Chromium Embedded Framework (CEF)  128.4.2+g5c235a2+chromium-128.0.6613.18
CefBinaryBuffer Class Referenceabstract

This class acts as a container for managing binary data. More...

#include "include/wrapper/cef_message_router.h"

Inheritance diagram for CefBinaryBuffer:
CefBaseRefCounted

Public Member Functions

virtual const void * GetData () const =0
 Returns the read-only pointer to the memory. More...
 
virtual void * GetData ()=0
 Returns the writable pointer to the memory. More...
 
virtual size_t GetSize () const =0
 Returns the size of the data. 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

This class acts as a container for managing binary data.

It retains references to the underlying backing store, ensuring it is valid as long as the CefBinaryBuffer exists. This allows efficient, zero-copy access to data received from another process.

This class is not designed to be thread-safe, and it is the user's responsibility to synchronize access from multiple threads to ensure data integrity.

Member Function Documentation

◆ GetData() [1/2]

virtual const void* CefBinaryBuffer::GetData ( ) const
pure virtual

Returns the read-only pointer to the memory.

Returns nullptr if |GetSize()| returns zero. The returned pointer is only valid for the life span of this object.

◆ GetData() [2/2]

virtual void* CefBinaryBuffer::GetData ( )
pure virtual

Returns the writable pointer to the memory.

Returns nullptr if |GetSize()| returns zero. The returned pointer is only valid for the life span of this object.

◆ GetSize()

virtual size_t CefBinaryBuffer::GetSize ( ) const
pure virtual

Returns the size of the data.


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