summaryrefslogtreecommitdiffstats
path: root/remoting/protocol/session.h
diff options
context:
space:
mode:
Diffstat (limited to 'remoting/protocol/session.h')
-rw-r--r--remoting/protocol/session.h30
1 files changed, 10 insertions, 20 deletions
diff --git a/remoting/protocol/session.h b/remoting/protocol/session.h
index 059a21f..754b223 100644
--- a/remoting/protocol/session.h
+++ b/remoting/protocol/session.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -16,7 +16,6 @@ class Task;
namespace net {
class Socket;
-class StreamSocket;
} // namespace net
namespace remoting {
@@ -25,6 +24,7 @@ namespace protocol {
// Generic interface for Chromotocol 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 Session : public base::NonThreadSafe {
public:
enum State {
@@ -36,10 +36,6 @@ class Session : public base::NonThreadSafe {
};
typedef Callback1<State>::Type StateChangeCallback;
- typedef base::Callback<void(const std::string&, net::StreamSocket*)>
- StreamChannelCallback;
- typedef base::Callback<void(const std::string&, net::Socket*)>
- DatagramChannelCallback;
Session() { }
virtual ~Session() { }
@@ -48,26 +44,20 @@ class Session : public base::NonThreadSafe {
// Must be called on the jingle thread only.
virtual void SetStateChangeCallback(StateChangeCallback* callback) = 0;
- // Creates new channels for this connection. The specified callback
- // is called when then new channel is created and connected. The
- // callback is called with NULL if connection failed for any reason.
- // Ownership of the channel socket is given to the caller when the
- // callback is called. All channels must be destroyed before the
- // session is destroyed. Can be called only when in CONNECTING or
- // CONNECTED state.
- virtual void CreateStreamChannel(
- const std::string& name, const StreamChannelCallback& callback) = 0;
- virtual void CreateDatagramChannel(
- const std::string& name, const DatagramChannelCallback& callback) = 0;
-
- // TODO(sergeyu): Remove these methods, and use CreateChannel()
- // instead.
+ // Reliable PseudoTCP channels for this connection.
virtual net::Socket* control_channel() = 0;
virtual net::Socket* event_channel() = 0;
+
+ // TODO(sergeyu): Remove VideoChannel, and use RTP channels instead.
virtual net::Socket* video_channel() = 0;
+
+ // Unreliable channels for this connection.
virtual net::Socket* video_rtp_channel() = 0;
virtual net::Socket* video_rtcp_channel() = 0;
+ // TODO(sergeyu): Make it possible to create/destroy additional channels
+ // on-fly?
+
// JID of the other side.
virtual const std::string& jid() = 0;