host_stub.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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
  3. // found in the LICENSE file.
  4. // Interface of a host that receives commands from a Chromoting client.
  5. //
  6. // This interface handles control messages defined in control.proto.
  7. #ifndef REMOTING_PROTOCOL_HOST_STUB_H_
  8. #define REMOTING_PROTOCOL_HOST_STUB_H_
  9. namespace remoting {
  10. namespace protocol {
  11. class AudioControl;
  12. class Capabilities;
  13. class ClientResolution;
  14. class ExtensionMessage;
  15. class PairingRequest;
  16. class PeerConnectionParameters;
  17. class SelectDesktopDisplayRequest;
  18. class VideoControl;
  19. class HostStub {
  20. public:
  21. HostStub() {}
  22. HostStub(const HostStub&) = delete;
  23. HostStub& operator=(const HostStub&) = delete;
  24. // Notification of the client dimensions and pixel density.
  25. // This may be used to resize the host display to match the client area.
  26. virtual void NotifyClientResolution(const ClientResolution& resolution) = 0;
  27. // Configures video update properties. Currently only pausing & resuming the
  28. // video channel is supported.
  29. virtual void ControlVideo(const VideoControl& video_control) = 0;
  30. // Configures audio properties. Currently only pausing & resuming the audio
  31. // channel is supported.
  32. virtual void ControlAudio(const AudioControl& audio_control) = 0;
  33. // Configures peer connection. This will have no effect if the host doesn't
  34. // support the parameters or the parameters are invalid.
  35. virtual void ControlPeerConnection(
  36. const PeerConnectionParameters& parameters) = 0;
  37. // Passes the set of capabilities supported by the client to the host.
  38. virtual void SetCapabilities(const Capabilities& capabilities) = 0;
  39. // Requests pairing between the host and client for PIN-less authentication.
  40. virtual void RequestPairing(const PairingRequest& pairing_request) = 0;
  41. // Deliver an extension message from the client to the host.
  42. virtual void DeliverClientMessage(const ExtensionMessage& message) = 0;
  43. // Select the specified host display.
  44. virtual void SelectDesktopDisplay(
  45. const SelectDesktopDisplayRequest& select_display) = 0;
  46. protected:
  47. virtual ~HostStub() {}
  48. };
  49. } // namespace protocol
  50. } // namespace remoting
  51. #endif // REMOTING_PROTOCOL_HOST_STUB_H_