XMMS2
|
Typedefs | |
typedef void(* | xmmsv_dict_foreach_func )(const char *key, xmmsv_t *value, void *user_data) |
typedef struct xmmsv_dict_iter_St | xmmsv_dict_iter_t |
Functions | |
int | xmmsv_dict_foreach (xmmsv_t *dictv, xmmsv_dict_foreach_func func, void *user_data) |
Apply a function to each key-element pair in the list. | |
int | xmmsv_get_dict_iter (const xmmsv_t *val, xmmsv_dict_iter_t **it) |
Retrieves a dict iterator from a dict xmmsv_t. | |
void | xmmsv_dict_iter_explicit_destroy (xmmsv_dict_iter_t *it) |
Explicitly free dict iterator. | |
int | xmmsv_dict_iter_pair (xmmsv_dict_iter_t *it, const char **key, xmmsv_t **val) |
Get the key-element pair currently pointed at by the iterator. | |
int | xmmsv_dict_iter_valid (xmmsv_dict_iter_t *it) |
Check whether the iterator is valid and points to a valid pair. | |
void | xmmsv_dict_iter_first (xmmsv_dict_iter_t *it) |
Rewind the iterator to the start of the dict. | |
void | xmmsv_dict_iter_next (xmmsv_dict_iter_t *it) |
Advance the iterator to the next pair in the dict. | |
int | xmmsv_dict_iter_find (xmmsv_dict_iter_t *it, const char *key) |
Move the iterator to the pair with the given key (if it exists) or move it to the position where the key would have to be put (if it doesn't exist yet). | |
int | xmmsv_dict_iter_set (xmmsv_dict_iter_t *it, xmmsv_t *val) |
Replace the element of the pair currently pointed to by the iterator. | |
int | xmmsv_dict_iter_remove (xmmsv_dict_iter_t *it) |
Remove the pair in the dict pointed at by the iterator. | |
int | xmmsv_dict_iter_pair_string (xmmsv_dict_iter_t *it, const char **key, const char **r) |
int | xmmsv_dict_iter_pair_int (xmmsv_dict_iter_t *it, const char **key, int32_t *r) |
int | xmmsv_dict_iter_pair_coll (xmmsv_dict_iter_t *it, const char **key, xmmsv_coll_t **r) |
int | xmmsv_dict_iter_set_string (xmmsv_dict_iter_t *it, const char *elem) |
int | xmmsv_dict_iter_set_int (xmmsv_dict_iter_t *it, int32_t elem) |
int | xmmsv_dict_iter_set_coll (xmmsv_dict_iter_t *it, xmmsv_coll_t *elem) |
typedef void(* xmmsv_dict_foreach_func)(const char *key, xmmsv_t *value, void *user_data) |
Definition at line 56 of file xmmsv_dict.h.
typedef struct xmmsv_dict_iter_St xmmsv_dict_iter_t |
Definition at line 59 of file xmmsv_dict.h.
int xmmsv_dict_foreach | ( | xmmsv_t * | dictv, |
xmmsv_dict_foreach_func | func, | ||
void * | user_data | ||
) |
Apply a function to each key-element pair in the list.
No particular order is assumed.
dictv | A xmmsv_t containing a dict. |
function | The function to apply to each key-element pair. |
user_data | User data passed to the foreach function. |
Definition at line 1853 of file value.c.
Referenced by xmmsv_coll_attribute_foreach().
void xmmsv_dict_iter_explicit_destroy | ( | xmmsv_dict_iter_t * | it | ) |
int xmmsv_dict_iter_find | ( | xmmsv_dict_iter_t * | it, |
const char * | key | ||
) |
Move the iterator to the pair with the given key (if it exists) or move it to the position where the key would have to be put (if it doesn't exist yet).
it | A xmmsv_dict_iter_t. |
key | The key to seek for. |
Definition at line 2028 of file value.c.
Referenced by xmmsv_dict_format(), xmmsv_dict_get(), xmmsv_dict_remove(), and xmmsv_dict_set().
void xmmsv_dict_iter_first | ( | xmmsv_dict_iter_t * | it | ) |
Rewind the iterator to the start of the dict.
it | A xmmsv_dict_iter_t. |
void xmmsv_dict_iter_next | ( | xmmsv_dict_iter_t * | it | ) |
Advance the iterator to the next pair in the dict.
it | A xmmsv_dict_iter_t. |
Definition at line 2009 of file value.c.
Referenced by xmmsv_dict_foreach(), and xmmsv_propdict_to_dict().
int xmmsv_dict_iter_pair | ( | xmmsv_dict_iter_t * | it, |
const char ** | key, | ||
xmmsv_t ** | val | ||
) |
Get the key-element pair currently pointed at by the iterator.
This function does not increase the refcount of the element, the reference is still owned by the dict.
it | A xmmsv_dict_iter_t. |
key | Pointer set to the key pointed at by the iterator. |
val | Pointer set to a borrowed reference to the element pointed at by the iterator. |
Definition at line 1948 of file value.c.
Referenced by xmmsv_dict_foreach(), xmmsv_dict_format(), xmmsv_dict_get(), and xmmsv_propdict_to_dict().
int xmmsv_dict_iter_pair_coll | ( | xmmsv_dict_iter_t * | it, |
const char ** | key, | ||
xmmsv_coll_t ** | r | ||
) |
int xmmsv_dict_iter_pair_int | ( | xmmsv_dict_iter_t * | it, |
const char ** | key, | ||
int32_t * | r | ||
) |
int xmmsv_dict_iter_pair_string | ( | xmmsv_dict_iter_t * | it, |
const char ** | key, | ||
const char ** | r | ||
) |
int xmmsv_dict_iter_remove | ( | xmmsv_dict_iter_t * | it | ) |
Remove the pair in the dict pointed at by the iterator.
it | A xmmsv_dict_iter_t. |
int xmmsv_dict_iter_set | ( | xmmsv_dict_iter_t * | it, |
xmmsv_t * | val | ||
) |
Replace the element of the pair currently pointed to by the iterator.
it | A xmmsv_dict_iter_t. |
val | The element to set in the pair. |
Definition at line 2101 of file value.c.
Referenced by xmmsv_dict_set().
int xmmsv_dict_iter_set_coll | ( | xmmsv_dict_iter_t * | it, |
xmmsv_coll_t * | elem | ||
) |
int xmmsv_dict_iter_set_int | ( | xmmsv_dict_iter_t * | it, |
int32_t | elem | ||
) |
int xmmsv_dict_iter_set_string | ( | xmmsv_dict_iter_t * | it, |
const char * | elem | ||
) |
int xmmsv_dict_iter_valid | ( | xmmsv_dict_iter_t * | it | ) |
Check whether the iterator is valid and points to a valid pair.
it | A xmmsv_dict_iter_t. |
Definition at line 1983 of file value.c.
Referenced by xmmsv_dict_foreach(), xmmsv_dict_iter_pair(), xmmsv_dict_iter_set(), and xmmsv_propdict_to_dict().
int xmmsv_get_dict_iter | ( | const xmmsv_t * | val, |
xmmsv_dict_iter_t ** | it | ||
) |
Retrieves a dict iterator from a dict xmmsv_t.
val | a xmmsv_t containing a dict. |
it | An xmmsv_dict_iter_t that can be used to access the dict data. The iterator will be freed when the value is freed. |
Definition at line 955 of file value.c.
Referenced by xmmsv_dict_foreach(), xmmsv_dict_format(), xmmsv_dict_get(), xmmsv_dict_remove(), xmmsv_dict_set(), and xmmsv_propdict_to_dict().