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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 // Called when state of the connection changes. | 66 // Called when state of the connection changes. |
67 virtual void OnConnectionState(State state, ErrorCode error) = 0; | 67 virtual void OnConnectionState(State state, ErrorCode error) = 0; |
68 | 68 |
69 // Called when ready state of the connection changes. When |ready| | 69 // Called when ready state of the connection changes. When |ready| |
70 // is set to false some data sent by the peers may be | 70 // is set to false some data sent by the peers may be |
71 // delayed. This is used to indicate in the UI when connection is | 71 // delayed. This is used to indicate in the UI when connection is |
72 // temporarily broken. | 72 // temporarily broken. |
73 virtual void OnConnectionReady(bool ready) = 0; | 73 virtual void OnConnectionReady(bool ready) = 0; |
74 }; | 74 }; |
75 | 75 |
76 ConnectionToHost(bool allow_nat_traversal); | 76 explicit ConnectionToHost(bool allow_nat_traversal); |
77 virtual ~ConnectionToHost(); | 77 virtual ~ConnectionToHost(); |
78 | 78 |
79 virtual void Connect(scoped_refptr<XmppProxy> xmpp_proxy, | 79 virtual void Connect(scoped_refptr<XmppProxy> xmpp_proxy, |
80 const std::string& local_jid, | 80 const std::string& local_jid, |
81 const std::string& host_jid, | 81 const std::string& host_jid, |
82 const std::string& host_public_key, | 82 const std::string& host_public_key, |
83 scoped_ptr<TransportFactory> transport_factory, | 83 scoped_ptr<TransportFactory> transport_factory, |
84 scoped_ptr<Authenticator> authenticator, | 84 scoped_ptr<Authenticator> authenticator, |
85 HostEventCallback* event_callback, | 85 HostEventCallback* event_callback, |
86 ClientStub* client_stub, | 86 ClientStub* client_stub, |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 std::set<std::string> not_ready_channels_; | 165 std::set<std::string> not_ready_channels_; |
166 | 166 |
167 private: | 167 private: |
168 DISALLOW_COPY_AND_ASSIGN(ConnectionToHost); | 168 DISALLOW_COPY_AND_ASSIGN(ConnectionToHost); |
169 }; | 169 }; |
170 | 170 |
171 } // namespace protocol | 171 } // namespace protocol |
172 } // namespace remoting | 172 } // namespace remoting |
173 | 173 |
174 #endif // REMOTING_PROTOCOL_CONNECTION_TO_HOST_H_ | 174 #endif // REMOTING_PROTOCOL_CONNECTION_TO_HOST_H_ |
OLD | NEW |