Elly Jones | a44d22d | 2012-01-05 18:05:56 -0500 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium OS Authors. All rights reserved. |
Elly Jones | e7cb5b3 | 2011-12-01 14:18:32 -0500 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
3 | // found in the LICENSE file. | ||||
4 | |||||
Alex Vakulenko | 262be3f | 2014-07-30 15:25:50 -0700 | [diff] [blame] | 5 | #ifndef DEBUGD_SRC_PING_TOOL_H_ |
6 | #define DEBUGD_SRC_PING_TOOL_H_ | ||||
Elly Jones | e7cb5b3 | 2011-12-01 14:18:32 -0500 | [diff] [blame] | 7 | |
8 | #include <map> | ||||
9 | #include <string> | ||||
10 | |||||
Ben Chan | 657bed8 | 2014-09-02 20:40:51 -0700 | [diff] [blame] | 11 | #include <base/macros.h> |
Eric Caruso | cc7106c | 2017-04-27 14:22:42 -0700 | [diff] [blame^] | 12 | #include <brillo/errors/error.h> |
13 | #include <brillo/variant_dictionary.h> | ||||
Elly Jones | e7cb5b3 | 2011-12-01 14:18:32 -0500 | [diff] [blame] | 14 | |
Alex Vakulenko | 262be3f | 2014-07-30 15:25:50 -0700 | [diff] [blame] | 15 | #include "debugd/src/subprocess_tool.h" |
Elly Jones | 0c016cc | 2011-12-19 16:19:22 -0500 | [diff] [blame] | 16 | |
Elly Jones | e7cb5b3 | 2011-12-01 14:18:32 -0500 | [diff] [blame] | 17 | namespace debugd { |
18 | |||||
Elly Jones | 0c016cc | 2011-12-19 16:19:22 -0500 | [diff] [blame] | 19 | class PingTool : public SubprocessTool { |
Elly Jones | e7cb5b3 | 2011-12-01 14:18:32 -0500 | [diff] [blame] | 20 | public: |
Ben Chan | 78f8953 | 2014-08-29 09:35:09 -0700 | [diff] [blame] | 21 | PingTool() = default; |
22 | ~PingTool() override = default; | ||||
Elly Jones | e7cb5b3 | 2011-12-01 14:18:32 -0500 | [diff] [blame] | 23 | |
Eric Caruso | cc7106c | 2017-04-27 14:22:42 -0700 | [diff] [blame^] | 24 | bool Start(const dbus::FileDescriptor& outfd, |
Eric Caruso | 8fe49c7 | 2017-04-25 10:43:59 -0700 | [diff] [blame] | 25 | const std::string& destination, |
Eric Caruso | cc7106c | 2017-04-27 14:22:42 -0700 | [diff] [blame^] | 26 | const brillo::VariantDictionary& options, |
Eric Caruso | 8fe49c7 | 2017-04-25 10:43:59 -0700 | [diff] [blame] | 27 | std::string* out_id, |
Eric Caruso | cc7106c | 2017-04-27 14:22:42 -0700 | [diff] [blame^] | 28 | brillo::ErrorPtr* error); |
Ben Chan | 657bed8 | 2014-09-02 20:40:51 -0700 | [diff] [blame] | 29 | |
30 | private: | ||||
31 | DISALLOW_COPY_AND_ASSIGN(PingTool); | ||||
Elly Jones | e7cb5b3 | 2011-12-01 14:18:32 -0500 | [diff] [blame] | 32 | }; |
33 | |||||
Ben Chan | a0011d8 | 2014-05-13 00:19:29 -0700 | [diff] [blame] | 34 | } // namespace debugd |
Elly Jones | e7cb5b3 | 2011-12-01 14:18:32 -0500 | [diff] [blame] | 35 | |
Alex Vakulenko | 262be3f | 2014-07-30 15:25:50 -0700 | [diff] [blame] | 36 | #endif // DEBUGD_SRC_PING_TOOL_H_ |