Mike Frysinger | f9da3d3 | 2017-09-19 23:41:27 -0400 | [diff] [blame] | 1 | // 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 Caruso | 0b24188 | 2018-04-04 13:43:46 -0700 | [diff] [blame] | 11 | #include <base/files/scoped_file.h> |
Mike Frysinger | f9da3d3 | 2017-09-19 23:41:27 -0400 | [diff] [blame] | 12 | #include <base/macros.h> |
| 13 | #include <brillo/errors/error.h> |
Mike Frysinger | f9da3d3 | 2017-09-19 23:41:27 -0400 | [diff] [blame] | 14 | |
| 15 | #include "debugd/src/subprocess_tool.h" |
| 16 | |
| 17 | namespace debugd { |
| 18 | |
| 19 | class ShillScriptsTool : public SubprocessTool { |
| 20 | public: |
| 21 | ShillScriptsTool() = default; |
Qijiang Fan | 6bc59e1 | 2020-11-11 02:51:06 +0900 | [diff] [blame^] | 22 | ShillScriptsTool(const ShillScriptsTool&) = delete; |
| 23 | ShillScriptsTool& operator=(const ShillScriptsTool&) = delete; |
| 24 | |
Mike Frysinger | f9da3d3 | 2017-09-19 23:41:27 -0400 | [diff] [blame] | 25 | ~ShillScriptsTool() override = default; |
| 26 | |
Eric Caruso | 0b24188 | 2018-04-04 13:43:46 -0700 | [diff] [blame] | 27 | bool Run(const base::ScopedFD& outfd, |
Mike Frysinger | f9da3d3 | 2017-09-19 23:41:27 -0400 | [diff] [blame] | 28 | const std::string& script, |
| 29 | const std::vector<std::string>& script_args, |
| 30 | std::string* out_id, |
| 31 | brillo::ErrorPtr* error); |
Mike Frysinger | f9da3d3 | 2017-09-19 23:41:27 -0400 | [diff] [blame] | 32 | }; |
| 33 | |
| 34 | } // namespace debugd |
| 35 | |
| 36 | #endif // DEBUGD_SRC_SHILL_SCRIPTS_TOOL_H_ |