MedialibControl
[XMMSClient]

This controls the medialib. More...

Functions

int xmmsc_entry_format (char *target, int len, const char *fmt, xmmsv_t *val)
 This function will make a pretty string about the information in the mediainfo hash supplied to it.
xmmsc_result_txmmsc_medialib_get_id (xmmsc_connection_t *conn, const char *url)
 Search for a entry (URL) in the medialib db and return its ID number.
xmmsc_result_txmmsc_medialib_get_id_encoded (xmmsc_connection_t *conn, const char *url)
 Search for a entry (URL) in the medialib db and return its ID number.
xmmsc_result_txmmsc_medialib_move_entry (xmmsc_connection_t *conn, int entry, const char *url)
 Change the url property of an entry in the media library.
xmmsc_result_txmmsc_medialib_remove_entry (xmmsc_connection_t *conn, int entry)
 Remove a entry from the medialib.
xmmsc_result_txmmsc_medialib_add_entry (xmmsc_connection_t *conn, const char *url)
 Add a URL to the medialib.
xmmsc_result_txmmsc_medialib_add_entry_args (xmmsc_connection_t *conn, const char *url, int numargs, const char **args)
 Add a URL with arguments to the medialib.
xmmsc_result_txmmsc_medialib_add_entry_full (xmmsc_connection_t *conn, const char *url, xmmsv_t *args)
 Add a URL with arguments to the medialib.
xmmsc_result_txmmsc_medialib_add_entry_encoded (xmmsc_connection_t *conn, const char *url)
 Add a URL to the medialib.
xmmsc_result_txmmsc_medialib_import_path (xmmsc_connection_t *conn, const char *path)
 Import a all files recursivly from the directory passed as argument.
xmmsc_result_txmmsc_medialib_import_path_encoded (xmmsc_connection_t *conn, const char *path)
 Import a all files recursivly from the directory passed as argument which must already be url encoded.
xmmsc_result_txmmsc_medialib_path_import (xmmsc_connection_t *conn, const char *path)
 Import a all files recursivly from the directory passed as argument.
xmmsc_result_txmmsc_medialib_path_import_encoded (xmmsc_connection_t *conn, const char *path)
 Import a all files recursivly from the directory passed as argument which must already be url encoded.
xmmsc_result_txmmsc_medialib_rehash (xmmsc_connection_t *conn, int id)
 Rehash the medialib, this will check data in the medialib still is the same as the data in files.
xmmsc_result_txmmsc_medialib_get_info (xmmsc_connection_t *c, int id)
 Retrieve information about a entry from the medialib.
xmmsc_result_txmmsc_broadcast_medialib_entry_added (xmmsc_connection_t *c)
 Request the medialib_entry_added broadcast.
xmmsc_result_txmmsc_broadcast_medialib_entry_changed (xmmsc_connection_t *c)
 Request the medialib_entry_changed broadcast.
xmmsc_result_txmmsc_medialib_entry_property_set_int (xmmsc_connection_t *c, int id, const char *key, int32_t value)
 Associate a int value with a medialib entry.
xmmsc_result_txmmsc_medialib_entry_property_set_int_with_source (xmmsc_connection_t *c, int id, const char *source, const char *key, int32_t value)
 Set a custom int field in the medialib associated with a entry, the same as xmmsc_medialib_entry_property_set_int but with specifing your own source.
xmmsc_result_txmmsc_medialib_entry_property_set_str (xmmsc_connection_t *c, int id, const char *key, const char *value)
 Associate a value with a medialib entry.
xmmsc_result_txmmsc_medialib_entry_property_set_str_with_source (xmmsc_connection_t *c, int id, const char *source, const char *key, const char *value)
 Set a custom field in the medialib associated with a entry, the same as xmmsc_medialib_entry_property_set_str but with specifing your own source.
xmmsc_result_txmmsc_medialib_entry_property_remove (xmmsc_connection_t *c, int id, const char *key)
 Remove a custom field in the medialib associated with an entry.
xmmsc_result_txmmsc_medialib_entry_property_remove_with_source (xmmsc_connection_t *c, int id, const char *source, const char *key)
 Remove a custom field in the medialib associated with an entry.

Detailed Description

This controls the medialib.


Function Documentation

xmmsc_result_t* xmmsc_broadcast_medialib_entry_added ( xmmsc_connection_t c  ) 

Request the medialib_entry_added broadcast.

This will be called if a new entry is added to the medialib serverside.

Definition at line 339 of file medialib.c.

xmmsc_result_t* xmmsc_broadcast_medialib_entry_changed ( xmmsc_connection_t c  ) 

Request the medialib_entry_changed broadcast.

This will be called if a entry changes on the serverside. The argument will be an medialib id.

Definition at line 352 of file medialib.c.

int xmmsc_entry_format ( char *  target,
int  len,
const char *  fmt,
xmmsv_t *  val 
)

This function will make a pretty string about the information in the mediainfo hash supplied to it.

Parameters:
target A allocated char *
len Length of target
fmt A format string to use. You can insert items from the hash by using specialformat "${field}".
val The xmmsv_t that contains the dict.
Returns:
The number of chars written to target

Definition at line 54 of file medialib.c.

xmmsc_result_t* xmmsc_medialib_add_entry ( xmmsc_connection_t conn,
const char *  url 
)

Add a URL to the medialib.

If you want to add mutiple files you should call xmmsc_medialib_import_path

Parameters:
conn The xmmsc_connection_t
url URL to add to the medialib.

Definition at line 141 of file medialib.c.

xmmsc_result_t* xmmsc_medialib_add_entry_args ( xmmsc_connection_t conn,
const char *  url,
int  numargs,
const char **  args 
)

Add a URL with arguments to the medialib.

xmmsc_medialib_add_entry_args (conn, "file:///data/HVSC/C64Music/Hubbard_Rob/Commando.sid", 1, "subtune=2");

Parameters:
conn The xmmsc_connection_t
url URL to add to the medialib.
numargs The number of arguments
args array of numargs strings used as arguments

Definition at line 157 of file medialib.c.

xmmsc_result_t* xmmsc_medialib_add_entry_encoded ( xmmsc_connection_t conn,
const char *  url 
)

Add a URL to the medialib.

If you want to add mutiple files you should call xmmsc_medialib_import_path

same as xmmsc_medialib_add_entry but expects a encoded URL instead

Parameters:
conn The xmmsc_connection_t
url URL to add to the medialib.

Definition at line 213 of file medialib.c.

Referenced by xmmsc_medialib_add_entry_args(), and xmmsc_medialib_add_entry_full().

xmmsc_result_t* xmmsc_medialib_add_entry_full ( xmmsc_connection_t conn,
const char *  url,
xmmsv_t *  args 
)

Add a URL with arguments to the medialib.

Parameters:
conn The xmmsc_connection_t
url URL to add to the medialib.
numargs The number of arguments
args array of numargs strings used as arguments

Definition at line 184 of file medialib.c.

Referenced by xmmsc_medialib_add_entry().

xmmsc_result_t* xmmsc_medialib_entry_property_remove ( xmmsc_connection_t c,
int  id,
const char *  key 
)

Remove a custom field in the medialib associated with an entry.

Uses default source which is client/<clientname>

Definition at line 446 of file medialib.c.

xmmsc_result_t* xmmsc_medialib_entry_property_remove_with_source ( xmmsc_connection_t c,
int  id,
const char *  source,
const char *  key 
)

Remove a custom field in the medialib associated with an entry.

Identical to xmmsc_medialib_entry_property_remove except with specifying your own source.

Definition at line 464 of file medialib.c.

Referenced by xmmsc_medialib_entry_property_remove().

xmmsc_result_t* xmmsc_medialib_entry_property_set_int ( xmmsc_connection_t c,
int  id,
const char *  key,
int32_t  value 
)

Associate a int value with a medialib entry.

Uses default source which is client/<clientname>

Definition at line 364 of file medialib.c.

xmmsc_result_t* xmmsc_medialib_entry_property_set_int_with_source ( xmmsc_connection_t c,
int  id,
const char *  source,
const char *  key,
int32_t  value 
)

Set a custom int field in the medialib associated with a entry, the same as xmmsc_medialib_entry_property_set_int but with specifing your own source.

Definition at line 383 of file medialib.c.

Referenced by xmmsc_medialib_entry_property_set_int().

xmmsc_result_t* xmmsc_medialib_entry_property_set_str ( xmmsc_connection_t c,
int  id,
const char *  key,
const char *  value 
)

Associate a value with a medialib entry.

Uses default source which is client/<clientname>

Definition at line 405 of file medialib.c.

xmmsc_result_t* xmmsc_medialib_entry_property_set_str_with_source ( xmmsc_connection_t c,
int  id,
const char *  source,
const char *  key,
const char *  value 
)

Set a custom field in the medialib associated with a entry, the same as xmmsc_medialib_entry_property_set_str but with specifing your own source.

Definition at line 424 of file medialib.c.

Referenced by xmmsc_medialib_entry_property_set_str().

xmmsc_result_t* xmmsc_medialib_get_id ( xmmsc_connection_t conn,
const char *  url 
)

Search for a entry (URL) in the medialib db and return its ID number.

Parameters:
conn The xmmsc_connection_t
url The URL to search for

Definition at line 65 of file medialib.c.

xmmsc_result_t* xmmsc_medialib_get_id_encoded ( xmmsc_connection_t conn,
const char *  url 
)

Search for a entry (URL) in the medialib db and return its ID number.

Same as xmmsc_medialib_get_id but expects a encoded URL instead

Parameters:
conn The xmmsc_connection_t
url The URL to search for

Definition at line 91 of file medialib.c.

Referenced by xmmsc_medialib_get_id().

xmmsc_result_t* xmmsc_medialib_get_info ( xmmsc_connection_t c,
int  id 
)

Retrieve information about a entry from the medialib.

Definition at line 326 of file medialib.c.

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

Import a all files recursivly from the directory passed as argument.

Parameters:
conn xmmsc_connection_t
path A directory to recursive search for mediafiles, this must include the protocol, i.e file://

Definition at line 231 of file medialib.c.

Referenced by xmmsc_medialib_path_import().

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

Import a all files recursivly from the directory passed as argument which must already be url encoded.

You probably want to use xmmsc_medialib_import_path unless you want to add a string that comes as a result from the daemon, such as from xmmsc_xform_media_browse

Parameters:
conn xmmsc_connection_t
path A directory to recursive search for mediafiles, this must include the protocol, i.e file://

Definition at line 261 of file medialib.c.

Referenced by xmmsc_medialib_import_path(), and xmmsc_medialib_path_import_encoded().

xmmsc_result_t* xmmsc_medialib_move_entry ( xmmsc_connection_t conn,
int  entry,
const char *  url 
)

Change the url property of an entry in the media library.

Note that you need to handle the actual file move yourself.

Parameters:
conn The xmmsc_connection_t
entry The entry id you want to move
url The url to move it to

Definition at line 107 of file medialib.c.

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

Import a all files recursivly from the directory passed as argument.

Parameters:
conn xmmsc_connection_t
path A directory to recursive search for mediafiles, this must include the protocol, i.e file://

Definition at line 280 of file medialib.c.

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

Import a all files recursivly from the directory passed as argument which must already be url encoded.

You probably want to use xmmsc_medialib_path_import unless you want to add a string that comes as a result from the daemon, such as from xmmsc_xform_media_browse

Parameters:
conn xmmsc_connection_t
path A directory to recursive search for mediafiles, this must include the protocol, i.e file://

Definition at line 297 of file medialib.c.

xmmsc_result_t* xmmsc_medialib_rehash ( xmmsc_connection_t conn,
int  id 
)

Rehash the medialib, this will check data in the medialib still is the same as the data in files.

Parameters:
conn xmmsc_connection_t
id The id to rehash. Set it to 0 if you want to rehash the whole medialib.

Definition at line 312 of file medialib.c.

xmmsc_result_t* xmmsc_medialib_remove_entry ( xmmsc_connection_t conn,
int  entry 
)

Remove a entry from the medialib.

Parameters:
conn The xmmsc_connection_t
entry The entry id you want to remove

Definition at line 124 of file medialib.c.


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