diff options
author | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-06 22:46:00 +0000 |
---|---|---|
committer | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-06 22:46:00 +0000 |
commit | c3af26f3314bf48f478cec8128b5c15cc3f98940 (patch) | |
tree | 0d3d0802a3a9b8e05487626f90c7dbf0dcecdea9 /remoting/protocol/chromoting_connection.h | |
parent | 5bcab699da1cedb4fc666c9f5d0099574a27c2fe (diff) | |
download | chromium_src-c3af26f3314bf48f478cec8128b5c15cc3f98940.zip chromium_src-c3af26f3314bf48f478cec8128b5c15cc3f98940.tar.gz chromium_src-c3af26f3314bf48f478cec8128b5c15cc3f98940.tar.bz2 |
Use new Chromotocol code in host andclient.
1. ProtocolDecoder renamed to MessagesDecoder and moved to remoting/protocol.
2. base/protocol_util.[h|cc] split into base/util.[h|cc] and protocol/util.[h|cc].
3. Added StreamReader and StreamWriter classes for events and video channels.
4. Client and host changed to use the new protocol code.
BUG=None
TEST=Unittests
Review URL: http://codereview.chromium.org/3595012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61723 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/protocol/chromoting_connection.h')
-rw-r--r-- | remoting/protocol/chromoting_connection.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/remoting/protocol/chromoting_connection.h b/remoting/protocol/chromoting_connection.h index e9c0f42d..397b633 100644 --- a/remoting/protocol/chromoting_connection.h +++ b/remoting/protocol/chromoting_connection.h @@ -9,6 +9,7 @@ #include "base/callback.h" +class MessageLoop; class Task; namespace net { @@ -17,7 +18,10 @@ class Socket; namespace remoting { -// Generic interface for Chromoting connection. +// Generic interface for Chromoting connection used by both client and host. +// Provides access to the connection channels, but doesn't depend on the +// protocol used for each channel. +// TODO(sergeyu): Remove refcounting? class ChromotingConnection : public base::RefCountedThreadSafe<ChromotingConnection> { public: @@ -37,6 +41,7 @@ class ChromotingConnection // Reliable PseudoTCP channels for this connection. // TODO(sergeyu): Remove VideoChannel, and use RTP channels instead. + // TODO(sergeyu): Make it possible to create/destroy new channels on-fly? virtual net::Socket* GetVideoChannel() = 0; virtual net::Socket* GetEventsChannel() = 0; @@ -47,7 +52,11 @@ class ChromotingConnection // JID of the other side. virtual const std::string& jid() = 0; - // Closed connection. Callbacks are guaranteed not to be called after + // Message loop that must be used for to access the channels of this + // connection. + virtual MessageLoop* message_loop() = 0; + + // Closes connection. Callbacks are guaranteed not to be called after // |closed_task| is executed. virtual void Close(Task* closed_task) = 0; |