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

#include <misc_image.h>

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

Public Member Functions

 MiscImage (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 = "misc"
 

Private Member Functions

 MiscImage (std::string)
 

Private Attributes

bool ready_
 
std::string path_
 

Constructor & Destructor Documentation

◆ MiscImage() [1/2]

cuttlefish::MiscImage::MiscImage ( const CuttlefishConfig::InstanceSpecific instance)

◆ MiscImage() [2/2]

cuttlefish::MiscImage::MiscImage ( std::string  )
private

Member Function Documentation

◆ Generate()

Result< std::string > cuttlefish::MiscImage::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::MiscImage::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::MiscImage::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::MiscImage::kName = "misc"
staticconstexpr

◆ path_

std::string cuttlefish::MiscImage::path_
private

◆ ready_

bool cuttlefish::MiscImage::ready_
private

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