Diffusion C API  6.3.3
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
diffusion-value.h File Reference

Typedefs

typedef struct DIFFUSION_VALUE_T DIFFUSION_VALUE_T
 Opaque diffusion value data type.
 

Functions

bool diffusion_value_get_raw_bytes (const DIFFUSION_VALUE_T *value, void **raw_bytes, size_t *len)
 Retrieve the value's raw bytes. More...
 
DIFFUSION_VALUE_Tdiffusion_value_dup (const DIFFUSION_VALUE_T *value)
 Create a copy of a DIFFUSION_VALUE_T. More...
 
void diffusion_value_free (DIFFUSION_VALUE_T *value)
 Free a diffusion value. More...
 

Function Documentation

DIFFUSION_VALUE_T* diffusion_value_dup ( const DIFFUSION_VALUE_T value)

Create a copy of a DIFFUSION_VALUE_T.

Parameters
valuevalue to be copied.
Returns
copy of the provided DIFFUSION_VALUE_T. NULL if the value cannot be copied.
void diffusion_value_free ( DIFFUSION_VALUE_T value)

Free a diffusion value.

Parameters
valuevalue to be freed.
bool diffusion_value_get_raw_bytes ( const DIFFUSION_VALUE_T value,
void **  raw_bytes,
size_t *  len 
)

Retrieve the value's raw bytes.

If the raw bytes are successfully retrieved from the diffusion value, the "len" parameter will have its value set to the length of the returned bytes.

Parameters
valuethe diffusion value
raw_bytespointer to a pointer to be set
lensize_t pointer to have its value set to the length of the bytes data.
Returns
true if the value's raw bytes were successfully retrieved. False otherwise.