Conviva Client Library
 
Loading...
Searching...
No Matches
Typedefs | Functions
ccl_dictionary

Implementation of a string-to-string dictionary. More...

Typedefs

typedef struct ccl_dictionary ccl_dictionary_t
 

Functions

ccl_dictionary_tccl_dictionary_create (void)
 Creates a new ccl_dictionary_t.
 
void ccl_dictionary_destroy (ccl_dictionary_t *dictionary)
 Destroys an existing ccl_dictionary_t.
 
int ccl_dictionary_put (ccl_dictionary_t *dictionary, const char *key, const char *value)
 Adds a key/value pair to an existing ccl_dictionary_t.
 
const char * ccl_dictionary_get (ccl_dictionary_t *dictionary, const char *key)
 Gets the value for a specific key within an existing ccl_dictionary_t.
 

Detailed Description

Implementation of a string-to-string dictionary.

Typedef Documentation

◆ ccl_dictionary_t

typedef struct ccl_dictionary ccl_dictionary_t

Function Documentation

◆ ccl_dictionary_create()

ccl_dictionary_t * ccl_dictionary_create ( void  )

Creates a new ccl_dictionary_t.

Returns
A ccl_dictionary_t, or NULL on failure.

◆ ccl_dictionary_destroy()

void ccl_dictionary_destroy ( ccl_dictionary_t dictionary)

Destroys an existing ccl_dictionary_t.

Parameters
dictionaryccl_dictionary_t to destroy.

◆ ccl_dictionary_get()

const char * ccl_dictionary_get ( ccl_dictionary_t dictionary,
const char *  key 
)

Gets the value for a specific key within an existing ccl_dictionary_t.

Parameters
dictionaryccl_dictionary_t to fetch the value from.
keyKey for the pair.
Returns
The string value for the key. NULL if not found.
Warning
Returned strings must not be freed by the caller.

◆ ccl_dictionary_put()

int ccl_dictionary_put ( ccl_dictionary_t dictionary,
const char *  key,
const char *  value 
)

Adds a key/value pair to an existing ccl_dictionary_t.

Parameters
dictionaryccl_dictionary_t to add a new key/value pair to.
keyKey of the new pair.
valueString value of the new pair.
Returns
CCL_SUCCESS or CCL_ERROR