XMMS2
|
Modules | |
Iteration | |
Macros | |
#define | xmmsv_dict_entry_get_int xmmsv_dict_entry_get_int32 |
#define | xmmsv_dict_iter_pair_int xmmsv_dict_iter_pair_int32 |
Functions | |
xmmsv_t * | xmmsv_new_dict (void) |
Allocates a new dict xmmsv_t. More... | |
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). More... | |
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. More... | |
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). More... | |
int | xmmsv_dict_clear (xmmsv_t *dictv) |
Empty the dict of all its elements. More... | |
int | xmmsv_dict_get_size (xmmsv_t *dictv) |
Return the size of the dict. More... | |
int | xmmsv_dict_has_key (xmmsv_t *dictv, const char *key) |
int | xmmsv_dict_keys (xmmsv_t *dictv, xmmsv_t **keys) |
Get a XMMSV_TYPE_LIST of all the keys. More... | |
int | xmmsv_dict_values (xmmsv_t *dictv, xmmsv_t **values) |
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) |
int | xmmsv_dict_entry_get_int32 (xmmsv_t *val, const char *key, int32_t *r) |
int | xmmsv_dict_entry_get_int64 (xmmsv_t *val, const char *key, int64_t *r) |
int | xmmsv_dict_entry_get_float (xmmsv_t *val, const char *key, float *r) |
int | xmmsv_dict_entry_get_coll (xmmsv_t *val, const char *key, xmmsv_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, int64_t el) |
int | xmmsv_dict_set_float (xmmsv_t *val, const char *key, float el) |
int | xmmsv_dict_set_coll (xmmsv_t *val, const char *key, xmmsv_t *el) |
xmmsv_type_t | xmmsv_dict_entry_get_type (xmmsv_t *val, const char *key) |
Gets the type of a dict entry. More... | |
#define xmmsv_dict_entry_get_int xmmsv_dict_entry_get_int32 |
Referenced by xmmsv_coll_attribute_get_int32(), and xmmsv_coll_attribute_get_int64().
#define xmmsv_dict_iter_pair_int xmmsv_dict_iter_pair_int32 |
int xmmsv_dict_clear | ( | xmmsv_t * | dictv | ) |
Empty the dict of all its elements.
dictv | A xmmsv_t containing a dict. |
int xmmsv_dict_entry_get_float | ( | xmmsv_t * | val, |
const char * | key, | ||
float * | r | ||
) |
int xmmsv_dict_entry_get_int32 | ( | xmmsv_t * | val, |
const char * | key, | ||
int32_t * | r | ||
) |
int xmmsv_dict_entry_get_int64 | ( | xmmsv_t * | val, |
const char * | key, | ||
int64_t * | r | ||
) |
int xmmsv_dict_entry_get_string | ( | xmmsv_t * | val, |
const char * | key, | ||
const char ** | r | ||
) |
Referenced by xmms_fetch_spec_new(), and xmmsv_coll_attribute_get_string().
xmmsv_type_t xmmsv_dict_entry_get_type | ( | xmmsv_t * | val, |
const char * | key | ||
) |
Gets the type of a dict entry.
val | A xmmsv_t containing a dict. |
key | The key in the dict. |
Referenced by xmms_fetch_spec_new().
Get the element corresponding to the given key in the dict xmmsv_t (if it exists).
This function does not increase the refcount of the element, the reference is still owned by the dict.
dictv | A xmmsv_t containing a dict. |
key | The key in the dict. |
val | Pointer set to a borrowed reference to the element corresponding to the given key in the dict. |
Referenced by xmms_collection_restore(), xmmsv_coll_attribute_get_value(), xmmsv_dict_entry_get_coll(), xmmsv_dict_entry_get_type(), and xmmsv_dict_has_key().
int xmmsv_dict_get_size | ( | xmmsv_t * | dictv | ) |
Return the size of the dict.
dictv | The xmmsv_t containing the dict. |
int xmmsv_dict_has_key | ( | xmmsv_t * | dictv, |
const char * | key | ||
) |
Get a XMMSV_TYPE_LIST of all the keys.
val | A xmmsv_t containing a dict. |
keys | Pointer that will own the reference to the new list containing the dict keys. |
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).
dictv | A xmmsv_t containing a dict. |
key | The key in the dict. |
Referenced by xmmsv_coll_attribute_remove().
Insert an element under the given key in the dict xmmsv_t.
If the key already referenced an element, that element is unref'd and replaced by the new one.
dictv | A xmmsv_t containing a dict. |
key | The key in the dict. |
val | The new element to insert in the dict. |
Referenced by xmms_collection_snapshot(), xmms_medialib_query_to_xmmsv(), xmms_xform_browse_add_entry_property(), xmmsv_build_cluster_dict(), xmmsv_build_cluster_list(), xmmsv_build_dict_va(), xmmsv_build_metadata(), xmmsv_build_organize(), xmmsv_coll_attribute_set_value(), xmmsv_dict_set_coll(), xmmsv_propdict_to_dict(), and xmmsv_sc_argument_new().
int xmmsv_dict_set_float | ( | xmmsv_t * | val, |
const char * | key, | ||
float | el | ||
) |
int xmmsv_dict_set_int | ( | xmmsv_t * | val, |
const char * | key, | ||
int64_t | el | ||
) |
int xmmsv_dict_set_string | ( | xmmsv_t * | val, |
const char * | key, | ||
const char * | el | ||
) |
Get a XMMSV_TYPE_LIST of all the values.
val | A xmmsv_t containing a dict. |
keys | Pointer that will own the reference to the new list containing the dict values. |
xmmsv_t* xmmsv_new_dict | ( | void | ) |
Allocates a new dict xmmsv_t.
Referenced by xmms_collection_snapshot(), xmms_medialib_query_to_xmmsv(), xmms_xform_browse_add_entry(), xmmsv_build_cluster_dict(), xmmsv_build_cluster_list(), xmmsv_build_count(), xmmsv_build_dict_va(), xmmsv_build_metadata(), xmmsv_build_organize(), xmmsv_propdict_to_dict(), and xmmsv_sc_argument_new().