XmmsClient
Macros | Functions
medialib.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <xmmsclient/xmmsclient.h>
#include <xmmsclientpriv/xmmsclient.h>
#include <xmmsclientpriv/xmmsclient_ipc.h>
#include <xmmsc/xmmsc_idnumbers.h>
#include <xmmsc/xmmsc_stringport.h>

Macros

#define GOODCHAR(a)
 

Functions

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. More...
 
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. More...
 
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. More...
 
xmmsc_result_txmmsc_medialib_remove_entry (xmmsc_connection_t *conn, int entry)
 Remove a entry from the medialib. More...
 
xmmsc_result_txmmsc_medialib_add_entry (xmmsc_connection_t *conn, const char *url)
 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)
 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)
 Add a URL with arguments to the medialib. More...
 
xmmsc_result_txmmsc_medialib_add_entry_encoded (xmmsc_connection_t *conn, const char *url)
 Add a URL to the medialib. More...
 
xmmsc_result_txmmsc_medialib_import_path (xmmsc_connection_t *conn, const char *path)
 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)
 Import a all files recursivly from the directory passed as argument which must already be url encoded. More...
 
xmmsc_result_txmmsc_medialib_path_import (xmmsc_connection_t *conn, const char *path)
 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)
 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)
 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_info (xmmsc_connection_t *c, int id)
 Retrieve information about a entry from the medialib. More...
 
xmmsc_result_txmmsc_broadcast_medialib_entry_added (xmmsc_connection_t *c)
 Request the medialib_entry_added broadcast. More...
 
xmmsc_result_txmmsc_broadcast_medialib_entry_changed (xmmsc_connection_t *c)
 Request the medialib_entry_updated broadcast. More...
 
xmmsc_result_txmmsc_broadcast_medialib_entry_updated (xmmsc_connection_t *c)
 Request the medialib_entry_updated broadcast. More...
 
xmmsc_result_txmmsc_broadcast_medialib_entry_removed (xmmsc_connection_t *c)
 Request the medialib_entry_removed broadcast. More...
 
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. 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)
 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)
 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)
 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)
 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)
 Remove a custom field in the medialib associated with an entry. More...
 
int _xmmsc_medialib_verify_url (const char *url)
 
char * _xmmsc_medialib_encode_url_old (const char *url, int narg, const char **args)
 
char * xmmsc_medialib_encode_url_full (const char *url, xmmsv_t *args)
 Encodes an url with arguments stored in dict args. More...
 
char * xmmsc_medialib_encode_url (const char *url)
 Encodes an url. More...
 

Macro Definition Documentation

#define GOODCHAR (   a)
Value:
((((a) >= 'a') && ((a) <= 'z')) || \
(((a) >= 'A') && ((a) <= 'Z')) || \
(((a) >= '0') && ((a) <= '9')) || \
((a) == ':') || \
((a) == '/') || \
((a) == '-') || \
((a) == '.') || \
((a) == '_'))

Referenced by _xmmsc_medialib_encode_url_old(), and _xmmsc_medialib_verify_url().

Function Documentation

char* _xmmsc_medialib_encode_url_old ( const char *  url,
int  narg,
const char **  args 
)
int _xmmsc_medialib_verify_url ( const char *  url)
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