Android-cuttlefish cvd tool
android_build.h
Go to the documentation of this file.
1//
2// Copyright (C) 2019 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 <ostream>
20#include <string>
21#include <variant>
22#include <vector>
23
25
26namespace cuttlefish {
27
29 std::string id;
30 std::string branch;
31 std::string target;
32 std::string product;
33 bool is_signed = false;
34 // did retrieving build details block waiting for a terminal status
35 bool status_blocked = false;
36 std::optional<std::string> filepath;
38};
39
40std::ostream& operator<<(std::ostream&, const DeviceBuild&);
41
43 DirectoryBuild(std::vector<std::string> paths, std::string target,
44 std::optional<std::string> filepath);
45
46 std::vector<std::string> paths;
47 std::string target;
48 std::string id;
49 std::string product;
50 bool is_signed = false;
51 std::optional<std::string> filepath;
52};
53
54std::ostream& operator<<(std::ostream&, const DirectoryBuild&);
55
56using Build = std::variant<DeviceBuild, DirectoryBuild>;
57
58std::ostream& operator<<(std::ostream&, const Build&);
59
60std::string FetchLabel(const Build& build);
61
62} // namespace cuttlefish
Definition: alloc_driver.h:20
std::ostream & operator<<(std::ostream &out, DeviceType device_type)
Definition: device_type.cpp:72
std::variant< DeviceBuild, DirectoryBuild > Build
Definition: android_build.h:56
std::string FetchLabel(const Build &build)
Definition: android_build.cc:60
SafeLevel
Definition: android_build_url.h:25
Definition: android_build.h:28
std::optional< std::string > filepath
Definition: android_build.h:36
std::string target
Definition: android_build.h:31
std::string product
Definition: android_build.h:32
std::string id
Definition: android_build.h:29
bool is_signed
Definition: android_build.h:33
SafeLevel safe_level
Definition: android_build.h:37
std::string branch
Definition: android_build.h:30
bool status_blocked
Definition: android_build.h:35
Definition: android_build.h:42
std::string target
Definition: android_build.h:47
std::optional< std::string > filepath
Definition: android_build.h:51
DirectoryBuild(std::vector< std::string > paths, std::string target, std::optional< std::string > filepath)
Definition: android_build.cc:38
bool is_signed
Definition: android_build.h:50
std::string product
Definition: android_build.h:49
std::string id
Definition: android_build.h:48
std::vector< std::string > paths
Definition: android_build.h:46