Index: remoting/protocol/connection_to_host.h |
diff --git a/remoting/protocol/connection_to_host.h b/remoting/protocol/connection_to_host.h |
index 29bbb540f81b1b9391b70e1c6468f3d52fdb6c97..ec8ceb6cc0f57c7afd260dcb27304a9d3342a4bf 100644 |
--- a/remoting/protocol/connection_to_host.h |
+++ b/remoting/protocol/connection_to_host.h |
@@ -124,9 +124,16 @@ class ConnectionToHost : public SignalStrategy::StatusObserver, |
// Callback for |session_|. |
void OnSessionStateChange(Session::State state); |
+ // Callback for VideoReader::Init(). |
+ void OnVideoChannelInitialized(bool successful); |
+ |
+ void NotifyIfChannelsReady(); |
+ |
// Callback for |video_reader_|. |
void OnVideoPacket(VideoPacket* packet); |
+ void CloseOnError(); |
+ |
// Stops writing in the channels. |
void CloseChannels(); |
@@ -137,44 +144,36 @@ class ConnectionToHost : public SignalStrategy::StatusObserver, |
scoped_ptr<PortAllocatorSessionFactory> port_allocator_session_factory_; |
bool allow_nat_traversal_; |
- // Internal state of the connection. |
- State state_; |
+ std::string host_jid_; |
+ std::string host_public_key_; |
+ std::string access_code_; |
+ |
+ HostEventCallback* event_callback_; |
+ |
+ // Stub for incoming messages. |
+ ClientStub* client_stub_; |
+ VideoStub* video_stub_; |
scoped_ptr<SignalStrategy> signal_strategy_; |
std::string local_jid_; |
scoped_ptr<SessionManager> session_manager_; |
scoped_ptr<Session> session_; |
+ // Handlers for incoming messages. |
scoped_ptr<VideoReader> video_reader_; |
- |
- HostEventCallback* event_callback_; |
- |
- std::string host_jid_; |
- std::string host_public_key_; |
- std::string access_code_; |
- |
scoped_ptr<ClientMessageDispatcher> dispatcher_; |
- //////////////////////////////////////////////////////////////////////////// |
- // User input event channel interface |
- |
- // Stub for sending input event messages to the host. |
+ // Senders for outgoing messages. |
scoped_ptr<InputSender> input_sender_; |
- |
- //////////////////////////////////////////////////////////////////////////// |
- // Protocol control channel interface |
- |
- // Stub for sending control messages to the host. |
scoped_ptr<HostControlSender> host_control_sender_; |
- // Stub for receiving control messages from the host. |
- ClientStub* client_stub_; |
- |
- //////////////////////////////////////////////////////////////////////////// |
- // Video channel interface |
+ // Internal state of the connection. |
+ State state_; |
- // Stub for receiving video packets from the host. |
- VideoStub* video_stub_; |
+ // State of the channels. |
+ bool control_connected_; |
+ bool input_connected_; |
+ bool video_connected_; |
private: |
DISALLOW_COPY_AND_ASSIGN(ConnectionToHost); |