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 #ifndef REMOTING_PROTOCOL_CONNECTION_TO_CLIENT_H_ | 5 #ifndef REMOTING_PROTOCOL_CONNECTION_TO_CLIENT_H_ |
6 #define REMOTING_PROTOCOL_CONNECTION_TO_CLIENT_H_ | 6 #define REMOTING_PROTOCOL_CONNECTION_TO_CLIENT_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 | 77 |
78 // Disconnect the client connection. | 78 // Disconnect the client connection. |
79 virtual void Disconnect(ErrorCode error) = 0; | 79 virtual void Disconnect(ErrorCode error) = 0; |
80 | 80 |
81 // Callback for HostEventDispatcher to be called with a timestamp for each | 81 // Callback for HostEventDispatcher to be called with a timestamp for each |
82 // received event. | 82 // received event. |
83 virtual void OnInputEventReceived(int64_t timestamp) = 0; | 83 virtual void OnInputEventReceived(int64_t timestamp) = 0; |
84 | 84 |
85 // Start video stream that sends screen content from |desktop_capturer| to the | 85 // Start video stream that sends screen content from |desktop_capturer| to the |
86 // client. | 86 // client. |
87 virtual scoped_ptr<VideoStream> StartVideoStream( | 87 virtual std::unique_ptr<VideoStream> StartVideoStream( |
88 scoped_ptr<webrtc::DesktopCapturer> desktop_capturer) = 0; | 88 std::unique_ptr<webrtc::DesktopCapturer> desktop_capturer) = 0; |
89 | 89 |
90 // Get the stubs used by the host to transmit messages to the client. | 90 // Get the stubs used by the host to transmit messages to the client. |
91 // The stubs must not be accessed before OnConnectionAuthenticated(), or | 91 // The stubs must not be accessed before OnConnectionAuthenticated(), or |
92 // after OnConnectionClosed(). | 92 // after OnConnectionClosed(). |
93 // Note that the audio stub will be nullptr if audio is not enabled. | 93 // Note that the audio stub will be nullptr if audio is not enabled. |
94 virtual AudioStub* audio_stub() = 0; | 94 virtual AudioStub* audio_stub() = 0; |
95 virtual ClientStub* client_stub() = 0; | 95 virtual ClientStub* client_stub() = 0; |
96 | 96 |
97 // Set the stubs which will handle messages we receive from the client. These | 97 // Set the stubs which will handle messages we receive from the client. These |
98 // must be called in EventHandler::OnConnectionAuthenticated(). | 98 // must be called in EventHandler::OnConnectionAuthenticated(). |
99 virtual void set_clipboard_stub(ClipboardStub* clipboard_stub) = 0; | 99 virtual void set_clipboard_stub(ClipboardStub* clipboard_stub) = 0; |
100 virtual void set_host_stub(HostStub* host_stub) = 0; | 100 virtual void set_host_stub(HostStub* host_stub) = 0; |
101 virtual void set_input_stub(InputStub* input_stub) = 0; | 101 virtual void set_input_stub(InputStub* input_stub) = 0; |
102 }; | 102 }; |
103 | 103 |
104 } // namespace protocol | 104 } // namespace protocol |
105 } // namespace remoting | 105 } // namespace remoting |
106 | 106 |
107 #endif // REMOTING_PROTOCOL_CONNECTION_TO_CLIENT_H_ | 107 #endif // REMOTING_PROTOCOL_CONNECTION_TO_CLIENT_H_ |
OLD | NEW |