Chromium Code Reviews| 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 // Interface of a host that receives commands from a Chromoting client. | 5 // Interface of a host that receives commands from a Chromoting client. |
| 6 // | 6 // |
| 7 // This interface handles control messages defined in control.proto. | 7 // This interface handles control messages defined in control.proto. |
| 8 | 8 |
| 9 #ifndef REMOTING_PROTOCOL_HOST_STUB_H_ | 9 #ifndef REMOTING_PROTOCOL_HOST_STUB_H_ |
| 10 #define REMOTING_PROTOCOL_HOST_STUB_H_ | 10 #define REMOTING_PROTOCOL_HOST_STUB_H_ |
| 11 | 11 |
| 12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 13 | 13 |
| 14 namespace remoting { | 14 namespace remoting { |
| 15 namespace protocol { | 15 namespace protocol { |
| 16 | 16 |
| 17 class AudioControl; | 17 class AudioControl; |
| 18 class Capabilities; | 18 class Capabilities; |
| 19 class ClientResolution; | 19 class ClientResolution; |
| 20 class JsonMessage; | |
| 20 class PairingResponse; | 21 class PairingResponse; |
| 21 class PairingRequest; | 22 class PairingRequest; |
| 22 class VideoControl; | 23 class VideoControl; |
| 23 | 24 |
| 24 class HostStub { | 25 class HostStub { |
| 25 public: | 26 public: |
| 26 HostStub() {} | 27 HostStub() {} |
| 27 | 28 |
| 28 // Notification of the client dimensions and pixel density. | 29 // Notification of the client dimensions and pixel density. |
| 29 // This may be used to resize the host display to match the client area. | 30 // This may be used to resize the host display to match the client area. |
| 30 virtual void NotifyClientResolution(const ClientResolution& resolution) = 0; | 31 virtual void NotifyClientResolution(const ClientResolution& resolution) = 0; |
| 31 | 32 |
| 32 // Configures video update properties. Currently only pausing & resuming the | 33 // Configures video update properties. Currently only pausing & resuming the |
| 33 // video channel is supported. | 34 // video channel is supported. |
| 34 virtual void ControlVideo(const VideoControl& video_control) = 0; | 35 virtual void ControlVideo(const VideoControl& video_control) = 0; |
| 35 | 36 |
| 36 // Configures audio properties. Currently only pausing & resuming the audio | 37 // Configures audio properties. Currently only pausing & resuming the audio |
| 37 // channel is supported. | 38 // channel is supported. |
| 38 virtual void ControlAudio(const AudioControl& audio_control) = 0; | 39 virtual void ControlAudio(const AudioControl& audio_control) = 0; |
| 39 | 40 |
| 40 // Passes the set of capabilities supported by the client to the host. | 41 // Passes the set of capabilities supported by the client to the host. |
| 41 virtual void SetCapabilities(const Capabilities& capabilities) = 0; | 42 virtual void SetCapabilities(const Capabilities& capabilities) = 0; |
| 42 | 43 |
| 43 // Requests pairing between the host and client for PIN-less authentication. | 44 // Requests pairing between the host and client for PIN-less authentication. |
| 44 virtual void RequestPairing(const PairingRequest& pairing_request) = 0; | 45 virtual void RequestPairing(const PairingRequest& pairing_request) = 0; |
| 45 | 46 |
| 47 // Send a JSON message from the client to the host. | |
| 48 virtual void ProcessClientJson(const JsonMessage& message) = 0; | |
|
Wez
2013/08/09 21:25:48
See comments on ClientStub
Jamie
2013/08/09 21:39:06
See my reply on ClientStub :)
| |
| 49 | |
| 46 protected: | 50 protected: |
| 47 virtual ~HostStub() {} | 51 virtual ~HostStub() {} |
| 48 | 52 |
| 49 private: | 53 private: |
| 50 DISALLOW_COPY_AND_ASSIGN(HostStub); | 54 DISALLOW_COPY_AND_ASSIGN(HostStub); |
| 51 }; | 55 }; |
| 52 | 56 |
| 53 } // namespace protocol | 57 } // namespace protocol |
| 54 } // namespace remoting | 58 } // namespace remoting |
| 55 | 59 |
| 56 #endif // REMOTING_PROTOCOL_HOST_STUB_H_ | 60 #endif // REMOTING_PROTOCOL_HOST_STUB_H_ |
| OLD | NEW |