Implementation of a string-to-string dictionary.
More...
Implementation of a string-to-string dictionary.
◆ ccl_dictionary_t
◆ ccl_dictionary_create()
Creates a new ccl_dictionary_t.
- Returns
- A ccl_dictionary_t, or NULL on failure.
◆ ccl_dictionary_destroy()
Destroys an existing ccl_dictionary_t.
- Parameters
-
| dictionary | ccl_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
-
| dictionary | ccl_dictionary_t to fetch the value from. |
| key | Key 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
-
| dictionary | ccl_dictionary_t to add a new key/value pair to. |
| key | Key of the new pair. |
| value | String value of the new pair. |
- Returns
- CCL_SUCCESS or CCL_ERROR