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

#include <kernel_ramdisk_repacker.h>

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

Public Member Functions

 InstanceBootImage (const CuttlefishConfig &, const CuttlefishConfig::InstanceSpecific &, const BootImageFlag &)
 
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
 

Private Attributes

const CuttlefishConfigconfig_
 
const CuttlefishConfig::InstanceSpecific instance_
 
const BootImageFlagboot_image_flag_
 
std::optional< std::string > path_
 

Constructor & Destructor Documentation

◆ InstanceBootImage()

cuttlefish::InstanceBootImage::InstanceBootImage ( const CuttlefishConfig config,
const CuttlefishConfig::InstanceSpecific instance,
const BootImageFlag boot_image_flag 
)

Member Function Documentation

◆ Generate()

Result< std::string > cuttlefish::InstanceBootImage::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::InstanceBootImage::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::InstanceBootImage::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

◆ boot_image_flag_

const BootImageFlag* cuttlefish::InstanceBootImage::boot_image_flag_
private

◆ config_

const CuttlefishConfig* cuttlefish::InstanceBootImage::config_
private

◆ instance_

const CuttlefishConfig::InstanceSpecific cuttlefish::InstanceBootImage::instance_
private

◆ path_

std::optional<std::string> cuttlefish::InstanceBootImage::path_
private

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