Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1274)

Unified Diff: remoting/host/heartbeat_sender.h

Issue 2690003: Copy the (early prototype of) remoting in Chrome into the public tree.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/host/event_executor_win.cc ('k') | remoting/host/heartbeat_sender.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/heartbeat_sender.h
===================================================================
--- remoting/host/heartbeat_sender.h (revision 0)
+++ remoting/host/heartbeat_sender.h (revision 0)
@@ -0,0 +1,41 @@
+// 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_HOST_HEARTBEAT_SENDER_H_
+#define REMOTING_HOST_HEARTBEAT_SENDER_H_
+
+#include <string>
+
+#include "base/scoped_ptr.h"
+#include "base/ref_counted.h"
+#include "remoting/jingle_glue/iq_request.h"
+
+namespace remoting {
+
+class IqRequest;
+class JingleClient;
+
+// HeartbeatSender periodically sends hertbeats to the chromoting bot.
+// TODO(sergeyu): Write unittest for this class.
+class HeartbeatSender : public base::RefCountedThreadSafe<HeartbeatSender> {
+ public:
+ HeartbeatSender();
+
+ // Starts heart-beating for |jingle_client|.
+ void Start(JingleClient* jingle_client, const std::string& host_id);
+
+ private:
+
+ void DoStart();
+ void DoSendStanza();
+
+ bool started_;
+ JingleClient* jingle_client_;
+ std::string host_id_;
+ scoped_ptr<IqRequest> request_;
+};
+
+} // namespace remoting
+
+#endif // REMOTING_HOST_HEARTBEAT_SENDER_H_
Property changes on: remoting/host/heartbeat_sender.h
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « remoting/host/event_executor_win.cc ('k') | remoting/host/heartbeat_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698