src/xmms/medialib.c File Reference

Medialib is a metainfo cache that is searchable. More...

#include "xmms_configuration.h"
#include "xmmspriv/xmms_medialib.h"
#include "xmmspriv/xmms_xform.h"
#include "xmmspriv/xmms_utils.h"
#include "xmms/xmms_error.h"
#include "xmms/xmms_config.h"
#include "xmms/xmms_object.h"
#include "xmms/xmms_ipc.h"
#include "xmms/xmms_log.h"
#include <string.h>
#include <stdlib.h>
#include <glib.h>
#include <time.h>
#include <sqlite3.h>
#include "medialib_ipc.c"

Go to the source code of this file.

Defines

#define XMMS_MEDIALIB_SOURCE_SERVER   "server"
#define XMMS_MEDIALIB_SOURCE_SERVER_ID   1
#define XMMS_MEDIALIB_RETRV_PROPERTY_SQL   "SELECT IFNULL (intval, value) FROM Media WHERE key=%Q AND id=%d ORDER BY xmms_source_pref(source, %Q) LIMIT 1"
 Retrieve a property from an entry.
#define GOODCHAR(a)

Functions

gchar * xmms_medialib_url_encode (const gchar *path)
guint32 xmms_medialib_source_to_id (xmms_medialib_session_t *session, const gchar *source)
xmms_medialib_txmms_medialib_init (xmms_playlist_t *playlist)
 Initialize the medialib and open the database file.
xmms_medialib_session_t_xmms_medialib_begin (gboolean write, const char *file, int line)
 Session handling.
void xmms_medialib_end (xmms_medialib_session_t *session)
xmmsv_t * xmms_medialib_entry_property_get_value (xmms_medialib_session_t *session, xmms_medialib_entry_t entry, const gchar *property)
gchar * xmms_medialib_entry_property_get_str (xmms_medialib_session_t *session, xmms_medialib_entry_t entry, const gchar *property)
 Retrieve a property from an entry.
gint xmms_medialib_entry_property_get_int (xmms_medialib_session_t *session, xmms_medialib_entry_t entry, const gchar *property)
 Retrieve a property as a int from a entry.
gboolean xmms_medialib_entry_property_set_int (xmms_medialib_session_t *session, xmms_medialib_entry_t entry, const gchar *property, gint value)
 Set a entry property to a new value, overwriting the old value.
gboolean xmms_medialib_entry_property_set_int_source (xmms_medialib_session_t *session, xmms_medialib_entry_t entry, const gchar *property, gint value, guint32 source)
gboolean xmms_medialib_entry_property_set_str (xmms_medialib_session_t *session, xmms_medialib_entry_t entry, const gchar *property, const gchar *value)
 Set a entry property to a new value, overwriting the old value.
gboolean xmms_medialib_entry_property_set_str_source (xmms_medialib_session_t *session, xmms_medialib_entry_t entry, const gchar *property, const gchar *value, guint32 source)
void xmms_medialib_entry_send_update (xmms_medialib_entry_t entry)
 Trigger a update signal to the client.
void xmms_medialib_entry_send_added (xmms_medialib_entry_t entry)
 Trigger an added siginal to the client.
void xmms_medialib_entry_remove (xmms_medialib_entry_t entry)
 Remove a medialib entry from the database.
void xmms_medialib_entry_cleanup (xmms_medialib_session_t *session, xmms_medialib_entry_t entry)
void xmms_medialib_add_recursive (xmms_medialib_t *medialib, const gchar *playlist, const gchar *path, xmms_error_t *error)
void xmms_medialib_insert_recursive (xmms_medialib_t *medialib, const gchar *playlist, gint32 pos, const gchar *path, xmms_error_t *error)
xmms_medialib_entry_t xmms_medialib_entry_new_encoded (xmms_medialib_session_t *session, const char *url, xmms_error_t *error)
xmms_medialib_entry_t xmms_medialib_entry_new (xmms_medialib_session_t *session, const char *url, xmms_error_t *error)
 Welcome to a function that should be called something else.
GList * xmms_medialib_info_list (xmms_medialib_t *medialib, guint32 id, xmms_error_t *err)
GList * xmms_medialib_select (xmms_medialib_session_t *session, const gchar *query, xmms_error_t *error)
 Get a list of GHashTables 's that matches the query.
gboolean xmms_medialib_check_id (xmms_medialib_entry_t entry)
xmms_medialib_entry_t xmms_medialib_entry_not_resolved_get (xmms_medialib_session_t *session)
guint xmms_medialib_num_not_resolved (xmms_medialib_session_t *session)
gboolean xmms_medialib_decode_url (char *url)

Detailed Description

Medialib is a metainfo cache that is searchable.

Definition in file medialib.c.


Define Documentation

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

Definition at line 1511 of file medialib.c.

Referenced by xmms_medialib_url_encode().


Function Documentation

gboolean xmms_medialib_check_id ( xmms_medialib_entry_t  entry  ) 

Definition at line 1401 of file medialib.c.

gboolean xmms_medialib_decode_url ( char *  url  ) 

Definition at line 1474 of file medialib.c.

Referenced by xmms_xform_browse().

xmms_medialib_entry_t xmms_medialib_entry_not_resolved_get ( xmms_medialib_session_t session  ) 

Definition at line 1439 of file medialib.c.

guint xmms_medialib_num_not_resolved ( xmms_medialib_session_t session  ) 

Definition at line 1457 of file medialib.c.

gchar * xmms_medialib_url_encode ( const gchar *  path  ) 

Generated on Tue Feb 23 18:14:36 2010 for XMMS2 by  doxygen 1.6.1