Android-cuttlefish cvd tool
fetch_cvd_parser.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#pragma once
17
18#include <optional>
19#include <string>
20#include <vector>
21
25
26namespace cuttlefish {
27
28inline constexpr char kDefaultBuildString[] = "";
29inline constexpr char kDefaultTargetDirectory[] = "";
30inline constexpr bool kDefaultKeepDownloadedArchives = false;
31
32inline constexpr char kDefaultBuildTarget[] =
33 "aosp_cf_x86_64_only_phone-userdebug";
34
35struct FetchFlags {
37 std::optional<BuildString> host_package_build;
40 bool helpxml = false;
43 std::vector<std::string> host_substitutions;
44
45 static Result<FetchFlags> Parse(std::vector<std::string>& args);
46};
47
48} // namespace cuttlefish
Definition: expected.h:86
LogSeverity
Definition: logging.h:87
@ INFO
Definition: logging.h:90
Definition: alloc_utils.cpp:23
constexpr bool kDefaultKeepDownloadedArchives
Definition: fetch_cvd_parser.h:30
constexpr char kDefaultTargetDirectory[]
Definition: fetch_cvd_parser.h:29
constexpr char kDefaultBuildTarget[]
Definition: fetch_cvd_parser.h:32
constexpr char kDefaultBuildString[]
Definition: fetch_cvd_parser.h:28
Definition: build_api_flags.h:37
Definition: fetch_cvd_parser.h:35
VectorFlags vector_flags
Definition: fetch_cvd_parser.h:42
bool helpxml
Definition: fetch_cvd_parser.h:40
bool keep_downloaded_archives
Definition: fetch_cvd_parser.h:38
BuildApiFlags build_api_flags
Definition: fetch_cvd_parser.h:41
std::vector< std::string > host_substitutions
Definition: fetch_cvd_parser.h:43
android::base::LogSeverity verbosity
Definition: fetch_cvd_parser.h:39
std::string target_directory
Definition: fetch_cvd_parser.h:36
static Result< FetchFlags > Parse(std::vector< std::string > &args)
Definition: fetch_cvd_parser.cc:87
std::optional< BuildString > host_package_build
Definition: fetch_cvd_parser.h:37
Definition: vector_flags.h:31