Android-cuttlefish cvd tool
Public Member Functions | Protected Member Functions | Friends | List of all members
fastboot::IFastBootDriver Class Referenceabstract

#include <fastboot_driver_interface.h>

Inheritance diagram for fastboot::IFastBootDriver:
Inheritance graph
[legend]

Public Member Functions

template<typename F >
auto RunWithNoCrash (F &&functor)
 
virtual RetCode FlashPartition (const std::string &partition, const std::vector< char > &data)=0
 
virtual RetCode FlashPartition (const std::string &partition, android::base::borrowed_fd fd, uint32_t sz)=0
 
virtual RetCode DeletePartition (const std::string &partition)=0
 
virtual RetCode WaitForDisconnect ()=0
 
virtual RetCode Reboot (std::string *response=nullptr, std::vector< std::string > *info=nullptr)=0
 
virtual RetCode RebootTo (std::string target, std::string *response=nullptr, std::vector< std::string > *info=nullptr)=0
 
virtual RetCode GetVar (const std::string &key, std::string *val, std::vector< std::string > *info=nullptr)=0
 
virtual RetCode FetchToFd (const std::string &partition, android::base::borrowed_fd fd, int64_t offset=-1, int64_t size=-1, std::string *response=nullptr, std::vector< std::string > *info=nullptr)=0
 
virtual RetCode Fetch (const std::string &partition, const std::function< RetCode(const char *, uint64_t)> &write_fn, int64_t offset=-1, int64_t size=-1, std::string *response=nullptr, std::vector< std::string > *info=nullptr)=0
 
template<typename T >
RetCode Fetch (const std::string &partition, T *container, int64_t offset=-1, int64_t size=-1, std::string *response=nullptr, std::vector< std::string > *info=nullptr)
 
RetCode FetchAtOffset (const std::string &partition, void *data, size_t size, int64_t offset)
 
virtual RetCode Download (const std::string &name, android::base::borrowed_fd fd, size_t size, std::string *response=nullptr, std::vector< std::string > *info=nullptr)=0
 
virtual RetCode Download (android::base::borrowed_fd fd, size_t size, std::string *response=nullptr, std::vector< std::string > *info=nullptr)=0
 
virtual RetCode Download (const std::string &name, const std::vector< char > &buf, std::string *response=nullptr, std::vector< std::string > *info=nullptr)=0
 
virtual RetCode Download (const std::vector< char > &buf, std::string *response=nullptr, std::vector< std::string > *info=nullptr)=0
 
virtual RetCode Download (const std::string &partition, struct sparse_file *s, uint32_t sz, size_t current, size_t total, bool use_crc, std::string *response=nullptr, std::vector< std::string > *info=nullptr)=0
 
virtual RetCode RawCommand (const std::string &cmd, const std::string &message, std::string *response=nullptr, std::vector< std::string > *info=nullptr, int *dsize=nullptr)=0
 
virtual RetCode RawCommand (const std::string &cmd, std::string *response=nullptr, std::vector< std::string > *info=nullptr, int *dsize=nullptr)=0
 
virtual RetCode ResizePartition (const std::string &partition, const std::string &size)=0
 
virtual RetCode Erase (const std::string &partition, std::string *response=nullptr, std::vector< std::string > *info=nullptr)=0
 
virtual RetCode Flash (const std::string &partition, std::string *response=nullptr, std::vector< std::string > *info=nullptr)=0
 
virtual ~IFastBootDriver ()=default
 
virtual std::string Error ()=0
 
virtual RetCode SetActive (const std::string &slot, std::string *response=nullptr, std::vector< std::string > *info=nullptr)=0
 
virtual void set_transport (std::unique_ptr< Transport > transport)=0
 
virtual RetCode SnapshotUpdateCommand (const std::string &command, std::string *response=nullptr, std::vector< std::string > *info=nullptr)=0
 
virtual RetCode Boot (std::string *response=nullptr, std::vector< std::string > *info=nullptr)=0
 
virtual RetCode Continue (std::string *response=nullptr, std::vector< std::string > *info=nullptr)=0
 
virtual RetCode CreatePartition (const std::string &partition, const std::string &size)=0
 
virtual RetCode Upload (const std::string &outfile, std::string *response=nullptr, std::vector< std::string > *info=nullptr)=0
 

Protected Member Functions

virtual void SetCrashOnError (bool)=0
 
virtual bool GetCrashOnError () const =0
 

Friends

struct NoCrashGuard
 

Constructor & Destructor Documentation

◆ ~IFastBootDriver()

virtual fastboot::IFastBootDriver::~IFastBootDriver ( )
virtualdefault

Member Function Documentation

◆ Boot()

virtual RetCode fastboot::IFastBootDriver::Boot ( std::string *  response = nullptr,
std::vector< std::string > *  info = nullptr 
)
pure virtual

Implemented in fastboot::FastBootDriver.

◆ Continue()

virtual RetCode fastboot::IFastBootDriver::Continue ( std::string *  response = nullptr,
std::vector< std::string > *  info = nullptr 
)
pure virtual

Implemented in fastboot::FastBootDriver.

◆ CreatePartition()

virtual RetCode fastboot::IFastBootDriver::CreatePartition ( const std::string &  partition,
const std::string &  size 
)
pure virtual

Implemented in fastboot::FastBootDriver.

◆ DeletePartition()

virtual RetCode fastboot::IFastBootDriver::DeletePartition ( const std::string &  partition)
pure virtual

Implemented in fastboot::FastBootDriver.

◆ Download() [1/5]

virtual RetCode fastboot::IFastBootDriver::Download ( android::base::borrowed_fd  fd,
size_t  size,
std::string *  response = nullptr,
std::vector< std::string > *  info = nullptr 
)
pure virtual

Implemented in fastboot::FastBootDriver.

◆ Download() [2/5]

virtual RetCode fastboot::IFastBootDriver::Download ( const std::string &  name,
android::base::borrowed_fd  fd,
size_t  size,
std::string *  response = nullptr,
std::vector< std::string > *  info = nullptr 
)
pure virtual

Implemented in fastboot::FastBootDriver.

◆ Download() [3/5]

virtual RetCode fastboot::IFastBootDriver::Download ( const std::string &  name,
const std::vector< char > &  buf,
std::string *  response = nullptr,
std::vector< std::string > *  info = nullptr 
)
pure virtual

Implemented in fastboot::FastBootDriver.

◆ Download() [4/5]

virtual RetCode fastboot::IFastBootDriver::Download ( const std::string &  partition,
struct sparse_file *  s,
uint32_t  sz,
size_t  current,
size_t  total,
bool  use_crc,
std::string *  response = nullptr,
std::vector< std::string > *  info = nullptr 
)
pure virtual

Implemented in fastboot::FastBootDriver.

◆ Download() [5/5]

virtual RetCode fastboot::IFastBootDriver::Download ( const std::vector< char > &  buf,
std::string *  response = nullptr,
std::vector< std::string > *  info = nullptr 
)
pure virtual

Implemented in fastboot::FastBootDriver.

◆ Erase()

virtual RetCode fastboot::IFastBootDriver::Erase ( const std::string &  partition,
std::string *  response = nullptr,
std::vector< std::string > *  info = nullptr 
)
pure virtual

Implemented in fastboot::FastBootDriver.

◆ Error()

virtual std::string fastboot::IFastBootDriver::Error ( )
pure virtual

Implemented in fastboot::FastBootDriver.

◆ Fetch() [1/2]

virtual RetCode fastboot::IFastBootDriver::Fetch ( const std::string &  partition,
const std::function< RetCode(const char *, uint64_t)> &  write_fn,
int64_t  offset = -1,
int64_t  size = -1,
std::string *  response = nullptr,
std::vector< std::string > *  info = nullptr 
)
pure virtual

Implemented in fastboot::FastBootDriver.

◆ Fetch() [2/2]

template<typename T >
RetCode fastboot::IFastBootDriver::Fetch ( const std::string &  partition,
T *  container,
int64_t  offset = -1,
int64_t  size = -1,
std::string *  response = nullptr,
std::vector< std::string > *  info = nullptr 
)
inline

◆ FetchAtOffset()

RetCode fastboot::IFastBootDriver::FetchAtOffset ( const std::string &  partition,
void *  data,
size_t  size,
int64_t  offset 
)
inline

◆ FetchToFd()

virtual RetCode fastboot::IFastBootDriver::FetchToFd ( const std::string &  partition,
android::base::borrowed_fd  fd,
int64_t  offset = -1,
int64_t  size = -1,
std::string *  response = nullptr,
std::vector< std::string > *  info = nullptr 
)
pure virtual

Implemented in fastboot::FastBootDriver.

◆ Flash()

virtual RetCode fastboot::IFastBootDriver::Flash ( const std::string &  partition,
std::string *  response = nullptr,
std::vector< std::string > *  info = nullptr 
)
pure virtual

Implemented in fastboot::FastBootDriver.

◆ FlashPartition() [1/2]

virtual RetCode fastboot::IFastBootDriver::FlashPartition ( const std::string &  partition,
android::base::borrowed_fd  fd,
uint32_t  sz 
)
pure virtual

Implemented in fastboot::FastBootDriver.

◆ FlashPartition() [2/2]

virtual RetCode fastboot::IFastBootDriver::FlashPartition ( const std::string &  partition,
const std::vector< char > &  data 
)
pure virtual

Implemented in fastboot::FastBootDriver.

◆ GetCrashOnError()

virtual bool fastboot::IFastBootDriver::GetCrashOnError ( ) const
protectedpure virtual

Implemented in fastboot::FastBootDriver.

◆ GetVar()

virtual RetCode fastboot::IFastBootDriver::GetVar ( const std::string &  key,
std::string *  val,
std::vector< std::string > *  info = nullptr 
)
pure virtual

Implemented in fastboot::FastBootDriver.

◆ RawCommand() [1/2]

virtual RetCode fastboot::IFastBootDriver::RawCommand ( const std::string &  cmd,
const std::string &  message,
std::string *  response = nullptr,
std::vector< std::string > *  info = nullptr,
int *  dsize = nullptr 
)
pure virtual

Implemented in fastboot::FastBootDriver.

◆ RawCommand() [2/2]

virtual RetCode fastboot::IFastBootDriver::RawCommand ( const std::string &  cmd,
std::string *  response = nullptr,
std::vector< std::string > *  info = nullptr,
int *  dsize = nullptr 
)
pure virtual

Implemented in fastboot::FastBootDriver.

◆ Reboot()

virtual RetCode fastboot::IFastBootDriver::Reboot ( std::string *  response = nullptr,
std::vector< std::string > *  info = nullptr 
)
pure virtual

Implemented in fastboot::FastBootDriver.

◆ RebootTo()

virtual RetCode fastboot::IFastBootDriver::RebootTo ( std::string  target,
std::string *  response = nullptr,
std::vector< std::string > *  info = nullptr 
)
pure virtual

Implemented in fastboot::FastBootDriver.

◆ ResizePartition()

virtual RetCode fastboot::IFastBootDriver::ResizePartition ( const std::string &  partition,
const std::string &  size 
)
pure virtual

Implemented in fastboot::FastBootDriver.

◆ RunWithNoCrash()

template<typename F >
auto fastboot::IFastBootDriver::RunWithNoCrash ( F &&  functor)
inline

◆ set_transport()

virtual void fastboot::IFastBootDriver::set_transport ( std::unique_ptr< Transport >  transport)
pure virtual

Implemented in fastboot::FastBootDriver.

◆ SetActive()

virtual RetCode fastboot::IFastBootDriver::SetActive ( const std::string &  slot,
std::string *  response = nullptr,
std::vector< std::string > *  info = nullptr 
)
pure virtual

Implemented in fastboot::FastBootDriver.

◆ SetCrashOnError()

virtual void fastboot::IFastBootDriver::SetCrashOnError ( bool  )
protectedpure virtual

Implemented in fastboot::FastBootDriver.

◆ SnapshotUpdateCommand()

virtual RetCode fastboot::IFastBootDriver::SnapshotUpdateCommand ( const std::string &  command,
std::string *  response = nullptr,
std::vector< std::string > *  info = nullptr 
)
pure virtual

Implemented in fastboot::FastBootDriver.

◆ Upload()

virtual RetCode fastboot::IFastBootDriver::Upload ( const std::string &  outfile,
std::string *  response = nullptr,
std::vector< std::string > *  info = nullptr 
)
pure virtual

Implemented in fastboot::FastBootDriver.

◆ WaitForDisconnect()

virtual RetCode fastboot::IFastBootDriver::WaitForDisconnect ( )
pure virtual

Implemented in fastboot::FastBootDriver.

Friends And Related Function Documentation

◆ NoCrashGuard

friend struct NoCrashGuard
friend

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