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 REMOTING_PROTOCOL_CONNECTION_TO_HOST_H_ | 5 #ifndef REMOTING_PROTOCOL_CONNECTION_TO_HOST_H_ |
6 #define REMOTING_PROTOCOL_CONNECTION_TO_HOST_H_ | 6 #define REMOTING_PROTOCOL_CONNECTION_TO_HOST_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 class Instance; | 24 class Instance; |
25 } // namespace pp | 25 } // namespace pp |
26 | 26 |
27 namespace remoting { | 27 namespace remoting { |
28 | 28 |
29 class XmppProxy; | 29 class XmppProxy; |
30 class VideoPacket; | 30 class VideoPacket; |
31 | 31 |
32 namespace protocol { | 32 namespace protocol { |
33 | 33 |
34 class ClientMessageDispatcher; | 34 class ClientControlDispatcher; |
| 35 class ClientInputDispatcher; |
35 class ClientStub; | 36 class ClientStub; |
36 class HostControlSender; | |
37 class HostStub; | 37 class HostStub; |
38 class InputSender; | |
39 class InputStub; | 38 class InputStub; |
40 class SessionConfig; | 39 class SessionConfig; |
41 class VideoReader; | 40 class VideoReader; |
42 class VideoStub; | 41 class VideoStub; |
43 | 42 |
44 class ConnectionToHost : public SignalStrategy::StatusObserver, | 43 class ConnectionToHost : public SignalStrategy::StatusObserver, |
45 public SessionManager::Listener { | 44 public SessionManager::Listener { |
46 public: | 45 public: |
47 enum State { | 46 enum State { |
48 CONNECTING, | 47 CONNECTING, |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 | 144 |
146 // Stub for incoming messages. | 145 // Stub for incoming messages. |
147 ClientStub* client_stub_; | 146 ClientStub* client_stub_; |
148 VideoStub* video_stub_; | 147 VideoStub* video_stub_; |
149 | 148 |
150 scoped_ptr<SignalStrategy> signal_strategy_; | 149 scoped_ptr<SignalStrategy> signal_strategy_; |
151 std::string local_jid_; | 150 std::string local_jid_; |
152 scoped_ptr<SessionManager> session_manager_; | 151 scoped_ptr<SessionManager> session_manager_; |
153 scoped_ptr<Session> session_; | 152 scoped_ptr<Session> session_; |
154 | 153 |
155 // Handlers for incoming messages. | |
156 scoped_ptr<VideoReader> video_reader_; | 154 scoped_ptr<VideoReader> video_reader_; |
157 scoped_ptr<ClientMessageDispatcher> dispatcher_; | 155 scoped_ptr<ClientControlDispatcher> control_dispatcher_; |
158 | 156 scoped_ptr<ClientInputDispatcher> input_dispatcher_; |
159 // Senders for outgoing messages. | |
160 scoped_ptr<InputSender> input_sender_; | |
161 scoped_ptr<HostControlSender> host_control_sender_; | |
162 | 157 |
163 // Internal state of the connection. | 158 // Internal state of the connection. |
164 State state_; | 159 State state_; |
165 Error error_; | 160 Error error_; |
166 | 161 |
167 // State of the channels. | 162 // State of the channels. |
168 bool control_connected_; | 163 bool control_connected_; |
169 bool input_connected_; | 164 bool input_connected_; |
170 bool video_connected_; | 165 bool video_connected_; |
171 | 166 |
172 private: | 167 private: |
173 DISALLOW_COPY_AND_ASSIGN(ConnectionToHost); | 168 DISALLOW_COPY_AND_ASSIGN(ConnectionToHost); |
174 }; | 169 }; |
175 | 170 |
176 } // namespace protocol | 171 } // namespace protocol |
177 } // namespace remoting | 172 } // namespace remoting |
178 | 173 |
179 #endif // REMOTING_PROTOCOL_CONNECTION_TO_HOST_H_ | 174 #endif // REMOTING_PROTOCOL_CONNECTION_TO_HOST_H_ |
OLD | NEW |