| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 // object is created. | 76 // object is created. |
| 77 virtual void SetEventHandler(EventHandler* event_handler) = 0; | 77 virtual void SetEventHandler(EventHandler* event_handler) = 0; |
| 78 | 78 |
| 79 // Returns the Session object for the connection. | 79 // Returns the Session object for the connection. |
| 80 // TODO(sergeyu): Remove this method. | 80 // TODO(sergeyu): Remove this method. |
| 81 virtual Session* session() = 0; | 81 virtual Session* session() = 0; |
| 82 | 82 |
| 83 // Disconnect the client connection. | 83 // Disconnect the client connection. |
| 84 virtual void Disconnect(ErrorCode error) = 0; | 84 virtual void Disconnect(ErrorCode error) = 0; |
| 85 | 85 |
| 86 // Callback for HostEventDispatcher to be called with a timestamp for each | |
| 87 // received event. | |
| 88 virtual void OnInputEventReceived(int64_t timestamp) = 0; | |
| 89 | |
| 90 // Start video stream that sends screen content from |desktop_capturer| to the | 86 // Start video stream that sends screen content from |desktop_capturer| to the |
| 91 // client. | 87 // client. |
| 92 virtual std::unique_ptr<VideoStream> StartVideoStream( | 88 virtual std::unique_ptr<VideoStream> StartVideoStream( |
| 93 std::unique_ptr<webrtc::DesktopCapturer> desktop_capturer) = 0; | 89 std::unique_ptr<webrtc::DesktopCapturer> desktop_capturer) = 0; |
| 94 | 90 |
| 95 // Starts an audio stream. Returns nullptr if audio is not supported by the | 91 // Starts an audio stream. Returns nullptr if audio is not supported by the |
| 96 // client. | 92 // client. |
| 97 virtual std::unique_ptr<AudioStream> StartAudioStream( | 93 virtual std::unique_ptr<AudioStream> StartAudioStream( |
| 98 std::unique_ptr<AudioSource> audio_source) = 0; | 94 std::unique_ptr<AudioSource> audio_source) = 0; |
| 99 | 95 |
| 100 // The client stubs used by the host to send control messages to the client. | 96 // The client stubs used by the host to send control messages to the client. |
| 101 // The stub must not be accessed before OnConnectionAuthenticated(), or | 97 // The stub must not be accessed before OnConnectionAuthenticated(), or |
| 102 // after OnConnectionClosed(). | 98 // after OnConnectionClosed(). |
| 103 virtual ClientStub* client_stub() = 0; | 99 virtual ClientStub* client_stub() = 0; |
| 104 | 100 |
| 105 // Set the stubs which will handle messages we receive from the client. These | 101 // Set the stubs which will handle messages we receive from the client. These |
| 106 // must be called in EventHandler::OnConnectionAuthenticated(). | 102 // must be called in EventHandler::OnConnectionAuthenticated(). |
| 107 virtual void set_clipboard_stub(ClipboardStub* clipboard_stub) = 0; | 103 virtual void set_clipboard_stub(ClipboardStub* clipboard_stub) = 0; |
| 108 virtual void set_host_stub(HostStub* host_stub) = 0; | 104 virtual void set_host_stub(HostStub* host_stub) = 0; |
| 109 virtual void set_input_stub(InputStub* input_stub) = 0; | 105 virtual void set_input_stub(InputStub* input_stub) = 0; |
| 110 }; | 106 }; |
| 111 | 107 |
| 112 } // namespace protocol | 108 } // namespace protocol |
| 113 } // namespace remoting | 109 } // namespace remoting |
| 114 | 110 |
| 115 #endif // REMOTING_PROTOCOL_CONNECTION_TO_CLIENT_H_ | 111 #endif // REMOTING_PROTOCOL_CONNECTION_TO_CLIENT_H_ |
| OLD | NEW |