Android-cuttlefish cvd tool
host_tool_target.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2023 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#pragma once
18
19#include <sys/types.h>
20
21#include <string>
22#include <vector>
23
26
27namespace cuttlefish {
28
30 public:
31 // artifacts_path: ANDROID_HOST_OUT, or so
32 HostToolTarget(const std::string& artifacts_path);
33
34 Result<FlagInfo> GetFlagInfo(const std::string& bin_name,
35 const std::string& flag_name) const;
36
44
45 private:
47 const std::vector<std::string>& alternatives) const;
48 const std::string artifacts_path_;
49};
50
51} // namespace cuttlefish
Definition: expected.h:86
Definition: host_tool_target.h:29
HostToolTarget(const std::string &artifacts_path)
Definition: host_tool_target.cpp:59
Result< std::string > GetPowerwashBinPath() const
Definition: host_tool_target.cpp:93
Result< std::string > GetStatusBinName() const
Definition: host_tool_target.cpp:84
Result< std::string > GetBinName(const std::vector< std::string > &alternatives) const
Definition: host_tool_target.cpp:107
Result< std::string > GetStopBinName() const
Definition: host_tool_target.cpp:80
Result< std::string > GetSnapshotBinName() const
Definition: host_tool_target.cpp:103
Result< std::string > GetRestartBinPath() const
Definition: host_tool_target.cpp:88
Result< std::string > GetPowerBtnBinPath() const
Definition: host_tool_target.cpp:98
Result< FlagInfo > GetFlagInfo(const std::string &bin_name, const std::string &flag_name) const
Definition: host_tool_target.cpp:62
Result< std::string > GetStartBinName() const
Definition: host_tool_target.cpp:76
const std::string artifacts_path_
Definition: host_tool_target.h:48
Definition: alloc_utils.cpp:23