diff options
Diffstat (limited to 'remoting/protocol/connection_to_host.h')
-rw-r--r-- | remoting/protocol/connection_to_host.h | 37 |
1 files changed, 33 insertions, 4 deletions
diff --git a/remoting/protocol/connection_to_host.h b/remoting/protocol/connection_to_host.h index d34b9ee..0d1c602 100644 --- a/remoting/protocol/connection_to_host.h +++ b/remoting/protocol/connection_to_host.h @@ -10,10 +10,14 @@ #include "base/ref_counted.h" #include "base/scoped_ptr.h" #include "remoting/proto/internal.pb.h" +#include "remoting/protocol/host_stub.h" +#include "remoting/protocol/input_stub.h" +#include "remoting/protocol/stream_writer.h" namespace remoting { namespace protocol { +class ClientStub; class SessionConfig; class VideoStub; @@ -33,23 +37,48 @@ class ConnectionToHost { virtual void OnConnectionFailed(ConnectionToHost* conn) = 0; }; - virtual ~ConnectionToHost() {} + virtual ~ConnectionToHost(); // TODO(ajwong): We need to generalize this API. virtual void Connect(const std::string& username, const std::string& auth_token, const std::string& host_jid, HostEventCallback* event_callback, + ClientStub* client_stub, VideoStub* video_stub) = 0; virtual void Disconnect() = 0; virtual const SessionConfig* config() = 0; - // Send an input event to the host. - virtual void SendEvent(const ChromotingClientMessage& msg) = 0; + virtual InputStub* input_stub(); + + virtual HostStub* host_stub(); protected: - ConnectionToHost() {} + ConnectionToHost(); + + //private: TODO(garykac). Merge jingle_connection_to_host up into this class + // and then make these private again. + //////////////////////////////////////////////////////////////////////////// + // User input event channel interface + + // Stub for sending input event messages to the host. + scoped_ptr<InputStub> input_stub_; + + //////////////////////////////////////////////////////////////////////////// + // Protocol control channel interface + + // Stub for sending control messages to the host. + scoped_ptr<HostStub> host_stub_; + + // Stub for receiving control messages from the host. + ClientStub* client_stub_; + + //////////////////////////////////////////////////////////////////////////// + // Video channel interface + + // Stub for receiving video packets from the host. + VideoStub* video_stub_; private: DISALLOW_COPY_AND_ASSIGN(ConnectionToHost); |