17 #ifndef __XMMS_COLL_H__ 18 #define __XMMS_COLL_H__ 72 #define xmmsc_coll_new xmmsv_coll_new 73 #define xmmsc_coll_ref xmmsv_coll_ref 74 #define xmmsc_coll_unref xmmsv_coll_unref 76 #define xmmsc_coll_set_idlist xmmsv_coll_set_idlist 77 #define xmmsc_coll_add_operand xmmsv_coll_add_operand 78 #define xmmsc_coll_remove_operand xmmsv_coll_remove_operand 80 #define xmmsc_coll_idlist_append xmmsv_coll_idlist_append 81 #define xmmsc_coll_idlist_insert xmmsv_coll_idlist_insert 82 #define xmmsc_coll_idlist_move xmmsv_coll_idlist_move 83 #define xmmsc_coll_idlist_remove xmmsv_coll_idlist_remove 84 #define xmmsc_coll_idlist_clear xmmsv_coll_idlist_clear 85 #define xmmsc_coll_idlist_get_index xmmsv_coll_idlist_get_index 86 #define xmmsc_coll_idlist_set_index xmmsv_coll_idlist_set_index 87 #define xmmsc_coll_idlist_get_size xmmsv_coll_idlist_get_size 89 #define xmmsc_coll_get_type xmmsv_coll_get_type 90 #define xmmsc_coll_get_idlist xmmsv_coll_get_idlist 92 #define xmmsc_coll_attribute_set xmmsv_coll_attribute_set 93 #define xmmsc_coll_attribute_remove xmmsv_coll_attribute_remove 94 #define xmmsc_coll_attribute_get xmmsv_coll_attribute_get 95 #define xmmsc_coll_attribute_foreach xmmsv_coll_attribute_foreach 97 #define xmmsc_coll_universe xmmsv_coll_universe int xmmsv_coll_idlist_insert(xmmsv_coll_t *coll, int index, int id)
Insert a value at a given position in the idlist.
int xmmsv_coll_attribute_get(xmmsv_coll_t *coll, const char *key, char **value)
Retrieve the value of the attribute of the given collection.
const int32_t * xmmsv_coll_get_idlist(xmmsv_coll_t *coll) XMMS_DEPRECATED
Return the list of ids stored in the collection.
int xmmsv_coll_idlist_append(xmmsv_coll_t *coll, int id)
Append a value to the idlist.
void xmmsv_coll_attribute_set(xmmsv_coll_t *coll, const char *key, const char *value)
Set an attribute in the given collection.
xmmsv_coll_t * xmmsv_coll_ref(xmmsv_coll_t *coll)
Increases the references for the xmmsv_coll_t.
int xmmsv_coll_attribute_remove(xmmsv_coll_t *coll, const char *key)
Remove an attribute from the given collection.
struct xmmsv_St * xmmsv_coll_operands_get(xmmsv_coll_t *coll)
size_t xmmsv_coll_idlist_get_size(xmmsv_coll_t *coll)
Get the size of the idlist.
struct xmmsv_St * xmmsv_coll_idlist_get(xmmsv_coll_t *coll)
Return the list of ids stored in the collection.
int xmmsv_coll_idlist_get_index(xmmsv_coll_t *coll, int index, int32_t *val)
Retrieves the value at the given position in the idlist.
struct xmmsv_coll_St xmmsv_coll_t
void(* xmmsv_coll_attribute_foreach_func)(const char *key, const char *value, void *udata)
xmmsv_coll_t * xmmsv_coll_new(xmmsv_coll_type_t type)
Allocate a new collection of the given type.
struct xmmsv_St * xmmsv_coll_attributes_get(xmmsv_coll_t *coll)
void xmmsv_coll_add_operand(xmmsv_coll_t *coll, xmmsv_coll_t *op)
Add the operand to the given collection.
void xmmsv_coll_set_idlist(xmmsv_coll_t *coll, int ids[])
Set the list of ids in the given collection.
int xmmsv_coll_idlist_remove(xmmsv_coll_t *coll, int index)
Remove the value at a given index from the idlist.
void xmmsv_coll_remove_operand(xmmsv_coll_t *coll, xmmsv_coll_t *op)
Remove all the occurences of the operand in the given collection.
int xmmsv_coll_idlist_set_index(xmmsv_coll_t *coll, int index, int32_t val)
Sets the value at the given position in the idlist.
void xmmsv_coll_attribute_foreach(xmmsv_coll_t *coll, xmmsv_coll_attribute_foreach_func func, void *user_data) XMMS_DEPRECATED
Iterate over all key/value-pair of the collection attributes.
int xmmsv_coll_idlist_move(xmmsv_coll_t *coll, int index, int newindex)
Move a value of the idlist to a new position.
int xmmsv_coll_idlist_clear(xmmsv_coll_t *coll)
Empties the idlist.
xmmsv_coll_t xmmsc_coll_t
xmmsv_coll_type_t xmmsv_coll_get_type(xmmsv_coll_t *coll)
Return the type of the collection.
xmmsv_coll_t * xmmsv_coll_universe(void)
Return a collection referencing the whole media library, that is a reference to the "All Media" colle...
void xmmsv_coll_unref(xmmsv_coll_t *coll)
Decreases the references for the xmmsv_coll_t When the number of references reaches 0 it will be free...