| 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_HOST_H_ | 5 #ifndef REMOTING_PROTOCOL_CONNECTION_TO_HOST_H_ |
| 6 #define REMOTING_PROTOCOL_CONNECTION_TO_HOST_H_ | 6 #define REMOTING_PROTOCOL_CONNECTION_TO_HOST_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 8 #include <string> | 9 #include <string> |
| 9 | 10 |
| 10 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 11 #include "base/memory/scoped_ptr.h" | |
| 12 #include "remoting/protocol/errors.h" | 12 #include "remoting/protocol/errors.h" |
| 13 | 13 |
| 14 namespace remoting { | 14 namespace remoting { |
| 15 namespace protocol { | 15 namespace protocol { |
| 16 | 16 |
| 17 class AudioStub; | 17 class AudioStub; |
| 18 class Authenticator; | 18 class Authenticator; |
| 19 class ClientStub; | 19 class ClientStub; |
| 20 class ClipboardStub; | 20 class ClipboardStub; |
| 21 class HostStub; | 21 class HostStub; |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 // is called. | 70 // is called. |
| 71 virtual void set_client_stub(ClientStub* client_stub) = 0; | 71 virtual void set_client_stub(ClientStub* client_stub) = 0; |
| 72 virtual void set_clipboard_stub(ClipboardStub* clipboard_stub) = 0; | 72 virtual void set_clipboard_stub(ClipboardStub* clipboard_stub) = 0; |
| 73 virtual void set_video_renderer(VideoRenderer* video_renderer) = 0; | 73 virtual void set_video_renderer(VideoRenderer* video_renderer) = 0; |
| 74 // If no audio stub is specified then audio will not be requested. | 74 // If no audio stub is specified then audio will not be requested. |
| 75 virtual void set_audio_stub(AudioStub* audio_stub) = 0; | 75 virtual void set_audio_stub(AudioStub* audio_stub) = 0; |
| 76 | 76 |
| 77 // Initiates a connection using |session|. |event_callback| will be notified | 77 // Initiates a connection using |session|. |event_callback| will be notified |
| 78 // of changes in the state of the connection and must outlive the | 78 // of changes in the state of the connection and must outlive the |
| 79 // ConnectionToHost. Caller must set stubs (see below) before calling Connect. | 79 // ConnectionToHost. Caller must set stubs (see below) before calling Connect. |
| 80 virtual void Connect(scoped_ptr<Session> session, | 80 virtual void Connect(std::unique_ptr<Session> session, |
| 81 scoped_refptr<TransportContext> transport_context, | 81 scoped_refptr<TransportContext> transport_context, |
| 82 HostEventCallback* event_callback) = 0; | 82 HostEventCallback* event_callback) = 0; |
| 83 | 83 |
| 84 // Returns the session configuration that was negotiated with the host. | 84 // Returns the session configuration that was negotiated with the host. |
| 85 virtual const SessionConfig& config() = 0; | 85 virtual const SessionConfig& config() = 0; |
| 86 | 86 |
| 87 // Stubs for sending data to the host. | 87 // Stubs for sending data to the host. |
| 88 virtual ClipboardStub* clipboard_forwarder() = 0; | 88 virtual ClipboardStub* clipboard_forwarder() = 0; |
| 89 virtual HostStub* host_stub() = 0; | 89 virtual HostStub* host_stub() = 0; |
| 90 virtual InputStub* input_stub() = 0; | 90 virtual InputStub* input_stub() = 0; |
| 91 | 91 |
| 92 // Return the current state of ConnectionToHost. | 92 // Return the current state of ConnectionToHost. |
| 93 virtual State state() const = 0; | 93 virtual State state() const = 0; |
| 94 }; | 94 }; |
| 95 | 95 |
| 96 } // namespace protocol | 96 } // namespace protocol |
| 97 } // namespace remoting | 97 } // namespace remoting |
| 98 | 98 |
| 99 #endif // REMOTING_PROTOCOL_CONNECTION_TO_HOST_H_ | 99 #endif // REMOTING_PROTOCOL_CONNECTION_TO_HOST_H_ |
| OLD | NEW |