| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef JINGLE_NOTIFIER_COMMUNICATOR_LOGIN_H_ | 5 #ifndef JINGLE_NOTIFIER_COMMUNICATOR_LOGIN_H_ |
| 6 #define JINGLE_NOTIFIER_COMMUNICATOR_LOGIN_H_ | 6 #define JINGLE_NOTIFIER_COMMUNICATOR_LOGIN_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/scoped_ptr.h" | 10 #include "base/scoped_ptr.h" |
| 11 #include "base/time.h" | 11 #include "base/time.h" |
| 12 #include "base/timer.h" | 12 #include "base/timer.h" |
| 13 #include "base/weak_ptr.h" | 13 #include "base/weak_ptr.h" |
| 14 #include "jingle/notifier/communicator/single_login_attempt.h" | 14 #include "jingle/notifier/communicator/single_login_attempt.h" |
| 15 #include "net/base/network_change_notifier.h" | 15 #include "net/base/network_change_notifier.h" |
| 16 #include "talk/xmpp/xmppengine.h" | 16 #include "talk/xmpp/xmppengine.h" |
| 17 | 17 |
| 18 namespace buzz { | 18 namespace buzz { |
| 19 class XmppClient; | 19 class XmppClient; |
| 20 class XmppEngine; | 20 class XmppEngine; |
| 21 class XmppClientSettings; | 21 class XmppClientSettings; |
| 22 } // namespace buzz | 22 } // namespace buzz |
| 23 | 23 |
| 24 namespace net { | 24 namespace net { |
| 25 class CertVerifier; |
| 25 class HostResolver; | 26 class HostResolver; |
| 26 } // namespace net | 27 } // namespace net |
| 27 | 28 |
| 28 namespace talk_base { | 29 namespace talk_base { |
| 29 class Task; | 30 class Task; |
| 30 class TaskParent; | 31 class TaskParent; |
| 31 } // namespace talk_base | 32 } // namespace talk_base |
| 32 | 33 |
| 33 namespace notifier { | 34 namespace notifier { |
| 34 | 35 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 47 public SingleLoginAttemptDelegate { | 48 public SingleLoginAttemptDelegate { |
| 48 public: | 49 public: |
| 49 class Delegate { | 50 class Delegate { |
| 50 public: | 51 public: |
| 51 virtual ~Delegate() {} | 52 virtual ~Delegate() {} |
| 52 | 53 |
| 53 virtual void OnConnect(base::WeakPtr<talk_base::Task> base_task) = 0; | 54 virtual void OnConnect(base::WeakPtr<talk_base::Task> base_task) = 0; |
| 54 virtual void OnDisconnect() = 0; | 55 virtual void OnDisconnect() = 0; |
| 55 }; | 56 }; |
| 56 | 57 |
| 57 // Does not take ownership of |delegate|, |host_resolver|, or | 58 // Does not take ownership of |delegate|, |host_resolver|, |cert_verifier|, |
| 58 // |server_list|, none of which may be NULL. | 59 // or |server_list|, none of which may be NULL. |
| 59 Login(Delegate* delegate, | 60 Login(Delegate* delegate, |
| 60 const buzz::XmppClientSettings& user_settings, | 61 const buzz::XmppClientSettings& user_settings, |
| 61 const ConnectionOptions& options, | 62 const ConnectionOptions& options, |
| 62 net::HostResolver* host_resolver, | 63 net::HostResolver* host_resolver, |
| 64 net::CertVerifier* cert_verifier, |
| 63 ServerInformation* server_list, | 65 ServerInformation* server_list, |
| 64 int server_count, | 66 int server_count, |
| 65 bool try_ssltcp_first); | 67 bool try_ssltcp_first); |
| 66 virtual ~Login(); | 68 virtual ~Login(); |
| 67 | 69 |
| 68 void StartConnection(); | 70 void StartConnection(); |
| 69 | 71 |
| 70 // net::NetworkChangeNotifier::Observer implementation. | 72 // net::NetworkChangeNotifier::Observer implementation. |
| 71 virtual void OnIPAddressChanged(); | 73 virtual void OnIPAddressChanged(); |
| 72 | 74 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 103 base::Time redirect_time_; | 105 base::Time redirect_time_; |
| 104 std::string redirect_server_; | 106 std::string redirect_server_; |
| 105 int redirect_port_; | 107 int redirect_port_; |
| 106 | 108 |
| 107 DISALLOW_COPY_AND_ASSIGN(Login); | 109 DISALLOW_COPY_AND_ASSIGN(Login); |
| 108 }; | 110 }; |
| 109 | 111 |
| 110 } // namespace notifier | 112 } // namespace notifier |
| 111 | 113 |
| 112 #endif // JINGLE_NOTIFIER_COMMUNICATOR_LOGIN_H_ | 114 #endif // JINGLE_NOTIFIER_COMMUNICATOR_LOGIN_H_ |
| OLD | NEW |