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 23 matching lines...) Expand all Loading... |
34 class ConnectionToClient { | 34 class ConnectionToClient { |
35 public: | 35 public: |
36 class EventHandler { | 36 class EventHandler { |
37 public: | 37 public: |
38 // Called when the network connection is authenticating | 38 // Called when the network connection is authenticating |
39 virtual void OnConnectionAuthenticating(ConnectionToClient* connection) = 0; | 39 virtual void OnConnectionAuthenticating(ConnectionToClient* connection) = 0; |
40 | 40 |
41 // Called when the network connection is authenticated. | 41 // Called when the network connection is authenticated. |
42 virtual void OnConnectionAuthenticated(ConnectionToClient* connection) = 0; | 42 virtual void OnConnectionAuthenticated(ConnectionToClient* connection) = 0; |
43 | 43 |
| 44 // Called to request creation of video streams. May be called before or |
| 45 // after OnConnectionChannelsConnected(). |
| 46 virtual void CreateVideoStreams(ConnectionToClient* connection) = 0; |
| 47 |
44 // Called when the network connection is authenticated and all | 48 // Called when the network connection is authenticated and all |
45 // channels are connected. | 49 // channels are connected. |
46 virtual void OnConnectionChannelsConnected( | 50 virtual void OnConnectionChannelsConnected( |
47 ConnectionToClient* connection) = 0; | 51 ConnectionToClient* connection) = 0; |
48 | 52 |
49 // Called when the network connection is closed or failed. | 53 // Called when the network connection is closed or failed. |
50 virtual void OnConnectionClosed(ConnectionToClient* connection, | 54 virtual void OnConnectionClosed(ConnectionToClient* connection, |
51 ErrorCode error) = 0; | 55 ErrorCode error) = 0; |
52 | 56 |
53 // Called when a new input event is received. | 57 // Called when a new input event is received. |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 // must be called in EventHandler::OnConnectionAuthenticated(). | 102 // must be called in EventHandler::OnConnectionAuthenticated(). |
99 virtual void set_clipboard_stub(ClipboardStub* clipboard_stub) = 0; | 103 virtual void set_clipboard_stub(ClipboardStub* clipboard_stub) = 0; |
100 virtual void set_host_stub(HostStub* host_stub) = 0; | 104 virtual void set_host_stub(HostStub* host_stub) = 0; |
101 virtual void set_input_stub(InputStub* input_stub) = 0; | 105 virtual void set_input_stub(InputStub* input_stub) = 0; |
102 }; | 106 }; |
103 | 107 |
104 } // namespace protocol | 108 } // namespace protocol |
105 } // namespace remoting | 109 } // namespace remoting |
106 | 110 |
107 #endif // REMOTING_PROTOCOL_CONNECTION_TO_CLIENT_H_ | 111 #endif // REMOTING_PROTOCOL_CONNECTION_TO_CLIENT_H_ |
OLD | NEW |