libvariant
 All Classes Namespaces Files Functions Enumerations Groups
Public Member Functions | Static Public Member Functions | List of all members
libvariant::Blob Class Reference

Public Member Functions

BlobPtr Copy () const
 
void * GetPtr (unsigned i)
 
const void * GetPtr (unsigned i) const
 
unsigned GetLength (unsigned i) const
 
struct iovec * GetIOVec ()
 
const struct iovec * GetIOVec () const
 
unsigned GetNumBuffers () const
 
unsigned GetTotalLength () const
 
int Compare (ConstBlobPtr other) const
 

Static Public Member Functions

static BlobPtr Create (void *ptr, unsigned len, BlobFreeFunc ffunc, void *context)
 Reference the buffer and call ffunc when Blob no longer references it.
 
static BlobPtr Create (struct iovec *iov, unsigned iov_len, BlobFreeFunc ffunc, void *context)
 Will call ffunc on each buffer in iov.
 
static BlobPtr CreateCopy (const void *ptr, unsigned len)
 Copy the data into a newly allocatd buffer.
 
static BlobPtr CreateCopy (const struct iovec *iov, unsigned iov_len)
 
static BlobPtr CreateFree (void *ptr, unsigned len)
 Reference the buffer and when done call free to free the buffer.
 
static BlobPtr CreateFree (struct iovec *iov, unsigned iov_len)
 
static BlobPtr CreateReferenced (void *ptr, unsigned len)
 Reference the buffer, assume static or other allocation lifetime where.
 
static BlobPtr CreateReferenced (struct iovec *iov, unsigned iov_len)
 

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