Liblinphone  5.3.0
Public Member Functions | Static Public Member Functions | List of all members
linphone::Buffer Class Reference

The object representing a data buffer. More...

#include <buffer.hh>

Inheritance diagram for linphone::Buffer:

Public Member Functions

LINPHONECXX_PUBLIC Buffer (void *ptr, bool takeRef=true)
 
LINPHONECXX_PUBLIC _LinphoneBuffer * cPtr ()
 
LINPHONECXX_PUBLIC const uint8_t * getContent () const
 Get the content of the data buffer. More...
 
LINPHONECXX_PUBLIC bool isEmpty () const
 Tell whether the Buffer is empty. More...
 
LINPHONECXX_PUBLIC size_t getSize () const
 Get the size of the content of the data buffer. More...
 
LINPHONECXX_PUBLIC void setSize (size_t size)
 Set the size of the content of the data buffer. More...
 
LINPHONECXX_PUBLIC std::string getStringContent () const
 Get the string content of the data buffer. More...
 
LINPHONECXX_PUBLIC void setStringContent (const std::string &content)
 Set the string content of the data buffer. More...
 
LINPHONECXX_PUBLIC void setContent (const uint8_t *content, size_t size)
 Set the content of the data buffer. More...
 

Static Public Member Functions

static LINPHONECXX_PUBLIC std::shared_ptr< linphone::BuffernewFromData (const uint8_t *data, size_t size)
 Create a new Buffer object from existing data. More...
 
static LINPHONECXX_PUBLIC std::shared_ptr< linphone::BuffernewFromString (const std::string &data)
 Create a new Buffer object from a string. More...
 

Detailed Description

The object representing a data buffer.

Member Function Documentation

◆ getContent()

LINPHONECXX_PUBLIC const uint8_t* linphone::Buffer::getContent ( ) const

Get the content of the data buffer.

Returns
The content of the data buffer.

◆ getSize()

LINPHONECXX_PUBLIC size_t linphone::Buffer::getSize ( ) const

Get the size of the content of the data buffer.

Returns
The size of the content of the data buffer.

◆ getStringContent()

LINPHONECXX_PUBLIC std::string linphone::Buffer::getStringContent ( ) const

Get the string content of the data buffer.

Returns
The string content of the data buffer.

◆ isEmpty()

LINPHONECXX_PUBLIC bool linphone::Buffer::isEmpty ( ) const

Tell whether the Buffer is empty.

Returns
A boolean value telling whether the Buffer is empty or not.

◆ newFromData()

static LINPHONECXX_PUBLIC std::shared_ptr<linphone::Buffer> linphone::Buffer::newFromData ( const uint8_t *  data,
size_t  size 
)
static

Create a new Buffer object from existing data.

Parameters
dataThe initial data to store in the LinphoneBuffer.
sizeThe size of the initial data to stroe in the LinphoneBuffer.
Returns
A new Buffer object.

◆ newFromString()

static LINPHONECXX_PUBLIC std::shared_ptr<linphone::Buffer> linphone::Buffer::newFromString ( const std::string &  data)
static

Create a new Buffer object from a string.

Parameters
dataThe initial string content of the LinphoneBuffer.
Returns
A new Buffer object.

◆ setContent()

LINPHONECXX_PUBLIC void linphone::Buffer::setContent ( const uint8_t *  content,
size_t  size 
)

Set the content of the data buffer.

Parameters
contentThe content of the data buffer.
sizeThe size of the content of the data buffer.

◆ setSize()

LINPHONECXX_PUBLIC void linphone::Buffer::setSize ( size_t  size)

Set the size of the content of the data buffer.

Parameters
sizeThe size of the content of the data buffer.

◆ setStringContent()

LINPHONECXX_PUBLIC void linphone::Buffer::setStringContent ( const std::string &  content)

Set the string content of the data buffer.

Parameters
contentThe string content of the data buffer.

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