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 <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 // Called when ready state of the connection changes. When |ready| | 70 // Called when ready state of the connection changes. When |ready| |
71 // is set to false some data sent by the peers may be | 71 // is set to false some data sent by the peers may be |
72 // delayed. This is used to indicate in the UI when connection is | 72 // delayed. This is used to indicate in the UI when connection is |
73 // temporarily broken. | 73 // temporarily broken. |
74 virtual void OnConnectionReady(bool ready) = 0; | 74 virtual void OnConnectionReady(bool ready) = 0; |
75 }; | 75 }; |
76 | 76 |
77 ConnectionToHost(bool allow_nat_traversal); | 77 ConnectionToHost(bool allow_nat_traversal); |
78 virtual ~ConnectionToHost(); | 78 virtual ~ConnectionToHost(); |
79 | 79 |
80 // |signal_strategy| must outlive connection. | 80 // |signal_strategy| must outlive connection. |audio_stub| may be |
| 81 // null, in which case audio will not be requested. |
81 virtual void Connect(SignalStrategy* signal_strategy, | 82 virtual void Connect(SignalStrategy* signal_strategy, |
82 const std::string& host_jid, | 83 const std::string& host_jid, |
83 const std::string& host_public_key, | 84 const std::string& host_public_key, |
84 scoped_ptr<TransportFactory> transport_factory, | 85 scoped_ptr<TransportFactory> transport_factory, |
85 scoped_ptr<Authenticator> authenticator, | 86 scoped_ptr<Authenticator> authenticator, |
86 HostEventCallback* event_callback, | 87 HostEventCallback* event_callback, |
87 ClientStub* client_stub, | 88 ClientStub* client_stub, |
88 ClipboardStub* clipboard_stub, | 89 ClipboardStub* clipboard_stub, |
89 VideoStub* video_stub, | 90 VideoStub* video_stub, |
90 AudioStub* audio_stub); | 91 AudioStub* audio_stub); |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 std::set<std::string> not_ready_channels_; | 165 std::set<std::string> not_ready_channels_; |
165 | 166 |
166 private: | 167 private: |
167 DISALLOW_COPY_AND_ASSIGN(ConnectionToHost); | 168 DISALLOW_COPY_AND_ASSIGN(ConnectionToHost); |
168 }; | 169 }; |
169 | 170 |
170 } // namespace protocol | 171 } // namespace protocol |
171 } // namespace remoting | 172 } // namespace remoting |
172 | 173 |
173 #endif // REMOTING_PROTOCOL_CONNECTION_TO_HOST_H_ | 174 #endif // REMOTING_PROTOCOL_CONNECTION_TO_HOST_H_ |
OLD | NEW |