XMMS2
Typedefs | Functions
src/include/xmmsc/xmmsv_dict.h File Reference
#include "xmmsc/xmmsv_general.h"

Go to the source code of this file.

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

xmmsv_txmmsv_new_dict (void)
 Allocates a new dict xmmsv_t.
int xmmsv_dict_get (xmmsv_t *dictv, const char *key, xmmsv_t **val)
 Get the element corresponding to the given key in the dict xmmsv_t (if it exists).
int xmmsv_dict_set (xmmsv_t *dictv, const char *key, xmmsv_t *val)
 Insert an element under the given key in the dict xmmsv_t.
int xmmsv_dict_remove (xmmsv_t *dictv, const char *key)
 Remove the element corresponding to a given key in the dict xmmsv_t (if it exists).
int xmmsv_dict_clear (xmmsv_t *dictv)
 Empty the dict of all its elements.
int xmmsv_dict_get_size (xmmsv_t *dictv)
 Return the size of the dict.
int xmmsv_dict_has_key (xmmsv_t *dictv, const char *key)
int xmmsv_dict_entry_get_string (xmmsv_t *val, const char *key, const char **r)
int xmmsv_dict_entry_get_int (xmmsv_t *val, const char *key, int32_t *r)
int xmmsv_dict_entry_get_coll (xmmsv_t *val, const char *key, xmmsv_coll_t **coll)
int xmmsv_dict_set_string (xmmsv_t *val, const char *key, const char *el)
int xmmsv_dict_set_int (xmmsv_t *val, const char *key, int32_t el)
int xmmsv_dict_set_coll (xmmsv_t *val, const char *key, xmmsv_coll_t *el)
xmmsv_type_t xmmsv_dict_entry_get_type (xmmsv_t *val, const char *key)
 Gets the type of a dict entry.
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)