Android-cuttlefish cvd tool
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
cuttlefish::anonymous_namespace{buffered_zip_source.cc}::BufferedZipSourceCallbacks Class Reference
Inheritance diagram for cuttlefish::anonymous_namespace{buffered_zip_source.cc}::BufferedZipSourceCallbacks:
Inheritance graph
[legend]
Collaboration diagram for cuttlefish::anonymous_namespace{buffered_zip_source.cc}::BufferedZipSourceCallbacks:
Collaboration graph
[legend]

Public Member Functions

bool Close () override
 
bool Open () override
 
int64_t Read (char *data, uint64_t len) override
 
uint64_t Size () override
 
bool SetOffset (int64_t new_offset) override
 
int64_t Offset () override
 
- Public Member Functions inherited from cuttlefish::SeekableZipSourceCallback
virtual ~SeekableZipSourceCallback ()=default
 
virtual bool SetOffset (int64_t offset)=0
 
virtual int64_t Offset ()=0
 
- Public Member Functions inherited from cuttlefish::ReadableZipSourceCallback
virtual ~ReadableZipSourceCallback ()=default
 
virtual bool Close ()=0
 
virtual bool Open ()=0
 
virtual int64_t Read (char *data, uint64_t len)=0
 
virtual uint64_t Size ()=0
 

Static Public Member Functions

static Result< std::unique_ptr< BufferedZipSourceCallbacks > > Create (std::unique_ptr< ReaderSeeker > data_provider, size_t buffer_size)
 
static Result< std::unique_ptr< BufferedZipSourceCallbacks > > Create (SeekableZipSource source, size_t buffer_size)
 

Private Member Functions

 BufferedZipSourceCallbacks (size_t buffer_size)
 

Private Attributes

std::unique_ptr< ReaderSeekerdata_provider_
 
std::optional< SeekableZipSourcesource_
 
std::vector< char > buffer_
 
uint64_t size_ = 0
 
int64_t offset_ = 0
 
size_t offset_in_buffer_ = 0
 
size_t buffer_remaining_ = 0
 

Constructor & Destructor Documentation

◆ BufferedZipSourceCallbacks()

cuttlefish::anonymous_namespace{buffered_zip_source.cc}::BufferedZipSourceCallbacks::BufferedZipSourceCallbacks ( size_t  buffer_size)
inlineexplicitprivate

Member Function Documentation

◆ Close()

bool cuttlefish::anonymous_namespace{buffered_zip_source.cc}::BufferedZipSourceCallbacks::Close ( )
inlineoverridevirtual

◆ Create() [1/2]

static Result< std::unique_ptr< BufferedZipSourceCallbacks > > cuttlefish::anonymous_namespace{buffered_zip_source.cc}::BufferedZipSourceCallbacks::Create ( SeekableZipSource  source,
size_t  buffer_size 
)
inlinestatic

◆ Create() [2/2]

static Result< std::unique_ptr< BufferedZipSourceCallbacks > > cuttlefish::anonymous_namespace{buffered_zip_source.cc}::BufferedZipSourceCallbacks::Create ( std::unique_ptr< ReaderSeeker data_provider,
size_t  buffer_size 
)
inlinestatic

◆ Offset()

int64_t cuttlefish::anonymous_namespace{buffered_zip_source.cc}::BufferedZipSourceCallbacks::Offset ( )
inlineoverridevirtual

◆ Open()

bool cuttlefish::anonymous_namespace{buffered_zip_source.cc}::BufferedZipSourceCallbacks::Open ( )
inlineoverridevirtual

◆ Read()

int64_t cuttlefish::anonymous_namespace{buffered_zip_source.cc}::BufferedZipSourceCallbacks::Read ( char *  data,
uint64_t  len 
)
inlineoverridevirtual

◆ SetOffset()

bool cuttlefish::anonymous_namespace{buffered_zip_source.cc}::BufferedZipSourceCallbacks::SetOffset ( int64_t  new_offset)
inlineoverridevirtual

◆ Size()

uint64_t cuttlefish::anonymous_namespace{buffered_zip_source.cc}::BufferedZipSourceCallbacks::Size ( )
inlineoverridevirtual

Member Data Documentation

◆ buffer_

std::vector<char> cuttlefish::anonymous_namespace{buffered_zip_source.cc}::BufferedZipSourceCallbacks::buffer_
private

◆ buffer_remaining_

size_t cuttlefish::anonymous_namespace{buffered_zip_source.cc}::BufferedZipSourceCallbacks::buffer_remaining_ = 0
private

◆ data_provider_

std::unique_ptr<ReaderSeeker> cuttlefish::anonymous_namespace{buffered_zip_source.cc}::BufferedZipSourceCallbacks::data_provider_
private

◆ offset_

int64_t cuttlefish::anonymous_namespace{buffered_zip_source.cc}::BufferedZipSourceCallbacks::offset_ = 0
private

◆ offset_in_buffer_

size_t cuttlefish::anonymous_namespace{buffered_zip_source.cc}::BufferedZipSourceCallbacks::offset_in_buffer_ = 0
private

◆ size_

uint64_t cuttlefish::anonymous_namespace{buffered_zip_source.cc}::BufferedZipSourceCallbacks::size_ = 0
private

◆ source_

std::optional<SeekableZipSource> cuttlefish::anonymous_namespace{buffered_zip_source.cc}::BufferedZipSourceCallbacks::source_
private

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