Chun-Ta Lin | 32b8a51 | 2019-03-25 18:53:40 +0800 | [diff] [blame] | 1 | // Copyright 2019 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_PROBE_TOOL_H_ |
| 6 | #define DEBUGD_SRC_PROBE_TOOL_H_ |
| 7 | |
| 8 | #include <string> |
| 9 | |
| 10 | #include <base/macros.h> |
Clark Chung | fb2997b | 2019-07-10 12:21:33 +0800 | [diff] [blame] | 11 | #include <brillo/dbus/file_descriptor.h> |
Chun-Ta Lin | 32b8a51 | 2019-03-25 18:53:40 +0800 | [diff] [blame] | 12 | #include <brillo/errors/error.h> |
| 13 | |
| 14 | namespace debugd { |
| 15 | |
| 16 | class ProbeTool { |
| 17 | public: |
| 18 | ProbeTool() = default; |
Qijiang Fan | 6bc59e1 | 2020-11-11 02:51:06 +0900 | [diff] [blame^] | 19 | ProbeTool(const ProbeTool&) = delete; |
| 20 | ProbeTool& operator=(const ProbeTool&) = delete; |
| 21 | |
Chun-Ta Lin | 32b8a51 | 2019-03-25 18:53:40 +0800 | [diff] [blame] | 22 | ~ProbeTool() = default; |
| 23 | |
| 24 | // Executes the function defined for runtime_probe. |
Tom Hughes | d6c2d39 | 2020-08-24 18:12:11 -0700 | [diff] [blame] | 25 | bool EvaluateProbeFunction(brillo::ErrorPtr* error, |
| 26 | const std::string& sandbox_info, |
| 27 | const std::string& probe_statement, |
| 28 | brillo::dbus_utils::FileDescriptor* outfd); |
Chun-Ta Lin | 32b8a51 | 2019-03-25 18:53:40 +0800 | [diff] [blame] | 29 | }; |
| 30 | |
| 31 | } // namespace debugd |
| 32 | |
| 33 | #endif // DEBUGD_SRC_PROBE_TOOL_H_ |