XmmsClient
Functions
CollectionControl

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. More...
 
xmmsc_result_txmmsc_coll_sync (xmmsc_connection_t *conn)
 Synchronize collection data to the database. More...
 
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. More...
 
xmmsc_result_txmmsc_coll_save (xmmsc_connection_t *conn, xmmsv_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. More...
 
xmmsc_result_txmmsc_coll_remove (xmmsc_connection_t *conn, const char *name, xmmsv_coll_namespace_t ns)
 Remove a collection from the server. More...
 
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. More...
 
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. More...
 
xmmsc_result_txmmsc_coll_query_ids (xmmsc_connection_t *conn, xmmsv_t *coll, xmmsv_t *order, int limit_start, int limit_len)
 List the ids of all media matched by the given collection. More...
 
xmmsc_result_txmmsc_coll_query_infos (xmmsc_connection_t *conn, xmmsv_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. More...
 
xmmsc_result_txmmsc_coll_query (xmmsc_connection_t *conn, xmmsv_t *coll, xmmsv_t *fetch)
 Finds all media in the collection and fetches it as specified in fetch. More...
 
xmmsc_result_txmmsc_broadcast_collection_changed (xmmsc_connection_t *c)
 Request the collection changed broadcast from the server. More...
 
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. More...
 

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.

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
connThe connection to the server.
mediaidThe id of the media to look for.
nsThe namespace to consider (cannot be ALL).
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
connThe connection to the server.
collnameThe name of the saved collection.
nsThe namespace containing the saved collection.
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
connThe connection to the server.
pathPath to the playlist file. Must be unencoded.
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
connThe connection to the server.
nsThe namespace containing the saved collections.

Referenced by xmmsc_playlist_list().

xmmsc_result_t* xmmsc_coll_query ( xmmsc_connection_t conn,
xmmsv_t coll,
xmmsv_t fetch 
)

Finds all media in the collection and fetches it as specified in fetch.

For a description of the different collection operators and the fetch specification look at http://xmms2.org/wiki/Collections_2.0

Parameters
connThe connection to the server.
collThe collection used to query.
fetchThe fetch specification.
Returns
An xmmsv_t with the structure specified in fetch.

Referenced by xmmsc_coll_query_ids().

xmmsc_result_t* xmmsc_coll_query_ids ( xmmsc_connection_t conn,
xmmsv_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
connThe connection to the server.
collThe collection used to query.
orderThe list of properties to order by, passed as an xmmsv_t list of strings.
limit_startThe offset at which to start retrieving results (0 to disable).
limit_lenThe maximum number of entries to retrieve (0 to disable).
xmmsc_result_t* xmmsc_coll_query_infos ( xmmsc_connection_t conn,
xmmsv_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
connThe connection to the server.
collThe collection used to query.
orderThe list of properties to order by, passed as an xmmsv_t list of strings.
limit_startThe offset at which to start retrieving results (0 to disable).
limit_lenThe maximum number of entries to retrieve (0 to disable).
fetchThe list of properties to retrieve, passed as an xmmsv_t list of strings. At least one property is required.
groupThe list of properties to group by, passed as an xmmsv_t list of strings.
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
connThe connection to the server.
nameThe name of the collection to remove.
nsThe namespace from which to remove the collection.

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
connThe connection to the server.
from_nameThe name of the collection to rename.
to_nameThe new name of the collection.
nsThe namespace containing the collection.
xmmsc_result_t* xmmsc_coll_save ( xmmsc_connection_t conn,
xmmsv_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
connThe connection to the server.
collThe collection structure to save.
nameThe name under which to save the collection.
nsThe namespace in which to save the collection.

Referenced by xmmsc_playlist_create().

xmmsc_result_t* xmmsc_coll_sync ( xmmsc_connection_t conn)

Synchronize collection data to the database.

Parameters
connThe connection to the server.