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

#include <metadata_image.h>

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

Public Member Functions

 MetadataImage (const CuttlefishConfig::InstanceSpecific &)
 
std::string Name () const override
 
Result< std::string > Generate () override
 
Result< std::string > Path () const override
 
- Public Member Functions inherited from cuttlefish::ImageFile
virtual ~ImageFile ()=default
 
virtual std::string Name () const =0
 
virtual Result< std::string > Generate ()=0
 
virtual Result< std::string > Path () const =0
 

Static Public Attributes

static constexpr std::string_view kName = "metadata"
 

Private Member Functions

 MetadataImage (std::string)
 

Private Attributes

bool ready_
 
std::string path_
 

Constructor & Destructor Documentation

◆ MetadataImage() [1/2]

cuttlefish::MetadataImage::MetadataImage ( const CuttlefishConfig::InstanceSpecific ins)

◆ MetadataImage() [2/2]

cuttlefish::MetadataImage::MetadataImage ( std::string  path)
private

Member Function Documentation

◆ Generate()

Result< std::string > cuttlefish::MetadataImage::Generate ( )
overridevirtual

If the image file is not ready, generate it. Returns the path to the file.

If this function succeeds, Path() should return the same value afterwards.

Implements cuttlefish::ImageFile.

◆ Name()

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

Image name, reused in multiple places for consistency.

  • The filename (minus .img extension) used on the file system.
  • GPT entry name
  • Logical partition name within the super image.

Implements cuttlefish::ImageFile.

◆ Path()

Result< std::string > cuttlefish::MetadataImage::Path ( ) const
overridevirtual

Returns the path on the filesystem where the image file is.

The image file should be ready for use and correct for the current device configuration.

Implements cuttlefish::ImageFile.

Member Data Documentation

◆ kName

constexpr std::string_view cuttlefish::MetadataImage::kName = "metadata"
staticconstexpr

◆ path_

std::string cuttlefish::MetadataImage::path_
private

◆ ready_

bool cuttlefish::MetadataImage::ready_
private

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