| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/callback_forward.h" | 10 #include "base/callback_forward.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 AudioReader; |
| 35 class AudioStub; |
| 34 class Authenticator; | 36 class Authenticator; |
| 35 class ClientControlDispatcher; | 37 class ClientControlDispatcher; |
| 36 class ClientEventDispatcher; | 38 class ClientEventDispatcher; |
| 37 class ClientStub; | 39 class ClientStub; |
| 38 class ClipboardStub; | 40 class ClipboardStub; |
| 39 class HostStub; | 41 class HostStub; |
| 40 class InputStub; | 42 class InputStub; |
| 41 class SessionConfig; | 43 class SessionConfig; |
| 42 class TransportFactory; | 44 class TransportFactory; |
| 43 class VideoReader; | 45 class VideoReader; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 67 | 69 |
| 68 virtual void Connect(scoped_refptr<XmppProxy> xmpp_proxy, | 70 virtual void Connect(scoped_refptr<XmppProxy> xmpp_proxy, |
| 69 const std::string& local_jid, | 71 const std::string& local_jid, |
| 70 const std::string& host_jid, | 72 const std::string& host_jid, |
| 71 const std::string& host_public_key, | 73 const std::string& host_public_key, |
| 72 scoped_ptr<TransportFactory> transport_factory, | 74 scoped_ptr<TransportFactory> transport_factory, |
| 73 scoped_ptr<Authenticator> authenticator, | 75 scoped_ptr<Authenticator> authenticator, |
| 74 HostEventCallback* event_callback, | 76 HostEventCallback* event_callback, |
| 75 ClientStub* client_stub, | 77 ClientStub* client_stub, |
| 76 ClipboardStub* clipboard_stub, | 78 ClipboardStub* clipboard_stub, |
| 77 VideoStub* video_stub); | 79 VideoStub* video_stub, |
| 80 AudioStub* audio_stub); |
| 78 | 81 |
| 79 virtual void Disconnect(const base::Closure& shutdown_task); | 82 virtual void Disconnect(const base::Closure& shutdown_task); |
| 80 | 83 |
| 81 virtual const SessionConfig& config(); | 84 virtual const SessionConfig& config(); |
| 82 | 85 |
| 83 // Stubs for sending data to the host. | 86 // Stubs for sending data to the host. |
| 84 virtual ClipboardStub* clipboard_stub(); | 87 virtual ClipboardStub* clipboard_stub(); |
| 85 virtual HostStub* host_stub(); | 88 virtual HostStub* host_stub(); |
| 86 virtual InputStub* input_stub(); | 89 virtual InputStub* input_stub(); |
| 87 | 90 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 110 | 113 |
| 111 void NotifyIfChannelsReady(); | 114 void NotifyIfChannelsReady(); |
| 112 | 115 |
| 113 void CloseOnError(ErrorCode error); | 116 void CloseOnError(ErrorCode error); |
| 114 | 117 |
| 115 // Stops writing in the channels. | 118 // Stops writing in the channels. |
| 116 void CloseChannels(); | 119 void CloseChannels(); |
| 117 | 120 |
| 118 void SetState(State state, ErrorCode error); | 121 void SetState(State state, ErrorCode error); |
| 119 | 122 |
| 123 bool AudioEnabled(); |
| 124 |
| 120 bool allow_nat_traversal_; | 125 bool allow_nat_traversal_; |
| 121 | 126 |
| 122 std::string host_jid_; | 127 std::string host_jid_; |
| 123 std::string host_public_key_; | 128 std::string host_public_key_; |
| 124 scoped_ptr<Authenticator> authenticator_; | 129 scoped_ptr<Authenticator> authenticator_; |
| 125 | 130 |
| 126 HostEventCallback* event_callback_; | 131 HostEventCallback* event_callback_; |
| 127 | 132 |
| 128 // Stub for incoming messages. | 133 // Stub for incoming messages. |
| 129 ClientStub* client_stub_; | 134 ClientStub* client_stub_; |
| 130 ClipboardStub* clipboard_stub_; | 135 ClipboardStub* clipboard_stub_; |
| 131 VideoStub* video_stub_; | 136 VideoStub* video_stub_; |
| 137 AudioStub* audio_stub_; |
| 132 | 138 |
| 133 scoped_ptr<SignalStrategy> signal_strategy_; | 139 scoped_ptr<SignalStrategy> signal_strategy_; |
| 134 scoped_ptr<SessionManager> session_manager_; | 140 scoped_ptr<SessionManager> session_manager_; |
| 135 scoped_ptr<Session> session_; | 141 scoped_ptr<Session> session_; |
| 136 | 142 |
| 137 scoped_ptr<VideoReader> video_reader_; | 143 scoped_ptr<VideoReader> video_reader_; |
| 144 scoped_ptr<AudioReader> audio_reader_; |
| 138 scoped_ptr<ClientControlDispatcher> control_dispatcher_; | 145 scoped_ptr<ClientControlDispatcher> control_dispatcher_; |
| 139 scoped_ptr<ClientEventDispatcher> event_dispatcher_; | 146 scoped_ptr<ClientEventDispatcher> event_dispatcher_; |
| 140 ClipboardFilter clipboard_forwarder_; | 147 ClipboardFilter clipboard_forwarder_; |
| 141 InputFilter event_forwarder_; | 148 InputFilter event_forwarder_; |
| 142 | 149 |
| 143 // Internal state of the connection. | 150 // Internal state of the connection. |
| 144 State state_; | 151 State state_; |
| 145 ErrorCode error_; | 152 ErrorCode error_; |
| 146 | 153 |
| 147 private: | 154 private: |
| 148 DISALLOW_COPY_AND_ASSIGN(ConnectionToHost); | 155 DISALLOW_COPY_AND_ASSIGN(ConnectionToHost); |
| 149 }; | 156 }; |
| 150 | 157 |
| 151 } // namespace protocol | 158 } // namespace protocol |
| 152 } // namespace remoting | 159 } // namespace remoting |
| 153 | 160 |
| 154 #endif // REMOTING_PROTOCOL_CONNECTION_TO_HOST_H_ | 161 #endif // REMOTING_PROTOCOL_CONNECTION_TO_HOST_H_ |
| OLD | NEW |