OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROMEOS_DBUS_DEBUG_DAEMON_CLIENT_H_ | 5 #ifndef CHROMEOS_DBUS_DEBUG_DAEMON_CLIENT_H_ |
6 #define CHROMEOS_DBUS_DEBUG_DAEMON_CLIENT_H_ | 6 #define CHROMEOS_DBUS_DEBUG_DAEMON_CLIENT_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/platform_file.h" | 9 #include "base/platform_file.h" |
10 #include "base/memory/ref_counted_memory.h" | 10 #include "base/memory/ref_counted_memory.h" |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
89 typedef base::Callback<void(const scoped_refptr<base::RefCountedString>& | 89 typedef base::Callback<void(const scoped_refptr<base::RefCountedString>& |
90 result)> StopSystemTracingCallback; | 90 result)> StopSystemTracingCallback; |
91 | 91 |
92 // Requests to stop system tracing and calls |callback| when completed. | 92 // Requests to stop system tracing and calls |callback| when completed. |
93 virtual bool RequestStopSystemTracing(const StopSystemTracingCallback& | 93 virtual bool RequestStopSystemTracing(const StopSystemTracingCallback& |
94 callback) = 0; | 94 callback) = 0; |
95 | 95 |
96 // Returns an empty SystemTracingCallback that does nothing. | 96 // Returns an empty SystemTracingCallback that does nothing. |
97 static StopSystemTracingCallback EmptyStopSystemTracingCallback(); | 97 static StopSystemTracingCallback EmptyStopSystemTracingCallback(); |
98 | 98 |
99 // Called once TestICMP() is complete. Takes two parameters: | |
100 // - succeeded: information was obtained successfully. | |
101 // - status: information about ICMP connectivity to a specified host as json. | |
102 // For details please refer to | |
103 // https://gerrit.chromium.org/gerrit/#/c/30310/2/src/helpers/icmp.cc | |
104 typedef base::Callback<void(bool succeeded, const std::string& status)> | |
105 TestICMPCallback; | |
106 | |
107 // Tests ICMP connectivity to a specified host. The |host| contains an IPv4 | |
108 // or IPv6 address. | |
satorux1
2012/08/17 21:13:16
could you add some examples? can this be a host na
hshi1
2012/08/17 21:23:00
No this must be numeric IP address. Done.
| |
109 virtual void TestICMP( | |
110 const std::string& host, | |
satorux1
2012/08/17 21:13:16
if this only accepts IP address, host -> ip_addres
hshi1
2012/08/17 21:23:00
Done.
| |
111 const TestICMPCallback& callback) = 0; | |
112 | |
99 // Factory function, creates a new instance and returns ownership. | 113 // Factory function, creates a new instance and returns ownership. |
100 // For normal usage, access the singleton via DBusThreadManager::Get(). | 114 // For normal usage, access the singleton via DBusThreadManager::Get(). |
101 static DebugDaemonClient* Create(DBusClientImplementationType type, | 115 static DebugDaemonClient* Create(DBusClientImplementationType type, |
102 dbus::Bus* bus); | 116 dbus::Bus* bus); |
103 protected: | 117 protected: |
104 // Create() should be used instead. | 118 // Create() should be used instead. |
105 DebugDaemonClient(); | 119 DebugDaemonClient(); |
106 | 120 |
107 private: | 121 private: |
108 DISALLOW_COPY_AND_ASSIGN(DebugDaemonClient); | 122 DISALLOW_COPY_AND_ASSIGN(DebugDaemonClient); |
109 }; | 123 }; |
110 | 124 |
111 } // namespace chromeos | 125 } // namespace chromeos |
112 | 126 |
113 #endif // CHROMEOS_DBUS_DEBUG_DAEMON_CLIENT_H_ | 127 #endif // CHROMEOS_DBUS_DEBUG_DAEMON_CLIENT_H_ |
OLD | NEW |