Chromium Embedded Framework (CEF)  115.2.0+g096e3eb+chromium-115.0.5790.13
CefByteReadHandler Class Reference

Thread safe implementation of the CefReadHandler class for reading an in-memory array of bytes. More...

#include "include/wrapper/cef_byte_read_handler.h"

Inheritance diagram for CefByteReadHandler:
CefReadHandler CefBaseRefCounted

Public Member Functions

 CefByteReadHandler (const unsigned char *bytes, size_t size, CefRefPtr< CefBaseRefCounted > source)
 Create a new object for reading an array of bytes. More...
 
 CefByteReadHandler (const CefByteReadHandler &)=delete
 
CefByteReadHandleroperator= (const CefByteReadHandler &)=delete
 
virtual size_t Read (void *ptr, size_t size, size_t n) override
 Read raw binary data. More...
 
virtual int Seek (int64_t offset, int whence) override
 Seek to the specified offset position. More...
 
virtual int64_t Tell () override
 Return the current offset position. More...
 
virtual int Eof () override
 Return non-zero if at end of file. More...
 
virtual bool MayBlock () override
 Return true if this handler 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...
 

Additional Inherited Members

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

Detailed Description

Thread safe implementation of the CefReadHandler class for reading an in-memory array of bytes.

Constructor & Destructor Documentation

◆ CefByteReadHandler() [1/2]

CefByteReadHandler::CefByteReadHandler ( const unsigned char *  bytes,
size_t  size,
CefRefPtr< CefBaseRefCounted source 
)

Create a new object for reading an array of bytes.

An optional |source| reference can be kept to keep the underlying data source from being released while the reader exists.

◆ CefByteReadHandler() [2/2]

CefByteReadHandler::CefByteReadHandler ( const CefByteReadHandler )
delete

Member Function Documentation

◆ Eof()

virtual int CefByteReadHandler::Eof ( )
overridevirtual

Return non-zero if at end of file.

Implements CefReadHandler.

◆ MayBlock()

virtual bool CefByteReadHandler::MayBlock ( )
inlineoverridevirtual

Return true if this handler performs work like accessing the file system which may block.

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

Implements CefReadHandler.

◆ operator=()

CefByteReadHandler& CefByteReadHandler::operator= ( const CefByteReadHandler )
delete

◆ Read()

virtual size_t CefByteReadHandler::Read ( void *  ptr,
size_t  size,
size_t  n 
)
overridevirtual

Read raw binary data.

Implements CefReadHandler.

◆ Seek()

virtual int CefByteReadHandler::Seek ( int64_t  offset,
int  whence 
)
overridevirtual

Seek to the specified offset position.

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

Implements CefReadHandler.

◆ Tell()

virtual int64_t CefByteReadHandler::Tell ( )
overridevirtual

Return the current offset position.

Implements CefReadHandler.


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