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

Class used to read data from a stream. More...

#include "include/cef_stream.h"

Inheritance diagram for CefStreamReader:
CefBaseRefCounted

Public Member Functions

virtual size_t Read (void *ptr, size_t size, size_t n)=0
 Read raw binary data. More...
 
virtual int Seek (int64_t offset, int whence)=0
 Seek to the specified offset position. More...
 
virtual int64_t Tell ()=0
 Return the current offset position. More...
 
virtual int Eof ()=0
 Return non-zero if at end of file. More...
 
virtual bool MayBlock ()=0
 Returns true if this reader performs work like accessing the file system which may block. 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< CefStreamReaderCreateForFile (const CefString &fileName)
 Create a new CefStreamReader object from a file. More...
 
static CefRefPtr< CefStreamReaderCreateForData (void *data, size_t size)
 Create a new CefStreamReader object from data. More...
 
static CefRefPtr< CefStreamReaderCreateForHandler (CefRefPtr< CefReadHandler > handler)
 Create a new CefStreamReader object from a custom handler. More...
 

Additional Inherited Members

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

Detailed Description

Class used to read data from a stream.

The methods of this class may be called on any thread.

Member Function Documentation

◆ CreateForData()

static CefRefPtr<CefStreamReader> CefStreamReader::CreateForData ( void *  data,
size_t  size 
)
static

Create a new CefStreamReader object from data.

◆ CreateForFile()

static CefRefPtr<CefStreamReader> CefStreamReader::CreateForFile ( const CefString fileName)
static

Create a new CefStreamReader object from a file.

◆ CreateForHandler()

static CefRefPtr<CefStreamReader> CefStreamReader::CreateForHandler ( CefRefPtr< CefReadHandler handler)
static

Create a new CefStreamReader object from a custom handler.

◆ Eof()

virtual int CefStreamReader::Eof ( )
pure virtual

Return non-zero if at end of file.

◆ MayBlock()

virtual bool CefStreamReader::MayBlock ( )
pure virtual

Returns true if this reader performs work like accessing the file system which may block.

Used as a hint for determining the thread to access the reader from.

◆ Read()

virtual size_t CefStreamReader::Read ( void *  ptr,
size_t  size,
size_t  n 
)
pure virtual

Read raw binary data.

◆ Seek()

virtual int CefStreamReader::Seek ( int64_t  offset,
int  whence 
)
pure virtual

Seek to the specified offset position.

|whence| may be any one of SEEK_CUR, SEEK_END or SEEK_SET. Returns zero on success and non-zero on failure.

◆ Tell()

virtual int64_t CefStreamReader::Tell ( )
pure virtual

Return the current offset position.


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