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

Generic datatype value associated functions. More...

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...
 

Detailed Description

Generic datatype value associated functions.

Function Documentation

DIFFUSION_VALUE_T* diffusion_value_dup ( const DIFFUSION_VALUE_T value)

Create a copy of a DIFFUSION_VALUE_T.

diffusion_value_free should be called on this pointer when no longer needed.

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.