Android-cuttlefish cvd tool
cuttlefish
host
commands
cvd
cli
commands
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
24
#include "
cuttlefish/common/libs/utils/result.h
"
25
#include "
cuttlefish/host/commands/cvd/utils/flags_collector.h
"
26
27
namespace
cuttlefish
{
28
29
class
HostToolTarget
{
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
37
Result<std::string>
GetStartBinName
()
const
;
38
Result<std::string>
GetStopBinName
()
const
;
39
Result<std::string>
GetStatusBinName
()
const
;
40
Result<std::string>
GetRestartBinPath
()
const
;
41
Result<std::string>
GetPowerwashBinPath
()
const
;
42
Result<std::string>
GetPowerBtnBinPath
()
const
;
43
Result<std::string>
GetSnapshotBinName
()
const
;
44
45
private
:
46
Result<std::string>
GetBinName
(
47
const
std::vector<std::string>& alternatives)
const
;
48
const
std::string
artifacts_path_
;
49
};
50
51
}
// namespace cuttlefish
android::base::expected
Definition:
expected.h:86
cuttlefish::HostToolTarget
Definition:
host_tool_target.h:29
cuttlefish::HostToolTarget::HostToolTarget
HostToolTarget(const std::string &artifacts_path)
Definition:
host_tool_target.cpp:59
cuttlefish::HostToolTarget::GetPowerwashBinPath
Result< std::string > GetPowerwashBinPath() const
Definition:
host_tool_target.cpp:93
cuttlefish::HostToolTarget::GetStatusBinName
Result< std::string > GetStatusBinName() const
Definition:
host_tool_target.cpp:84
cuttlefish::HostToolTarget::GetBinName
Result< std::string > GetBinName(const std::vector< std::string > &alternatives) const
Definition:
host_tool_target.cpp:107
cuttlefish::HostToolTarget::GetStopBinName
Result< std::string > GetStopBinName() const
Definition:
host_tool_target.cpp:80
cuttlefish::HostToolTarget::GetSnapshotBinName
Result< std::string > GetSnapshotBinName() const
Definition:
host_tool_target.cpp:103
cuttlefish::HostToolTarget::GetRestartBinPath
Result< std::string > GetRestartBinPath() const
Definition:
host_tool_target.cpp:88
cuttlefish::HostToolTarget::GetPowerBtnBinPath
Result< std::string > GetPowerBtnBinPath() const
Definition:
host_tool_target.cpp:98
cuttlefish::HostToolTarget::GetFlagInfo
Result< FlagInfo > GetFlagInfo(const std::string &bin_name, const std::string &flag_name) const
Definition:
host_tool_target.cpp:62
cuttlefish::HostToolTarget::GetStartBinName
Result< std::string > GetStartBinName() const
Definition:
host_tool_target.cpp:76
cuttlefish::HostToolTarget::artifacts_path_
const std::string artifacts_path_
Definition:
host_tool_target.h:48
result.h
flags_collector.h
cuttlefish
Definition:
alloc_utils.cpp:23
Generated by
1.9.4