XmmsClient
|
Modules | |
Iteration | |
Macros | |
#define | xmmsv_list_get_int xmmsv_list_get_int32 |
#define | xmmsv_list_iter_entry_int xmmsv_list_iter_entry_int32 |
Typedefs | |
typedef int(* | xmmsv_list_compare_func_t )(xmmsv_t **, xmmsv_t **) |
Functions | |
xmmsv_t * | xmmsv_new_list (void) XMMS_PUBLIC |
Allocates a new list xmmsv_t. More... | |
int | xmmsv_list_get (xmmsv_t *listv, int pos, xmmsv_t **val) XMMS_PUBLIC |
Get the element at the given position in the list xmmsv_t. More... | |
int | xmmsv_list_set (xmmsv_t *listv, int pos, xmmsv_t *val) XMMS_PUBLIC |
Set the element at the given position in the list xmmsv_t. More... | |
int | xmmsv_list_append (xmmsv_t *listv, xmmsv_t *val) XMMS_PUBLIC |
Append an element to the end of the list xmmsv_t. More... | |
int | xmmsv_list_insert (xmmsv_t *listv, int pos, xmmsv_t *val) XMMS_PUBLIC |
Insert an element at the given position in the list xmmsv_t. More... | |
int | xmmsv_list_remove (xmmsv_t *listv, int pos) XMMS_PUBLIC |
Remove the element at the given position from the list xmmsv_t. More... | |
int | xmmsv_list_move (xmmsv_t *listv, int old_pos, int new_pos) XMMS_PUBLIC |
Move the element from position #old to position #new. More... | |
int | xmmsv_list_clear (xmmsv_t *listv) XMMS_PUBLIC |
Empty the list from all its elements. More... | |
int | xmmsv_list_sort (xmmsv_t *listv, xmmsv_list_compare_func_t comparator) XMMS_PUBLIC |
Sort the list using the supplied comparator. More... | |
int | xmmsv_list_get_size (xmmsv_t *listv) XMMS_PUBLIC |
Return the size of the list. More... | |
int | xmmsv_list_restrict_type (xmmsv_t *listv, xmmsv_type_t type) XMMS_PUBLIC |
int | xmmsv_list_has_type (xmmsv_t *listv, xmmsv_type_t type) XMMS_PUBLIC |
Checks if all elements in the list has the given type. More... | |
int | xmmsv_list_get_type (xmmsv_t *listv, xmmsv_type_t *type) XMMS_PUBLIC |
Gets the current type restriction of a list. More... | |
int | xmmsv_list_index_of (xmmsv_t *listv, xmmsv_t *val) XMMS_PUBLIC |
Get the index of an element in the list. More... | |
int | xmmsv_list_get_string (xmmsv_t *v, int pos, const char **val) XMMS_PUBLIC |
int | xmmsv_list_get_int32 (xmmsv_t *v, int pos, int32_t *val) XMMS_PUBLIC |
int | xmmsv_list_get_int64 (xmmsv_t *v, int pos, int64_t *val) XMMS_PUBLIC |
int | xmmsv_list_get_float (xmmsv_t *v, int pos, float *val) XMMS_PUBLIC |
int | xmmsv_list_get_coll (xmmsv_t *v, int pos, xmmsv_t **val) XMMS_PUBLIC XMMS_DEPRECATED |
int | xmmsv_list_set_string (xmmsv_t *v, int pos, const char *val) XMMS_PUBLIC |
int | xmmsv_list_set_int (xmmsv_t *v, int pos, int64_t val) XMMS_PUBLIC |
int | xmmsv_list_set_float (xmmsv_t *v, int pos, float val) XMMS_PUBLIC |
int | xmmsv_list_set_coll (xmmsv_t *v, int pos, xmmsv_t *val) XMMS_PUBLIC XMMS_DEPRECATED |
int | xmmsv_list_insert_string (xmmsv_t *v, int pos, const char *val) XMMS_PUBLIC |
int | xmmsv_list_insert_int (xmmsv_t *v, int pos, int64_t val) XMMS_PUBLIC |
int | xmmsv_list_insert_float (xmmsv_t *v, int pos, float val) XMMS_PUBLIC |
int | xmmsv_list_insert_coll (xmmsv_t *v, int pos, xmmsv_t *val) XMMS_PUBLIC XMMS_DEPRECATED |
int | xmmsv_list_append_string (xmmsv_t *v, const char *val) XMMS_PUBLIC |
int | xmmsv_list_append_int (xmmsv_t *v, int64_t val) XMMS_PUBLIC |
int | xmmsv_list_append_float (xmmsv_t *v, float val) XMMS_PUBLIC |
int | xmmsv_list_append_coll (xmmsv_t *v, xmmsv_t *val) XMMS_PUBLIC XMMS_DEPRECATED |
xmmsv_t * | xmmsv_list_flatten (xmmsv_t *list, int depth) XMMS_PUBLIC |
Flattens a list of lists. More... | |
#define xmmsv_list_get_int xmmsv_list_get_int32 |
Referenced by xmmsv_coll_idlist_get_index_int32(), and xmmsv_coll_idlist_get_index_int64().
#define xmmsv_list_iter_entry_int xmmsv_list_iter_entry_int32 |
Append an element to the end of the list xmmsv_t.
The list will hold a reference to the element until it's removed.
listv | A xmmsv_t containing a list. |
val | The element to append. |
Referenced by xmmsc_sc_interface_entity_broadcast_add_id(), xmmsc_sc_interface_entity_namespace_introspect(), xmmsv_build_list_va(), xmmsv_build_metadata(), xmmsv_coll_add_operand(), xmmsv_dict_values(), xmmsv_list_append_coll(), and xmmsv_make_stringlist().
int xmmsv_list_append_float | ( | xmmsv_t * | v, |
float | val | ||
) |
int xmmsv_list_append_int | ( | xmmsv_t * | v, |
int64_t | val | ||
) |
Referenced by xmmsv_coll_idlist_append(), and xmmsv_coll_set_idlist().
int xmmsv_list_append_string | ( | xmmsv_t * | v, |
const char * | val | ||
) |
Referenced by xmmsc_sc_introspect_docstring(), and xmmsv_dict_keys().
int xmmsv_list_clear | ( | xmmsv_t * | listv | ) |
Empty the list from all its elements.
listv | A xmmsv_t containing a list. |
Referenced by xmmsv_coll_idlist_clear(), and xmmsv_coll_set_idlist().
Flattens a list of lists.
list | The list to flatten |
depth | The level of lists to flatten. |
Get the element at the given position in the list xmmsv_t.
This function does not increase the refcount of the element, the reference is still owned by the list.
listv | A xmmsv_t containing a list. |
pos | The position in the list. If negative, start counting from the end (-1 is the last element, etc). |
val | Pointer set to a borrowed reference to the element at the given position in the list. |
Referenced by xmmsv_list_get_coll().
int xmmsv_list_get_float | ( | xmmsv_t * | v, |
int | pos, | ||
float * | val | ||
) |
int xmmsv_list_get_int32 | ( | xmmsv_t * | v, |
int | pos, | ||
int32_t * | val | ||
) |
int xmmsv_list_get_int64 | ( | xmmsv_t * | v, |
int | pos, | ||
int64_t * | val | ||
) |
int xmmsv_list_get_size | ( | xmmsv_t * | listv | ) |
Return the size of the list.
listv | The xmmsv_t containing the list. |
Referenced by xmmsc_sc_broadcast_emit(), xmmsc_sc_broadcast_subscribe(), xmmsc_sc_call(), xmmsc_sc_locate_interface_entity(), and xmmsv_coll_idlist_get_size().
int xmmsv_list_get_string | ( | xmmsv_t * | v, |
int | pos, | ||
const char ** | val | ||
) |
int xmmsv_list_get_type | ( | xmmsv_t * | listv, |
xmmsv_type_t * | type | ||
) |
Gets the current type restriction of a list.
listv | The list to Check |
int xmmsv_list_has_type | ( | xmmsv_t * | listv, |
xmmsv_type_t | type | ||
) |
Checks if all elements in the list has the given type.
listv | The list to check |
type | The type to check for |
Referenced by xmmsv_list_restrict_type().
Get the index of an element in the list.
This function compares the pointers and not the actual values contained in the elements.
listv | The xmmsv_t containing the list |
val | The element to find |
Insert an element at the given position in the list xmmsv_t.
The list will hold a reference to the element until it's removed.
listv | A xmmsv_t containing a list. |
pos | The position in the list. If negative, start counting from the end (-1 is the last element, etc). |
val | The element to insert. |
Referenced by xmmsv_list_insert_coll().
int xmmsv_list_insert_float | ( | xmmsv_t * | v, |
int | pos, | ||
float | val | ||
) |
int xmmsv_list_insert_int | ( | xmmsv_t * | v, |
int | pos, | ||
int64_t | val | ||
) |
Referenced by xmmsv_coll_idlist_insert().
int xmmsv_list_insert_string | ( | xmmsv_t * | v, |
int | pos, | ||
const char * | val | ||
) |
int xmmsv_list_move | ( | xmmsv_t * | listv, |
int | old_pos, | ||
int | new_pos | ||
) |
Move the element from position #old to position #new.
xmmsv_list_iter_t's remain pointing at their element (which might or might not be at a different position).
listv | A xmmsv_t containing a list |
old | The original position in the list. If negative, start counting from the end (-1 is the last element, etc.) |
new | The new position in the list. If negative start counting from the end (-1 is the last element, etc.) For the sake of counting the element to be moved is still at its old position. |
Referenced by xmmsv_coll_idlist_move().
int xmmsv_list_remove | ( | xmmsv_t * | listv, |
int | pos | ||
) |
Remove the element at the given position from the list xmmsv_t.
listv | A xmmsv_t containing a list. |
pos | The position in the list. If negative, start counting from the end (-1 is the last element, etc). |
Referenced by xmmsv_coll_idlist_remove().
int xmmsv_list_restrict_type | ( | xmmsv_t * | listv, |
xmmsv_type_t | type | ||
) |
Referenced by xmmsc_playlist_sort(), xmmsc_sc_broadcast_emit(), xmmsc_sc_broadcast_subscribe(), xmmsc_sc_call(), xmmsc_sc_introspect_constant(), xmmsc_sc_introspect_docstring(), xmmsc_sc_namespace_lookup(), xmmsc_sc_namespace_remove(), xmmsv_coll_idlist_set(), xmmsv_coll_operands_set(), and xmmsv_dict_keys().
Set the element at the given position in the list xmmsv_t.
listv | A xmmsv_t containing a list. |
pos | The position in the list. If negative, start counting from the end (-1 is the last element, etc). |
val | The element to put at the given position in the list. |
Referenced by xmmsv_list_iter_set(), and xmmsv_list_set_coll().
int xmmsv_list_set_float | ( | xmmsv_t * | v, |
int | pos, | ||
float | val | ||
) |
int xmmsv_list_set_int | ( | xmmsv_t * | v, |
int | pos, | ||
int64_t | val | ||
) |
Referenced by xmmsv_coll_idlist_set_index().
int xmmsv_list_set_string | ( | xmmsv_t * | v, |
int | pos, | ||
const char * | val | ||
) |
int xmmsv_list_sort | ( | xmmsv_t * | listv, |
xmmsv_list_compare_func_t | comparator | ||
) |
Sort the list using the supplied comparator.
listv | A xmmsv_t containing a list. |
xmmsv_t* xmmsv_new_list | ( | void | ) |
Allocates a new list xmmsv_t.
Referenced by xmmsc_coll_query_infos(), xmmsc_sc_call(), xmmsc_sc_interface_entity_namespace_introspect(), xmmsc_sc_introspect_docstring(), xmmsc_send_msg_no_arg(), xmmsv_build_list_va(), xmmsv_build_metadata(), xmmsv_dict_keys(), xmmsv_dict_values(), xmmsv_list_flatten(), and xmmsv_make_stringlist().