blob: be4352643f57876ca71766092912036aa844278c [file] [log] [blame]
Chun-Ta Lin32b8a512019-03-25 18:53:40 +08001// 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 Chungfb2997b2019-07-10 12:21:33 +080011#include <brillo/dbus/file_descriptor.h>
Chun-Ta Lin32b8a512019-03-25 18:53:40 +080012#include <brillo/errors/error.h>
13
14namespace debugd {
15
16class ProbeTool {
17 public:
18 ProbeTool() = default;
Qijiang Fan6bc59e12020-11-11 02:51:06 +090019 ProbeTool(const ProbeTool&) = delete;
20 ProbeTool& operator=(const ProbeTool&) = delete;
21
Chun-Ta Lin32b8a512019-03-25 18:53:40 +080022 ~ProbeTool() = default;
23
24 // Executes the function defined for runtime_probe.
Tom Hughesd6c2d392020-08-24 18:12:11 -070025 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 Lin32b8a512019-03-25 18:53:40 +080029};
30
31} // namespace debugd
32
33#endif // DEBUGD_SRC_PROBE_TOOL_H_