CollectionControl
[Collections]

Functions to manage the collections on the server. More...

Functions

xmmsc_result_txmmsc_coll_get (xmmsc_connection_t *conn, const char *collname, xmmsv_coll_namespace_t ns)
 Get the collection structure of a collection saved on the server.
xmmsc_result_txmmsc_coll_sync (xmmsc_connection_t *conn)
 Synchronize collection data to the database.
xmmsc_result_txmmsc_coll_list (xmmsc_connection_t *conn, xmmsv_coll_namespace_t ns)
 List all collections saved on the server in the given namespace.
xmmsc_result_txmmsc_coll_save (xmmsc_connection_t *conn, xmmsv_coll_t *coll, const char *name, xmmsv_coll_namespace_t ns)
 Save a collection structure on the server under the given name, in the given namespace.
xmmsc_result_txmmsc_coll_remove (xmmsc_connection_t *conn, const char *name, xmmsv_coll_namespace_t ns)
 Remove a collection from the server.
xmmsc_result_txmmsc_coll_find (xmmsc_connection_t *conn, int mediaid, xmmsv_coll_namespace_t ns)
 Find all collections in the given namespace which match the given media.
xmmsc_result_txmmsc_coll_rename (xmmsc_connection_t *conn, const char *from_name, const char *to_name, xmmsv_coll_namespace_t ns)
 Rename a saved collection.
xmmsc_result_txmmsc_coll_query_ids (xmmsc_connection_t *conn, xmmsv_coll_t *coll, xmmsv_t *order, int limit_start, int limit_len)
 List the ids of all media matched by the given collection.
xmmsc_result_txmmsc_coll_query_infos (xmmsc_connection_t *conn, xmmsv_coll_t *coll, xmmsv_t *order, int limit_start, int limit_len, xmmsv_t *fetch, xmmsv_t *group)
 List the properties of all media matched by the given collection.
xmmsc_result_txmmsc_broadcast_collection_changed (xmmsc_connection_t *c)
 Request the collection changed broadcast from the server.
xmmsc_result_txmmsc_coll_idlist_from_playlist_file (xmmsc_connection_t *conn, const char *path)
 Create a new collections structure with type idlist from a playlist file.

Detailed Description

Functions to manage the collections on the server.


Function Documentation

xmmsc_result_t* xmmsc_broadcast_collection_changed ( xmmsc_connection_t c  ) 

Request the collection changed broadcast from the server.

Everytime someone manipulates a collection this will be emitted.

Definition at line 281 of file collection.c.

xmmsc_result_t* xmmsc_coll_find ( xmmsc_connection_t conn,
int  mediaid,
xmmsv_coll_namespace_t  ns 
)

Find all collections in the given namespace which match the given media.

The names of these collections is returned as a list.

Parameters:
conn The connection to the server.
mediaid The id of the media to look for.
ns The namespace to consider (cannot be ALL).

Definition at line 151 of file collection.c.

xmmsc_result_t* xmmsc_coll_get ( xmmsc_connection_t conn,
const char *  collname,
xmmsv_coll_namespace_t  ns 
)

Get the collection structure of a collection saved on the server.

Parameters:
conn The connection to the server.
collname The name of the saved collection.
ns The namespace containing the saved collection.

Definition at line 50 of file collection.c.

xmmsc_result_t* xmmsc_coll_idlist_from_playlist_file ( xmmsc_connection_t conn,
const char *  path 
)

Create a new collections structure with type idlist from a playlist file.

Parameters:
conn The connection to the server.
path Path to the playlist file. Must be unencoded.

Definition at line 296 of file collection.c.

xmmsc_result_t* xmmsc_coll_list ( xmmsc_connection_t conn,
xmmsv_coll_namespace_t  ns 
)

List all collections saved on the server in the given namespace.

Parameters:
conn The connection to the server.
ns The namespace containing the saved collections.

Definition at line 85 of file collection.c.

Referenced by xmmsc_playlist_list().

xmmsc_result_t* xmmsc_coll_query_ids ( xmmsc_connection_t conn,
xmmsv_coll_t coll,
xmmsv_t *  order,
int  limit_start,
int  limit_len 
)

List the ids of all media matched by the given collection.

A list of ordering properties can be specified, as well as offsets to only retrieve part of the result set.

Parameters:
conn The connection to the server.
coll The collection used to query.
order The list of properties to order by, passed as an xmmsv_t list of strings.
limit_start The offset at which to start retrieving results (0 to disable).
limit_len The maximum number of entries to retrieve (0 to disable).

Definition at line 200 of file collection.c.

xmmsc_result_t* xmmsc_coll_query_infos ( xmmsc_connection_t conn,
xmmsv_coll_t coll,
xmmsv_t *  order,
int  limit_start,
int  limit_len,
xmmsv_t *  fetch,
xmmsv_t *  group 
)

List the properties of all media matched by the given collection.

A list of ordering properties can be specified, as well as offsets to only retrieve part of the result set. The list of properties to retrieve must be explicitely specified. It is also possible to group by certain properties.

Parameters:
conn The connection to the server.
coll The collection used to query.
order The list of properties to order by, passed as an xmmsv_t list of strings.
limit_start The offset at which to start retrieving results (0 to disable).
limit_len The maximum number of entries to retrieve (0 to disable).
fetch The list of properties to retrieve, passed as an xmmsv_t list of strings. At least one property is required.
group The list of properties to group by, passed as an xmmsv_t list of strings.

Definition at line 242 of file collection.c.

xmmsc_result_t* xmmsc_coll_remove ( xmmsc_connection_t conn,
const char *  name,
xmmsv_coll_namespace_t  ns 
)

Remove a collection from the server.

Parameters:
conn The connection to the server.
name The name of the collection to remove.
ns The namespace from which to remove the collection.

Definition at line 128 of file collection.c.

Referenced by xmmsc_playlist_remove().

xmmsc_result_t* xmmsc_coll_rename ( xmmsc_connection_t conn,
const char *  from_name,
const char *  to_name,
xmmsv_coll_namespace_t  ns 
)

Rename a saved collection.

Parameters:
conn The connection to the server.
from_name The name of the collection to rename.
to_name The new name of the collection.
ns The namespace containing the collection.

Definition at line 170 of file collection.c.

xmmsc_result_t* xmmsc_coll_save ( xmmsc_connection_t conn,
xmmsv_coll_t coll,
const char *  name,
xmmsv_coll_namespace_t  ns 
)

Save a collection structure on the server under the given name, in the given namespace.

Parameters:
conn The connection to the server.
coll The collection structure to save.
name The name under which to save the collection.
ns The namespace in which to save the collection.

Definition at line 105 of file collection.c.

Referenced by xmmsc_playlist_create().

xmmsc_result_t* xmmsc_coll_sync ( xmmsc_connection_t conn  ) 

Synchronize collection data to the database.

Parameters:
conn The connection to the server.

Definition at line 69 of file collection.c.


Generated on Tue Feb 23 18:17:57 2010 for XmmsClient by  doxygen 1.6.1