src/include/xmmsc/xmmsc_coll.h File Reference

#include "xmmsc/xmmsc_stdint.h"
#include "xmmsc/xmmsc_idnumbers.h"

Go to the source code of this file.

Typedefs

typedef struct xmmsc_coll_St xmmsc_coll_t
typedef void(* xmmsc_coll_attribute_foreach_func )(const char *key, const char *value, void *udata)

Functions

xmmsc_coll_txmmsc_coll_new (xmmsc_coll_type_t type)
 Allocate a new collection of the given type.
xmmsc_coll_txmmsc_coll_ref (xmmsc_coll_t *coll)
 Increases the references for the xmmsc_coll_t.
void xmmsc_coll_unref (xmmsc_coll_t *coll)
 Decreases the references for the xmmsc_coll_t When the number of references reaches 0 it will be freed and all its operands unreferenced as well.
void xmmsc_coll_set_idlist (xmmsc_coll_t *coll, unsigned int ids[])
 Set the list of ids in the given collection.
void xmmsc_coll_add_operand (xmmsc_coll_t *coll, xmmsc_coll_t *op)
 Add the operand to the given collection.
void xmmsc_coll_remove_operand (xmmsc_coll_t *coll, xmmsc_coll_t *op)
 Remove all the occurences of the operand in the given collection.
int xmmsc_coll_idlist_append (xmmsc_coll_t *coll, unsigned int id)
 Append a value to the idlist.
int xmmsc_coll_idlist_insert (xmmsc_coll_t *coll, unsigned int index, unsigned int id)
 Insert a value at a given position in the idlist.
int xmmsc_coll_idlist_move (xmmsc_coll_t *coll, unsigned int index, unsigned int newindex)
 Move a value of the idlist to a new position.
int xmmsc_coll_idlist_remove (xmmsc_coll_t *coll, unsigned int index)
 Remove the value at a given index from the idlist.
int xmmsc_coll_idlist_clear (xmmsc_coll_t *coll)
 Empties the idlist.
int xmmsc_coll_idlist_get_index (xmmsc_coll_t *coll, unsigned int index, uint32_t *val)
 Retrieves the value at the given position in the idlist.
int xmmsc_coll_idlist_set_index (xmmsc_coll_t *coll, unsigned int index, uint32_t val)
 Sets the value at the given position in the idlist.
size_t xmmsc_coll_idlist_get_size (xmmsc_coll_t *coll)
 Get the size of the idlist.
xmmsc_coll_type_t xmmsc_coll_get_type (xmmsc_coll_t *coll)
 Return the type of the collection.
uint32_t * xmmsc_coll_get_idlist (xmmsc_coll_t *coll)
 Return the list of ids stored in the collection.
int xmmsc_coll_operand_list_first (xmmsc_coll_t *coll)
 Move the internal pointer of the operand list to the first operand.
int xmmsc_coll_operand_list_valid (xmmsc_coll_t *coll)
 Checks if the internal pointer points to a valid operand of the list.
int xmmsc_coll_operand_list_entry (xmmsc_coll_t *coll, xmmsc_coll_t **operand)
 Provide a reference to the current operand in the list by changing the operand parameter to point to it.
int xmmsc_coll_operand_list_next (xmmsc_coll_t *coll)
 Move forward the internal pointer of the operand list.
int xmmsc_coll_operand_list_save (xmmsc_coll_t *coll)
 Save the position of the operand iterator, to be restored later by calling xmmsc_coll_operand_list_restore.
int xmmsc_coll_operand_list_restore (xmmsc_coll_t *coll)
 Restore the position of the operand iterator, previously saved by calling xmmsc_coll_operand_list_save.
void xmmsc_coll_operand_list_clear (xmmsc_coll_t *coll)
 Remove all the operands.
void xmmsc_coll_attribute_list_first (xmmsc_coll_t *coll)
int xmmsc_coll_attribute_list_valid (xmmsc_coll_t *coll)
void xmmsc_coll_attribute_list_entry (xmmsc_coll_t *coll, const char **k, const char **v)
void xmmsc_coll_attribute_list_next (xmmsc_coll_t *coll)
void xmmsc_coll_attribute_set (xmmsc_coll_t *coll, const char *key, const char *value)
 Set an attribute in the given collection.
int xmmsc_coll_attribute_remove (xmmsc_coll_t *coll, const char *key)
 Remove an attribute from the given collection.
int xmmsc_coll_attribute_get (xmmsc_coll_t *coll, const char *key, char **value)
 Retrieve the value of the attribute of the given collection.
void xmmsc_coll_attribute_foreach (xmmsc_coll_t *coll, xmmsc_coll_attribute_foreach_func func, void *user_data)
 Iterate over all key/value-pair of the collection attributes.
xmmsc_coll_txmmsc_coll_universe (void)
 Return a collection referencing the whole media library, that is a reference to the "All Media" collection.


Typedef Documentation

typedef void(* xmmsc_coll_attribute_foreach_func)(const char *key, const char *value, void *udata)

Definition at line 29 of file xmmsc_coll.h.

typedef struct xmmsc_coll_St xmmsc_coll_t

Definition at line 27 of file xmmsc_coll.h.


Generated on Wed Dec 10 18:06:44 2008 for XMMS2 by  doxygen 1.5.6