blob: ba78564157ecc7dde66fe77af2e46ca691746085 [file] [log] [blame]
Mike Frysingerf9da3d32017-09-19 23:41:27 -04001// Copyright 2017 The Chromium OS 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 DEBUGD_SRC_SHILL_SCRIPTS_TOOL_H_
6#define DEBUGD_SRC_SHILL_SCRIPTS_TOOL_H_
7
8#include <string>
9#include <vector>
10
Eric Caruso0b241882018-04-04 13:43:46 -070011#include <base/files/scoped_file.h>
Mike Frysingerf9da3d32017-09-19 23:41:27 -040012#include <base/macros.h>
13#include <brillo/errors/error.h>
Mike Frysingerf9da3d32017-09-19 23:41:27 -040014
15#include "debugd/src/subprocess_tool.h"
16
17namespace debugd {
18
19class ShillScriptsTool : public SubprocessTool {
20 public:
21 ShillScriptsTool() = default;
Qijiang Fan6bc59e12020-11-11 02:51:06 +090022 ShillScriptsTool(const ShillScriptsTool&) = delete;
23 ShillScriptsTool& operator=(const ShillScriptsTool&) = delete;
24
Mike Frysingerf9da3d32017-09-19 23:41:27 -040025 ~ShillScriptsTool() override = default;
26
Eric Caruso0b241882018-04-04 13:43:46 -070027 bool Run(const base::ScopedFD& outfd,
Mike Frysingerf9da3d32017-09-19 23:41:27 -040028 const std::string& script,
29 const std::vector<std::string>& script_args,
30 std::string* out_id,
31 brillo::ErrorPtr* error);
Mike Frysingerf9da3d32017-09-19 23:41:27 -040032};
33
34} // namespace debugd
35
36#endif // DEBUGD_SRC_SHILL_SCRIPTS_TOOL_H_