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#ifndef REMOTING_CLIENT_CLIENT_USER_INTERFACE_H_
6#define REMOTING_CLIENT_CLIENT_USER_INTERFACE_H_
7
8#include <string>
9
10#include "base/basictypes.h"
11#include "base/memory/scoped_ptr.h"
12#include "remoting/protocol/connection_to_host.h"
13#include "remoting/protocol/third_party_client_authenticator.h"
14
15namespace remoting {
16
17namespace protocol {
18class ClipboardStub;
19class CursorShapeStub;
20class PairingResponse;
21}  // namespace protocol
22
23// ClientUserInterface is an interface that must be implemented by
24// applications embedding the Chromoting client, to provide client's user
25// interface.
26//
27// TODO(sergeyu): Cleanup this interface, see crbug.com/138108 .
28class ClientUserInterface {
29 public:
30  virtual ~ClientUserInterface() {}
31
32  // Record the update the state of the connection, updating the UI as needed.
33  virtual void OnConnectionState(protocol::ConnectionToHost::State state,
34                                 protocol::ErrorCode error) = 0;
35  virtual void OnConnectionReady(bool ready) = 0;
36  virtual void OnRouteChanged(const std::string& channel_name,
37                              const protocol::TransportRoute& route) = 0;
38
39  // Passes the final set of capabilities negotiated between the client and host
40  // to the application.
41  virtual void SetCapabilities(const std::string& capabilities) = 0;
42
43  // Passes a pairing response message to the client.
44  virtual void SetPairingResponse(
45      const protocol::PairingResponse& pairing_response) = 0;
46
47  // Deliver an extension message from the host to the client.
48  virtual void DeliverHostMessage(
49      const protocol::ExtensionMessage& message) = 0;
50
51  // Get the view's ClipboardStub implementation.
52  virtual protocol::ClipboardStub* GetClipboardStub() = 0;
53
54  // Get the view's CursorShapeStub implementation.
55  virtual protocol::CursorShapeStub* GetCursorShapeStub() = 0;
56};
57
58}  // namespace remoting
59
60#endif  // REMOTING_CLIENT_CLIENT_USER_INTERFACE_H_
61