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#include <string_view>
24
26
27namespace cuttlefish {
28
30 public:
33
35 std::string_view host_path) &;
37 std::string_view host_path) &&;
38
40 std::string_view host_path) &;
42 std::string_view host_path) &&;
43
44 Result<std::string> WriteToDirectory(std::string_view output_dir,
45 std::string_view file_name,
46 std::string_view header_name);
47
48 private:
49 size_t size_ = 0;
50 // Map is from partition name to filename
51 std::map<std::string, std::string, std::less<void>> system_partitions_;
52 std::map<std::string, std::string, std::less<void>> vendor_partitions_;
53};
54
55} // namespace cuttlefish
Definition: super_builder.h:29
std::map< std::string, std::string, std::less< void > > vendor_partitions_
Definition: super_builder.h:52
CompositeSuperImageBuilder & VendorPartition(std::string_view name, std::string_view host_path) &
Definition: super_builder.cc:228
std::map< std::string, std::string, std::less< void > > system_partitions_
Definition: super_builder.h:51
CompositeSuperImageBuilder & BlockDeviceSize(uint64_t) &
Definition: super_builder.cc:204
size_t size_
Definition: super_builder.h:49
Result< std::string > WriteToDirectory(std::string_view output_dir, std::string_view file_name, std::string_view header_name)
Definition: super_builder.cc:240
CompositeSuperImageBuilder & SystemPartition(std::string_view name, std::string_view host_path) &
Definition: super_builder.cc:216
char * name
Definition: libf2fs.c:1403
Definition: alloc_driver.h:20
tl::expected< T, StackTraceError > Result
Definition: result_type.h:30