blob: f707351afe9b56d3b560323b7c8723470c9b59ad [file] [log] [blame]
Elly Jonesa44d22d2012-01-05 18:05:56 -05001// Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
Elly Jonese7cb5b32011-12-01 14:18:32 -05002// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
Alex Vakulenko262be3f2014-07-30 15:25:50 -07005#ifndef DEBUGD_SRC_PING_TOOL_H_
6#define DEBUGD_SRC_PING_TOOL_H_
Elly Jonese7cb5b32011-12-01 14:18:32 -05007
Elly Jonese7cb5b32011-12-01 14:18:32 -05008#include <string>
9
Ben Chan657bed82014-09-02 20:40:51 -070010#include <base/macros.h>
Eric Carusocc7106c2017-04-27 14:22:42 -070011#include <brillo/errors/error.h>
12#include <brillo/variant_dictionary.h>
Elly Jonese7cb5b32011-12-01 14:18:32 -050013
Alex Vakulenko262be3f2014-07-30 15:25:50 -070014#include "debugd/src/subprocess_tool.h"
Elly Jones0c016cc2011-12-19 16:19:22 -050015
Elly Jonese7cb5b32011-12-01 14:18:32 -050016namespace debugd {
17
Elly Jones0c016cc2011-12-19 16:19:22 -050018class PingTool : public SubprocessTool {
Elly Jonese7cb5b32011-12-01 14:18:32 -050019 public:
Ben Chan78f89532014-08-29 09:35:09 -070020 PingTool() = default;
Qijiang Fan6bc59e12020-11-11 02:51:06 +090021 PingTool(const PingTool&) = delete;
22 PingTool& operator=(const PingTool&) = delete;
23
Ben Chan78f89532014-08-29 09:35:09 -070024 ~PingTool() override = default;
Elly Jonese7cb5b32011-12-01 14:18:32 -050025
Eric Caruso0b241882018-04-04 13:43:46 -070026 bool Start(const base::ScopedFD& outfd,
Eric Caruso8fe49c72017-04-25 10:43:59 -070027 const std::string& destination,
Eric Carusocc7106c2017-04-27 14:22:42 -070028 const brillo::VariantDictionary& options,
Eric Caruso8fe49c72017-04-25 10:43:59 -070029 std::string* out_id,
Eric Carusocc7106c2017-04-27 14:22:42 -070030 brillo::ErrorPtr* error);
Elly Jonese7cb5b32011-12-01 14:18:32 -050031};
32
Ben Chana0011d82014-05-13 00:19:29 -070033} // namespace debugd
Elly Jonese7cb5b32011-12-01 14:18:32 -050034
Alex Vakulenko262be3f2014-07-30 15:25:50 -070035#endif // DEBUGD_SRC_PING_TOOL_H_