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

#include <fetcher_config.h>

Public Member Functions

 FetcherConfig ()
 
 FetcherConfig (FetcherConfig &&)
 
FetcherConfigoperator= (FetcherConfig &&)
 
bool SaveToFile (const std::string &file) const
 
bool LoadFromFile (const std::string &file)
 
bool add_cvd_file (const CvdFile &file, bool override_entry=false)
 
std::map< std::string, CvdFileget_cvd_files () const
 
std::string FindCvdFileWithSuffix (FileSource source, std::string_view suffix) const
 
Result< void > RemoveFileFromConfig (const std::string &path)
 

Private Attributes

Json::Value dictionary_
 
std::unique_ptr< std::mutex > mutex_
 

Detailed Description

A report of state to transfer from fetch_cvd to downstream consumers.

This includes data intended for programmatic access by other tools such as assemble_cvd. assemble_cvd can use signals like that multiple build IDs are present to judge that it needs to do super image remixing or rebuilding the boot image for a new kernel.

The output json also includes data relevant for human debugging, like which flags fetch_cvd was invoked with.

FetcherConfig is thread-safe for reads and writes, but the move constructor and assignment operator are not thread-safe and cannot be called concurrently with any other operations.

Constructor & Destructor Documentation

◆ FetcherConfig() [1/2]

cuttlefish::FetcherConfig::FetcherConfig ( )

◆ FetcherConfig() [2/2]

cuttlefish::FetcherConfig::FetcherConfig ( FetcherConfig &&  other)

Member Function Documentation

◆ add_cvd_file()

bool cuttlefish::FetcherConfig::add_cvd_file ( const CvdFile file,
bool  override_entry = false 
)

◆ FindCvdFileWithSuffix()

std::string cuttlefish::FetcherConfig::FindCvdFileWithSuffix ( FileSource  source,
std::string_view  suffix 
) const

◆ get_cvd_files()

std::map< std::string, CvdFile > cuttlefish::FetcherConfig::get_cvd_files ( ) const

◆ LoadFromFile()

bool cuttlefish::FetcherConfig::LoadFromFile ( const std::string &  file)

◆ operator=()

FetcherConfig & cuttlefish::FetcherConfig::operator= ( FetcherConfig &&  other)

◆ RemoveFileFromConfig()

Result< void > cuttlefish::FetcherConfig::RemoveFileFromConfig ( const std::string &  path)

◆ SaveToFile()

bool cuttlefish::FetcherConfig::SaveToFile ( const std::string &  file) const

Member Data Documentation

◆ dictionary_

Json::Value cuttlefish::FetcherConfig::dictionary_
private

◆ mutex_

std::unique_ptr<std::mutex> cuttlefish::FetcherConfig::mutex_
private

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