Index: chromeos/dbus/icmp_packet_sender.h |
diff --git a/chromeos/dbus/icmp_packet_sender.h b/chromeos/dbus/icmp_packet_sender.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..0cb8ade409d5f82830204960d03aa8c0249fe357 |
--- /dev/null |
+++ b/chromeos/dbus/icmp_packet_sender.h |
@@ -0,0 +1,35 @@ |
+// Copyright (c) 2013 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 CHROMEOS_DBUS_ICMP_PACKET_SENDER_H_ |
+#define CHROMEOS_DBUS_ICMP_PACKET_SENDER_H_ |
+ |
+#include "base/callback.h" |
+#include "base/values.h" |
xiaowenx
2013/06/17 08:00:00
this include seems unnecessary?
Bei Zhang
2013/06/17 08:14:57
Done.
|
+#include "chromeos/chromeos_export.h" |
+ |
+namespace chromeos { |
+ |
+class CHROMEOS_EXPORT ICMPPacketSender { |
+ public: |
+ typedef base::Callback<void(bool succeeded, |
+ const std::string& ip, |
+ int latency)> SendCallback; |
+ ICMPPacketSender(); |
+ ~ICMPPacketSender(); |
+ |
+ // Send ICMP packet with given parameters. |
+ // If omitted |
xiaowenx
2013/06/17 08:00:00
If omitted?
|
+ void Send(const std::string& ip, int* ttl, int* timeout, int* size, |
+ const SendCallback& callback); |
+ |
+ static ICMPPacketSender* GetInstance(); |
+ private: |
+ void OnSend(const SendCallback& callback, |
+ bool succeeded, const std::string& reply); |
+}; |
+ |
+} // namespace chromeos |
+ |
+#endif // CHROMEOS_DBUS_ICMP_PACKET_SENDER_H_ |