Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / remoting / test / remote_connection_observer.h
blob99da8be2fd51c760feb4685e2fc6b7727e643cb3
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.
5 #ifndef REMOTING_TEST_REMOTE_CONNECTION_OBSERVER_H_
6 #define REMOTING_TEST_REMOTE_CONNECTION_OBSERVER_H_
8 #include <string>
10 #include "remoting/proto/control.pb.h"
11 #include "remoting/protocol/connection_to_host.h"
12 #include "remoting/protocol/errors.h"
13 #include "remoting/protocol/transport.h"
15 namespace remoting {
16 namespace test {
18 // Interface for a remote connection observer which will be notified when
19 // certain connection status changes occur or events from the remote host
20 // are received. Observers must not tear-down the object they have registered
21 // while in a callback. The callbacks should be used for informational
22 // purposes only.
23 class RemoteConnectionObserver {
24 public:
25 RemoteConnectionObserver() {}
26 virtual ~RemoteConnectionObserver() {}
28 // Called when the connection state has changed.
29 virtual void ConnectionStateChanged(protocol::ConnectionToHost::State state,
30 protocol::ErrorCode error_code) {}
32 // Called when the connection is ready to be used, |ready| will be true once
33 // the video channel has been established.
34 virtual void ConnectionReady(bool ready) {}
36 // Called when a channel changes the type of route it is using.
37 virtual void RouteChanged(const std::string& channel_name,
38 const protocol::TransportRoute& route) {}
40 // Called when the host sends its list of capabilities to the client.
41 virtual void CapabilitiesSet(const std::string& capabilities) {}
43 // Called when a pairing response has been set.
44 virtual void PairingResponseSet(
45 const protocol::PairingResponse& pairing_response) {}
47 // Called when we have received an ExtensionMessage from the host.
48 virtual void HostMessageReceived(const protocol::ExtensionMessage& message) {}
50 private:
51 DISALLOW_COPY_AND_ASSIGN(RemoteConnectionObserver);
54 } // namespace test
55 } // namespace remoting
57 #endif // REMOTING_TEST_REMOTE_CONNECTION_OBSERVER_H_