OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef REMOTING_TEST_REMOTE_CONNECTION_OBSERVER_H_ | |
6 #define REMOTING_TEST_REMOTE_CONNECTION_OBSERVER_H_ | |
7 | |
8 #include <string> | |
9 | |
10 namespace remoting { | |
11 namespace test { | |
12 | |
13 // Interface for a remote connection observer which will be notified when | |
14 // certain connection status changes occur or events from the remote host | |
15 // are received. Observers must not tear-down the object they have registered | |
16 // while in a callback. The callbacks should be used for informational | |
17 // purposes only. | |
18 class RemoteConnectionObserver { | |
19 public: | |
20 RemoteConnectionObserver() {} | |
21 virtual ~RemoteConnectionObserver() {} | |
22 | |
23 // Called when the connection state has changed. | |
24 virtual void ConnectionStateChanged(protocol::ConnectionToHost::State state, | |
Sergey Ulanov
2015/03/11 00:09:51
please include headers that define protocol::Conne
joedow
2015/03/11 19:06:39
Done.
| |
25 protocol::ErrorCode error_code) {} | |
26 | |
27 // Called when the connection is ready to be used, |ready| will be true once | |
28 // the video channel has been established. | |
29 virtual void ConnectionReady(bool ready) {} | |
30 | |
31 // Called when a channel changes the type of route it is using. | |
32 virtual void RouteChanged(const std::string& channel_name, | |
33 const protocol::TransportRoute& route) {} | |
34 | |
35 // Called when the host sends its list of capabilities to the client. | |
36 virtual void CapabilitiesSet(const std::string& capabilities) {} | |
37 | |
38 // Called when a pairing response has been set. | |
39 virtual void PairingResponseSet( | |
40 const protocol::PairingResponse& pairing_response) {} | |
41 | |
42 // Called when we have received an ExtensionMessage from the host. | |
43 virtual void HostMessageReceived(const protocol::ExtensionMessage& message) {} | |
44 | |
45 private: | |
46 DISALLOW_COPY_AND_ASSIGN(RemoteConnectionObserver); | |
47 }; | |
48 | |
49 } // namespace test | |
50 } // namespace remoting | |
51 | |
52 #endif // REMOTING_TEST_REMOTE_CONNECTION_OBSERVER_H_ | |
OLD | NEW |