XMMS2
|
Typedefs | |
typedef void(* | xmmsv_list_foreach_func) (xmmsv_t *value, void *user_data) |
typedef struct xmmsv_list_iter_St | xmmsv_list_iter_t |
Functions | |
int | xmmsv_list_foreach (xmmsv_t *listv, xmmsv_list_foreach_func func, void *user_data) |
Apply a function to each element in the list, in sequential order. More... | |
int | xmmsv_get_list_iter (const xmmsv_t *val, xmmsv_list_iter_t **it) |
Retrieves a list iterator from a list xmmsv_t. More... | |
void | xmmsv_list_iter_explicit_destroy (xmmsv_list_iter_t *it) |
Explicitly free list iterator. More... | |
int | xmmsv_list_iter_entry (xmmsv_list_iter_t *it, xmmsv_t **val) |
Get the element currently pointed at by the iterator. More... | |
int | xmmsv_list_iter_valid (xmmsv_list_iter_t *it) |
Check whether the iterator is valid and points to a valid element. More... | |
void | xmmsv_list_iter_first (xmmsv_list_iter_t *it) |
Rewind the iterator to the start of the list. More... | |
void | xmmsv_list_iter_last (xmmsv_list_iter_t *it) |
Move the iterator to end of the list. More... | |
void | xmmsv_list_iter_next (xmmsv_list_iter_t *it) |
Advance the iterator to the next element in the list. More... | |
void | xmmsv_list_iter_prev (xmmsv_list_iter_t *it) |
Move the iterator to the previous element in the list. More... | |
int | xmmsv_list_iter_seek (xmmsv_list_iter_t *it, int pos) |
Move the iterator to the n-th element in the list. More... | |
int | xmmsv_list_iter_tell (const xmmsv_list_iter_t *it) |
Tell the position of the iterator. More... | |
xmmsv_t * | xmmsv_list_iter_get_parent (const xmmsv_list_iter_t *it) |
Return the parent xmmsv_t of an iterator. More... | |
int | xmmsv_list_iter_insert (xmmsv_list_iter_t *it, xmmsv_t *val) |
Insert an element in the list at the position pointed at by the iterator. More... | |
int | xmmsv_list_iter_remove (xmmsv_list_iter_t *it) |
Remove the element in the list at the position pointed at by the iterator. More... | |
int | xmmsv_list_iter_entry_string (xmmsv_list_iter_t *it, const char **val) |
int | xmmsv_list_iter_entry_int (xmmsv_list_iter_t *it, int32_t *val) |
int | xmmsv_list_iter_entry_coll (xmmsv_list_iter_t *it, xmmsv_coll_t **val) |
int | xmmsv_list_iter_insert_string (xmmsv_list_iter_t *it, const char *val) |
int | xmmsv_list_iter_insert_int (xmmsv_list_iter_t *it, int32_t val) |
int | xmmsv_list_iter_insert_coll (xmmsv_list_iter_t *it, xmmsv_coll_t *val) |
typedef void(* xmmsv_list_foreach_func) (xmmsv_t *value, void *user_data) |
Definition at line 66 of file xmmsv_list.h.
typedef struct xmmsv_list_iter_St xmmsv_list_iter_t |
Definition at line 69 of file xmmsv_list.h.
int xmmsv_get_list_iter | ( | const xmmsv_t * | val, |
xmmsv_list_iter_t ** | it | ||
) |
Retrieves a list iterator from a list xmmsv_t.
val | a xmmsv_t containing a list. |
it | An xmmsv_list_iter_t that can be used to access the list data. The iterator will be freed when the value is freed. |
Definition at line 926 of file value.c.
Referenced by check_string_list(), xmmsv_coll_add_operand(), xmmsv_coll_get_idlist(), xmmsv_coll_remove_operand(), xmmsv_list_foreach(), and xmmsv_list_restrict_type().
int xmmsv_list_foreach | ( | xmmsv_t * | listv, |
xmmsv_list_foreach_func | func, | ||
void * | user_data | ||
) |
int xmmsv_list_iter_entry | ( | xmmsv_list_iter_t * | it, |
xmmsv_t ** | val | ||
) |
Get the element currently pointed at by the iterator.
This function does not increase the refcount of the element, the reference is still owned by the list. If iterator does not point on a valid element xmmsv_list_iter_entry returns 0 and leaves val untouched.
it | A xmmsv_list_iter_t. |
val | Pointer set to a borrowed reference to the element pointed at by the iterator. |
Definition at line 1495 of file value.c.
Referenced by check_string_list(), xmmsv_dict_iter_find(), xmmsv_dict_iter_pair(), xmmsv_list_foreach(), and xmmsv_list_restrict_type().
int xmmsv_list_iter_entry_coll | ( | xmmsv_list_iter_t * | it, |
xmmsv_coll_t ** | val | ||
) |
int xmmsv_list_iter_entry_int | ( | xmmsv_list_iter_t * | it, |
int32_t * | val | ||
) |
Referenced by xmmsv_coll_get_idlist().
int xmmsv_list_iter_entry_string | ( | xmmsv_list_iter_t * | it, |
const char ** | val | ||
) |
void xmmsv_list_iter_explicit_destroy | ( | xmmsv_list_iter_t * | it | ) |
void xmmsv_list_iter_first | ( | xmmsv_list_iter_t * | it | ) |
Rewind the iterator to the start of the list.
it | A xmmsv_list_iter_t. |
Definition at line 1523 of file value.c.
Referenced by xmmsv_dict_iter_first().
xmmsv_t* xmmsv_list_iter_get_parent | ( | const xmmsv_list_iter_t * | it | ) |
Return the parent xmmsv_t of an iterator.
it | A xmmsv_list_iter_t. |
int xmmsv_list_iter_insert | ( | xmmsv_list_iter_t * | it, |
xmmsv_t * | val | ||
) |
Insert an element in the list at the position pointed at by the iterator.
it | A xmmsv_list_iter_t. |
val | The element to insert. |
Definition at line 1636 of file value.c.
Referenced by xmmsv_dict_iter_set(), and xmmsv_dict_set().
int xmmsv_list_iter_insert_coll | ( | xmmsv_list_iter_t * | it, |
xmmsv_coll_t * | val | ||
) |
int xmmsv_list_iter_insert_int | ( | xmmsv_list_iter_t * | it, |
int32_t | val | ||
) |
int xmmsv_list_iter_insert_string | ( | xmmsv_list_iter_t * | it, |
const char * | val | ||
) |
void xmmsv_list_iter_last | ( | xmmsv_list_iter_t * | it | ) |
Move the iterator to end of the list.
listv | A xmmsv_list_iter_t. |
void xmmsv_list_iter_next | ( | xmmsv_list_iter_t * | it | ) |
Advance the iterator to the next element in the list.
it | A xmmsv_list_iter_t. |
Definition at line 1553 of file value.c.
Referenced by check_string_list(), xmmsv_coll_get_idlist(), xmmsv_dict_iter_find(), xmmsv_dict_iter_next(), xmmsv_dict_iter_pair(), xmmsv_dict_iter_set(), xmmsv_dict_set(), xmmsv_list_foreach(), and xmmsv_list_restrict_type().
void xmmsv_list_iter_prev | ( | xmmsv_list_iter_t * | it | ) |
Move the iterator to the previous element in the list.
listv | A xmmsv_list_iter_t. |
int xmmsv_list_iter_remove | ( | xmmsv_list_iter_t * | it | ) |
Remove the element in the list at the position pointed at by the iterator.
it | A xmmsv_list_iter_t. |
Definition at line 1652 of file value.c.
Referenced by xmmsv_dict_iter_remove(), xmmsv_dict_iter_set(), xmmsv_dict_remove(), and xmmsv_dict_set().
int xmmsv_list_iter_seek | ( | xmmsv_list_iter_t * | it, |
int | pos | ||
) |
Move the iterator to the n-th element in the list.
it | A xmmsv_list_iter_t. |
pos | The position in the list. If negative, start counting from the end (-1 is the last element, etc). |
Definition at line 1587 of file value.c.
Referenced by xmmsv_dict_iter_find().
int xmmsv_list_iter_tell | ( | const xmmsv_list_iter_t * | it | ) |
Tell the position of the iterator.
it | A xmmsv_list_iter_t. |
int xmmsv_list_iter_valid | ( | xmmsv_list_iter_t * | it | ) |
Check whether the iterator is valid and points to a valid element.
it | A xmmsv_list_iter_t. |
Definition at line 1512 of file value.c.
Referenced by check_string_list(), xmmsv_coll_get_idlist(), xmmsv_dict_iter_valid(), xmmsv_list_foreach(), xmmsv_list_iter_entry(), and xmmsv_list_restrict_type().