OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROMEOS_DBUS_ICMP_PACKET_SENDER_H_ | |
6 #define CHROMEOS_DBUS_ICMP_PACKET_SENDER_H_ | |
7 | |
8 #include "base/callback.h" | |
9 #include "base/values.h" | |
xiaowenx
2013/06/17 08:00:00
this include seems unnecessary?
Bei Zhang
2013/06/17 08:14:57
Done.
| |
10 #include "chromeos/chromeos_export.h" | |
11 | |
12 namespace chromeos { | |
13 | |
14 class CHROMEOS_EXPORT ICMPPacketSender { | |
15 public: | |
16 typedef base::Callback<void(bool succeeded, | |
17 const std::string& ip, | |
18 int latency)> SendCallback; | |
19 ICMPPacketSender(); | |
20 ~ICMPPacketSender(); | |
21 | |
22 // Send ICMP packet with given parameters. | |
23 // If omitted | |
xiaowenx
2013/06/17 08:00:00
If omitted?
| |
24 void Send(const std::string& ip, int* ttl, int* timeout, int* size, | |
25 const SendCallback& callback); | |
26 | |
27 static ICMPPacketSender* GetInstance(); | |
28 private: | |
29 void OnSend(const SendCallback& callback, | |
30 bool succeeded, const std::string& reply); | |
31 }; | |
32 | |
33 } // namespace chromeos | |
34 | |
35 #endif // CHROMEOS_DBUS_ICMP_PACKET_SENDER_H_ | |
OLD | NEW |