| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/memory/ref_counted.h" |
| 10 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 11 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
| 12 #include "base/time.h" | 13 #include "base/time.h" |
| 13 #include "base/timer.h" | 14 #include "base/timer.h" |
| 14 #include "jingle/notifier/base/server_information.h" | 15 #include "jingle/notifier/base/server_information.h" |
| 15 #include "jingle/notifier/communicator/single_login_attempt.h" | 16 #include "jingle/notifier/communicator/single_login_attempt.h" |
| 16 #include "net/base/network_change_notifier.h" | 17 #include "net/base/network_change_notifier.h" |
| 17 #include "talk/xmpp/xmppengine.h" | 18 #include "talk/xmpp/xmppengine.h" |
| 18 | 19 |
| 19 namespace buzz { | 20 namespace buzz { |
| 20 class XmppClient; | 21 class XmppClient; |
| 21 class XmppEngine; | 22 class XmppEngine; |
| 22 class XmppClientSettings; | 23 class XmppClientSettings; |
| 23 } // namespace buzz | 24 } // namespace buzz |
| 24 | 25 |
| 25 namespace net { | 26 namespace net { |
| 26 class CertVerifier; | 27 class URLRequestContextGetter; |
| 27 class HostResolver; | |
| 28 } // namespace net | 28 } // namespace net |
| 29 | 29 |
| 30 namespace talk_base { | 30 namespace talk_base { |
| 31 class Task; | 31 class Task; |
| 32 class TaskParent; | 32 class TaskParent; |
| 33 } // namespace talk_base | 33 } // namespace talk_base |
| 34 | 34 |
| 35 namespace notifier { | 35 namespace notifier { |
| 36 | 36 |
| 37 class ConnectionOptions; | 37 class ConnectionOptions; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 53 | 53 |
| 54 virtual void OnConnect(base::WeakPtr<talk_base::Task> base_task) = 0; | 54 virtual void OnConnect(base::WeakPtr<talk_base::Task> base_task) = 0; |
| 55 virtual void OnDisconnect() = 0; | 55 virtual void OnDisconnect() = 0; |
| 56 }; | 56 }; |
| 57 | 57 |
| 58 // Does not take ownership of |delegate|, |host_resolver|, |cert_verifier|, | 58 // Does not take ownership of |delegate|, |host_resolver|, |cert_verifier|, |
| 59 // or |server_list|, none of which may be NULL. | 59 // or |server_list|, none of which may be NULL. |
| 60 Login(Delegate* delegate, | 60 Login(Delegate* delegate, |
| 61 const buzz::XmppClientSettings& user_settings, | 61 const buzz::XmppClientSettings& user_settings, |
| 62 const ConnectionOptions& options, | 62 const ConnectionOptions& options, |
| 63 net::HostResolver* host_resolver, | 63 const scoped_refptr<net::URLRequestContextGetter>& |
| 64 net::CertVerifier* cert_verifier, | 64 request_context_getter, |
| 65 const ServerList& servers, | 65 const ServerList& servers, |
| 66 bool try_ssltcp_first, | 66 bool try_ssltcp_first, |
| 67 const std::string& auth_mechanism); | 67 const std::string& auth_mechanism); |
| 68 virtual ~Login(); | 68 virtual ~Login(); |
| 69 | 69 |
| 70 void StartConnection(); | 70 void StartConnection(); |
| 71 // The updated settings only take effect the next time StartConnection | 71 // The updated settings only take effect the next time StartConnection |
| 72 // is called. | 72 // is called. |
| 73 void UpdateXmppSettings(const buzz::XmppClientSettings& user_settings); | 73 void UpdateXmppSettings(const buzz::XmppClientSettings& user_settings); |
| 74 | 74 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 DISALLOW_COPY_AND_ASSIGN(Login); | 112 DISALLOW_COPY_AND_ASSIGN(Login); |
| 113 }; | 113 }; |
| 114 | 114 |
| 115 // Workaround for MSVS 2005 bug that fails to handle inheritance from a nested | 115 // Workaround for MSVS 2005 bug that fails to handle inheritance from a nested |
| 116 // class properly if it comes directly on a base class list. | 116 // class properly if it comes directly on a base class list. |
| 117 typedef Login::Delegate LoginDelegate; | 117 typedef Login::Delegate LoginDelegate; |
| 118 | 118 |
| 119 } // namespace notifier | 119 } // namespace notifier |
| 120 | 120 |
| 121 #endif // JINGLE_NOTIFIER_COMMUNICATOR_LOGIN_H_ | 121 #endif // JINGLE_NOTIFIER_COMMUNICATOR_LOGIN_H_ |
| OLD | NEW |