XmmsClient
Macros | Typedefs | Functions
xmmsv_dict.h File Reference
#include <xmmsc/xmmsv_general.h>

Macros

#define xmmsv_dict_entry_get_int   xmmsv_dict_entry_get_int32
 
#define xmmsv_dict_iter_pair_int   xmmsv_dict_iter_pair_int32
 

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) XMMS_PUBLIC
 Allocates a new dict xmmsv_t. More...
 
int xmmsv_dict_get (xmmsv_t *dictv, const char *key, xmmsv_t **val) XMMS_PUBLIC
 Get the element corresponding to the given key in the dict xmmsv_t (if it exists). More...
 
int xmmsv_dict_set (xmmsv_t *dictv, const char *key, xmmsv_t *val) XMMS_PUBLIC
 Insert an element under the given key in the dict xmmsv_t. More...
 
int xmmsv_dict_remove (xmmsv_t *dictv, const char *key) XMMS_PUBLIC
 Remove the element corresponding to a given key in the dict xmmsv_t (if it exists). More...
 
int xmmsv_dict_clear (xmmsv_t *dictv) XMMS_PUBLIC
 Empty the dict of all its elements. More...
 
int xmmsv_dict_get_size (xmmsv_t *dictv) XMMS_PUBLIC
 Return the size of the dict. More...
 
int xmmsv_dict_has_key (xmmsv_t *dictv, const char *key) XMMS_PUBLIC
 
int xmmsv_dict_keys (xmmsv_t *dictv, xmmsv_t **keys) XMMS_PUBLIC
 Get a XMMSV_TYPE_LIST of all the keys. More...
 
int xmmsv_dict_values (xmmsv_t *dictv, xmmsv_t **values) XMMS_PUBLIC
 Get a XMMSV_TYPE_LIST of all the values. More...
 
int xmmsv_dict_entry_get_string (xmmsv_t *val, const char *key, const char **r) XMMS_PUBLIC
 
int xmmsv_dict_entry_get_int32 (xmmsv_t *val, const char *key, int32_t *r) XMMS_PUBLIC
 
int xmmsv_dict_entry_get_int64 (xmmsv_t *val, const char *key, int64_t *r) XMMS_PUBLIC
 
int xmmsv_dict_entry_get_float (xmmsv_t *val, const char *key, float *r) XMMS_PUBLIC
 
int xmmsv_dict_entry_get_coll (xmmsv_t *val, const char *key, xmmsv_t **coll) XMMS_PUBLIC XMMS_DEPRECATED
 
int xmmsv_dict_set_string (xmmsv_t *val, const char *key, const char *el) XMMS_PUBLIC
 
int xmmsv_dict_set_int (xmmsv_t *val, const char *key, int64_t el) XMMS_PUBLIC
 
int xmmsv_dict_set_float (xmmsv_t *val, const char *key, float el) XMMS_PUBLIC
 
int xmmsv_dict_set_coll (xmmsv_t *val, const char *key, xmmsv_t *el) XMMS_PUBLIC XMMS_DEPRECATED
 
xmmsv_type_t xmmsv_dict_entry_get_type (xmmsv_t *val, const char *key) XMMS_PUBLIC
 Gets the type of a dict entry. More...
 
int xmmsv_dict_foreach (xmmsv_t *dictv, xmmsv_dict_foreach_func func, void *user_data) XMMS_PUBLIC
 Apply a function to each key-element pair in the list. More...
 
int xmmsv_get_dict_iter (const xmmsv_t *val, xmmsv_dict_iter_t **it) XMMS_PUBLIC
 Retrieves a dict iterator from a dict xmmsv_t. More...
 
void xmmsv_dict_iter_explicit_destroy (xmmsv_dict_iter_t *it) XMMS_PUBLIC
 Explicitly free dict iterator. More...
 
int xmmsv_dict_iter_pair (xmmsv_dict_iter_t *it, const char **key, xmmsv_t **val) XMMS_PUBLIC
 Get the key-element pair currently pointed at by the iterator. More...
 
int xmmsv_dict_iter_valid (xmmsv_dict_iter_t *it) XMMS_PUBLIC
 Check whether the iterator is valid and points to a valid pair. More...
 
void xmmsv_dict_iter_first (xmmsv_dict_iter_t *it) XMMS_PUBLIC
 Rewind the iterator to the start of the dict. More...
 
void xmmsv_dict_iter_next (xmmsv_dict_iter_t *it) XMMS_PUBLIC
 Advance the iterator to the next pair in the dict. More...
 
int xmmsv_dict_iter_find (xmmsv_dict_iter_t *it, const char *key) XMMS_PUBLIC
 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). More...
 
int xmmsv_dict_iter_set (xmmsv_dict_iter_t *it, xmmsv_t *val) XMMS_PUBLIC
 Replace the element of the pair currently pointed to by the iterator. More...
 
int xmmsv_dict_iter_remove (xmmsv_dict_iter_t *it) XMMS_PUBLIC
 Remove the pair in the dict pointed at by the iterator. More...
 
int xmmsv_dict_iter_pair_string (xmmsv_dict_iter_t *it, const char **key, const char **r) XMMS_PUBLIC
 
int xmmsv_dict_iter_pair_int32 (xmmsv_dict_iter_t *it, const char **key, int32_t *r) XMMS_PUBLIC
 
int xmmsv_dict_iter_pair_int64 (xmmsv_dict_iter_t *it, const char **key, int64_t *r) XMMS_PUBLIC
 
int xmmsv_dict_iter_pair_float (xmmsv_dict_iter_t *it, const char **key, float *r) XMMS_PUBLIC
 
int xmmsv_dict_iter_pair_coll (xmmsv_dict_iter_t *it, const char **key, xmmsv_t **r) XMMS_PUBLIC XMMS_DEPRECATED
 
int xmmsv_dict_iter_set_string (xmmsv_dict_iter_t *it, const char *elem) XMMS_PUBLIC
 
int xmmsv_dict_iter_set_int (xmmsv_dict_iter_t *it, int64_t elem) XMMS_PUBLIC
 
int xmmsv_dict_iter_set_float (xmmsv_dict_iter_t *it, float elem) XMMS_PUBLIC
 
int xmmsv_dict_iter_set_coll (xmmsv_dict_iter_t *it, xmmsv_t *elem) XMMS_PUBLIC XMMS_DEPRECATED