1 // Copyright 2014 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.
5 #ifndef REMOTING_IOS_BRIDGE_HOST_PROXY_H_
6 #define REMOTING_IOS_BRIDGE_HOST_PROXY_H_
10 #include <objc/objc.h>
11 #include "base/memory/weak_ptr.h"
12 #include "remoting/protocol/connection_to_host.h"
13 #include "third_party/webrtc/modules/desktop_capture/desktop_frame.h"
16 @
class ClientProxyDelegateWrapper
;
18 class ClientProxyDelegateWrapper
;
23 // Proxies incoming common Chromoting protocol (HOST) to the UI Application
24 // (CLIENT). The HOST will have a Weak reference to call member functions on
26 class ClientProxy
: public base::SupportsWeakPtr
<ClientProxy
> {
28 ClientProxy(ClientProxyDelegateWrapper
* wrapper
);
30 // Notifies the user of the current connection status.
31 void ReportConnectionStatus(protocol::ConnectionToHost::State state
,
32 protocol::ErrorCode error
);
34 // Display a dialog box asking the user to enter a PIN.
35 void DisplayAuthenticationPrompt(bool pairing_supported
);
37 // Saves new pairing credentials to permanent storage.
38 void CommitPairingCredentials(const std::string
& hostId
,
39 const std::string
& pairId
,
40 const std::string
& pairSecret
);
42 // Delivers the latest image buffer for the canvas.
43 void RedrawCanvas(const webrtc::DesktopSize
& view_size
,
44 webrtc::DesktopFrame
* buffer
,
45 const webrtc::DesktopRegion
& region
);
48 void UpdateCursorShape(const protocol::CursorShapeInfo
& cursor_shape
);
51 // Pointer to the UI application which implements the ClientProxyDelegate.
52 // (id) is similar to a (void*) |delegate_| is set from accepting a
53 // strongly typed @interface which wraps the @protocol ClientProxyDelegate.
54 // see comments for host_proxy_delegate_wrapper.h
57 DISALLOW_COPY_AND_ASSIGN(ClientProxy
);
60 } // namespace remoting
62 #endif // REMOTING_IOS_BRIDGE_HOST_PROXY_H_