Android-cuttlefish cvd tool
super_builder.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2026 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 <stdint.h>
19
20#include <functional>
21#include <map>
22#include <string>
23
24#include "absl/strings/string_view.h"
25
27
28namespace cuttlefish {
29
31 public:
34
35 CompositeSuperImageBuilder& SystemPartition(absl::string_view name,
36 absl::string_view host_path) &;
37 CompositeSuperImageBuilder SystemPartition(absl::string_view name,
38 absl::string_view host_path) &&;
39
40 CompositeSuperImageBuilder& VendorPartition(absl::string_view name,
41 absl::string_view host_path) &;
42 CompositeSuperImageBuilder VendorPartition(absl::string_view name,
43 absl::string_view host_path) &&;
44
45 Result<std::string> WriteToDirectory(absl::string_view output_dir,
46 absl::string_view file_name,
47 absl::string_view header_name);
48
49 private:
50 size_t size_ = 0;
51 // Map is from partition name to filename
52 std::map<std::string, std::string, std::less<void>> system_partitions_;
53 std::map<std::string, std::string, std::less<void>> vendor_partitions_;
54};
55
56} // namespace cuttlefish
Definition: super_builder.h:30
Result< std::string > WriteToDirectory(absl::string_view output_dir, absl::string_view file_name, absl::string_view header_name)
Definition: super_builder.cc:240
std::map< std::string, std::string, std::less< void > > vendor_partitions_
Definition: super_builder.h:53
CompositeSuperImageBuilder & SystemPartition(absl::string_view name, absl::string_view host_path) &
Definition: super_builder.cc:216
std::map< std::string, std::string, std::less< void > > system_partitions_
Definition: super_builder.h:52
CompositeSuperImageBuilder & VendorPartition(absl::string_view name, absl::string_view host_path) &
Definition: super_builder.cc:228
CompositeSuperImageBuilder & BlockDeviceSize(uint64_t) &
Definition: super_builder.cc:204
size_t size_
Definition: super_builder.h:50
Definition: alloc_driver.h:21
tl::expected< T, StackTraceError< E > > Result
Definition: result_type.h:30