summaryrefslogtreecommitdiffstats
path: root/remoting/protocol/chromoting_server.h
diff options
context:
space:
mode:
authorsergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-28 20:59:56 +0000
committersergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-28 20:59:56 +0000
commit2fc3b4267fd4f28dd864c2858cea0e84f55cbb0a (patch)
tree726f9dc89d195927c151dd969c68051b0c135a02 /remoting/protocol/chromoting_server.h
parente393b9fc0267deaf55f3624aa7b0bfb08707dfda (diff)
downloadchromium_src-2fc3b4267fd4f28dd864c2858cea0e84f55cbb0a.zip
chromium_src-2fc3b4267fd4f28dd864c2858cea0e84f55cbb0a.tar.gz
chromium_src-2fc3b4267fd4f28dd864c2858cea0e84f55cbb0a.tar.bz2
Implemented basic support Chromotocol connection.
New code supports multiple PseudoTCP and UDP channels. Client and host still use old JjngleChannel for connection. BUG=53986 TEST=None Review URL: http://codereview.chromium.org/3319021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60842 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/protocol/chromoting_server.h')
-rw-r--r--remoting/protocol/chromoting_server.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/remoting/protocol/chromoting_server.h b/remoting/protocol/chromoting_server.h
new file mode 100644
index 0000000..5b93534
--- /dev/null
+++ b/remoting/protocol/chromoting_server.h
@@ -0,0 +1,40 @@
+// 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.
+
+#ifndef REMOTING_PROTOCOL_CHROMOTING_SERVER_H_
+#define REMOTING_PROTOCOL_CHROMOTING_SERVER_H_
+
+#include <string>
+
+#include "base/callback.h"
+#include "base/ref_counted.h"
+#include "remoting/protocol/chromoting_connection.h"
+
+class Task;
+
+namespace remoting {
+
+// Generic interface for Chromoting server.
+class ChromotingServer : public base::RefCountedThreadSafe<ChromotingServer> {
+ public:
+ typedef Callback2<ChromotingConnection*, bool*>::Type NewConnectionCallback;
+
+ // Initializes connection to the host |jid|.
+ virtual scoped_refptr<ChromotingConnection> Connect(
+ const std::string& jid,
+ ChromotingConnection::StateChangeCallback* state_change_callback) = 0;
+
+ // Close connection. |close_task| is executed after the session client
+ // is actually closed. No callbacks are called after |closed_task| is
+ // executed.
+ virtual void Close(Task* closed_task) = 0;
+
+ protected:
+ friend class base::RefCountedThreadSafe<ChromotingServer>;
+ virtual ~ChromotingServer() { }
+};
+
+} // namespace remoting
+
+#endif // REMOTING_PROTOCOL_CHROMOTING_SERVER_H_