| 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 REMOTING_JINGLE_GLUE_JINGLE_CLIENT_H_ | 5 #ifndef REMOTING_JINGLE_GLUE_JINGLE_CLIENT_H_ |
| 6 #define REMOTING_JINGLE_GLUE_JINGLE_CLIENT_H_ | 6 #define REMOTING_JINGLE_GLUE_JINGLE_CLIENT_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/lock.h" | |
| 11 #include "base/ref_counted.h" | 10 #include "base/ref_counted.h" |
| 11 #include "base/synchronization/lock.h" |
| 12 #include "third_party/libjingle/source/talk/xmpp/xmppclient.h" | 12 #include "third_party/libjingle/source/talk/xmpp/xmppclient.h" |
| 13 | 13 |
| 14 class MessageLoop; | 14 class MessageLoop; |
| 15 class Task; | 15 class Task; |
| 16 | 16 |
| 17 namespace talk_base { | 17 namespace talk_base { |
| 18 class NetworkManager; | 18 class NetworkManager; |
| 19 } // namespace talk_base | 19 } // namespace talk_base |
| 20 | 20 |
| 21 namespace buzz { | 21 namespace buzz { |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 | 116 |
| 117 // JingleThread used for the connection. Set in the constructor. | 117 // JingleThread used for the connection. Set in the constructor. |
| 118 JingleThread* thread_; | 118 JingleThread* thread_; |
| 119 | 119 |
| 120 // Callback for this object. Callback must not be called if closed_ == true. | 120 // Callback for this object. Callback must not be called if closed_ == true. |
| 121 Callback* callback_; | 121 Callback* callback_; |
| 122 | 122 |
| 123 // The XmppClient and its state and jid. | 123 // The XmppClient and its state and jid. |
| 124 buzz::XmppClient* client_; | 124 buzz::XmppClient* client_; |
| 125 State state_; | 125 State state_; |
| 126 Lock full_jid_lock_; | 126 base::Lock full_jid_lock_; |
| 127 std::string full_jid_; | 127 std::string full_jid_; |
| 128 | 128 |
| 129 // Current state of the object. | 129 // Current state of the object. |
| 130 Lock state_lock_; // Must be locked when accessing initialized_ or closed_. | 130 // Must be locked when accessing initialized_ or closed_. |
| 131 base::Lock state_lock_; |
| 131 bool initialized_; | 132 bool initialized_; |
| 132 bool closed_; | 133 bool closed_; |
| 133 scoped_ptr<Task> closed_task_; | 134 scoped_ptr<Task> closed_task_; |
| 134 | 135 |
| 135 scoped_ptr<talk_base::NetworkManager> network_manager_; | 136 scoped_ptr<talk_base::NetworkManager> network_manager_; |
| 136 scoped_ptr<cricket::BasicPortAllocator> port_allocator_; | 137 scoped_ptr<cricket::BasicPortAllocator> port_allocator_; |
| 137 scoped_ptr<cricket::SessionManager> session_manager_; | 138 scoped_ptr<cricket::SessionManager> session_manager_; |
| 138 | 139 |
| 139 DISALLOW_COPY_AND_ASSIGN(JingleClient); | 140 DISALLOW_COPY_AND_ASSIGN(JingleClient); |
| 140 }; | 141 }; |
| 141 | 142 |
| 142 } // namespace remoting | 143 } // namespace remoting |
| 143 | 144 |
| 144 #endif // REMOTING_JINGLE_GLUE_JINGLE_CLIENT_H_ | 145 #endif // REMOTING_JINGLE_GLUE_JINGLE_CLIENT_H_ |
| OLD | NEW |