|
Android-cuttlefish cvd tool
|
#include <image_file.h>

Public Member Functions | |
| virtual | ~ImageFile ()=default |
| virtual std::string | Name () const =0 |
| virtual Result< std::string > | Generate ()=0 |
| virtual Result< std::string > | Path () const =0 |
An entire disk, GPT entry, or super image logical partition that ends up inside a block device inside the VM.
Image files may contain the contents of other image files, or serve as indirections to other image files.
Image files may come pre-made from an Android build, or may be generated dynamically at runtime.
Exposes the configuration of the image file as serialized data that can be used to determine whether an existing image file can be used or needs to be recreated.
Instances of this class have two states: configured but not created, and configured with a created image file. Subclasses should accept configuration at construction time, and should not expose any additional unconfigured states.
|
virtualdefault |
|
pure virtual |
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.
Implemented in cuttlefish::EfiLoaderImage, cuttlefish::InstanceBootImage, cuttlefish::MetadataImage, and cuttlefish::MiscImage.
|
pure virtual |
Image name, reused in multiple places for consistency.
Implemented in cuttlefish::EfiLoaderImage, cuttlefish::InstanceBootImage, cuttlefish::MetadataImage, and cuttlefish::MiscImage.
|
pure virtual |
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.
Implemented in cuttlefish::EfiLoaderImage, cuttlefish::InstanceBootImage, cuttlefish::MetadataImage, and cuttlefish::MiscImage.