Android-cuttlefish cvd tool
Public Types | Public Member Functions | Private Attributes | List of all members
cuttlefish::FakeAndroidBuild Class Reference

#include <fake_android_build.h>

Inheritance diagram for cuttlefish::FakeAndroidBuild:
Inheritance graph
[legend]
Collaboration diagram for cuttlefish::FakeAndroidBuild:
Collaboration graph
[legend]

Public Types

enum class  ImageStatus { kExtracted , kUnextracted , kMissing }
 

Public Member Functions

std::string Name () const override
 
PrettyStruct Pretty () override
 
Result< std::set< std::string, std::less< void > > > Images () override
 
Result< std::string > ImageFile (std::string_view name, bool extract=true) override
 
void AddExtractedImage (std::string_view image, std::string_view path)
 
void AddUnextractedImage (std::string_view image)
 
void AddMissingImage (std::string_view image)
 
Result< void > SetExtractDir (std::string_view) override
 
Result< std::set< std::string, std::less< void > > > AbPartitions () override
 
void SetAbPartitions (std::set< std::string, std::less< void > >)
 
Result< std::set< std::string, std::less< void > > > SystemPartitions () override
 
void SetSystemPartitions (std::set< std::string, std::less< void > >)
 
Result< std::set< std::string, std::less< void > > > VendorPartitions () override
 
void SetVendorPartitions (std::set< std::string, std::less< void > >)
 
Result< std::set< std::string, std::less< void > > > LogicalPartitions () override
 
void SetLogicalPartitions (std::set< std::string, std::less< void > >)
 
Result< std::set< std::string, std::less< void > > > PhysicalPartitions () override
 
void SetPhysicalPartitions (std::set< std::string, std::less< void > >)
 
- Public Member Functions inherited from cuttlefish::AndroidBuild
virtual ~AndroidBuild ()=default
 
virtual std::string Name () const =0
 
virtual PrettyStruct Pretty ()=0
 
virtual Result< std::set< std::string, std::less< void > > > Images ()
 
virtual Result< std::string > ImageFile (std::string_view name, bool extract=true)
 
virtual Result< void > SetExtractDir (std::string_view)
 
virtual Result< std::set< std::string, std::less< void > > > AbPartitions ()
 
virtual Result< std::set< std::string, std::less< void > > > SystemPartitions ()
 
virtual Result< std::set< std::string, std::less< void > > > VendorPartitions ()
 
virtual Result< std::set< std::string, std::less< void > > > LogicalPartitions ()
 
virtual Result< std::set< std::string, std::less< void > > > PhysicalPartitions ()
 

Private Attributes

std::optional< std::map< std::string, std::pair< ImageStatus, std::string >, std::less< void > > > images_
 
std::optional< std::string > extract_dir_
 
std::optional< std::set< std::string, std::less< void > > > ab_partitions_
 
std::optional< std::set< std::string, std::less< void > > > system_partitions_
 
std::optional< std::set< std::string, std::less< void > > > vendor_partitions_
 
std::optional< std::set< std::string, std::less< void > > > logical_partitions_
 
std::optional< std::set< std::string, std::less< void > > > physical_partitions_
 

Member Enumeration Documentation

◆ ImageStatus

Enumerator
kExtracted 
kUnextracted 
kMissing 

Member Function Documentation

◆ AbPartitions()

Result< std::set< std::string, std::less< void > > > cuttlefish::FakeAndroidBuild::AbPartitions ( )
overridevirtual

Reimplemented from cuttlefish::AndroidBuild.

◆ AddExtractedImage()

void cuttlefish::FakeAndroidBuild::AddExtractedImage ( std::string_view  image,
std::string_view  path 
)

◆ AddMissingImage()

void cuttlefish::FakeAndroidBuild::AddMissingImage ( std::string_view  image)

◆ AddUnextractedImage()

void cuttlefish::FakeAndroidBuild::AddUnextractedImage ( std::string_view  image)

◆ ImageFile()

Result< std::string > cuttlefish::FakeAndroidBuild::ImageFile ( std::string_view  name,
bool  extract = true 
)
overridevirtual

Reimplemented from cuttlefish::AndroidBuild.

◆ Images()

Result< std::set< std::string, std::less< void > > > cuttlefish::FakeAndroidBuild::Images ( )
overridevirtual

Image information, as reported by the Android build system.

An image may be one of three different categories:

  • A partition in the top-level GPT, such as the the super partition.
  • A logical partition stored inside the GPT super partition.
  • A super_empty pseudo-partition file that reports what should be in the super partition, but without the logical partition contents.

Reimplemented from cuttlefish::AndroidBuild.

◆ LogicalPartitions()

Result< std::set< std::string, std::less< void > > > cuttlefish::FakeAndroidBuild::LogicalPartitions ( )
overridevirtual

Partitions in the super image. Disjoint from GPT entries.

Reimplemented from cuttlefish::AndroidBuild.

◆ Name()

std::string cuttlefish::FakeAndroidBuild::Name ( ) const
overridevirtual

The name of the concrete implementation.

Implements cuttlefish::AndroidBuild.

◆ PhysicalPartitions()

Result< std::set< std::string, std::less< void > > > cuttlefish::FakeAndroidBuild::PhysicalPartitions ( )
overridevirtual

Entries in the GPT. Disjoint from logical partitions.

Reimplemented from cuttlefish::AndroidBuild.

◆ Pretty()

PrettyStruct cuttlefish::FakeAndroidBuild::Pretty ( )
overridevirtual

◆ SetAbPartitions()

void cuttlefish::FakeAndroidBuild::SetAbPartitions ( std::set< std::string, std::less< void > >  partitions)

◆ SetExtractDir()

Result< void > cuttlefish::FakeAndroidBuild::SetExtractDir ( std::string_view  )
overridevirtual

Stores a directory to use for extracting generated files. ImageFile may store generated files here, and implementations may extract files here as part of the implementation of other methods.

Reimplemented from cuttlefish::AndroidBuild.

◆ SetLogicalPartitions()

void cuttlefish::FakeAndroidBuild::SetLogicalPartitions ( std::set< std::string, std::less< void > >  partitions)

◆ SetPhysicalPartitions()

void cuttlefish::FakeAndroidBuild::SetPhysicalPartitions ( std::set< std::string, std::less< void > >  partitions)

◆ SetSystemPartitions()

void cuttlefish::FakeAndroidBuild::SetSystemPartitions ( std::set< std::string, std::less< void > >  partitions)

◆ SetVendorPartitions()

void cuttlefish::FakeAndroidBuild::SetVendorPartitions ( std::set< std::string, std::less< void > >  partitions)

◆ SystemPartitions()

Result< std::set< std::string, std::less< void > > > cuttlefish::FakeAndroidBuild::SystemPartitions ( )
overridevirtual

If this build is combined with another build by mixing system and vendor from different places, reports which partitions this build expects to contribute to a particular side of the mix. System and vendor partition sets should be disjoint.

Reimplemented from cuttlefish::AndroidBuild.

◆ VendorPartitions()

Result< std::set< std::string, std::less< void > > > cuttlefish::FakeAndroidBuild::VendorPartitions ( )
overridevirtual

Reimplemented from cuttlefish::AndroidBuild.

Member Data Documentation

◆ ab_partitions_

std::optional<std::set<std::string, std::less<void> > > cuttlefish::FakeAndroidBuild::ab_partitions_
private

◆ extract_dir_

std::optional<std::string> cuttlefish::FakeAndroidBuild::extract_dir_
private

◆ images_

std::optional<std::map<std::string, std::pair<ImageStatus, std::string>, std::less<void> > > cuttlefish::FakeAndroidBuild::images_
private

◆ logical_partitions_

std::optional<std::set<std::string, std::less<void> > > cuttlefish::FakeAndroidBuild::logical_partitions_
private

◆ physical_partitions_

std::optional<std::set<std::string, std::less<void> > > cuttlefish::FakeAndroidBuild::physical_partitions_
private

◆ system_partitions_

std::optional<std::set<std::string, std::less<void> > > cuttlefish::FakeAndroidBuild::system_partitions_
private

◆ vendor_partitions_

std::optional<std::set<std::string, std::less<void> > > cuttlefish::FakeAndroidBuild::vendor_partitions_
private

The documentation for this class was generated from the following files: