XmmsClient
Data Structures | Macros | Typedefs | Enumerations | Functions
xmmsclient.h File Reference
#include <xmmsc/xmmsc_compiler.h>
#include <xmmsc/xmmsc_stdint.h>
#include <xmmsc/xmmsc_ipc_msg.h>
#include <xmmsc/xmmsc_idnumbers.h>
#include <xmmsc/xmmsv.h>
#include <xmmsc/xmmsv_coll.h>
#include <xmmsc/xmmsv_c2c.h>
#include <xmmsc/xmmsv_service.h>

Data Structures

struct  xmmsv_coll_token_St
 

Macros

#define XMMS_COLLECTION_TOKEN_CUSTOM   32
 
#define XMMSC_SC_CMD_KEY   "libxmmsclient-sc-command"
 
#define XMMSC_SC_ARGS_KEY   "libxmmsclient-sc-args"
 
#define XMMSC_SC_CALL_METHOD_KEY   "libxmmsclient-sc-call-method"
 
#define XMMSC_SC_CALL_PARGS_KEY   "libxmmsclient-sc-call-pargs"
 
#define XMMSC_SC_CALL_NARGS_KEY   "libxmmsclient-sc-call-nargs"
 
#define XMMSC_SC_INTROSPECT_PATH_KEY   "libxmmsclient-sc-introspect-path"
 
#define XMMSC_SC_INTROSPECT_TYPE_KEY   "libxmmsclient-sc-introspect-type"
 
#define XMMSC_SC_INTROSPECT_KEYFILTER_KEY   "libxmmsclient-sc-introspect-keyfilter"
 
#define XMMS_CALLBACK_SET(conn, meth, callback, udata)   XMMS_CALLBACK_SET_FULL(conn,meth,callback,udata,NULL);
 
#define XMMS_CALLBACK_SET_FULL(conn, meth, callback, udata, free_func)
 
#define xmmsc_result_iserror(res)   xmmsv_is_error(xmmsc_result_get_value(res))
 
#define xmmsc_result_notifier_set   xmmsc_result_notifier_set_default
 
#define xmmsc_result_notifier_set_full   xmmsc_result_notifier_set_default_full
 
#define xmmsc_coll_parse   xmmsv_coll_parse
 
#define xmmsc_coll_parse_custom   xmmsv_coll_parse_custom
 
#define xmmsc_coll_default_parse_build   xmmsv_coll_default_parse_build
 
#define xmmsc_coll_default_parse_tokens   xmmsv_coll_default_parse_tokens
 

Typedefs

typedef struct xmmsc_connection_St xmmsc_connection_t
 
typedef struct xmmsc_result_St xmmsc_result_t
 
typedef void(* xmmsc_disconnect_func_t )(void *user_data)
 
typedef void(* xmmsc_user_data_free_func_t )(void *user_data)
 
typedef void(* xmmsc_io_need_out_callback_func_t )(int, void *)
 
typedef struct xmmsv_coll_token_St xmmsv_coll_token_t
 
typedef xmmsv_coll_token_t *(* xmmsv_coll_parse_tokens_f )(const char *str, const char **newpos)
 
typedef xmmsv_t *(* xmmsv_coll_parse_build_f )(xmmsv_coll_token_t *tokens)
 
typedef struct
xmmsc_sc_namespace_St 
xmmsc_sc_namespace_t
 
typedef xmmsv_t *(* xmmsc_sc_method_t )(xmmsv_t *positional_args, xmmsv_t *named_args, void *user_data)
 
typedef int(* xmmsc_result_notifier_t )(xmmsv_t *val, void *user_data)
 
typedef xmmsv_coll_token_type_t xmmsc_coll_token_type_t
 
typedef xmmsv_coll_token_t xmmsc_coll_token_t
 
typedef xmmsv_coll_parse_tokens_f xmmsc_coll_parse_tokens_f
 
typedef xmmsv_coll_parse_build_f xmmsc_coll_parse_build_f
 

Enumerations

enum  xmmsc_result_type_t { XMMSC_RESULT_CLASS_DEFAULT, XMMSC_RESULT_CLASS_SIGNAL, XMMSC_RESULT_CLASS_BROADCAST }
 
enum  xmmsv_coll_token_type_t {
  XMMS_COLLECTION_TOKEN_INVALID, XMMS_COLLECTION_TOKEN_GROUP_OPEN, XMMS_COLLECTION_TOKEN_GROUP_CLOSE, XMMS_COLLECTION_TOKEN_REFERENCE,
  XMMS_COLLECTION_TOKEN_SYMBOL_ID, XMMS_COLLECTION_TOKEN_STRING, XMMS_COLLECTION_TOKEN_PATTERN, XMMS_COLLECTION_TOKEN_INTEGER,
  XMMS_COLLECTION_TOKEN_SEQUENCE, XMMS_COLLECTION_TOKEN_PROP_LONG, XMMS_COLLECTION_TOKEN_PROP_SHORT, XMMS_COLLECTION_TOKEN_OPSET_UNION,
  XMMS_COLLECTION_TOKEN_OPSET_INTERSECTION, XMMS_COLLECTION_TOKEN_OPSET_COMPLEMENT, XMMS_COLLECTION_TOKEN_OPFIL_HAS, XMMS_COLLECTION_TOKEN_OPFIL_EQUALS,
  XMMS_COLLECTION_TOKEN_OPFIL_MATCH, XMMS_COLLECTION_TOKEN_OPFIL_SMALLER, XMMS_COLLECTION_TOKEN_OPFIL_GREATER, XMMS_COLLECTION_TOKEN_OPFIL_SMALLEREQ,
  XMMS_COLLECTION_TOKEN_OPFIL_GREATEREQ
}
 
enum  xmmsc_sc_commands_t { XMMSC_SC_CALL, XMMSC_SC_BROADCAST_SUBSCRIBE, XMMSC_SC_INTROSPECT }
 

Functions

xmmsc_connection_txmmsc_init (const char *clientname) XMMS_PUBLIC
 Initializes a xmmsc_connection_t. More...
 
int xmmsc_connect (xmmsc_connection_t *, const char *) XMMS_PUBLIC
 Connects to the XMMS server. More...
 
xmmsc_connection_txmmsc_ref (xmmsc_connection_t *c) XMMS_PUBLIC
 References the xmmsc_connection_t. More...
 
void xmmsc_unref (xmmsc_connection_t *c) XMMS_PUBLIC
 Dereference the xmmsc_connection_t and free the memory when reference count reaches zero. More...
 
void xmmsc_lock_set (xmmsc_connection_t *conn, void *lock, void(*lockfunc)(void *), void(*unlockfunc)(void *)) XMMS_PUBLIC
 Set locking functions for a connection. More...
 
void xmmsc_disconnect_callback_set (xmmsc_connection_t *c, xmmsc_disconnect_func_t disconnect_func, void *userdata) XMMS_PUBLIC
 Set the disconnect callback. More...
 
void xmmsc_disconnect_callback_set_full (xmmsc_connection_t *c, xmmsc_disconnect_func_t disconnect_func, void *userdata, xmmsc_user_data_free_func_t free_func) XMMS_PUBLIC
 
void xmmsc_io_need_out_callback_set (xmmsc_connection_t *c, xmmsc_io_need_out_callback_func_t callback, void *userdata) XMMS_PUBLIC
 Set callback for enabling/disabling writing. More...
 
void xmmsc_io_need_out_callback_set_full (xmmsc_connection_t *c, xmmsc_io_need_out_callback_func_t callback, void *userdata, xmmsc_user_data_free_func_t free_func) XMMS_PUBLIC
 
void xmmsc_io_disconnect (xmmsc_connection_t *c) XMMS_PUBLIC
 Flag connection as disconnected. More...
 
int xmmsc_io_want_out (xmmsc_connection_t *c) XMMS_PUBLIC
 Check for pending output. More...
 
int xmmsc_io_out_handle (xmmsc_connection_t *c) XMMS_PUBLIC
 Write pending data. More...
 
int xmmsc_io_in_handle (xmmsc_connection_t *c) XMMS_PUBLIC
 Read available data. More...
 
int xmmsc_io_fd_get (xmmsc_connection_t *c) XMMS_PUBLIC
 Retrieve filedescriptor for connection. More...
 
char * xmmsc_get_last_error (xmmsc_connection_t *c) XMMS_PUBLIC
 Returns a string that descibes the last error. More...
 
xmmsc_result_txmmsc_quit (xmmsc_connection_t *c) XMMS_PUBLIC
 Tell the server to quit. More...
 
xmmsc_result_txmmsc_broadcast_quit (xmmsc_connection_t *c) XMMS_PUBLIC
 Request the quit broadcast. More...
 
const char * xmmsc_userconfdir_get (char *buf, int len) XMMS_PUBLIC
 Get the absolute path to the user config dir. More...
 
char * xmmsc_medialib_encode_url_full (const char *url, xmmsv_t *args) XMMS_PUBLIC XMMS_DEPRECATED
 Encodes an url with arguments stored in dict args. More...
 
char * xmmsc_medialib_encode_url (const char *url) XMMS_PUBLIC XMMS_DEPRECATED
 Encodes an url. More...
 
xmmsc_result_txmmsc_playlist_list (xmmsc_connection_t *c) XMMS_PUBLIC
 List the existing playlists. More...
 
xmmsc_result_txmmsc_playlist_create (xmmsc_connection_t *c, const char *playlist) XMMS_PUBLIC
 Create a new empty playlist. More...
 
xmmsc_result_txmmsc_playlist_shuffle (xmmsc_connection_t *c, const char *playlist) XMMS_PUBLIC
 Shuffles the current playlist. More...
 
xmmsc_result_txmmsc_playlist_add_args (xmmsc_connection_t *c, const char *playlist, const char *, int, const char **) XMMS_PUBLIC XMMS_DEPRECATED
 Add the url to the playlist with arguments. More...
 
xmmsc_result_txmmsc_playlist_add_full (xmmsc_connection_t *c, const char *playlist, const char *, xmmsv_t *) XMMS_PUBLIC
 Add the url to the playlist with arguments. More...
 
xmmsc_result_txmmsc_playlist_add_url (xmmsc_connection_t *c, const char *playlist, const char *url) XMMS_PUBLIC
 Add the url to the playlist. More...
 
xmmsc_result_txmmsc_playlist_add_id (xmmsc_connection_t *c, const char *playlist, int id) XMMS_PUBLIC
 Add a medialib id to the playlist. More...
 
xmmsc_result_txmmsc_playlist_add_encoded (xmmsc_connection_t *c, const char *playlist, const char *url) XMMS_PUBLIC
 Add the url to the playlist. More...
 
xmmsc_result_txmmsc_playlist_add_idlist (xmmsc_connection_t *c, const char *playlist, xmmsv_t *coll) XMMS_PUBLIC
 Adds media in idlist to a playlist. More...
 
xmmsc_result_txmmsc_playlist_add_collection (xmmsc_connection_t *c, const char *playlist, xmmsv_t *coll, xmmsv_t *order) XMMS_PUBLIC
 Queries the medialib for media and adds the matching ones to the current playlist. More...
 
xmmsc_result_txmmsc_playlist_remove_entry (xmmsc_connection_t *c, const char *playlist, int) XMMS_PUBLIC
 Remove an entry from the playlist. More...
 
xmmsc_result_txmmsc_playlist_clear (xmmsc_connection_t *c, const char *playlist) XMMS_PUBLIC
 Clears the current playlist. More...
 
xmmsc_result_txmmsc_playlist_replace (xmmsc_connection_t *c, const char *playlist, xmmsv_t *coll, xmms_playlist_position_action_t action) XMMS_PUBLIC
 Replaces the current playlist. More...
 
xmmsc_result_txmmsc_playlist_remove (xmmsc_connection_t *c, const char *playlist) XMMS_PUBLIC
 Remove the given playlist. More...
 
xmmsc_result_txmmsc_playlist_list_entries (xmmsc_connection_t *c, const char *playlist) XMMS_PUBLIC
 List current playlist. More...
 
xmmsc_result_txmmsc_playlist_sort (xmmsc_connection_t *c, const char *playlist, xmmsv_t *properties) XMMS_PUBLIC
 Sorts the playlist according to the list of properties (xmmsv_t containing a list of strings). More...
 
xmmsc_result_txmmsc_playlist_set_next (xmmsc_connection_t *c, int32_t) XMMS_PUBLIC
 
xmmsc_result_txmmsc_playlist_set_next_rel (xmmsc_connection_t *c, int32_t) XMMS_PUBLIC
 
xmmsc_result_txmmsc_playlist_move_entry (xmmsc_connection_t *c, const char *playlist, int, int) XMMS_PUBLIC
 Move a playlist entry to a new position (absolute move) More...
 
xmmsc_result_txmmsc_playlist_current_pos (xmmsc_connection_t *c, const char *playlist) XMMS_PUBLIC
 Retrive the current position in the playlist. More...
 
xmmsc_result_txmmsc_playlist_current_active (xmmsc_connection_t *c) XMMS_PUBLIC
 Retrive the name of the active playlist. More...
 
xmmsc_result_txmmsc_playlist_insert_args (xmmsc_connection_t *c, const char *playlist, int pos, const char *url, int numargs, const char **args) XMMS_PUBLIC XMMS_DEPRECATED
 Insert entry at given position in playlist with args. More...
 
xmmsc_result_txmmsc_playlist_insert_full (xmmsc_connection_t *c, const char *playlist, int pos, const char *url, xmmsv_t *args) XMMS_PUBLIC
 Insert entry at given position in playlist with args. More...
 
xmmsc_result_txmmsc_playlist_insert_url (xmmsc_connection_t *c, const char *playlist, int pos, const char *url) XMMS_PUBLIC
 Insert entry at given position in playlist. More...
 
xmmsc_result_txmmsc_playlist_insert_id (xmmsc_connection_t *c, const char *playlist, int pos, int32_t id) XMMS_PUBLIC
 
xmmsc_result_txmmsc_playlist_insert_encoded (xmmsc_connection_t *c, const char *playlist, int pos, const char *url) XMMS_PUBLIC
 Insert entry at given position in playlist. More...
 
xmmsc_result_txmmsc_playlist_insert_collection (xmmsc_connection_t *c, const char *playlist, int pos, xmmsv_t *coll, xmmsv_t *order) XMMS_PUBLIC
 Queries the medialib for media and inserts the matching ones to the current playlist at the given position. More...
 
xmmsc_result_txmmsc_playlist_load (xmmsc_connection_t *c, const char *playlist) XMMS_PUBLIC
 Load a playlist as the current active playlist. More...
 
xmmsc_result_txmmsc_playlist_radd (xmmsc_connection_t *c, const char *playlist, const char *url) XMMS_PUBLIC
 Adds a directory recursivly to the playlist. More...
 
xmmsc_result_txmmsc_playlist_radd_encoded (xmmsc_connection_t *c, const char *playlist, const char *url) XMMS_PUBLIC
 Adds a directory recursivly to the playlist. More...
 
xmmsc_result_txmmsc_playlist_rinsert (xmmsc_connection_t *c, const char *playlist, int pos, const char *url) XMMS_PUBLIC
 Insert a directory recursivly at a given position in the playlist. More...
 
xmmsc_result_txmmsc_playlist_rinsert_encoded (xmmsc_connection_t *c, const char *playlist, int pos, const char *url) XMMS_PUBLIC
 Insert a directory recursivly at a given position in the playlist. More...
 
xmmsc_result_txmmsc_broadcast_playlist_changed (xmmsc_connection_t *c) XMMS_PUBLIC
 Request the playlist changed broadcast from the server. More...
 
xmmsc_result_txmmsc_broadcast_playlist_current_pos (xmmsc_connection_t *c) XMMS_PUBLIC
 Request the playlist current pos broadcast. More...
 
xmmsc_result_txmmsc_broadcast_playlist_loaded (xmmsc_connection_t *c) XMMS_PUBLIC
 Request the playlist_loaded broadcast. More...
 
xmmsc_result_txmmsc_playback_stop (xmmsc_connection_t *c) XMMS_PUBLIC
 Stops the current playback. More...
 
xmmsc_result_txmmsc_playback_tickle (xmmsc_connection_t *c) XMMS_PUBLIC
 Stop decoding of current song. More...
 
xmmsc_result_txmmsc_playback_start (xmmsc_connection_t *c) XMMS_PUBLIC
 Starts playback if server is idle. More...
 
xmmsc_result_txmmsc_playback_pause (xmmsc_connection_t *c) XMMS_PUBLIC
 Pause the current playback, will tell the output to not read nor write. More...
 
xmmsc_result_txmmsc_playback_current_id (xmmsc_connection_t *c) XMMS_PUBLIC
 Make server emit the current id. More...
 
xmmsc_result_txmmsc_playback_seek_ms (xmmsc_connection_t *c, int milliseconds, xmms_playback_seek_mode_t whence) XMMS_PUBLIC
 Seek to a position given in milliseconds in the current playback. More...
 
xmmsc_result_txmmsc_playback_seek_samples (xmmsc_connection_t *c, int samples, xmms_playback_seek_mode_t whence) XMMS_PUBLIC
 Seek to a position given in samples in the current playback. More...
 
xmmsc_result_txmmsc_playback_playtime (xmmsc_connection_t *c) XMMS_PUBLIC
 Make server emit the current playtime. More...
 
xmmsc_result_txmmsc_playback_status (xmmsc_connection_t *c) XMMS_PUBLIC
 Make server emit the playback status. More...
 
xmmsc_result_txmmsc_playback_volume_set (xmmsc_connection_t *c, const char *channel, int volume) XMMS_PUBLIC
 
xmmsc_result_txmmsc_playback_volume_get (xmmsc_connection_t *c) XMMS_PUBLIC
 
xmmsc_result_txmmsc_broadcast_playback_volume_changed (xmmsc_connection_t *c) XMMS_PUBLIC
 
xmmsc_result_txmmsc_broadcast_playback_status (xmmsc_connection_t *c) XMMS_PUBLIC
 Requests the playback status broadcast. More...
 
xmmsc_result_txmmsc_broadcast_playback_current_id (xmmsc_connection_t *c) XMMS_PUBLIC
 Request the current id broadcast. More...
 
xmmsc_result_txmmsc_signal_playback_playtime (xmmsc_connection_t *c) XMMS_PUBLIC
 Request the playback_playtime signal. More...
 
xmmsc_result_txmmsc_config_set_value (xmmsc_connection_t *c, const char *key, const char *val) XMMS_PUBLIC
 Sets a configvalue in the server. More...
 
xmmsc_result_txmmsc_config_list_values (xmmsc_connection_t *c) XMMS_PUBLIC
 Lists all configuration values. More...
 
xmmsc_result_txmmsc_config_get_value (xmmsc_connection_t *c, const char *key) XMMS_PUBLIC
 Retrieves a configvalue from the server. More...
 
xmmsc_result_txmmsc_config_register_value (xmmsc_connection_t *c, const char *valuename, const char *defaultvalue) XMMS_PUBLIC
 Registers a configvalue in the server. More...
 
xmmsc_result_txmmsc_broadcast_config_value_changed (xmmsc_connection_t *c) XMMS_PUBLIC
 Requests the config_value_changed broadcast. More...
 
xmmsc_result_txmmsc_main_list_plugins (xmmsc_connection_t *c, xmms_plugin_type_t type) XMMS_PUBLIC
 Get a list of loaded plugins from the server. More...
 
xmmsc_result_txmmsc_main_stats (xmmsc_connection_t *c) XMMS_PUBLIC
 Get a list of statistics from the server. More...
 
xmmsc_result_txmmsc_broadcast_mediainfo_reader_status (xmmsc_connection_t *c) XMMS_PUBLIC
 Request status for the mediainfo reader. More...
 
xmmsc_result_txmmsc_signal_mediainfo_reader_unindexed (xmmsc_connection_t *c) XMMS_PUBLIC
 Request number of unindexed entries in medialib. More...
 
xmmsc_result_txmmsc_visualization_version (xmmsc_connection_t *c) XMMS_PUBLIC
 Querys the visualization version. More...
 
xmmsc_result_txmmsc_visualization_init (xmmsc_connection_t *c) XMMS_PUBLIC
 Initializes a new visualization dataset. More...
 
int xmmsc_visualization_init_handle (xmmsc_result_t *res) XMMS_PUBLIC
 
xmmsc_result_txmmsc_visualization_start (xmmsc_connection_t *c, int vv) XMMS_PUBLIC
 Initializes a new visualization connection. More...
 
void xmmsc_visualization_start_handle (xmmsc_connection_t *c, xmmsc_result_t *res) XMMS_PUBLIC
 
bool xmmsc_visualization_started (xmmsc_connection_t *c, int vv) XMMS_PUBLIC
 
bool xmmsc_visualization_errored (xmmsc_connection_t *c, int vv) XMMS_PUBLIC
 
xmmsc_result_txmmsc_visualization_property_set (xmmsc_connection_t *c, int v, const char *key, const char *value) XMMS_PUBLIC
 Deliver one property. More...
 
xmmsc_result_txmmsc_visualization_properties_set (xmmsc_connection_t *c, int v, xmmsv_t *props) XMMS_PUBLIC
 Deliver some properties. More...
 
int xmmsc_visualization_chunk_get (xmmsc_connection_t *c, int vv, short *buffer, int drawtime, unsigned int blocking) XMMS_PUBLIC
 Fetches the next available data chunk. More...
 
void xmmsc_visualization_shutdown (xmmsc_connection_t *c, int v) XMMS_PUBLIC
 Says goodbye and cleans up. More...
 
xmmsc_result_txmmsc_medialib_add_entry (xmmsc_connection_t *conn, const char *url) XMMS_PUBLIC
 Add a URL to the medialib. More...
 
xmmsc_result_txmmsc_medialib_add_entry_args (xmmsc_connection_t *conn, const char *url, int numargs, const char **args) XMMS_PUBLIC XMMS_DEPRECATED
 Add a URL with arguments to the medialib. More...
 
xmmsc_result_txmmsc_medialib_add_entry_full (xmmsc_connection_t *conn, const char *url, xmmsv_t *args) XMMS_PUBLIC
 Add a URL with arguments to the medialib. More...
 
xmmsc_result_txmmsc_medialib_add_entry_encoded (xmmsc_connection_t *conn, const char *url) XMMS_PUBLIC
 Add a URL to the medialib. More...
 
xmmsc_result_txmmsc_medialib_get_info (xmmsc_connection_t *, int) XMMS_PUBLIC
 Retrieve information about a entry from the medialib. More...
 
xmmsc_result_txmmsc_medialib_path_import (xmmsc_connection_t *conn, const char *path) XMMS_PUBLIC XMMS_DEPRECATED
 Import a all files recursivly from the directory passed as argument. More...
 
xmmsc_result_txmmsc_medialib_path_import_encoded (xmmsc_connection_t *conn, const char *path) XMMS_PUBLIC XMMS_DEPRECATED
 Import a all files recursivly from the directory passed as argument which must already be url encoded. More...
 
xmmsc_result_txmmsc_medialib_import_path (xmmsc_connection_t *conn, const char *path) XMMS_PUBLIC
 Import a all files recursivly from the directory passed as argument. More...
 
xmmsc_result_txmmsc_medialib_import_path_encoded (xmmsc_connection_t *conn, const char *path) XMMS_PUBLIC
 Import a all files recursivly from the directory passed as argument which must already be url encoded. More...
 
xmmsc_result_txmmsc_medialib_rehash (xmmsc_connection_t *conn, int id) XMMS_PUBLIC
 Rehash the medialib, this will check data in the medialib still is the same as the data in files. More...
 
xmmsc_result_txmmsc_medialib_get_id (xmmsc_connection_t *conn, const char *url) XMMS_PUBLIC
 Search for a entry (URL) in the medialib db and return its ID number. More...
 
xmmsc_result_txmmsc_medialib_get_id_encoded (xmmsc_connection_t *conn, const char *url) XMMS_PUBLIC
 Search for a entry (URL) in the medialib db and return its ID number. More...
 
xmmsc_result_txmmsc_medialib_remove_entry (xmmsc_connection_t *conn, int entry) XMMS_PUBLIC
 Remove a entry from the medialib. More...
 
xmmsc_result_txmmsc_medialib_move_entry (xmmsc_connection_t *conn, int entry, const char *url) XMMS_PUBLIC
 Change the url property of an entry in the media library. More...
 
xmmsc_result_txmmsc_medialib_entry_property_set_int (xmmsc_connection_t *c, int id, const char *key, int32_t value) XMMS_PUBLIC
 Associate a int value with a medialib entry. More...
 
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) XMMS_PUBLIC
 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. More...
 
xmmsc_result_txmmsc_medialib_entry_property_set_str (xmmsc_connection_t *c, int id, const char *key, const char *value) XMMS_PUBLIC
 Associate a value with a medialib entry. More...
 
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) XMMS_PUBLIC
 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. More...
 
xmmsc_result_txmmsc_medialib_entry_property_remove (xmmsc_connection_t *c, int id, const char *key) XMMS_PUBLIC
 Remove a custom field in the medialib associated with an entry. More...
 
xmmsc_result_txmmsc_medialib_entry_property_remove_with_source (xmmsc_connection_t *c, int id, const char *source, const char *key) XMMS_PUBLIC
 Remove a custom field in the medialib associated with an entry. More...
 
xmmsc_result_txmmsc_xform_media_browse (xmmsc_connection_t *c, const char *url) XMMS_PUBLIC
 Browse available media in a path. More...
 
xmmsc_result_txmmsc_xform_media_browse_encoded (xmmsc_connection_t *c, const char *url) XMMS_PUBLIC
 Browse available media in a (already encoded) path. More...
 
xmmsc_result_txmmsc_bindata_add (xmmsc_connection_t *c, const unsigned char *data, unsigned int len) XMMS_PUBLIC
 Add binary data to the servers bindata directory. More...
 
xmmsc_result_txmmsc_bindata_retrieve (xmmsc_connection_t *c, const char *hash) XMMS_PUBLIC
 Retrieve a file from the servers bindata directory, based on the hash. More...
 
xmmsc_result_txmmsc_bindata_remove (xmmsc_connection_t *c, const char *hash) XMMS_PUBLIC
 Remove a file with associated with the hash from the server. More...
 
xmmsc_result_txmmsc_bindata_list (xmmsc_connection_t *c) XMMS_PUBLIC
 List all bindata hashes stored on the server. More...
 
xmmsc_result_txmmsc_broadcast_medialib_entry_changed (xmmsc_connection_t *c) XMMS_PUBLIC XMMS_DEPRECATED
 Request the medialib_entry_updated broadcast. More...
 
xmmsc_result_txmmsc_broadcast_medialib_entry_updated (xmmsc_connection_t *c) XMMS_PUBLIC
 Request the medialib_entry_updated broadcast. More...
 
xmmsc_result_txmmsc_broadcast_medialib_entry_added (xmmsc_connection_t *c) XMMS_PUBLIC
 Request the medialib_entry_added broadcast. More...
 
xmmsc_result_txmmsc_broadcast_medialib_entry_removed (xmmsc_connection_t *c) XMMS_PUBLIC
 Request the medialib_entry_removed broadcast. More...
 
xmmsc_result_txmmsc_coll_get (xmmsc_connection_t *conn, const char *collname, xmmsv_coll_namespace_t ns) XMMS_PUBLIC
 Get the collection structure of a collection saved on the server. More...
 
xmmsc_result_txmmsc_coll_list (xmmsc_connection_t *conn, xmmsv_coll_namespace_t ns) XMMS_PUBLIC
 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) XMMS_PUBLIC
 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) XMMS_PUBLIC
 Remove a collection from the server. More...
 
xmmsc_result_txmmsc_coll_find (xmmsc_connection_t *conn, int mediaid, xmmsv_coll_namespace_t ns) XMMS_PUBLIC
 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) XMMS_PUBLIC
 Rename a saved collection. More...
 
xmmsc_result_txmmsc_coll_idlist_from_playlist_file (xmmsc_connection_t *conn, const char *path) XMMS_PUBLIC
 Create a new collections structure with type idlist from a playlist file. More...
 
xmmsc_result_txmmsc_coll_sync (xmmsc_connection_t *conn) XMMS_PUBLIC
 Synchronize collection data to the database. More...
 
xmmsc_result_txmmsc_coll_query_ids (xmmsc_connection_t *conn, xmmsv_t *coll, xmmsv_t *order, int limit_start, int limit_len) XMMS_PUBLIC
 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) XMMS_PUBLIC XMMS_DEPRECATED
 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) XMMS_PUBLIC
 Finds all media in the collection and fetches it as specified in fetch. More...
 
int xmmsv_coll_parse (const char *pattern, xmmsv_t **coll) XMMS_PUBLIC
 Try to parse the given pattern to produce a collection structure. More...
 
int xmmsv_coll_parse_custom (const char *pattern, xmmsv_coll_parse_tokens_f parse_f, xmmsv_coll_parse_build_f build_f, xmmsv_t **coll) XMMS_PUBLIC
 Try to parse the given pattern to produce a collection structure, using custom token-parsing and collection-building functions. More...
 
xmmsv_txmmsv_coll_default_parse_build (xmmsv_coll_token_t *tokens) XMMS_PUBLIC
 Default collection structure builder. More...
 
xmmsv_coll_token_txmmsv_coll_default_parse_tokens (const char *str, const char **newpos) XMMS_PUBLIC
 The default token parser. More...
 
xmmsc_result_txmmsc_broadcast_collection_changed (xmmsc_connection_t *c) XMMS_PUBLIC
 Request the collection changed broadcast from the server. More...
 
xmmsc_result_txmmsc_c2c_send (xmmsc_connection_t *c, int dest, xmms_c2c_reply_policy_t reply_policy, xmmsv_t *payload) XMMS_PUBLIC
 Send a client-to-client message. More...
 
xmmsc_result_txmmsc_c2c_reply (xmmsc_connection_t *c, int msgid, xmms_c2c_reply_policy_t reply_policy, xmmsv_t *payload) XMMS_PUBLIC
 Reply to a client-to-client message. More...
 
int32_t xmmsc_c2c_get_own_id (xmmsc_connection_t *c) XMMS_PUBLIC
 Request your own client id. More...
 
xmmsc_result_txmmsc_c2c_get_connected_clients (xmmsc_connection_t *c) XMMS_PUBLIC
 Request a list of connected client ids. More...
 
xmmsc_result_txmmsc_c2c_ready (xmmsc_connection_t *c) XMMS_PUBLIC
 Notify the client's api is ready for query. More...
 
xmmsc_result_txmmsc_c2c_get_ready_clients (xmmsc_connection_t *c) XMMS_PUBLIC
 Request a list of clients ready for c2c communication. More...
 
xmmsc_result_txmmsc_broadcast_c2c_message (xmmsc_connection_t *c) XMMS_PUBLIC
 Request the client-to-client message broadcast. More...
 
xmmsc_result_txmmsc_broadcast_c2c_ready (xmmsc_connection_t *c) XMMS_PUBLIC
 Request the client service ready broadcast. More...
 
xmmsc_result_txmmsc_broadcast_c2c_client_connected (xmmsc_connection_t *c) XMMS_PUBLIC
 Request the client connected broadcast. More...
 
xmmsc_result_txmmsc_broadcast_c2c_client_disconnected (xmmsc_connection_t *c) XMMS_PUBLIC
 Request the client disconnected broadcast. More...
 
xmmsc_sc_namespace_txmmsc_sc_init (xmmsc_connection_t *c) XMMS_PUBLIC
 Set up the connection to offer service functionality. More...
 
xmmsc_sc_namespace_txmmsc_sc_namespace_root (xmmsc_connection_t *c) XMMS_PUBLIC
 Get the root namespace. More...
 
xmmsc_sc_namespace_txmmsc_sc_namespace_lookup (xmmsc_connection_t *c, xmmsv_t *nms) XMMS_PUBLIC
 Get an existing namespace from its full path. More...
 
xmmsc_sc_namespace_txmmsc_sc_namespace_new (xmmsc_sc_namespace_t *parent, const char *name, const char *docstring) XMMS_PUBLIC
 Create a new namespace. More...
 
xmmsc_sc_namespace_txmmsc_sc_namespace_get (xmmsc_sc_namespace_t *parent, const char *name) XMMS_PUBLIC
 Get an existing sub-namespace. More...
 
bool xmmsc_sc_namespace_add_constant (xmmsc_sc_namespace_t *nms, const char *key, xmmsv_t *value) XMMS_PUBLIC
 Add a constant key, value pair to a namespace. More...
 
void xmmsc_sc_namespace_remove_constant (xmmsc_sc_namespace_t *nms, const char *key) XMMS_PUBLIC
 Remove a symbol from a namespace. More...
 
bool xmmsc_sc_namespace_add_method (xmmsc_sc_namespace_t *nms, xmmsc_sc_method_t method, const char *name, const char *docstring, xmmsv_t *positional_args, xmmsv_t *named_args, bool va_positional, bool va_named, void *userdata) XMMS_PUBLIC
 Create a new method. More...
 
bool xmmsc_sc_namespace_add_method_noarg (xmmsc_sc_namespace_t *nms, xmmsc_sc_method_t method, const char *name, const char *docstring, void *userdata) XMMS_PUBLIC
 Convenience wrapper around xmmsc_sc_method_new to declare a method that accepts no arguments. More...
 
bool xmmsc_sc_namespace_add_broadcast (xmmsc_sc_namespace_t *nms, const char *name, const char *docstring) XMMS_PUBLIC
 Create a new client-to-client broadcast. More...
 
void xmmsc_sc_namespace_remove (xmmsc_sc_namespace_t *nms, xmmsv_t *path) XMMS_PUBLIC
 Remove a symbol from a namespace. More...
 
bool xmmsc_sc_broadcast_emit (xmmsc_connection_t *c, xmmsv_t *broadcast, xmmsv_t *value) XMMS_PUBLIC
 Emit a broadcast. More...
 
xmmsc_result_txmmsc_sc_broadcast_subscribe (xmmsc_connection_t *c, int dest, xmmsv_t *broadcast) XMMS_PUBLIC
 Subscribe to a broadcast from another client. More...
 
xmmsc_result_txmmsc_sc_call (xmmsc_connection_t *c, int dest, xmmsv_t *method, xmmsv_t *pargs, xmmsv_t *nargs) XMMS_PUBLIC
 Call a method in another client. More...
 
xmmsc_result_txmmsc_sc_introspect_namespace (xmmsc_connection_t *c, int dest, xmmsv_t *nms) XMMS_PUBLIC
 
xmmsc_result_txmmsc_sc_introspect_method (xmmsc_connection_t *c, int dest, xmmsv_t *method) XMMS_PUBLIC
 
xmmsc_result_txmmsc_sc_introspect_broadcast (xmmsc_connection_t *c, int dest, xmmsv_t *broadcast) XMMS_PUBLIC
 
xmmsc_result_txmmsc_sc_introspect_constant (xmmsc_connection_t *c, int dest, xmmsv_t *nms, const char *key) XMMS_PUBLIC
 Convenience function to retrieve a constant from a namespace directly. More...
 
xmmsc_result_txmmsc_sc_introspect_docstring (xmmsc_connection_t *c, int dest, xmmsv_t *path) XMMS_PUBLIC
 Get the docstring from a method, broadcast or namespace. More...
 
xmmsc_result_type_t xmmsc_result_get_class (xmmsc_result_t *res) XMMS_PUBLIC
 Get the class of the result (default, signal, broadcast). More...
 
void xmmsc_result_disconnect (xmmsc_result_t *res) XMMS_PUBLIC
 Disconnect all notifiers for a signal or a broadcast result. More...
 
xmmsc_result_txmmsc_result_ref (xmmsc_result_t *res) XMMS_PUBLIC
 References the xmmsc_result_t. More...
 
void xmmsc_result_unref (xmmsc_result_t *res) XMMS_PUBLIC
 Decreases the references for the xmmsc_result_t When the number of references reaches 0 it will be freed. More...
 
void xmmsc_result_notifier_set_default (xmmsc_result_t *res, xmmsc_result_notifier_t func, void *user_data) XMMS_PUBLIC
 
void xmmsc_result_notifier_set_default_full (xmmsc_result_t *res, xmmsc_result_notifier_t func, void *user_data, xmmsc_user_data_free_func_t free_func) XMMS_PUBLIC
 
void xmmsc_result_notifier_set_raw (xmmsc_result_t *res, xmmsc_result_notifier_t func, void *user_data) XMMS_PUBLIC
 
void xmmsc_result_notifier_set_raw_full (xmmsc_result_t *res, xmmsc_result_notifier_t func, void *user_data, xmmsc_user_data_free_func_t free_func) XMMS_PUBLIC
 
void xmmsc_result_notifier_set_c2c (xmmsc_result_t *res, xmmsc_result_notifier_t func, void *user_data) XMMS_PUBLIC
 
void xmmsc_result_notifier_set_c2c_full (xmmsc_result_t *res, xmmsc_result_notifier_t func, void *user_data, xmmsc_user_data_free_func_t free_func) XMMS_PUBLIC
 
void xmmsc_result_wait (xmmsc_result_t *res) XMMS_PUBLIC
 Set up a default callback for the result retrieval. More...
 
xmmsv_txmmsc_result_get_value (xmmsc_result_t *res) XMMS_PUBLIC
 Get the value from a result. More...
 

Macro Definition Documentation

#define XMMS_CALLBACK_SET (   conn,
  meth,
  callback,
  udata 
)    XMMS_CALLBACK_SET_FULL(conn,meth,callback,udata,NULL);
#define XMMS_CALLBACK_SET_FULL (   conn,
  meth,
  callback,
  udata,
  free_func 
)
Value:
{\
xmmsc_result_t *res = meth (conn); \
xmmsc_result_notifier_set_full (res, callback, udata, free_func);\
}
#define XMMS_COLLECTION_TOKEN_CUSTOM   32
#define xmmsc_coll_default_parse_build   xmmsv_coll_default_parse_build
#define xmmsc_coll_default_parse_tokens   xmmsv_coll_default_parse_tokens
#define xmmsc_coll_parse   xmmsv_coll_parse
#define xmmsc_coll_parse_custom   xmmsv_coll_parse_custom
#define xmmsc_result_iserror (   res)    xmmsv_is_error(xmmsc_result_get_value(res))
#define xmmsc_result_notifier_set   xmmsc_result_notifier_set_default
#define xmmsc_result_notifier_set_full   xmmsc_result_notifier_set_default_full
#define XMMSC_SC_ARGS_KEY   "libxmmsclient-sc-args"
#define XMMSC_SC_CALL_METHOD_KEY   "libxmmsclient-sc-call-method"

Referenced by xmmsc_sc_call().

#define XMMSC_SC_CALL_NARGS_KEY   "libxmmsclient-sc-call-nargs"

Referenced by xmmsc_sc_call().

#define XMMSC_SC_CALL_PARGS_KEY   "libxmmsclient-sc-call-pargs"

Referenced by xmmsc_sc_call().

#define XMMSC_SC_CMD_KEY   "libxmmsclient-sc-command"
#define XMMSC_SC_INTROSPECT_KEYFILTER_KEY   "libxmmsclient-sc-introspect-keyfilter"
#define XMMSC_SC_INTROSPECT_PATH_KEY   "libxmmsclient-sc-introspect-path"
#define XMMSC_SC_INTROSPECT_TYPE_KEY   "libxmmsclient-sc-introspect-type"

Typedef Documentation

typedef struct xmmsc_connection_St xmmsc_connection_t
typedef void(* xmmsc_disconnect_func_t)(void *user_data)
typedef void(* xmmsc_io_need_out_callback_func_t)(int, void *)
typedef int(* xmmsc_result_notifier_t)(xmmsv_t *val, void *user_data)
typedef struct xmmsc_result_St xmmsc_result_t
typedef xmmsv_t*(* xmmsc_sc_method_t)(xmmsv_t *positional_args, xmmsv_t *named_args, void *user_data)
typedef struct xmmsc_sc_namespace_St xmmsc_sc_namespace_t
typedef void(* xmmsc_user_data_free_func_t)(void *user_data)
typedef xmmsv_t*(* xmmsv_coll_parse_build_f)(xmmsv_coll_token_t *tokens)
typedef xmmsv_coll_token_t*(* xmmsv_coll_parse_tokens_f)(const char *str, const char **newpos)

Enumeration Type Documentation

Enumerator
XMMSC_RESULT_CLASS_DEFAULT 
XMMSC_RESULT_CLASS_SIGNAL 
XMMSC_RESULT_CLASS_BROADCAST 
Enumerator
XMMSC_SC_CALL 
XMMSC_SC_BROADCAST_SUBSCRIBE 
XMMSC_SC_INTROSPECT 
Enumerator
XMMS_COLLECTION_TOKEN_INVALID 
XMMS_COLLECTION_TOKEN_GROUP_OPEN 
XMMS_COLLECTION_TOKEN_GROUP_CLOSE 
XMMS_COLLECTION_TOKEN_REFERENCE 
XMMS_COLLECTION_TOKEN_SYMBOL_ID 
XMMS_COLLECTION_TOKEN_STRING 
XMMS_COLLECTION_TOKEN_PATTERN 
XMMS_COLLECTION_TOKEN_INTEGER 
XMMS_COLLECTION_TOKEN_SEQUENCE 
XMMS_COLLECTION_TOKEN_PROP_LONG 
XMMS_COLLECTION_TOKEN_PROP_SHORT 
XMMS_COLLECTION_TOKEN_OPSET_UNION 
XMMS_COLLECTION_TOKEN_OPSET_INTERSECTION 
XMMS_COLLECTION_TOKEN_OPSET_COMPLEMENT 
XMMS_COLLECTION_TOKEN_OPFIL_HAS 
XMMS_COLLECTION_TOKEN_OPFIL_EQUALS 
XMMS_COLLECTION_TOKEN_OPFIL_MATCH 
XMMS_COLLECTION_TOKEN_OPFIL_SMALLER 
XMMS_COLLECTION_TOKEN_OPFIL_GREATER 
XMMS_COLLECTION_TOKEN_OPFIL_SMALLEREQ 
XMMS_COLLECTION_TOKEN_OPFIL_GREATEREQ 

Function Documentation

xmmsc_result_t* xmmsc_bindata_add ( xmmsc_connection_t c,
const unsigned char *  data,
unsigned int  len 
)

Add binary data to the servers bindata directory.

xmmsc_result_t* xmmsc_bindata_list ( xmmsc_connection_t c)

List all bindata hashes stored on the server.

xmmsc_result_t* xmmsc_bindata_remove ( xmmsc_connection_t c,
const char *  hash 
)

Remove a file with associated with the hash from the server.

xmmsc_result_t* xmmsc_bindata_retrieve ( xmmsc_connection_t c,
const char *  hash 
)

Retrieve a file from the servers bindata directory, based on the hash.

xmmsc_result_t* xmmsc_broadcast_c2c_client_connected ( xmmsc_connection_t c)

Request the client connected broadcast.

This broadcast gets triggered when a new client connects, and contains the new client's id.

Parameters
cThe connection to the server.
xmmsc_result_t* xmmsc_broadcast_c2c_client_disconnected ( xmmsc_connection_t c)

Request the client disconnected broadcast.

This broadcast gets triggered when a client disconnects, and contains the disconnected client's id.

Parameters
cThe connection to the server.
xmmsc_result_t* xmmsc_broadcast_c2c_message ( xmmsc_connection_t c)

Request the client-to-client message broadcast.

This broadcast gets triggered when messages from other clients are received.

Parameters
cThe connection to the server.

Referenced by xmmsc_sc_init().

xmmsc_result_t* xmmsc_broadcast_c2c_ready ( xmmsc_connection_t c)

Request the client service ready broadcast.

This broadcast gets triggered when a client notify the server its api is ready.

Parameters
cThe connection to the server.
xmmsc_result_t* xmmsc_c2c_get_connected_clients ( xmmsc_connection_t c)

Request a list of connected client ids.

Parameters
cThe connection to the server.
int32_t xmmsc_c2c_get_own_id ( xmmsc_connection_t c)

Request your own client id.

Parameters
cThe connection to the server.
xmmsc_result_t* xmmsc_c2c_get_ready_clients ( xmmsc_connection_t c)

Request a list of clients ready for c2c communication.

Parameters
cThe connection to the server.
xmmsc_result_t* xmmsc_c2c_ready ( xmmsc_connection_t c)

Notify the client's api is ready for query.

xmmsc_result_t* xmmsc_c2c_reply ( xmmsc_connection_t c,
int  msgid,
xmms_c2c_reply_policy_t  reply_policy,
xmmsv_t payload 
)

Reply to a client-to-client message.

Parameters
cThe connection to the server.
msgidThe id of the message you are replying to.
reply_policyWhether to expect no reply, a single reply or multiple replies for this message.
payloadThe contents of the reply.

Referenced by xmmsc_sc_broadcast_emit().

xmmsc_result_t* xmmsc_c2c_send ( xmmsc_connection_t c,
int  dest,
xmms_c2c_reply_policy_t  reply_policy,
xmmsv_t payload 
)

Send a client-to-client message.

Parameters
cThe connection to the server.
reply_policyWhether to expect no reply, a single reply or multiple replies for this message.
payloadThe contents of the message.

Referenced by xmmsc_sc_broadcast_subscribe(), and xmmsc_sc_call().

char* xmmsc_medialib_encode_url ( const char *  url)

Encodes an url.

The encoded url is allocated using malloc and has to be freed by the user.

Parameters
urlThe url to encode.
Returns
The encoded url
char* xmmsc_medialib_encode_url_full ( const char *  url,
xmmsv_t args 
)

Encodes an url with arguments stored in dict args.

The encoded url is allocated using malloc and has to be freed by the user.

Parameters
urlThe url to encode.
argsThe dict with arguments, or NULL.
Returns
The encoded url
xmmsc_result_t* xmmsc_playlist_insert_id ( xmmsc_connection_t c,
const char *  playlist,
int  pos,
int32_t  id 
)
xmmsc_result_t* xmmsc_playlist_set_next ( xmmsc_connection_t c,
int32_t   
)
xmmsc_result_t* xmmsc_playlist_set_next_rel ( xmmsc_connection_t c,
int32_t   
)
void xmmsc_result_notifier_set_c2c ( xmmsc_result_t res,
xmmsc_result_notifier_t  func,
void *  user_data 
)

Referenced by xmmsc_sc_init().

void xmmsc_result_notifier_set_c2c_full ( xmmsc_result_t res,
xmmsc_result_notifier_t  func,
void *  user_data,
xmmsc_user_data_free_func_t  free_func 
)
void xmmsc_result_notifier_set_default ( xmmsc_result_t res,
xmmsc_result_notifier_t  func,
void *  user_data 
)
void xmmsc_result_notifier_set_default_full ( xmmsc_result_t res,
xmmsc_result_notifier_t  func,
void *  user_data,
xmmsc_user_data_free_func_t  free_func 
)
void xmmsc_result_notifier_set_raw ( xmmsc_result_t res,
xmmsc_result_notifier_t  func,
void *  user_data 
)
void xmmsc_result_notifier_set_raw_full ( xmmsc_result_t res,
xmmsc_result_notifier_t  func,
void *  user_data,
xmmsc_user_data_free_func_t  free_func 
)
bool xmmsc_sc_broadcast_emit ( xmmsc_connection_t c,
xmmsv_t broadcast,
xmmsv_t value 
)

Emit a broadcast.

Parameters
cThe connection structure.
broadcastA non-empty list of strings specifying the broadcast path.
valueThe value to emit. Must not be NULL.
xmmsc_result_t* xmmsc_sc_broadcast_subscribe ( xmmsc_connection_t c,
int  dest,
xmmsv_t broadcast 
)

Subscribe to a broadcast from another client.

The returned result can be used to set up notifiers as usual.

Parameters
cThe connection structuer.
destThe client that issues the broadcast.
broadcastA non-empty list of strings forming the path to the broadcast.
See Also
xmmsc_result_notifier_set_default and others.
xmmsc_result_t* xmmsc_sc_call ( xmmsc_connection_t c,
int  dest,
xmmsv_t method,
xmmsv_t pargs,
xmmsv_t nargs 
)

Call a method in another client.

Parameters
cThe connection structure.
destThe destination client's id.
methodA non-empty list of strings forming the path to the method.
pargsA list of positional arguments. May be NULL.
nargsA dict of named arguments. May be NULL.
xmmsc_sc_namespace_t* xmmsc_sc_init ( xmmsc_connection_t c)

Set up the connection to offer service functionality.

Parameters
cThe connection structure.
Returns
The root namespace.
xmmsc_result_t* xmmsc_sc_introspect_broadcast ( xmmsc_connection_t c,
int  dest,
xmmsv_t broadcast 
)
xmmsc_result_t* xmmsc_sc_introspect_constant ( xmmsc_connection_t c,
int  dest,
xmmsv_t nms,
const char *  key 
)

Convenience function to retrieve a constant from a namespace directly.

Parameters
cThe connection structure.
destThe nonzero destination client's id.
nmsThe path to the namespace in the remote client. Use an empty list to refer to the root namespace.
keyThe key to the constant.
xmmsc_result_t* xmmsc_sc_introspect_docstring ( xmmsc_connection_t c,
int  dest,
xmmsv_t path 
)

Get the docstring from a method, broadcast or namespace.

Parameters
cThe connection structure.
destThe nonzero id of the destination client.
pathThe path to the remote entity.
xmmsc_result_t* xmmsc_sc_introspect_method ( xmmsc_connection_t c,
int  dest,
xmmsv_t method 
)
xmmsc_result_t* xmmsc_sc_introspect_namespace ( xmmsc_connection_t c,
int  dest,
xmmsv_t nms 
)
bool xmmsc_sc_namespace_add_broadcast ( xmmsc_sc_namespace_t nms,
const char *  name,
const char *  docstring 
)

Create a new client-to-client broadcast.

Parameters
nmsThe parent namespace.
nameThe name of the broadcast. Must not be NULL. Must match XMMSC_SC_ENTITY_NAME_PATTERN.
docstringThe docstring for the broadcast.
See Also
xmmsc_sc_broadcast_emit
bool xmmsc_sc_namespace_add_constant ( xmmsc_sc_namespace_t nms,
const char *  key,
xmmsv_t value 
)

Add a constant key, value pair to a namespace.

Parameters
nmsThe namespace.
keyThe key to the constant.
valueThe value of the constant.

Referenced by xmmsc_sc_create_root_namespace().

bool xmmsc_sc_namespace_add_method ( xmmsc_sc_namespace_t nms,
xmmsc_sc_method_t  method,
const char *  name,
const char *  docstring,
xmmsv_t positional_args,
xmmsv_t named_args,
bool  va_positional,
bool  va_named,
void *  userdata 
)

Create a new method.

Parameters
nmsThe parent namespace.
methodThe underlying function that will be called.
nameThe name of the method. Must not be NULL. Must match XMMSC_SC_ENTITY_NAME_PATTERN.
docstringThe docstring of the method.
positional_argsA list of positional arguments, or NULL to declare none.
named_argsA list of named arguments, or NULL to declare none.
va_positionalWhether or not this method accepts a variable number of positional arguments (in addition to positional_args).
va_namedWhether or not this method accepts a extra named arguments (in addition to named_args).
userdataWill be passed to the underlying function.
See Also
xmmsv_sc_argument_new

Referenced by xmmsc_sc_namespace_add_method_noarg().

bool xmmsc_sc_namespace_add_method_noarg ( xmmsc_sc_namespace_t parent,
xmmsc_sc_method_t  method,
const char *  name,
const char *  docstring,
void *  userdata 
)

Convenience wrapper around xmmsc_sc_method_new to declare a method that accepts no arguments.

See Also
xmmsc_sc_namespace_add_method
xmmsc_sc_namespace_t* xmmsc_sc_namespace_get ( xmmsc_sc_namespace_t parent,
const char *  name 
)

Get an existing sub-namespace.

Parameters
parentThe parent namespace.
nmsThe name of the namespace.
Returns
A namespace.
xmmsc_sc_namespace_t* xmmsc_sc_namespace_lookup ( xmmsc_connection_t c,
xmmsv_t nms 
)

Get an existing namespace from its full path.

Parameters
cThe connection structure.
nmsThe path to the namespace.
Returns
A namespace.
xmmsc_sc_namespace_t* xmmsc_sc_namespace_new ( xmmsc_sc_namespace_t parent,
const char *  name,
const char *  docstring 
)

Create a new namespace.

Parameters
parentThe parent namespace.
nameThe name of the new namespace. Must match XMMSC_SC_ENTITY_NAME_PATTERN.
docstringThe docstring of the namespace.
Returns
The new namespace.
void xmmsc_sc_namespace_remove ( xmmsc_sc_namespace_t nms,
xmmsv_t path 
)

Remove a symbol from a namespace.

The relative path can point to a subnamespace, a method or a broadcast.

Parameters
nmsThe parent namespace.
pathThe relative path of the symbol.
void xmmsc_sc_namespace_remove_constant ( xmmsc_sc_namespace_t nms,
const char *  key 
)

Remove a symbol from a namespace.

The relative path can point to a subnamespace, a method or a broadcast.

Parameters
nmsThe parent namespace.
pathThe relative path of the symbol.
xmmsc_sc_namespace_t* xmmsc_sc_namespace_root ( xmmsc_connection_t c)

Get the root namespace.

Parameters
cThe connection structure.
Returns
The root namespace.
xmmsc_result_t* xmmsc_xform_media_browse ( xmmsc_connection_t c,
const char *  url 
)

Browse available media in a path.

Retrieves a list of paths available (directly) under the specified path.

xmmsc_result_t* xmmsc_xform_media_browse_encoded ( xmmsc_connection_t c,
const char *  url 
)

Browse available media in a (already encoded) path.

Retrieves a list of paths available (directly) under the specified path.

Referenced by xmmsc_xform_media_browse().