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 Capabilities; | 18 class Capabilities; |
| 18 class ClientResolution; | 19 class ClientResolution; |
| 20 class PairingReply; | |
| 21 class PairingRequest; | |
| 19 class VideoControl; | 22 class VideoControl; |
| 20 class AudioControl; | |
| 21 | 23 |
| 22 class HostStub { | 24 class HostStub { |
| 23 public: | 25 public: |
| 24 HostStub() {} | 26 HostStub() {} |
| 25 | 27 |
| 26 // Notification of the client dimensions and pixel density. | 28 // Notification of the client dimensions and pixel density. |
| 27 // This may be used to resize the host display to match the client area. | 29 // This may be used to resize the host display to match the client area. |
| 28 virtual void NotifyClientResolution(const ClientResolution& resolution) = 0; | 30 virtual void NotifyClientResolution(const ClientResolution& resolution) = 0; |
| 29 | 31 |
| 30 // Configures video update properties. Currently only pausing & resuming the | 32 // Configures video update properties. Currently only pausing & resuming the |
| 31 // video channel is supported. | 33 // video channel is supported. |
| 32 virtual void ControlVideo(const VideoControl& video_control) = 0; | 34 virtual void ControlVideo(const VideoControl& video_control) = 0; |
| 33 | 35 |
| 34 // Configures audio properties. Currently only pausing & resuming the audio | 36 // Configures audio properties. Currently only pausing & resuming the audio |
| 35 // channel is supported. | 37 // channel is supported. |
| 36 virtual void ControlAudio(const AudioControl& audio_control) = 0; | 38 virtual void ControlAudio(const AudioControl& audio_control) = 0; |
| 37 | 39 |
| 38 // Passes the set of capabilities supported by the client to the host. | 40 // Passes the set of capabilities supported by the client to the host. |
| 39 virtual void SetCapabilities(const Capabilities& capabilities) = 0; | 41 virtual void SetCapabilities(const Capabilities& capabilities) = 0; |
| 40 | 42 |
| 43 // Requests pairing between the host and client for PIN-less authentication. | |
| 44 // TODO(jamiewalch): Make this pure virtual once the PIN-less authentication | |
| 45 // implementation CLs have landed. | |
|
Jamie
2013/05/09 01:37:41
I can make this pure virtual, but it means this CL
rmsousa
2013/05/09 03:55:02
Leaving it blank is fine for now. Same for the equ
| |
| 46 virtual void RequestPairing( | |
| 47 const PairingRequest& pairing_request, | |
| 48 const base::Callback<void(const PairingReply&)>& callback) {} | |
| 49 | |
| 41 protected: | 50 protected: |
| 42 virtual ~HostStub() {} | 51 virtual ~HostStub() {} |
| 43 | 52 |
| 44 private: | 53 private: |
| 45 DISALLOW_COPY_AND_ASSIGN(HostStub); | 54 DISALLOW_COPY_AND_ASSIGN(HostStub); |
| 46 }; | 55 }; |
| 47 | 56 |
| 48 } // namespace protocol | 57 } // namespace protocol |
| 49 } // namespace remoting | 58 } // namespace remoting |
| 50 | 59 |
| 51 #endif // REMOTING_PROTOCOL_HOST_STUB_H_ | 60 #endif // REMOTING_PROTOCOL_HOST_STUB_H_ |
| OLD | NEW |