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