Chromium Embedded Framework (CEF)  126.2.0+g5c56e98+chromium-126.0.6478.62
CefZipReader Class Referenceabstract

Class that supports the reading of zip archives via the zlib unzip API. More...

#include "include/cef_zip_reader.h"

Inheritance diagram for CefZipReader:
CefBaseRefCounted

Public Member Functions

virtual bool MoveToFirstFile ()=0
 Moves the cursor to the first file in the archive. More...
 
virtual bool MoveToNextFile ()=0
 Moves the cursor to the next file in the archive. More...
 
virtual bool MoveToFile (const CefString &fileName, bool caseSensitive)=0
 Moves the cursor to the specified file in the archive. More...
 
virtual bool Close ()=0
 Closes the archive. More...
 
virtual CefString GetFileName ()=0
 The below methods act on the file at the current cursor position. More...
 
virtual int64_t GetFileSize ()=0
 Returns the uncompressed size of the file. More...
 
virtual CefBaseTime GetFileLastModified ()=0
 Returns the last modified timestamp for the file. More...
 
virtual bool OpenFile (const CefString &password)=0
 Opens the file for reading of uncompressed data. More...
 
virtual bool CloseFile ()=0
 Closes the file. More...
 
virtual int ReadFile (void *buffer, size_t bufferSize)=0
 Read uncompressed file contents into the specified buffer. More...
 
virtual int64_t Tell ()=0
 Returns the current offset in the uncompressed file contents. More...
 
virtual bool Eof ()=0
 Returns true if at end of the file contents. More...
 
- Public Member Functions inherited from CefBaseRefCounted
virtual void AddRef () const =0
 Called to increment the reference count for the object. More...
 
virtual bool Release () const =0
 Called to decrement the reference count for the object. More...
 
virtual bool HasOneRef () const =0
 Returns true if the reference count is 1. More...
 
virtual bool HasAtLeastOneRef () const =0
 Returns true if the reference count is at least 1. More...
 

Static Public Member Functions

static CefRefPtr< CefZipReaderCreate (CefRefPtr< CefStreamReader > stream)
 Create a new CefZipReader object. More...
 

Additional Inherited Members

- Protected Member Functions inherited from CefBaseRefCounted
virtual ~CefBaseRefCounted ()
 

Detailed Description

Class that supports the reading of zip archives via the zlib unzip API.

The methods of this class should only be called on the thread that creates the object.

Member Function Documentation

◆ Close()

virtual bool CefZipReader::Close ( )
pure virtual

Closes the archive.

This should be called directly to ensure that cleanup occurs on the correct thread.

◆ CloseFile()

virtual bool CefZipReader::CloseFile ( )
pure virtual

Closes the file.

◆ Create()

static CefRefPtr<CefZipReader> CefZipReader::Create ( CefRefPtr< CefStreamReader stream)
static

Create a new CefZipReader object.

The returned object's methods can only be called from the thread that created the object.

◆ Eof()

virtual bool CefZipReader::Eof ( )
pure virtual

Returns true if at end of the file contents.

◆ GetFileLastModified()

virtual CefBaseTime CefZipReader::GetFileLastModified ( )
pure virtual

Returns the last modified timestamp for the file.

◆ GetFileName()

virtual CefString CefZipReader::GetFileName ( )
pure virtual

The below methods act on the file at the current cursor position.

Returns the name of the file.

◆ GetFileSize()

virtual int64_t CefZipReader::GetFileSize ( )
pure virtual

Returns the uncompressed size of the file.

◆ MoveToFile()

virtual bool CefZipReader::MoveToFile ( const CefString fileName,
bool  caseSensitive 
)
pure virtual

Moves the cursor to the specified file in the archive.

If |caseSensitive| is true then the search will be case sensitive. Returns true if the cursor position was set successfully.

◆ MoveToFirstFile()

virtual bool CefZipReader::MoveToFirstFile ( )
pure virtual

Moves the cursor to the first file in the archive.

Returns true if the cursor position was set successfully.

◆ MoveToNextFile()

virtual bool CefZipReader::MoveToNextFile ( )
pure virtual

Moves the cursor to the next file in the archive.

Returns true if the cursor position was set successfully.

◆ OpenFile()

virtual bool CefZipReader::OpenFile ( const CefString password)
pure virtual

Opens the file for reading of uncompressed data.

A read password may optionally be specified.

◆ ReadFile()

virtual int CefZipReader::ReadFile ( void *  buffer,
size_t  bufferSize 
)
pure virtual

Read uncompressed file contents into the specified buffer.

Returns < 0 if an error occurred, 0 if at the end of file, or the number of bytes read.

◆ Tell()

virtual int64_t CefZipReader::Tell ( )
pure virtual

Returns the current offset in the uncompressed file contents.


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