RCLibDb

RCLibDb — The playlist database

Synopsis

#include <rclib-db.h>

#define             RCLIB_TYPE_DB_LIBRARY_QUERY_RESULT_PROP_ITER
struct              RCLibDb;
                    RCLibDbCatalogData;
enum                RCLibDbCatalogDataType;
                    RCLibDbCatalogIter;
enum                RCLibDbCatalogType;
struct              RCLibDbClass;
                    RCLibDbLibraryData;
enum                RCLibDbLibraryDataType;
struct              RCLibDbLibraryQueryResult;
struct              RCLibDbLibraryQueryResultClass;
                    RCLibDbLibraryQueryResultIter;
                    RCLibDbLibraryQueryResultPropIter;
enum                RCLibDbLibraryType;
                    RCLibDbPlaylistData;
enum                RCLibDbPlaylistDataType;
                    RCLibDbPlaylistIter;
enum                RCLibDbPlaylistType;
                    RCLibDbQuery;
enum                RCLibDbQueryConditionType;
enum                RCLibDbQueryDataType;
gboolean            rclib_db_autosaved_exist            ();
void                rclib_db_autosaved_remove           ();
RCLibDbCatalogIter * rclib_db_catalog_add               (const gchar *name,
                                                         RCLibDbCatalogIter *iter,
                                                         gint type);
void                rclib_db_catalog_data_free          (RCLibDbCatalogData *data);
void                rclib_db_catalog_data_get           (RCLibDbCatalogData *data,
                                                         RCLibDbCatalogDataType type1,
                                                         ...);
void                rclib_db_catalog_data_iter_get      (RCLibDbCatalogIter *iter,
                                                         RCLibDbCatalogDataType type1,
                                                         ...);
void                rclib_db_catalog_data_iter_set      (RCLibDbCatalogIter *iter,
                                                         RCLibDbCatalogDataType type1,
                                                         ...);
RCLibDbCatalogData * rclib_db_catalog_data_new          ();
RCLibDbCatalogData * rclib_db_catalog_data_ref          (RCLibDbCatalogData *data);
void                rclib_db_catalog_data_set           (RCLibDbCatalogData *data,
                                                         RCLibDbCatalogDataType type1,
                                                         ...);
void                rclib_db_catalog_data_unref         (RCLibDbCatalogData *data);
void                rclib_db_catalog_delete             (RCLibDbCatalogIter *iter);
void                rclib_db_catalog_foreach            (GFunc func,
                                                         gpointer user_data);
RCLibDbCatalogIter * rclib_db_catalog_get_begin_iter    ();
RCLibDbCatalogIter * rclib_db_catalog_get_end_iter      ();
RCLibDbCatalogIter * rclib_db_catalog_get_iter_at_pos   (gint pos);
RCLibDbCatalogIter * rclib_db_catalog_get_last_iter     ();
gint                rclib_db_catalog_get_length         ();
gboolean            rclib_db_catalog_is_valid_iter      (RCLibDbCatalogIter *catalog_iter);
gint                rclib_db_catalog_iter_compare       (RCLibDbCatalogIter *a,
                                                         RCLibDbCatalogIter *b);
void                rclib_db_catalog_iter_foreach_range (RCLibDbCatalogIter *begin,
                                                         RCLibDbCatalogIter *end,
                                                         GFunc func,
                                                         gpointer user_data);
RCLibDbCatalogData * rclib_db_catalog_iter_get_data     (RCLibDbCatalogIter *iter);
gint                rclib_db_catalog_iter_get_position  (RCLibDbCatalogIter *iter);
gboolean            rclib_db_catalog_iter_is_begin      (RCLibDbCatalogIter *iter);
gboolean            rclib_db_catalog_iter_is_end        (RCLibDbCatalogIter *iter);
RCLibDbCatalogIter * rclib_db_catalog_iter_next         (RCLibDbCatalogIter *iter);
RCLibDbCatalogIter * rclib_db_catalog_iter_prev         (RCLibDbCatalogIter *iter);
RCLibDbCatalogIter * rclib_db_catalog_iter_range_get_midpoint
                                                        (RCLibDbCatalogIter *begin,
                                                         RCLibDbCatalogIter *end);
void                rclib_db_catalog_name_sort          (gboolean direction);
void                rclib_db_catalog_reorder            (gint *new_order);
void                rclib_db_exit                       ();
GObject *           rclib_db_get_instance               ();
GHashTable *        rclib_db_get_library_table          ();
void                rclib_db_import_cancel              ();
gint                rclib_db_import_queue_get_length    ();
gboolean            rclib_db_init                       (const gchar *file);
void                rclib_db_library_add_music          (const gchar *uri);
void                rclib_db_library_add_music_and_play (const gchar *uri);
void                rclib_db_library_data_free          (RCLibDbLibraryData *data);
void                rclib_db_library_data_get           (RCLibDbLibraryData *data,
                                                         RCLibDbLibraryDataType type1,
                                                         ...);
RCLibDbLibraryData * rclib_db_library_data_new          ();
gboolean            rclib_db_library_data_query         (RCLibDbLibraryData *library_data,
                                                         RCLibDbQuery *query,
                                                         GCancellable *cancellable);
RCLibDbLibraryData * rclib_db_library_data_ref          (RCLibDbLibraryData *data);
void                rclib_db_library_data_set           (RCLibDbLibraryData *data,
                                                         RCLibDbLibraryDataType type1,
                                                         ...);
void                rclib_db_library_data_unref         (RCLibDbLibraryData *data);
void                rclib_db_library_data_uri_get       (const gchar *uri,
                                                         RCLibDbLibraryDataType type1,
                                                         ...);
void                rclib_db_library_data_uri_set       (const gchar *uri,
                                                         RCLibDbLibraryDataType type1,
                                                         ...);
void                rclib_db_library_delete             (const gchar *uri);
gboolean            rclib_db_library_exist              (RCLibDbLibraryData *library_data);
GObject *           rclib_db_library_get_album_query_result
                                                        ();
GObject *           rclib_db_library_get_artist_query_result
                                                        ();
GObject *           rclib_db_library_get_base_query_result
                                                        ();
RCLibDbLibraryData * rclib_db_library_get_data          (const gchar *uri);
GObject *           rclib_db_library_get_genre_query_result
                                                        ();
gboolean            rclib_db_library_has_uri            (const gchar *uri);
GPtrArray *         rclib_db_library_query              (RCLibDbQuery *query,
                                                         GCancellable *cancellable);
GPtrArray *         rclib_db_library_query_get_uris     (RCLibDbQuery *query,
                                                         GCancellable *cancellable);
void                rclib_db_library_query_result_chain (RCLibDbLibraryQueryResult *query_result,
                                                         RCLibDbLibraryQueryResult *base,
                                                         gboolean import_entries);
void                rclib_db_library_query_result_copy_contents
                                                        (RCLibDbLibraryQueryResult *dst,
                                                         RCLibDbLibraryQueryResult *src);
RCLibDbLibraryQueryResult * rclib_db_library_query_result_get_base
                                                        (RCLibDbLibraryQueryResult *query_result);
RCLibDbLibraryQueryResultIter * rclib_db_library_query_result_get_begin_iter
                                                        (RCLibDbLibraryQueryResult *query_result);
RCLibDbLibraryData * rclib_db_library_query_result_get_data
                                                        (RCLibDbLibraryQueryResult *query_result,
                                                         RCLibDbLibraryQueryResultIter *iter);
RCLibDbLibraryQueryResultIter * rclib_db_library_query_result_get_iter_at_pos
                                                        (RCLibDbLibraryQueryResult *query_result,
                                                         gint pos);
RCLibDbLibraryQueryResultIter * rclib_db_library_query_result_get_iter_by_uri
                                                        (RCLibDbLibraryQueryResult *query_result,
                                                         const gchar *uri);
RCLibDbLibraryQueryResultIter * rclib_db_library_query_result_get_last_iter
                                                        (RCLibDbLibraryQueryResult *query_result);
guint               rclib_db_library_query_result_get_length
                                                        (RCLibDbLibraryQueryResult *query_result);
RCLibDbLibraryQueryResultIter * rclib_db_library_query_result_get_next_iter
                                                        (RCLibDbLibraryQueryResult *query_result,
                                                         RCLibDbLibraryQueryResultIter *iter);
gint                rclib_db_library_query_result_get_position
                                                        (RCLibDbLibraryQueryResult *query_result,
                                                         RCLibDbLibraryQueryResultIter *iter);
RCLibDbLibraryQueryResultIter * rclib_db_library_query_result_get_prev_iter
                                                        (RCLibDbLibraryQueryResult *query_result,
                                                         RCLibDbLibraryQueryResultIter *iter);
const RCLibDbQuery * rclib_db_library_query_result_get_query
                                                        (RCLibDbLibraryQueryResult *query_result);
RCLibDbLibraryQueryResultIter * rclib_db_library_query_result_get_random_iter
                                                        (RCLibDbLibraryQueryResult *query_result);
gboolean            rclib_db_library_query_result_iter_is_begin
                                                        (RCLibDbLibraryQueryResult *query_result,
                                                         RCLibDbLibraryQueryResultIter *iter);
gboolean            rclib_db_library_query_result_iter_is_end
                                                        (RCLibDbLibraryQueryResult *query_result,
                                                         RCLibDbLibraryQueryResultIter *iter);
GObject *           rclib_db_library_query_result_new   (RCLibDb *db,
                                                         RCLibDbLibraryQueryResult *base,
                                                         RCLibDbQueryDataType *prop_types);
RCLibDbLibraryQueryResultPropIter * rclib_db_library_query_result_prop_get_begin_iter
                                                        (RCLibDbLibraryQueryResult *query_result,
                                                         RCLibDbQueryDataType prop_type);
gboolean            rclib_db_library_query_result_prop_get_data
                                                        (RCLibDbLibraryQueryResult *query_result,
                                                         RCLibDbQueryDataType prop_type,
                                                         RCLibDbLibraryQueryResultPropIter *iter,
                                                         gchar **prop_name,
                                                         guint *prop_count);
RCLibDbLibraryQueryResultPropIter * rclib_db_library_query_result_prop_get_iter_at_pos
                                                        (RCLibDbLibraryQueryResult *query_result,
                                                         RCLibDbQueryDataType prop_type,
                                                         gint pos);
RCLibDbLibraryQueryResultPropIter * rclib_db_library_query_result_prop_get_iter_by_prop
                                                        (RCLibDbLibraryQueryResult *query_result,
                                                         RCLibDbQueryDataType prop_type,
                                                         const gchar *prop_text);
RCLibDbLibraryQueryResultPropIter * rclib_db_library_query_result_prop_get_last_iter
                                                        (RCLibDbLibraryQueryResult *query_result,
                                                         RCLibDbQueryDataType prop_type);
guint               rclib_db_library_query_result_prop_get_length
                                                        (RCLibDbLibraryQueryResult *query_result,
                                                         RCLibDbQueryDataType prop_type);
RCLibDbLibraryQueryResultPropIter * rclib_db_library_query_result_prop_get_next_iter
                                                        (RCLibDbLibraryQueryResult *query_result,
                                                         RCLibDbQueryDataType prop_type,
                                                         RCLibDbLibraryQueryResultPropIter *iter);
gint                rclib_db_library_query_result_prop_get_position
                                                        (RCLibDbLibraryQueryResult *query_result,
                                                         RCLibDbQueryDataType prop_type,
                                                         RCLibDbLibraryQueryResultPropIter *iter);
RCLibDbLibraryQueryResultPropIter * rclib_db_library_query_result_prop_get_prev_iter
                                                        (RCLibDbLibraryQueryResult *query_result,
                                                         RCLibDbQueryDataType prop_type,
                                                         RCLibDbLibraryQueryResultPropIter *iter);
gboolean            rclib_db_library_query_result_prop_get_total_count
                                                        (RCLibDbLibraryQueryResult *query_result,
                                                         RCLibDbQueryDataType prop_type,
                                                         guint *count);
gboolean            rclib_db_library_query_result_prop_iter_is_begin
                                                        (RCLibDbLibraryQueryResult *query_result,
                                                         RCLibDbQueryDataType prop_type,
                                                         RCLibDbLibraryQueryResultPropIter *iter);
gboolean            rclib_db_library_query_result_prop_iter_is_end
                                                        (RCLibDbLibraryQueryResult *query_result,
                                                         RCLibDbQueryDataType prop_type,
                                                         RCLibDbLibraryQueryResultPropIter *iter);
void                rclib_db_library_query_result_prop_sort
                                                        (RCLibDbLibraryQueryResult *query_result,
                                                         RCLibDbQueryDataType prop_type,
                                                         gboolean direction);
void                rclib_db_library_query_result_query_cancel
                                                        (RCLibDbLibraryQueryResult *query_result);
void                rclib_db_library_query_result_query_clear
                                                        (RCLibDbLibraryQueryResult *query_result);
void                rclib_db_library_query_result_query_start
                                                        (RCLibDbLibraryQueryResult *query_result,
                                                         gboolean clear);
void                rclib_db_library_query_result_set_query
                                                        (RCLibDbLibraryQueryResult *query_result,
                                                         const RCLibDbQuery *query);
void                rclib_db_library_query_result_sort  (RCLibDbLibraryQueryResult *query_result,
                                                         RCLibDbLibraryDataType column,
                                                         gboolean direction);
gboolean            rclib_db_load_autosaved             ();
gboolean            rclib_db_load_legacy                ();
void                rclib_db_playlist_add_directory     (RCLibDbCatalogIter *iter,
                                                         RCLibDbPlaylistIter *insert_iter,
                                                         const gchar *dir);
void                rclib_db_playlist_add_m3u_file      (RCLibDbCatalogIter *iter,
                                                         RCLibDbPlaylistIter *insert_iter,
                                                         const gchar *filename);
void                rclib_db_playlist_add_music         (RCLibDbCatalogIter *iter,
                                                         RCLibDbPlaylistIter *insert_iter,
                                                         const gchar *uri);
void                rclib_db_playlist_add_music_and_play
                                                        (RCLibDbCatalogIter *iter,
                                                         RCLibDbPlaylistIter *insert_iter,
                                                         const gchar *uri);
void                rclib_db_playlist_data_free         (RCLibDbPlaylistData *data);
void                rclib_db_playlist_data_get          (RCLibDbPlaylistData *data,
                                                         RCLibDbPlaylistDataType type1,
                                                         ...);
void                rclib_db_playlist_data_iter_get     (RCLibDbPlaylistIter *iter,
                                                         RCLibDbPlaylistDataType type1,
                                                         ...);
void                rclib_db_playlist_data_iter_set     (RCLibDbPlaylistIter *iter,
                                                         RCLibDbPlaylistDataType type1,
                                                         ...);
RCLibDbPlaylistData * rclib_db_playlist_data_new        ();
gboolean            rclib_db_playlist_data_query        (RCLibDbPlaylistData *playlist_data,
                                                         RCLibDbQuery *query,
                                                         GCancellable *cancellable);
RCLibDbPlaylistData * rclib_db_playlist_data_ref        (RCLibDbPlaylistData *data);
void                rclib_db_playlist_data_set          (RCLibDbPlaylistData *data,
                                                         RCLibDbPlaylistDataType type1,
                                                         ...);
void                rclib_db_playlist_data_unref        (RCLibDbPlaylistData *data);
void                rclib_db_playlist_delete            (RCLibDbPlaylistIter *iter);
gboolean            rclib_db_playlist_export_all_m3u_files
                                                        (const gchar *dir);
gboolean            rclib_db_playlist_export_m3u_file   (RCLibDbCatalogIter *iter,
                                                         const gchar *sfilename);
void                rclib_db_playlist_foreach           (RCLibDbCatalogIter *catalog_iter,
                                                         GFunc func,
                                                         gpointer user_data);
RCLibDbPlaylistIter * rclib_db_playlist_get_begin_iter  (RCLibDbCatalogIter *catalog_iter);
RCLibDbPlaylistIter * rclib_db_playlist_get_end_iter    (RCLibDbCatalogIter *catalog_iter);
RCLibDbPlaylistIter * rclib_db_playlist_get_iter_at_pos (RCLibDbCatalogIter *catalog_iter,
                                                         gint pos);
RCLibDbPlaylistIter * rclib_db_playlist_get_last_iter   (RCLibDbCatalogIter *catalog_iter);
gint                rclib_db_playlist_get_length        (RCLibDbCatalogIter *catalog_iter);
RCLibDbPlaylistIter * rclib_db_playlist_get_random_iter (RCLibDbCatalogIter *catalog_iter,
                                                         gboolean rating_limit,
                                                         gboolean condition,
                                                         gfloat rating);
gboolean            rclib_db_playlist_is_valid_iter     (RCLibDbPlaylistIter *playlist_iter);
void                rclib_db_playlist_item_sort         (RCLibDbCatalogIter *catalog_iter,
                                                         RCLibDbPlaylistDataType column,
                                                         gboolean direction);
gint                rclib_db_playlist_iter_compare      (RCLibDbPlaylistIter *a,
                                                         RCLibDbPlaylistIter *b);
void                rclib_db_playlist_iter_foreach_range
                                                        (RCLibDbPlaylistIter *begin,
                                                         RCLibDbPlaylistIter *end,
                                                         GFunc func,
                                                         gpointer user_data);
RCLibDbPlaylistIter * rclib_db_playlist_iter_get_begin_iter
                                                        (RCLibDbPlaylistIter *playlist_iter);
RCLibDbPlaylistData * rclib_db_playlist_iter_get_data   (RCLibDbPlaylistIter *iter);
RCLibDbPlaylistIter * rclib_db_playlist_iter_get_end_iter
                                                        (RCLibDbPlaylistIter *playlist_iter);
RCLibDbPlaylistIter * rclib_db_playlist_iter_get_iter_at_pos
                                                        (RCLibDbPlaylistIter *playlist_iter,
                                                         gint pos);
RCLibDbPlaylistIter * rclib_db_playlist_iter_get_last_iter
                                                        (RCLibDbPlaylistIter *playlist_iter);
gint                rclib_db_playlist_iter_get_length   (RCLibDbPlaylistIter *playlist_iter);
gint                rclib_db_playlist_iter_get_position (RCLibDbPlaylistIter *iter);
RCLibDbPlaylistIter * rclib_db_playlist_iter_get_random_iter
                                                        (RCLibDbPlaylistIter *piter,
                                                         gboolean rating_limit,
                                                         gboolean condition,
                                                         gfloat rating);
gboolean            rclib_db_playlist_iter_is_begin     (RCLibDbPlaylistIter *iter);
gboolean            rclib_db_playlist_iter_is_end       (RCLibDbPlaylistIter *iter);
RCLibDbPlaylistIter * rclib_db_playlist_iter_next       (RCLibDbPlaylistIter *iter);
RCLibDbPlaylistIter * rclib_db_playlist_iter_prev       (RCLibDbPlaylistIter *iter);
gboolean            rclib_db_playlist_iter_query        (RCLibDbPlaylistIter *playlist_iter,
                                                         RCLibDbQuery *query,
                                                         GCancellable *cancellable);
RCLibDbPlaylistIter * rclib_db_playlist_iter_range_get_midpoint
                                                        (RCLibDbPlaylistIter *begin,
                                                         RCLibDbPlaylistIter *end);
void                rclib_db_playlist_move_to_another_catalog
                                                        (RCLibDbPlaylistIter **iters,
                                                         guint num,
                                                         RCLibDbCatalogIter *catalog_iter);
GPtrArray *         rclib_db_playlist_query             (RCLibDbCatalogIter *catalog_iter,
                                                         RCLibDbQuery *query,
                                                         GCancellable *cancellable);
GPtrArray *         rclib_db_playlist_query_get_iters   (RCLibDbCatalogIter *catalog_iter,
                                                         RCLibDbQuery *query,
                                                         GCancellable *cancellable);
void                rclib_db_playlist_refresh           (RCLibDbCatalogIter *iter);
void                rclib_db_playlist_reorder           (RCLibDbCatalogIter *iter,
                                                         gint *new_order);
void                rclib_db_playlist_update_metadata   (RCLibDbPlaylistIter *iter,
                                                         const RCLibDbPlaylistData *data);
gboolean            rclib_db_query_concatenate          (RCLibDbQuery *target,
                                                         const RCLibDbQuery *src);
RCLibDbQuery *      rclib_db_query_copy                 (const RCLibDbQuery *query);
void                rclib_db_query_free                 (RCLibDbQuery *query);
GType               rclib_db_query_get_query_data_type  (RCLibDbQueryDataType query_type);
RCLibDbQuery *      rclib_db_query_parse                (RCLibDbQueryConditionType condition1,
                                                         ...);
RCLibDbQuery *      rclib_db_query_parse_valist         (RCLibDbQueryConditionType condition1,
                                                         va_list args);
void                rclib_db_refresh_cancel             ();
gint                rclib_db_refresh_queue_get_length   ();
gulong              rclib_db_signal_connect             (const gchar *name,
                                                         GCallback callback,
                                                         gpointer data);
void                rclib_db_signal_disconnect          (gulong handler_id);
gboolean            rclib_db_sync                       ();

Object Hierarchy

  GObject
   +----RCLibDb
  GBoxed
   +----RCLibDbCatalogData
  gpointer
   +----RCLibDbCatalogIter
  GBoxed
   +----RCLibDbLibraryData
  GObject
   +----RCLibDbLibraryQueryResult
  gpointer
   +----RCLibDbLibraryQueryResultIter
  GBoxed
   +----RCLibDbPlaylistData
  gpointer
   +----RCLibDbPlaylistIter
  GBoxed
   +----RCLibDbQuery

Signals

  "catalog-added"                                  : Run First
  "catalog-changed"                                : Run First
  "catalog-delete"                                 : Run First
  "catalog-reordered"                              : Run First
  "import-updated"                                 : Run First
  "library-added"                                  : Run First
  "library-changed"                                : Run First
  "library-deleted"                                : Run First
  "playlist-added"                                 : Run First
  "playlist-changed"                               : Run First
  "playlist-delete"                                : Run First
  "playlist-reordered"                             : Run First
  "refresh-updated"                                : Run First
  "prop-added"                                     : Run First
  "prop-changed"                                   : Run First
  "prop-delete"                                    : Run First
  "prop-reordered"                                 : Run First
  "query-result-added"                             : Run First
  "query-result-changed"                           : Run First
  "query-result-delete"                            : Run First
  "query-result-reordered"                         : Run First

Description

The RCLibDb is a class which manages the playlists in the player, all playlists are put in a catalog list, and all music are put in their playlists. The catalog item (playlist) and playlist item (music) data can be accessed by RCLibDbCatalogIter and RCLibDbPlaylistIter. The database can import music or playlist file asynchronously, or update the metadata in playlists asynchronously.

Details

RCLIB_TYPE_DB_LIBRARY_QUERY_RESULT_PROP_ITER

#define             RCLIB_TYPE_DB_LIBRARY_QUERY_RESULT_PROP_ITER

struct RCLibDb

struct RCLibDb;

The playlist database. The contents of the RCLibDb structure are private and should only be accessed via the provided API.


RCLibDbCatalogData

typedef struct _RCLibDbCatalogData RCLibDbCatalogData;

enum RCLibDbCatalogDataType

typedef enum {
    RCLIB_DB_CATALOG_DATA_TYPE_NONE = 0,
    RCLIB_DB_CATALOG_DATA_TYPE_PLAYLIST = 1,
    RCLIB_DB_CATALOG_DATA_TYPE_SELF_ITER = 2,
    RCLIB_DB_CATALOG_DATA_TYPE_NAME = 3,
    RCLIB_DB_CATALOG_DATA_TYPE_TYPE = 4,
    RCLIB_DB_CATALOG_DATA_TYPE_STORE = 5
} RCLibDbCatalogDataType;

The enum type for set/get the data in the RCLibDbCatalogData

RCLIB_DB_CATALOG_DATA_TYPE_NONE

none type, not used by data

RCLIB_DB_CATALOG_DATA_TYPE_PLAYLIST

the playlist data structure, should not be used out of this module

RCLIB_DB_CATALOG_DATA_TYPE_SELF_ITER

the iter pointed to self (RCLibDbCatalogIter)

RCLIB_DB_CATALOG_DATA_TYPE_NAME

the catalog name (string)

RCLIB_DB_CATALOG_DATA_TYPE_TYPE

the catalog type (RCLibDbCatalogType)

RCLIB_DB_CATALOG_DATA_TYPE_STORE

the store pointer which can be used for UI (gpointer)

RCLibDbCatalogIter

typedef struct _RCLibDbCatalogIter RCLibDbCatalogIter;

enum RCLibDbCatalogType

typedef enum {
    RCLIB_DB_CATALOG_TYPE_PLAYLIST = 1
} RCLibDbCatalogType;

The enum type for catalog type.

RCLIB_DB_CATALOG_TYPE_PLAYLIST

the catalog is a playlist

struct RCLibDbClass

struct RCLibDbClass {
};

RCLibDb class.


RCLibDbLibraryData

typedef struct _RCLibDbLibraryData RCLibDbLibraryData;

enum RCLibDbLibraryDataType

typedef enum {
    RCLIB_DB_LIBRARY_DATA_TYPE_NONE = 0,
    RCLIB_DB_LIBRARY_DATA_TYPE_TYPE = 1,
    RCLIB_DB_LIBRARY_DATA_TYPE_URI = 2,
    RCLIB_DB_LIBRARY_DATA_TYPE_TITLE = 3,
    RCLIB_DB_LIBRARY_DATA_TYPE_ARTIST = 4,
    RCLIB_DB_LIBRARY_DATA_TYPE_ALBUM = 5,
    RCLIB_DB_LIBRARY_DATA_TYPE_FTYPE = 6,
    RCLIB_DB_LIBRARY_DATA_TYPE_LENGTH = 7,
    RCLIB_DB_LIBRARY_DATA_TYPE_TRACKNUM = 8,
    RCLIB_DB_LIBRARY_DATA_TYPE_YEAR = 9,
    RCLIB_DB_LIBRARY_DATA_TYPE_RATING = 10,
    RCLIB_DB_LIBRARY_DATA_TYPE_LYRICFILE = 11,
    RCLIB_DB_LIBRARY_DATA_TYPE_LYRICSECFILE = 12,
    RCLIB_DB_LIBRARY_DATA_TYPE_ALBUMFILE = 13,
    RCLIB_DB_LIBRARY_DATA_TYPE_GENRE = 14
} RCLibDbLibraryDataType;

The enum type for set/get the data in the RCLibDbPlaylistData

RCLIB_DB_LIBRARY_DATA_TYPE_NONE

none type, not used by data

RCLIB_DB_LIBRARY_DATA_TYPE_TYPE

the library item type (RCLibDbLibraryType)

RCLIB_DB_LIBRARY_DATA_TYPE_URI

the URI (string)

RCLIB_DB_LIBRARY_DATA_TYPE_TITLE

the title (string)

RCLIB_DB_LIBRARY_DATA_TYPE_ARTIST

the artist (string)

RCLIB_DB_LIBRARY_DATA_TYPE_ALBUM

the album (string)

RCLIB_DB_LIBRARY_DATA_TYPE_FTYPE

the file type (string)

RCLIB_DB_LIBRARY_DATA_TYPE_LENGTH

the time length (gint64)

RCLIB_DB_LIBRARY_DATA_TYPE_TRACKNUM

the track number (gint)

RCLIB_DB_LIBRARY_DATA_TYPE_YEAR

the year (gint),

RCLIB_DB_LIBRARY_DATA_TYPE_RATING

the rating (gfloat)

RCLIB_DB_LIBRARY_DATA_TYPE_LYRICFILE

the lyric file path (string)

RCLIB_DB_LIBRARY_DATA_TYPE_LYRICSECFILE

the second lyric file path (string)

RCLIB_DB_LIBRARY_DATA_TYPE_ALBUMFILE

the album image file path (string)

RCLIB_DB_LIBRARY_DATA_TYPE_GENRE

the genre (string)

struct RCLibDbLibraryQueryResult

struct RCLibDbLibraryQueryResult;

The query result from the library. The contents of the RCLibDbLibraryQueryResult structure are private and should only be accessed via the provided API.


struct RCLibDbLibraryQueryResultClass

struct RCLibDbLibraryQueryResultClass {
};

RCLibDbLibraryQueryResult class.


RCLibDbLibraryQueryResultIter

typedef struct _RCLibDbLibraryQueryResultIter RCLibDbLibraryQueryResultIter;

RCLibDbLibraryQueryResultPropIter

typedef struct _RCLibDbLibraryQueryResultPropIter RCLibDbLibraryQueryResultPropIter;

enum RCLibDbLibraryType

typedef enum {
    RCLIB_DB_LIBRARY_TYPE_MISSING = 0,
    RCLIB_DB_LIBRARY_TYPE_MUSIC = 1,
    RCLIB_DB_LIBRARY_TYPE_CUE = 2
} RCLibDbLibraryType;

The enum type for library.

RCLIB_DB_LIBRARY_TYPE_MISSING

the library item is missing

RCLIB_DB_LIBRARY_TYPE_MUSIC

the library item is music

RCLIB_DB_LIBRARY_TYPE_CUE

the library item is from CUE sheet

RCLibDbPlaylistData

typedef struct _RCLibDbPlaylistData RCLibDbPlaylistData;

enum RCLibDbPlaylistDataType

typedef enum {
    RCLIB_DB_PLAYLIST_DATA_TYPE_NONE = 0,
    RCLIB_DB_PLAYLIST_DATA_TYPE_CATALOG = 1,
    RCLIB_DB_PLAYLIST_DATA_TYPE_SELF_ITER = 2,
    RCLIB_DB_PLAYLIST_DATA_TYPE_TYPE = 3,
    RCLIB_DB_PLAYLIST_DATA_TYPE_URI = 4,
    RCLIB_DB_PLAYLIST_DATA_TYPE_TITLE = 5,
    RCLIB_DB_PLAYLIST_DATA_TYPE_ARTIST = 6,
    RCLIB_DB_PLAYLIST_DATA_TYPE_ALBUM = 7,
    RCLIB_DB_PLAYLIST_DATA_TYPE_FTYPE = 8,
    RCLIB_DB_PLAYLIST_DATA_TYPE_LENGTH = 9,
    RCLIB_DB_PLAYLIST_DATA_TYPE_TRACKNUM = 10,
    RCLIB_DB_PLAYLIST_DATA_TYPE_YEAR = 11,
    RCLIB_DB_PLAYLIST_DATA_TYPE_RATING = 12,
    RCLIB_DB_PLAYLIST_DATA_TYPE_LYRICFILE = 13,
    RCLIB_DB_PLAYLIST_DATA_TYPE_LYRICSECFILE = 14,
    RCLIB_DB_PLAYLIST_DATA_TYPE_ALBUMFILE = 15,
    RCLIB_DB_PLAYLIST_DATA_TYPE_GENRE = 16
} RCLibDbPlaylistDataType;

The enum type for set/get the data in the RCLibDbPlaylistData

RCLIB_DB_PLAYLIST_DATA_TYPE_NONE

none type, not used by data

RCLIB_DB_PLAYLIST_DATA_TYPE_CATALOG

the catalog (RCLibDbCatalogIter)

RCLIB_DB_PLAYLIST_DATA_TYPE_SELF_ITER

the iter pointed to self (RCLibDbPlaylistIter)

RCLIB_DB_PLAYLIST_DATA_TYPE_TYPE

the playlist type (RCLibDbPlaylistType)

RCLIB_DB_PLAYLIST_DATA_TYPE_URI

the URI (string)

RCLIB_DB_PLAYLIST_DATA_TYPE_TITLE

the title (string)

RCLIB_DB_PLAYLIST_DATA_TYPE_ARTIST

the artist (string)

RCLIB_DB_PLAYLIST_DATA_TYPE_ALBUM

the album (string)

RCLIB_DB_PLAYLIST_DATA_TYPE_FTYPE

the file type (string)

RCLIB_DB_PLAYLIST_DATA_TYPE_LENGTH

the time length (gint64)

RCLIB_DB_PLAYLIST_DATA_TYPE_TRACKNUM

the track number (gint)

RCLIB_DB_PLAYLIST_DATA_TYPE_YEAR

the year (gint)

RCLIB_DB_PLAYLIST_DATA_TYPE_RATING

the rating (gfloat)

RCLIB_DB_PLAYLIST_DATA_TYPE_LYRICFILE

the lyric file path (string)

RCLIB_DB_PLAYLIST_DATA_TYPE_LYRICSECFILE

the second lyric file path (string)

RCLIB_DB_PLAYLIST_DATA_TYPE_ALBUMFILE

the album image file path (string)

RCLIB_DB_PLAYLIST_DATA_TYPE_GENRE

the genre (string)

RCLibDbPlaylistIter

typedef struct _RCLibDbPlaylistIter RCLibDbPlaylistIter;

enum RCLibDbPlaylistType

typedef enum {
    RCLIB_DB_PLAYLIST_TYPE_MISSING = 0,
    RCLIB_DB_PLAYLIST_TYPE_MUSIC = 1,
    RCLIB_DB_PLAYLIST_TYPE_CUE = 2
} RCLibDbPlaylistType;

The enum type for playlist type.

RCLIB_DB_PLAYLIST_TYPE_MISSING

the playlist item is missing

RCLIB_DB_PLAYLIST_TYPE_MUSIC

the playlist item is music

RCLIB_DB_PLAYLIST_TYPE_CUE

the playlist item is from CUE sheet

RCLibDbQuery

typedef struct _RCLibDbQuery RCLibDbQuery;

enum RCLibDbQueryConditionType

typedef enum {
    RCLIB_DB_QUERY_CONDITION_TYPE_NONE = 0,
    RCLIB_DB_QUERY_CONDITION_TYPE_SUBQUERY = 1,
    RCLIB_DB_QUERY_CONDITION_TYPE_PROP_EQUALS = 2,
    RCLIB_DB_QUERY_CONDITION_TYPE_PROP_NOT_EQUAL = 3,
    RCLIB_DB_QUERY_CONDITION_TYPE_PROP_LIKE = 4,
    RCLIB_DB_QUERY_CONDITION_TYPE_PROP_NOT_LIKE = 5,
    RCLIB_DB_QUERY_CONDITION_TYPE_PROP_PREFIX = 6,
    RCLIB_DB_QUERY_CONDITION_TYPE_PROP_SUFFIX = 7,
    RCLIB_DB_QUERY_CONDITION_TYPE_PROP_GREATER = 8,
    RCLIB_DB_QUERY_CONDITION_TYPE_PROP_LESS = 9,
    RCLIB_DB_QUERY_CONDITION_TYPE_PROP_GREATER_OR_EQUAL = 10,
    RCLIB_DB_QUERY_CONDITION_TYPE_PROP_LESS_OR_EQUAL = 11,
    RCLIB_DB_QUERY_CONDITION_TYPE_OR = 12,
    RCLIB_DB_QUERY_CONDITION_TYPE_LAST = 13
} RCLibDbQueryConditionType;

The enum type for query the properties of the items in the library by the given condition type.

RCLIB_DB_QUERY_CONDITION_TYPE_NONE

none query type

RCLIB_DB_QUERY_CONDITION_TYPE_SUBQUERY

the sub-query type

RCLIB_DB_QUERY_CONDITION_TYPE_PROP_EQUALS

the property equals to the query condition

RCLIB_DB_QUERY_CONDITION_TYPE_PROP_NOT_EQUAL

the property does not equal to the query condition

RCLIB_DB_QUERY_CONDITION_TYPE_PROP_LIKE

the property contains the sub-string which equals to the query condition

RCLIB_DB_QUERY_CONDITION_TYPE_PROP_NOT_LIKE

the property does not contain the sub-string which equals to the query condition

RCLIB_DB_QUERY_CONDITION_TYPE_PROP_PREFIX

the prefix of the property equals to the query condition

RCLIB_DB_QUERY_CONDITION_TYPE_PROP_SUFFIX

the suffix of the property equals to the query condition

RCLIB_DB_QUERY_CONDITION_TYPE_PROP_GREATER

the query condition is greater than the property

RCLIB_DB_QUERY_CONDITION_TYPE_PROP_LESS

the query condition is lesser than the property

RCLIB_DB_QUERY_CONDITION_TYPE_PROP_GREATER_OR_EQUAL

the query condition is greater than or equal to the property

RCLIB_DB_QUERY_CONDITION_TYPE_PROP_LESS_OR_EQUAL

the query condition is lesser than or equal to the property

RCLIB_DB_QUERY_CONDITION_TYPE_OR

the or condition type

RCLIB_DB_QUERY_CONDITION_TYPE_LAST

not used, just a last enum type

enum RCLibDbQueryDataType

typedef enum {
    RCLIB_DB_QUERY_DATA_TYPE_NONE = 0,
    RCLIB_DB_QUERY_DATA_TYPE_URI = 1,
    RCLIB_DB_QUERY_DATA_TYPE_TITLE = 2,
    RCLIB_DB_QUERY_DATA_TYPE_ARTIST = 3,
    RCLIB_DB_QUERY_DATA_TYPE_ALBUM = 4,
    RCLIB_DB_QUERY_DATA_TYPE_FTYPE = 5,
    RCLIB_DB_QUERY_DATA_TYPE_LENGTH = 6,
    RCLIB_DB_QUERY_DATA_TYPE_TRACKNUM = 7,
    RCLIB_DB_QUERY_DATA_TYPE_YEAR = 8,
    RCLIB_DB_QUERY_DATA_TYPE_RATING = 9,
    RCLIB_DB_QUERY_DATA_TYPE_GENRE = 10
} RCLibDbQueryDataType;

The enum type for query the given data type in the database.

RCLIB_DB_QUERY_DATA_TYPE_NONE

none type, not used by data

RCLIB_DB_QUERY_DATA_TYPE_URI

the URI (string)

RCLIB_DB_QUERY_DATA_TYPE_TITLE

the title (string)

RCLIB_DB_QUERY_DATA_TYPE_ARTIST

the artist (string)

RCLIB_DB_QUERY_DATA_TYPE_ALBUM

the album (string)

RCLIB_DB_QUERY_DATA_TYPE_FTYPE

the file type (string)

RCLIB_DB_QUERY_DATA_TYPE_LENGTH

the time length (gint64)

RCLIB_DB_QUERY_DATA_TYPE_TRACKNUM

the track number (gint)

RCLIB_DB_QUERY_DATA_TYPE_YEAR

the year (gint),

RCLIB_DB_QUERY_DATA_TYPE_RATING

the rating (gfloat)

RCLIB_DB_QUERY_DATA_TYPE_GENRE

the genre (string)

rclib_db_autosaved_exist ()

gboolean            rclib_db_autosaved_exist            ();

Whether auto-saved playlist file exists.

Returns :

The existence of auto-saved playlist file.

rclib_db_autosaved_remove ()

void                rclib_db_autosaved_remove           ();

Remove the auto-saved playlist file.


rclib_db_catalog_add ()

RCLibDbCatalogIter * rclib_db_catalog_add               (const gchar *name,
                                                         RCLibDbCatalogIter *iter,
                                                         gint type);

Add a new playlist to the catalog before the iter, if the iter is NULL, it will be added to the end. Must be called in main thread.

name :

the name for the new playlist

iter :

insert position (before this iter)

type :

the type of the new playlist

Returns :

(skip): The iter to the new playlist in the catalog. [transfer none]

rclib_db_catalog_data_free ()

void                rclib_db_catalog_data_free          (RCLibDbCatalogData *data);

Free the RCLibDbCatalogData structure. Please use #rclib_db_catalog_data_unref() in case of multi-threading.

data :

the data to free

rclib_db_catalog_data_get ()

void                rclib_db_catalog_data_get           (RCLibDbCatalogData *data,
                                                         RCLibDbCatalogDataType type1,
                                                         ...);

Gets properties of a RCLibDbCatalogData. The property contents will be copied (except the playlist and the store pointer). MT safe.

data :

the RCLibDbCatalogData data

type1 :

the first property in catalog data to get

... :

return location for the first property, followed optionally by more name/return location pairs, followed by RCLIB_DB_CATALOG_DATA_TYPE_NONE

rclib_db_catalog_data_iter_get ()

void                rclib_db_catalog_data_iter_get      (RCLibDbCatalogIter *iter,
                                                         RCLibDbCatalogDataType type1,
                                                         ...);

Gets properties of the data in a RCLibDbCatalogIter. The property contents will be copied, except the playlist and store pointer. MT safe.

iter :

the RCLibDbCatalogIter iter

type1 :

the first property in catalog data to get

... :

value for the first property, followed optionally by more name/value pairs, followed by RCLIB_DB_CATALOG_DATA_TYPE_NONE

rclib_db_catalog_data_iter_set ()

void                rclib_db_catalog_data_iter_set      (RCLibDbCatalogIter *iter,
                                                         RCLibDbCatalogDataType type1,
                                                         ...);

Sets properties on the data in a RCLibDbCatalogIter. Must be called in main thread.

iter :

the RCLibDbCatalogIter iter

type1 :

the first property in catalog data to set

... :

value for the first property, followed optionally by more name/value pairs, followed by RCLIB_DB_CATALOG_DATA_TYPE_NONE

rclib_db_catalog_data_new ()

RCLibDbCatalogData * rclib_db_catalog_data_new          ();

Create a new empty RCLibDbCatalogData structure, and set the reference count to 1. MT safe.

Returns :

The new empty allocated RCLibDbCatalogData structure.

rclib_db_catalog_data_ref ()

RCLibDbCatalogData * rclib_db_catalog_data_ref          (RCLibDbCatalogData *data);

Increase the reference of RCLibDbCatalogData by 1. MT safe.

data :

the RCLibDbCatalogData structure

Returns :

The RCLibDbCatalogData structure. [transfer none]

rclib_db_catalog_data_set ()

void                rclib_db_catalog_data_set           (RCLibDbCatalogData *data,
                                                         RCLibDbCatalogDataType type1,
                                                         ...);

Sets properties on a RCLibDbCatalogData. Must be called in main thread.

data :

the RCLibDbCatalogData data

type1 :

the first property in catalog data to set

... :

value for the first property, followed optionally by more name/value pairs, followed by RCLIB_DB_CATALOG_DATA_TYPE_NONE

rclib_db_catalog_data_unref ()

void                rclib_db_catalog_data_unref         (RCLibDbCatalogData *data);

Decrease the reference of RCLibDbCatalogData by 1. If the reference down to zero, the structure will be freed. MT safe.

data :

the RCLibDbCatalogData structure

Returns :

The RCLibDbCatalogData structure.

rclib_db_catalog_delete ()

void                rclib_db_catalog_delete             (RCLibDbCatalogIter *iter);

Delete the catalog pointed to by iter. Must be called in main thread.

iter :

the iter to the catalog

rclib_db_catalog_foreach ()

void                rclib_db_catalog_foreach            (GFunc func,
                                                         gpointer user_data);

Calls func for each item in the playlist catalog passing user_data to the function. MT safe.

func :

the function to call for each item in seq. [scope call]

user_data :

user data passed to func

rclib_db_catalog_get_begin_iter ()

RCLibDbCatalogIter * rclib_db_catalog_get_begin_iter    ();

Get the begin iterator for the playlist catalog. MT safe.

Returns :

(skip): The begin iterator. [transfer none]

rclib_db_catalog_get_end_iter ()

RCLibDbCatalogIter * rclib_db_catalog_get_end_iter      ();

Get the end iterator for the playlist catalog. MT safe.

Returns :

(skip): The end iterator. [transfer none]

rclib_db_catalog_get_iter_at_pos ()

RCLibDbCatalogIter * rclib_db_catalog_get_iter_at_pos   (gint pos);

Return the iterator at position pos. If pos is negative or larger than the number of items in the playlist catalog, the end iterator is returned. MT safe.

pos :

the position in the playlist catalog, or -1 for the end.

Returns :

(skip): The RCLibDbCatalogIter at position pos. [transfer none]

rclib_db_catalog_get_last_iter ()

RCLibDbCatalogIter * rclib_db_catalog_get_last_iter     ();

Get the last iterator for the playlist catalog. MT safe.

Returns :

(skip): The last iterator, NULL if does not exist. [transfer none]

rclib_db_catalog_get_length ()

gint                rclib_db_catalog_get_length         ();

Get the element length of the playlist catalog. MT safe.

Returns :

The length of catalog, -1 if any error occurs.

rclib_db_catalog_is_valid_iter ()

gboolean            rclib_db_catalog_is_valid_iter      (RCLibDbCatalogIter *catalog_iter);

Check whether the iter is valid in the catalog sequence. MT safe.

catalog_iter :

the iter to check

Returns :

Whether the iter is valid.

rclib_db_catalog_iter_compare ()

gint                rclib_db_catalog_iter_compare       (RCLibDbCatalogIter *a,
                                                         RCLibDbCatalogIter *b);

Return a negative number if a comes before b, 0 if they are equal, and a positive number if a comes after b. MT safe.

The a and b iterators must point into the same catalog.

a :

a RCLibDbCatalogIter

b :

a RCLibDbCatalogIter

Returns :

A negative number if a comes before b, 0 if they are equal, and a positive number if a comes after b.

rclib_db_catalog_iter_foreach_range ()

void                rclib_db_catalog_iter_foreach_range (RCLibDbCatalogIter *begin,
                                                         RCLibDbCatalogIter *end,
                                                         GFunc func,
                                                         gpointer user_data);

Calls func for each item in the range (begin, end) passing user_data to the function. MT safe.

begin :

a RCLibDbCatalogIter

end :

a RCLibDbCatalogIter

func :

a GFunc. [scope call]

user_data :

user data passed to func

rclib_db_catalog_iter_get_data ()

RCLibDbCatalogData * rclib_db_catalog_iter_get_data     (RCLibDbCatalogIter *iter);

Get the catalog item data which the iter pointed to. MT safe.

iter :

the iter pointed to the catalog data

Returns :

The RCLibDbCatalogData. [transfer full]

rclib_db_catalog_iter_get_position ()

gint                rclib_db_catalog_iter_get_position  (RCLibDbCatalogIter *iter);

Returns the position of iter. MT safe.

iter :

a RCLibDbCatalogIter

Returns :

the position of iter, -1 if the iter is not valid.

rclib_db_catalog_iter_is_begin ()

gboolean            rclib_db_catalog_iter_is_begin      (RCLibDbCatalogIter *iter);

Return whether iter is the begin iterator. MT safe. Notice that this function will NOT check whether the iter is valid.

iter :

a RCLibDbCatalogIter

Returns :

whether iter is the begin iterator

rclib_db_catalog_iter_is_end ()

gboolean            rclib_db_catalog_iter_is_end        (RCLibDbCatalogIter *iter);

Return whether iter is the end iterator. MT safe. Notice that this function will NOT check whether the iter is valid.

iter :

a RCLibDbCatalogIter

Returns :

whether iter is the end iterator

rclib_db_catalog_iter_next ()

RCLibDbCatalogIter * rclib_db_catalog_iter_next         (RCLibDbCatalogIter *iter);

Return an iterator pointing to the next position after iter. If iter is not valid, or iter is the last iterator in the catalog, NULL is returned. MT safe.

iter :

a RCLibDbCatalogIter

Returns :

(skip): a RCLibDbCatalogIter pointing to the next position after iter. [transfer none]

rclib_db_catalog_iter_prev ()

RCLibDbCatalogIter * rclib_db_catalog_iter_prev         (RCLibDbCatalogIter *iter);

Return an iterator pointing to the previous position before iter. If iter is not valid, or iter is the first iterator in the catalog, NULL is returned. MT safe.

iter :

a RCLibDbCatalogIter

Returns :

(skip): a RCLibDbCatalogIter pointing to the previous position before iter. [transfer none]

rclib_db_catalog_iter_range_get_midpoint ()

RCLibDbCatalogIter * rclib_db_catalog_iter_range_get_midpoint
                                                        (RCLibDbCatalogIter *begin,
                                                         RCLibDbCatalogIter *end);

Find an iterator somewhere in the range (begin, end). This iterator will be close to the middle of the range, but is not guaranteed to be exactly in the middle.

The begin and end iterators must both point to the same catalog and begin must come before or be equal to end in the sequence. MT safe.

begin :

a RCLibDbCatalogIter

end :

a RCLibDbCatalogIter

Returns :

(skip): A RCLibDbCatalogIter pointing somewhere in the (begin, end) range. [transfer none]

rclib_db_catalog_name_sort ()

void                rclib_db_catalog_name_sort          (gboolean direction);

Sort the catalogs by alphabets (ascending or descending). This function can only be called in main thread.

direction :

the sort direction, FALSE to use ascending, TRUE to use descending

rclib_db_catalog_reorder ()

void                rclib_db_catalog_reorder            (gint *new_order);

Reorder the catalog to follow the order indicated by new_order. Must be called in main thread.

new_order :

an array of integers mapping the new position of each child to its old position before the re-ordering, i.e. new_order[newpos] = oldpos. [array]

rclib_db_exit ()

void                rclib_db_exit                       ();

Unload the music library database.


rclib_db_get_instance ()

GObject *           rclib_db_get_instance               ();

Get the running RCLibDb instance.

Returns :

The running instance. [transfer none]

rclib_db_get_library_table ()

GHashTable *        rclib_db_get_library_table          ();

Get the library table.

Returns :

(skip): The library table, NULL if the table does not exist. [transfer none]

rclib_db_import_cancel ()

void                rclib_db_import_cancel              ();

Cancel all remaining import jobs in the queue.


rclib_db_import_queue_get_length ()

gint                rclib_db_import_queue_get_length    ();

Get the number of remaining jobs in the import queue.

Returns :

The number of remaining jobs.

rclib_db_init ()

gboolean            rclib_db_init                       (const gchar *file);

Initialize the music library database.

file :

the file of the music library database to load

Returns :

Whether the initialization succeeded.

rclib_db_library_add_music ()

void                rclib_db_library_add_music          (const gchar *uri);

Add music to the music library. MT safe.

uri :

the URI of the music to add

rclib_db_library_add_music_and_play ()

void                rclib_db_library_add_music_and_play (const gchar *uri);

Add music to the music library, and then play it if the add operation succeeds. MT safe.

uri :

the URI of the music to add

rclib_db_library_data_free ()

void                rclib_db_library_data_free          (RCLibDbLibraryData *data);

Free the RCLibDbLibraryData structure. Please use #rclib_db_library_data_unref() in case of multi-threading.

data :

the data to free

rclib_db_library_data_get ()

void                rclib_db_library_data_get           (RCLibDbLibraryData *data,
                                                         RCLibDbLibraryDataType type1,
                                                         ...);

Gets properties of a RCLibDbLibraryData. The property contents will be copied. MT safe.

data :

the RCLibDbLibraryData data

type1 :

the first property in library data to get

... :

return location for the first property, followed optionally by more name/return location pairs, followed by RCLIB_DB_LIBRARY_DATA_TYPE_NONE

rclib_db_library_data_new ()

RCLibDbLibraryData * rclib_db_library_data_new          ();

Create a new empty RCLibDbLibraryData structure, and set the reference count to 1. MT safe.

Returns :

The new empty allocated RCLibDbLibraryData structure.

rclib_db_library_data_query ()

gboolean            rclib_db_library_data_query         (RCLibDbLibraryData *library_data,
                                                         RCLibDbQuery *query,
                                                         GCancellable *cancellable);

Check whether the library data satisfied the query condition. MT safe.

library_data :

the library data to check

query :

the query condition

cancellable :

optional GCancellable object, NULL to ignore. [allow-none]

Returns :

Whether the library data satisfied the query condition.

rclib_db_library_data_ref ()

RCLibDbLibraryData * rclib_db_library_data_ref          (RCLibDbLibraryData *data);

Increase the reference of RCLibDbLibraryData by 1. MT safe.

data :

the RCLibDbLibraryData structure

Returns :

The RCLibDbLibraryData structure. [transfer none]

rclib_db_library_data_set ()

void                rclib_db_library_data_set           (RCLibDbLibraryData *data,
                                                         RCLibDbLibraryDataType type1,
                                                         ...);

Sets properties on a RCLibDbPlaylistData. MT safe.

data :

the RCLibDbLibraryDataType data

type1 :

the first property in playlist data to set

... :

value for the first property, followed optionally by more name/value pairs, followed by RCLIB_DB_LIBRARY_DATA_TYPE_NONE

rclib_db_library_data_unref ()

void                rclib_db_library_data_unref         (RCLibDbLibraryData *data);

Decrease the reference of RCLibDbLibraryData by 1. If the reference down to zero, the structure will be freed. MT safe.

data :

the RCLibDbLibraryData structure

Returns :

The RCLibDbLibraryData structure.

rclib_db_library_data_uri_get ()

void                rclib_db_library_data_uri_get       (const gchar *uri,
                                                         RCLibDbLibraryDataType type1,
                                                         ...);

Gets properties of the RCLibDbLibraryData which uri points to. The property contents will be copied. MT safe.

uri :

the URI of the RCLibDbPlaylistData entry

type1 :

the first property in library data to get

... :

return location for the first property, followed optionally by more name/return location pairs, followed by RCLIB_DB_LIBRARY_DATA_TYPE_NONE

rclib_db_library_data_uri_set ()

void                rclib_db_library_data_uri_set       (const gchar *uri,
                                                         RCLibDbLibraryDataType type1,
                                                         ...);

Sets properties on the RCLibDbPlaylistData which uri points to. MT safe.

uri :

the URI of the RCLibDbPlaylistData entry

type1 :

the first property in playlist data to set

... :

value for the first property, followed optionally by more name/value pairs, followed by RCLIB_DB_LIBRARY_DATA_TYPE_NONE

rclib_db_library_delete ()

void                rclib_db_library_delete             (const gchar *uri);

Delete the the music item by the given URI. MT safe.

uri :

the URI of the music item to delete

rclib_db_library_exist ()

gboolean            rclib_db_library_exist              (RCLibDbLibraryData *library_data);

Check whether the library data exists in the library.

library_data :

the library data

Returns :

Whether the library data exists in the library.

rclib_db_library_get_album_query_result ()

GObject *           rclib_db_library_get_album_query_result
                                                        ();

Get the built-in album query result object instance of the library.

Returns :

The album query result object, unref after usage. [transfer full]

rclib_db_library_get_artist_query_result ()

GObject *           rclib_db_library_get_artist_query_result
                                                        ();

Get the built-in artist query result object instance of the library.

Returns :

The artist query result object, unref after usage. [transfer full]

rclib_db_library_get_base_query_result ()

GObject *           rclib_db_library_get_base_query_result
                                                        ();

Get the built-in base query result object instance of the library.

Returns :

The base query result object, unref after usage. [transfer full]

rclib_db_library_get_data ()

RCLibDbLibraryData * rclib_db_library_get_data          (const gchar *uri);

Get the library entry data which uri points to. MT safe.

uri :

the URI of the RCLibDbPlaylistData entry

Returns :

The library entry data, NULL if not found. Free the data with #rclib_db_library_data_unref() after usage. [transfer full]

rclib_db_library_get_genre_query_result ()

GObject *           rclib_db_library_get_genre_query_result
                                                        ();

Get the built-in genre query result object instance of the library.

Returns :

The genre query result object, unref after usage. [transfer full]

rclib_db_library_has_uri ()

gboolean            rclib_db_library_has_uri            (const gchar *uri);

Check whether the give URI exists in the library. MT safe.

uri :

the URI to find

Returns :

Whether the URI exists in the library.

rclib_db_library_query ()

GPtrArray *         rclib_db_library_query              (RCLibDbQuery *query,
                                                         GCancellable *cancellable);

Query data from the music library. MT safe.

query :

he query condition

cancellable :

optional GCancellable object, NULL to ignore. [allow-none]

Returns :

The library data array which satisfied the query condition. Free with #g_ptr_array_free() or #g_ptr_array_unref() after usage. [transfer full]

rclib_db_library_query_get_uris ()

GPtrArray *         rclib_db_library_query_get_uris     (RCLibDbQuery *query,
                                                         GCancellable *cancellable);

Query data from the music library, and get an array of the URIs which points to the music that satisfied the query condition. MT safe.

query :

he query condition

cancellable :

optional GCancellable object, NULL to ignore. [allow-none]

Returns :

The URI array which points to the music that satisfied the query condition. Free with #g_ptr_array_free() or #g_ptr_array_unref() after usage. [transfer full]

rclib_db_library_query_result_chain ()

void                rclib_db_library_query_result_chain (RCLibDbLibraryQueryResult *query_result,
                                                         RCLibDbLibraryQueryResult *base,
                                                         gboolean import_entries);

Chain query_result to base, All changes made to the base instance will be reflected in the child instance.

query_result :

the RCLibDbLibraryQueryResult instance

base :

the base RCLibDbLibraryQueryResult instance

import_entries :

whether to copy the contents from base

rclib_db_library_query_result_copy_contents ()

void                rclib_db_library_query_result_copy_contents
                                                        (RCLibDbLibraryQueryResult *dst,
                                                         RCLibDbLibraryQueryResult *src);

Deep copy the content data from src to dst.

dst :

the destination RCLibDbLibraryQueryResult instance

src :

the source RCLibDbLibraryQueryResult instance

rclib_db_library_query_result_get_base ()

RCLibDbLibraryQueryResult * rclib_db_library_query_result_get_base
                                                        (RCLibDbLibraryQueryResult *query_result);

Get the base query result of current query result, if the query result is chained to another query result, or return NULL.

query_result :

the RCLibDbLibraryQueryResult instance

Returns :

The base query result, NULL if not exist or any error occurs. Dereference it after Usage. [transfer full]

rclib_db_library_query_result_get_begin_iter ()

RCLibDbLibraryQueryResultIter * rclib_db_library_query_result_get_begin_iter
                                                        (RCLibDbLibraryQueryResult *query_result);

Get the begin iter of the query result.

query_result :

the RCLibDbLibraryQueryResult instance

Returns :

(skip): The begin iter, NULL if the query result is empty or any error occurs. [transfer none]

rclib_db_library_query_result_get_data ()

RCLibDbLibraryData * rclib_db_library_query_result_get_data
                                                        (RCLibDbLibraryQueryResult *query_result,
                                                         RCLibDbLibraryQueryResultIter *iter);

Get the library data which the iter points to.

query_result :

the RCLibDbLibraryQueryResult instance

iter :

the iter

Returns :

The library data, NULL if not found or any error occurs. [transfer full]

rclib_db_library_query_result_get_iter_at_pos ()

RCLibDbLibraryQueryResultIter * rclib_db_library_query_result_get_iter_at_pos
                                                        (RCLibDbLibraryQueryResult *query_result,
                                                         gint pos);

Return the iterator at position pos. If pos is negative or larger than the number of items in the query result sequence, the end iterator is returned.

query_result :

the RCLibDbLibraryQueryResult instance

pos :

the position in the query result sequence, or -1 for the end.

Returns :

(skip): The RCLibDbLibraryQueryResultIter at position pos. [transfer none]

rclib_db_library_query_result_get_iter_by_uri ()

RCLibDbLibraryQueryResultIter * rclib_db_library_query_result_get_iter_by_uri
                                                        (RCLibDbLibraryQueryResult *query_result,
                                                         const gchar *uri);

Get the iter of the query result item by the given uri.

query_result :

the RCLibDbLibraryQueryResult instance

uri :

the URI of the query result item

Returns :

(skip): The iter, NULL if the URI does not exist in the query result. [transfer none]

rclib_db_library_query_result_get_last_iter ()

RCLibDbLibraryQueryResultIter * rclib_db_library_query_result_get_last_iter
                                                        (RCLibDbLibraryQueryResult *query_result);

Get the last iter of the query result.

query_result :

the RCLibDbLibraryQueryResult instance

Returns :

(skip): The last iter, NULL if the query result is empty or any error occurs. [transfer none]

rclib_db_library_query_result_get_length ()

guint               rclib_db_library_query_result_get_length
                                                        (RCLibDbLibraryQueryResult *query_result);

Get the query result length number.

query_result :

the RCLibDbLibraryQueryResult instance

Returns :

The number of the query result.

rclib_db_library_query_result_get_next_iter ()

RCLibDbLibraryQueryResultIter * rclib_db_library_query_result_get_next_iter
                                                        (RCLibDbLibraryQueryResult *query_result,
                                                         RCLibDbLibraryQueryResultIter *iter);

Get the next iter of iter.

query_result :

the RCLibDbLibraryQueryResult instance

iter :

the iter

Returns :

(skip): The next iter, NULL if there is no next one or any error occurs. [transfer none]

rclib_db_library_query_result_get_position ()

gint                rclib_db_library_query_result_get_position
                                                        (RCLibDbLibraryQueryResult *query_result,
                                                         RCLibDbLibraryQueryResultIter *iter);

Returns the position of iter.

query_result :

the RCLibDbLibraryQueryResult instance

iter :

the iter

Returns :

the position of iter, -1 if the iter is not valid.

rclib_db_library_query_result_get_prev_iter ()

RCLibDbLibraryQueryResultIter * rclib_db_library_query_result_get_prev_iter
                                                        (RCLibDbLibraryQueryResult *query_result,
                                                         RCLibDbLibraryQueryResultIter *iter);

Get the previous iter of iter.

query_result :

the RCLibDbLibraryQueryResult instance

iter :

the iter

Returns :

(skip): The previous iter, NULL if there is no previous one or any error occurs. [transfer none]

rclib_db_library_query_result_get_query ()

const RCLibDbQuery * rclib_db_library_query_result_get_query
                                                        (RCLibDbLibraryQueryResult *query_result);

Get the current query applied to the query result.

query_result :

the RCLibDbLibraryQueryResult instance

Returns :

The current query appiled to the query result. [transfer none]

rclib_db_library_query_result_get_random_iter ()

RCLibDbLibraryQueryResultIter * rclib_db_library_query_result_get_random_iter
                                                        (RCLibDbLibraryQueryResult *query_result);

Return the iterator at arandom position. If there is nothing in the query result, NULL is returned.

query_result :

the RCLibDbLibraryQueryResult instance

Returns :

(skip): The RCLibDbLibraryQueryResultIter at a random position. [transfer none]

rclib_db_library_query_result_iter_is_begin ()

gboolean            rclib_db_library_query_result_iter_is_begin
                                                        (RCLibDbLibraryQueryResult *query_result,
                                                         RCLibDbLibraryQueryResultIter *iter);

Return whether iter is the begin iterator. Notice that this function will NOT check whether the iter is valid.

query_result :

the RCLibDbLibraryQueryResult instance

iter :

the iter

Returns :

whether iter is the begin iterator

rclib_db_library_query_result_iter_is_end ()

gboolean            rclib_db_library_query_result_iter_is_end
                                                        (RCLibDbLibraryQueryResult *query_result,
                                                         RCLibDbLibraryQueryResultIter *iter);

Return whether iter is the end iterator. Notice that this function will NOT check whether the iter is valid.

query_result :

the RCLibDbLibraryQueryResult instance

iter :

the iter

Returns :

whether iter is the end iterator

rclib_db_library_query_result_new ()

GObject *           rclib_db_library_query_result_new   (RCLibDb *db,
                                                         RCLibDbLibraryQueryResult *base,
                                                         RCLibDbQueryDataType *prop_types);

Create a new library query result object instance.

db :

the RCLibDb instance

base :

the base instance of the query result, NULL to create a base instance

prop_types :

the property type list, end with RCLIB_DB_QUERY_DATA_TYPE_NONE

Returns :

The RCLibDbLibraryQueryResult instance, NULL the operation failed. [transfer full]

rclib_db_library_query_result_prop_get_begin_iter ()

RCLibDbLibraryQueryResultPropIter * rclib_db_library_query_result_prop_get_begin_iter
                                                        (RCLibDbLibraryQueryResult *query_result,
                                                         RCLibDbQueryDataType prop_type);

Get the begin iter of the given property type in the the query result.

query_result :

the RCLibDbLibraryQueryResult instance

prop_type :

the property type

Returns :

(skip): The begin iter, NULL if the query result is empty or any error occurs. [transfer none]

rclib_db_library_query_result_prop_get_data ()

gboolean            rclib_db_library_query_result_prop_get_data
                                                        (RCLibDbLibraryQueryResult *query_result,
                                                         RCLibDbQueryDataType prop_type,
                                                         RCLibDbLibraryQueryResultPropIter *iter,
                                                         gchar **prop_name,
                                                         guint *prop_count);

Get the data of the property in the query result.

query_result :

the RCLibDbLibraryQueryResult instance

prop_type :

the property type

iter :

the iter pointed to the property

prop_name :

the property name. [out]

prop_count :

the number of the property name used. [out]

Returns :

Whether the property data exists.

rclib_db_library_query_result_prop_get_iter_at_pos ()

RCLibDbLibraryQueryResultPropIter * rclib_db_library_query_result_prop_get_iter_at_pos
                                                        (RCLibDbLibraryQueryResult *query_result,
                                                         RCLibDbQueryDataType prop_type,
                                                         gint pos);

Return the iterator at position pos. If pos is negative or larger than the number of items in the property sequence, the end iterator is returned.

query_result :

the RCLibDbLibraryQueryResult instance

prop_type :

the property type

pos :

the position in the property sequence, or -1 for the end.

Returns :

(skip): The RCLibDbLibraryQueryResultPropIter at position pos. [transfer none]

rclib_db_library_query_result_prop_get_iter_by_prop ()

RCLibDbLibraryQueryResultPropIter * rclib_db_library_query_result_prop_get_iter_by_prop
                                                        (RCLibDbLibraryQueryResult *query_result,
                                                         RCLibDbQueryDataType prop_type,
                                                         const gchar *prop_text);

Get the iter pointed to the given prop_text of the given property type in the the query result.

query_result :

the RCLibDbLibraryQueryResult instance

prop_type :

the property type

prop_text :

the property text

Returns :

(skip): The iter, NULL if the property text does not exist or any error occurs. [transfer none]

rclib_db_library_query_result_prop_get_last_iter ()

RCLibDbLibraryQueryResultPropIter * rclib_db_library_query_result_prop_get_last_iter
                                                        (RCLibDbLibraryQueryResult *query_result,
                                                         RCLibDbQueryDataType prop_type);

Get the last iter of the given property type in the the query result.

query_result :

the RCLibDbLibraryQueryResult instance

prop_type :

the property type

Returns :

(skip): The last iter, NULL if the query result is empty or any error occurs. [transfer none]

rclib_db_library_query_result_prop_get_length ()

guint               rclib_db_library_query_result_prop_get_length
                                                        (RCLibDbLibraryQueryResult *query_result,
                                                         RCLibDbQueryDataType prop_type);

Get length of the given property type in the the query result.

query_result :

the RCLibDbLibraryQueryResult instance

prop_type :

the property type

Returns :

The length of the given property type.

rclib_db_library_query_result_prop_get_next_iter ()

RCLibDbLibraryQueryResultPropIter * rclib_db_library_query_result_prop_get_next_iter
                                                        (RCLibDbLibraryQueryResult *query_result,
                                                         RCLibDbQueryDataType prop_type,
                                                         RCLibDbLibraryQueryResultPropIter *iter);

Get the next iter of iter.

query_result :

the RCLibDbLibraryQueryResult instance

prop_type :

the property type

iter :

the iter pointed to the property

Returns :

(skip): The next iter, NULL if there is no next one or any error occurs. [transfer none]

rclib_db_library_query_result_prop_get_position ()

gint                rclib_db_library_query_result_prop_get_position
                                                        (RCLibDbLibraryQueryResult *query_result,
                                                         RCLibDbQueryDataType prop_type,
                                                         RCLibDbLibraryQueryResultPropIter *iter);

Returns the position of iter.

query_result :

the RCLibDbLibraryQueryResult instance

prop_type :

the property type

iter :

the iter pointed to the property

Returns :

the position of iter, -1 if the iter is not valid.

rclib_db_library_query_result_prop_get_prev_iter ()

RCLibDbLibraryQueryResultPropIter * rclib_db_library_query_result_prop_get_prev_iter
                                                        (RCLibDbLibraryQueryResult *query_result,
                                                         RCLibDbQueryDataType prop_type,
                                                         RCLibDbLibraryQueryResultPropIter *iter);

Get the previous iter of iter.

query_result :

the RCLibDbLibraryQueryResult instance

prop_type :

the property type

iter :

the iter pointed to the property

Returns :

(skip): The previous iter, NULL if there is no next one or any error occurs. [transfer none]

rclib_db_library_query_result_prop_get_total_count ()

gboolean            rclib_db_library_query_result_prop_get_total_count
                                                        (RCLibDbLibraryQueryResult *query_result,
                                                         RCLibDbQueryDataType prop_type,
                                                         guint *count);

Get the total count of music in the given property type in the query result.

query_result :

the RCLibDbLibraryQueryResult instance

prop_type :

the property type

count :

the total count of music in this property type. [out]

Returns :

Whether the property type exists.

rclib_db_library_query_result_prop_iter_is_begin ()

gboolean            rclib_db_library_query_result_prop_iter_is_begin
                                                        (RCLibDbLibraryQueryResult *query_result,
                                                         RCLibDbQueryDataType prop_type,
                                                         RCLibDbLibraryQueryResultPropIter *iter);

Return whether iter is the begin iterator. Notice that this function will NOT check whether the iter is valid.

query_result :

the RCLibDbLibraryQueryResult instance

prop_type :

the property type

iter :

the iter

Returns :

whether iter is the begin iterator.

rclib_db_library_query_result_prop_iter_is_end ()

gboolean            rclib_db_library_query_result_prop_iter_is_end
                                                        (RCLibDbLibraryQueryResult *query_result,
                                                         RCLibDbQueryDataType prop_type,
                                                         RCLibDbLibraryQueryResultPropIter *iter);

Return whether iter is the end iterator. Notice that this function will NOT check whether the iter is valid.

query_result :

the RCLibDbLibraryQueryResult instance

prop_type :

the property type

iter :

the iter

Returns :

whether iter is the end iterator.

rclib_db_library_query_result_prop_sort ()

void                rclib_db_library_query_result_prop_sort
                                                        (RCLibDbLibraryQueryResult *query_result,
                                                         RCLibDbQueryDataType prop_type,
                                                         gboolean direction);

Sort the query result property items by the alphabets order (ascending or descending) of the given column.

query_result :

the RCLibDbLibraryQueryResult instance

prop_type :

the property type

direction :

the sort direction, FALSE to use ascending, TRUE to use descending

rclib_db_library_query_result_query_cancel ()

void                rclib_db_library_query_result_query_cancel
                                                        (RCLibDbLibraryQueryResult *query_result);

Cancel the current query process.

query_result :

the RCLibDbLibraryQueryResult instance

rclib_db_library_query_result_query_clear ()

void                rclib_db_library_query_result_query_clear
                                                        (RCLibDbLibraryQueryResult *query_result);

Clear the query result.

query_result :

the RCLibDbLibraryQueryResult instance

rclib_db_library_query_result_query_start ()

void                rclib_db_library_query_result_query_start
                                                        (RCLibDbLibraryQueryResult *query_result,
                                                         gboolean clear);

Start query operation.

query_result :

the RCLibDbLibraryQueryResult instance

clear :

whether to clear the query result data

rclib_db_library_query_result_set_query ()

void                rclib_db_library_query_result_set_query
                                                        (RCLibDbLibraryQueryResult *query_result,
                                                         const RCLibDbQuery *query);

Set the query condition with query.

query_result :

the RCLibDbLibraryQueryResult instance

query :

the query to set

rclib_db_library_query_result_sort ()

void                rclib_db_library_query_result_sort  (RCLibDbLibraryQueryResult *query_result,
                                                         RCLibDbLibraryDataType column,
                                                         gboolean direction);

Sort the query result items by the alphabets order (ascending or descending) of the given column.

query_result :

the RCLibDbLibraryQueryResult instance

column :

the column to sort

direction :

the sort direction, FALSE to use ascending, TRUE to use descending

rclib_db_load_autosaved ()

gboolean            rclib_db_load_autosaved             ();

Load all playlist data from auto-saved playlist.


rclib_db_load_legacy ()

gboolean            rclib_db_load_legacy                ();

Load legacy playlist file from RhythmCat 1.0.

Returns :

Whether the operation succeeds.

rclib_db_playlist_add_directory ()

void                rclib_db_playlist_add_directory     (RCLibDbCatalogIter *iter,
                                                         RCLibDbPlaylistIter *insert_iter,
                                                         const gchar *dir);

Add all music in the directory to the catalog pointed to by iter. MT safe.

iter :

the catalog iter

insert_iter :

insert the music before this iter

dir :

the directory path

rclib_db_playlist_add_m3u_file ()

void                rclib_db_playlist_add_m3u_file      (RCLibDbCatalogIter *iter,
                                                         RCLibDbPlaylistIter *insert_iter,
                                                         const gchar *filename);

Load a m3u playlist file, and add all music inside to the catalog pointed to by iter. MT safe.

iter :

the catalog iter

insert_iter :

insert the music before this iter

filename :

the path of the playlist file

rclib_db_playlist_add_music ()

void                rclib_db_playlist_add_music         (RCLibDbCatalogIter *iter,
                                                         RCLibDbPlaylistIter *insert_iter,
                                                         const gchar *uri);

Add music to the playlist by given catalog iter. MT safe.

iter :

the catalog iter

insert_iter :

insert the music before this iter

uri :

the URI of the music

rclib_db_playlist_add_music_and_play ()

void                rclib_db_playlist_add_music_and_play
                                                        (RCLibDbCatalogIter *iter,
                                                         RCLibDbPlaylistIter *insert_iter,
                                                         const gchar *uri);

Add music to the playlist by given catalog iter, and then play it if the add operation succeeds. MT safe.

iter :

the catalog iter

insert_iter :

insert the music before this iter

uri :

the URI of the music

rclib_db_playlist_data_free ()

void                rclib_db_playlist_data_free         (RCLibDbPlaylistData *data);

Free the RCLibDbPlaylistData structure. Please use #rclib_db_playlist_data_unref() in case of multi-threading.

data :

the data to free

rclib_db_playlist_data_get ()

void                rclib_db_playlist_data_get          (RCLibDbPlaylistData *data,
                                                         RCLibDbPlaylistDataType type1,
                                                         ...);

Gets properties of a RCLibDbPlaylistData. The property contents will be copied, except the catalog and iters. MT safe.

data :

the RCLibDbPlaylistData data

type1 :

the first property in playlist data to get

... :

return location for the first property, followed optionally by more name/return location pairs, followed by RCLIB_DB_PLAYLIST_DATA_TYPE_NONE

rclib_db_playlist_data_iter_get ()

void                rclib_db_playlist_data_iter_get     (RCLibDbPlaylistIter *iter,
                                                         RCLibDbPlaylistDataType type1,
                                                         ...);

Gets properties of the data in a RCLibDbPlaylistIter. The property contents will be copied, except the catalog and iters. MT safe.

iter :

the RCLibDbPlaylistIter iter

type1 :

the first property in playlist data to get

... :

value for the first property, followed optionally by more name/value pairs, followed by RCLIB_DB_PLAYLIST_DATA_TYPE_NONE

rclib_db_playlist_data_iter_set ()

void                rclib_db_playlist_data_iter_set     (RCLibDbPlaylistIter *iter,
                                                         RCLibDbPlaylistDataType type1,
                                                         ...);

Sets properties on the data in a RCLibDbPlaylistIter. Must be called in main thread.

iter :

the RCLibDbPlaylistIter iter

type1 :

the first property in playlist data to set

... :

value for the first property, followed optionally by more name/value pairs, followed by RCLIB_DB_PLAYLIST_DATA_TYPE_NONE

rclib_db_playlist_data_new ()

RCLibDbPlaylistData * rclib_db_playlist_data_new        ();

Create a new empty RCLibDbPlaylistData structure, and set the reference count to 1. MT safe.

Returns :

The new empty allocated RCLibDbPlaylistData structure.

rclib_db_playlist_data_query ()

gboolean            rclib_db_playlist_data_query        (RCLibDbPlaylistData *playlist_data,
                                                         RCLibDbQuery *query,
                                                         GCancellable *cancellable);

Check whether the playlist data satisfied the query condition. MT safe.

playlist_data :

the playlist data to check

query :

the query condition

cancellable :

optional GCancellable object, NULL to ignore. [allow-none]

Returns :

Whether the playlist data satisfied the query condition.

rclib_db_playlist_data_ref ()

RCLibDbPlaylistData * rclib_db_playlist_data_ref        (RCLibDbPlaylistData *data);

Increase the reference of RCLibDbPlaylistData by 1. MT safe.

data :

the RCLibDbPlaylistData structure

Returns :

The RCLibDbPlaylistData structure. [transfer none]

rclib_db_playlist_data_set ()

void                rclib_db_playlist_data_set          (RCLibDbPlaylistData *data,
                                                         RCLibDbPlaylistDataType type1,
                                                         ...);

Sets properties on a RCLibDbPlaylistData. Must be called in main thread.

data :

the RCLibDbPlaylistData data

type1 :

the first property in playlist data to set

... :

value for the first property, followed optionally by more name/value pairs, followed by RCLIB_DB_PLAYLIST_DATA_TYPE_NONE

rclib_db_playlist_data_unref ()

void                rclib_db_playlist_data_unref        (RCLibDbPlaylistData *data);

Decrease the reference of RCLibDbPlaylistData by 1. If the reference down to zero, the structure will be freed. MT safe.

data :

the RCLibDbPlaylistData structure

Returns :

The RCLibDbPlaylistData structure.

rclib_db_playlist_delete ()

void                rclib_db_playlist_delete            (RCLibDbPlaylistIter *iter);

Delete the playlist data pointed to by iter. Must be called in main thread.

iter :

the iter to the playlist data

rclib_db_playlist_export_all_m3u_files ()

gboolean            rclib_db_playlist_export_all_m3u_files
                                                        (const gchar *dir);

Export all playlists in the catalog to playlist files. MTsafe.

dir :

the directory to save playlist files

Returns :

Whether the operation succeeded.

rclib_db_playlist_export_m3u_file ()

gboolean            rclib_db_playlist_export_m3u_file   (RCLibDbCatalogIter *iter,
                                                         const gchar *sfilename);

Export the catalog pointed to by iter to a new playlist file. MT safe.

iter :

the catalog iter

sfilename :

the new playlist file path

Returns :

Whether the operation succeeded.

rclib_db_playlist_foreach ()

void                rclib_db_playlist_foreach           (RCLibDbCatalogIter *catalog_iter,
                                                         GFunc func,
                                                         gpointer user_data);

Calls func for each item in the playlist passing user_data to the function. MT safe.

catalog_iter :

the RCLibDbCatalogIter which stores the playlist

func :

the function to call for each item in seq. [scope call]

user_data :

user data passed to func

rclib_db_playlist_get_begin_iter ()

RCLibDbPlaylistIter * rclib_db_playlist_get_begin_iter  (RCLibDbCatalogIter *catalog_iter);

Get the begin iterator for the playlist stored in RCLibDbCatalogIter. MT safe.

catalog_iter :

the RCLibDbCatalogIter which stores the playlist

Returns :

(skip): The begin iterator. [transfer none]

rclib_db_playlist_get_end_iter ()

RCLibDbPlaylistIter * rclib_db_playlist_get_end_iter    (RCLibDbCatalogIter *catalog_iter);

Get the end iterator for the playlist stored in RCLibDbCatalogIter. MT safe.

catalog_iter :

the RCLibDbCatalogIter which stores the playlist

Returns :

(skip): The end iterator. [transfer none]

rclib_db_playlist_get_iter_at_pos ()

RCLibDbPlaylistIter * rclib_db_playlist_get_iter_at_pos (RCLibDbCatalogIter *catalog_iter,
                                                         gint pos);

Return the iterator at position pos. If pos is negative or larger than the number of items in the playlist, the end iterator is returned. MT safe.

catalog_iter :

the RCLibDbCatalogIter which stores the playlist

pos :

the position in the playlist, or -1 for the end.

Returns :

(skip): The RCLibDbPlaylistIter at position pos. [transfer none]

rclib_db_playlist_get_last_iter ()

RCLibDbPlaylistIter * rclib_db_playlist_get_last_iter   (RCLibDbCatalogIter *catalog_iter);

Get the last iterator for the playlist stored in RCLibDbCatalogIter. MT safe.

catalog_iter :

the RCLibDbCatalogIter which stores the playlist

Returns :

(skip): The last iterator. [transfer none]

rclib_db_playlist_get_length ()

gint                rclib_db_playlist_get_length        (RCLibDbCatalogIter *catalog_iter);

Get the playlist length stored in the RCLibDbCatalogIter. MT safe.

catalog_iter :

the RCLibDbCatalogIter which stores the playlist

Returns :

The playlist length, -1 if the playlist does not exist.

rclib_db_playlist_get_random_iter ()

RCLibDbPlaylistIter * rclib_db_playlist_get_random_iter (RCLibDbCatalogIter *catalog_iter,
                                                         gboolean rating_limit,
                                                         gboolean condition,
                                                         gfloat rating);

Get a random playlist iter from in the given catalog or all catalogs. MT safe.

catalog_iter :

the catalog iter pointed to the catalog, NULL to use all catalogs

rating_limit :

whether to use rating limit

condition :

the condition, TRUE to get a random iter which pointed to the RCLibDbPlaylistData whose rating is less or equal to the rating, FALSE to get the a random iter which pointed to the RCLibDbPlaylistData whose rating is greater or equal to the rating

rating :

the rating limit value

Returns :

(skip): A random playlist iter. [transfer none]

rclib_db_playlist_is_valid_iter ()

gboolean            rclib_db_playlist_is_valid_iter     (RCLibDbPlaylistIter *playlist_iter);

Check whether the iter is valid in the playlist sequence. MT safe.

playlist_iter :

the iter to check

Returns :

Whether the iter is valid.

rclib_db_playlist_item_sort ()

void                rclib_db_playlist_item_sort         (RCLibDbCatalogIter *catalog_iter,
                                                         RCLibDbPlaylistDataType column,
                                                         gboolean direction);

Sort the playlist items by the alphabets order (ascending or descending) of the given column. This function can only be called in main thread.

catalog_iter :

the iter pointed to catalog

column :

the column to sort

direction :

the sort direction, FALSE to use ascending, TRUE to use descending

rclib_db_playlist_iter_compare ()

gint                rclib_db_playlist_iter_compare      (RCLibDbPlaylistIter *a,
                                                         RCLibDbPlaylistIter *b);

Return a negative number if a comes before b, 0 if they are equal, and a positive number if a comes after b. MT safe.

The a and b iterators must point into the same playlist.

a :

a RCLibDbPlaylistIter

b :

a RCLibDbPlaylistIter

Returns :

A negative number if a comes before b, 0 if they are equal, and a positive number if a comes after b.

rclib_db_playlist_iter_foreach_range ()

void                rclib_db_playlist_iter_foreach_range
                                                        (RCLibDbPlaylistIter *begin,
                                                         RCLibDbPlaylistIter *end,
                                                         GFunc func,
                                                         gpointer user_data);

Calls func for each item in the range (begin, end) passing user_data to the function. MT safe.

begin :

a RCLibDbPlaylistIter

end :

a RCLibDbPlaylistIter

func :

a GFunc. [scope call]

user_data :

user data passed to func

rclib_db_playlist_iter_get_begin_iter ()

RCLibDbPlaylistIter * rclib_db_playlist_iter_get_begin_iter
                                                        (RCLibDbPlaylistIter *playlist_iter);

Get the begin iterator of the playlist that the RCLibDbPlaylistIter belongs to. MT safe.

playlist_iter :

the RCLibDbPlaylistIter which the playlist belongs to

Returns :

(skip): The begin iterator. [transfer none]

rclib_db_playlist_iter_get_data ()

RCLibDbPlaylistData * rclib_db_playlist_iter_get_data   (RCLibDbPlaylistIter *iter);

Get the playlist item data which the iter pointed to. MT safe.

iter :

the iter pointed to the playlist data

Returns :

The RCLibDbPlaylistData. [transfer full]

rclib_db_playlist_iter_get_end_iter ()

RCLibDbPlaylistIter * rclib_db_playlist_iter_get_end_iter
                                                        (RCLibDbPlaylistIter *playlist_iter);

Get the end iterator of the playlist that the RCLibDbPlaylistIter belongs to. MT safe.

playlist_iter :

the RCLibDbPlaylistIter which the playlist belongs to

Returns :

(skip): The end iterator. [transfer none]

rclib_db_playlist_iter_get_iter_at_pos ()

RCLibDbPlaylistIter * rclib_db_playlist_iter_get_iter_at_pos
                                                        (RCLibDbPlaylistIter *playlist_iter,
                                                         gint pos);

Return the iterator at position pos. If pos is negative or larger than the number of items in the playlist, the end iterator is returned. MT safe.

playlist_iter :

the RCLibDbPlaylistIter which the playlist belongs to

pos :

the position in the playlist, or -1 for the end.

Returns :

(skip): The RCLibDbPlaylistIter at position pos. [transfer none]

rclib_db_playlist_iter_get_last_iter ()

RCLibDbPlaylistIter * rclib_db_playlist_iter_get_last_iter
                                                        (RCLibDbPlaylistIter *playlist_iter);

Get the last iterator of the playlist that the RCLibDbPlaylistIter belongs to. MT safe.

playlist_iter :

the RCLibDbPlaylistIter which the playlist belongs to

Returns :

(skip): The last iterator. [transfer none]

rclib_db_playlist_iter_get_length ()

gint                rclib_db_playlist_iter_get_length   (RCLibDbPlaylistIter *playlist_iter);

Get the playlist length that the RCLibDbPlaylistIter belongs to. MT safe.

playlist_iter :

the RCLibDbPlaylistIter which the playlist belongs to

Returns :

The playlist length, -1 if the playlist iter is not valid.

rclib_db_playlist_iter_get_position ()

gint                rclib_db_playlist_iter_get_position (RCLibDbPlaylistIter *iter);

Return the position of iter. MT safe.

iter :

a RCLibDbPlaylistIter

Returns :

the position of iter, -1 if the iter is not valid.

rclib_db_playlist_iter_get_random_iter ()

RCLibDbPlaylistIter * rclib_db_playlist_iter_get_random_iter
                                                        (RCLibDbPlaylistIter *piter,
                                                         gboolean rating_limit,
                                                         gboolean condition,
                                                         gfloat rating);

Get a random playlist iter from in the given catalog (which the piter belongs to) or all catalogs. MT safe.

piter :

the playlist iter which belongs to the catalog, NULL to use all catalogs

rating_limit :

whether to use rating limit

condition :

the condition, TRUE to get a random iter which pointed to the RCLibDbPlaylistData whose rating is less or equal to the rating, FALSE to get the a random iter which pointed to the RCLibDbPlaylistData whose rating is greater or equal to the rating

rating :

the rating limit value

Returns :

(skip): A random playlist iter. [transfer none]

rclib_db_playlist_iter_is_begin ()

gboolean            rclib_db_playlist_iter_is_begin     (RCLibDbPlaylistIter *iter);

Return whether iter is the begin iterator. MT safe. Notice that this function will NOT check whether the iter is valid.

iter :

a RCLibDbPlaylistIter

Returns :

whether iter is the begin iterator.

rclib_db_playlist_iter_is_end ()

gboolean            rclib_db_playlist_iter_is_end       (RCLibDbPlaylistIter *iter);

Return whether iter is the end iterator. MT safe. Notice that this function will NOT check whether the iter is valid.

iter :

a RCLibDbPlaylistIter

Returns :

whether iter is the end iterator.

rclib_db_playlist_iter_next ()

RCLibDbPlaylistIter * rclib_db_playlist_iter_next       (RCLibDbPlaylistIter *iter);

Return an iterator pointing to the next position after iter. If iter is not valid , or iter the end iterator, NULL is returned. MT safe.

iter :

a RCLibDbPlaylistIter

Returns :

(skip): a RCLibDbPlaylistIter pointing to the next position after iter. [transfer none]

rclib_db_playlist_iter_prev ()

RCLibDbPlaylistIter * rclib_db_playlist_iter_prev       (RCLibDbPlaylistIter *iter);

Return an iterator pointing to the previous position before iter. If iter is not valid , or iter the begin iterator, NULL is returned. MT safe.

iter :

a RCLibDbPlaylistIter

Returns :

(skip): a RCLibDbPlaylistIter pointing to the previous position before iter. [transfer none]

rclib_db_playlist_iter_query ()

gboolean            rclib_db_playlist_iter_query        (RCLibDbPlaylistIter *playlist_iter,
                                                         RCLibDbQuery *query,
                                                         GCancellable *cancellable);

Check whether the playlist data stored in the iter satisfied the query condition. MT safe.

playlist_iter :

the playlist iter to check

query :

the query condition

cancellable :

optional GCancellable object, NULL to ignore. [allow-none]

Returns :

Whether the playlist data stored in the iter satisfied the query condition.

rclib_db_playlist_iter_range_get_midpoint ()

RCLibDbPlaylistIter * rclib_db_playlist_iter_range_get_midpoint
                                                        (RCLibDbPlaylistIter *begin,
                                                         RCLibDbPlaylistIter *end);

Find an iterator somewhere in the range (begin, end). This iterator will be close to the middle of the range, but is not guaranteed to be exactly in the middle. MT safe.

The begin and end iterators must both point to the same playlist and begin must come before or be equal to end in the sequence.

begin :

a RCLibDbPlaylistIter

end :

a RCLibDbPlaylistIter

Returns :

(skip): A RCLibDbPlaylistIter pointing somewhere in the (begin, end) range. [transfer none]

rclib_db_playlist_move_to_another_catalog ()

void                rclib_db_playlist_move_to_another_catalog
                                                        (RCLibDbPlaylistIter **iters,
                                                         guint num,
                                                         RCLibDbCatalogIter *catalog_iter);

Move the playlist data pointed to by iters to another catalog pointed to by catalog_iter. Must be called in main thread.

iters :

an iter array

num :

the size of the iter array

catalog_iter :

the iter for the catalog

rclib_db_playlist_query ()

GPtrArray *         rclib_db_playlist_query             (RCLibDbCatalogIter *catalog_iter,
                                                         RCLibDbQuery *query,
                                                         GCancellable *cancellable);

Query data from the playlist library. MT safe.

catalog_iter :

the catalog to query, set to NULL to query in all catalogs

query :

the query condition

cancellable :

optional GCancellable object, NULL to ignore. [allow-none]

Returns :

The playlist data array which satisfied the query condition. Free with #g_ptr_array_free() or #g_ptr_array_unref() after usage. [transfer full]

rclib_db_playlist_query_get_iters ()

GPtrArray *         rclib_db_playlist_query_get_iters   (RCLibDbCatalogIter *catalog_iter,
                                                         RCLibDbQuery *query,
                                                         GCancellable *cancellable);

Query data from the playlist library, and get an array of iters which satisfied the query condition. MT safe.

catalog_iter :

the catalog to query, set to NULL to query in all catalogs

query :

the query condition

cancellable :

optional GCancellable object, NULL to ignore. [allow-none]

Returns :

The playlist iter array which satisfied the query condition. Free with #g_ptr_array_free() or #g_ptr_array_unref() after usage. [transfer full]

rclib_db_playlist_refresh ()

void                rclib_db_playlist_refresh           (RCLibDbCatalogIter *iter);

Refresh the metadata of the music in the playlist pointed to by the given catalog iter. MT safe.

iter :

the catalog iter

rclib_db_playlist_reorder ()

void                rclib_db_playlist_reorder           (RCLibDbCatalogIter *iter,
                                                         gint *new_order);

Reorder the playlist to follow the order indicated by new_order. Must be called in main thread.

iter :

the iter pointed to catalog

new_order :

an array of integers mapping the new position of each child to its old position before the re-ordering, i.e. new_order[newpos] = oldpos. [array]

rclib_db_playlist_update_metadata ()

void                rclib_db_playlist_update_metadata   (RCLibDbPlaylistIter *iter,
                                                         const RCLibDbPlaylistData *data);

Update the metadata in the playlist pointed to by iter. Title, artist, album, file type, track number, year information will be updated. Must be called in main thread.

iter :

the iter to the playlist

data :

the new metadata

rclib_db_query_concatenate ()

gboolean            rclib_db_query_concatenate          (RCLibDbQuery *target,
                                                         const RCLibDbQuery *src);

Appends src to target.

target :

query to append to

src :

query to append

Returns :

Whether the concatenate succeeded.

rclib_db_query_copy ()

RCLibDbQuery *      rclib_db_query_copy                 (const RCLibDbQuery *query);

Create a new query copied from the given query.

query :

the query to copy

Returns :

A new copied query. Must be freed after usage. [transfer full]

rclib_db_query_free ()

void                rclib_db_query_free                 (RCLibDbQuery *query);

Free the query.

query :

the query to free

rclib_db_query_get_query_data_type ()

GType               rclib_db_query_get_query_data_type  (RCLibDbQueryDataType query_type);

Get the query data type.

query_type :

the RCLibDbQueryDataType

Returns :

The GType of the given query data type

rclib_db_query_parse ()

RCLibDbQuery *      rclib_db_query_parse                (RCLibDbQueryConditionType condition1,
                                                         ...);

Create a query from a list of criteria.

condition1 :

the first query condition

... :

the query condition arguments, finished with RCLIB_DB_QUERY_CONDITION_TYPE_NONE

Returns :

A new created query. Must be freed after usage. [transfer full]

rclib_db_query_parse_valist ()

RCLibDbQuery *      rclib_db_query_parse_valist         (RCLibDbQueryConditionType condition1,
                                                         va_list args);

Create a query from a list of criteria in the variable list.

condition1 :

the first query condition

args :

a list of parameters which contain the query conditions

Returns :

A new created query. Must be freed after usage. [transfer full]

rclib_db_refresh_cancel ()

void                rclib_db_refresh_cancel             ();

Cancel all remaining refresh jobs in the queue.


rclib_db_refresh_queue_get_length ()

gint                rclib_db_refresh_queue_get_length   ();

Get the number of remaining jobs in the refresh queue.

Returns :

The number of remaining jobs.

rclib_db_signal_connect ()

gulong              rclib_db_signal_connect             (const gchar *name,
                                                         GCallback callback,
                                                         gpointer data);

Connect the GCallback function to the given signal for the running instance of RCLibDb object.

name :

the name of the signal

callback :

the the GCallback to connect. [scope call]

data :

the user data

Returns :

The handler ID.

rclib_db_signal_disconnect ()

void                rclib_db_signal_disconnect          (gulong handler_id);

Disconnects a handler from the running RCLibDb instance so it will not be called during any future or currently ongoing emissions of the signal it has been connected to. The handler_id becomes invalid and may be reused.

handler_id :

handler id of the handler to be disconnected

rclib_db_sync ()

gboolean            rclib_db_sync                       ();

Save the database (if modified) to disk.

Returns :

Whether the operation succeeded.

Signal Details

The "catalog-added" signal

void                user_function                      (RCLibDb *db,
                                                        gpointer iter,
                                                        gpointer user_data)      : Run First

The ::catalog-added signal is emitted when a new item has been added to the catalog.

db :

the RCLibDb that received the signal

iter :

the iter pointed to the added item

user_data :

user data set when the signal handler was connected.

The "catalog-changed" signal

void                user_function                      (RCLibDb *db,
                                                        gpointer iter,
                                                        gpointer user_data)      : Run First

The ::catalog-changed signal is emitted when an item has been changed in the catalog.

db :

the RCLibDb that received the signal

iter :

the iter pointed to the changed item

user_data :

user data set when the signal handler was connected.

The "catalog-delete" signal

void                user_function                      (RCLibDb *db,
                                                        gpointer iter,
                                                        gpointer user_data)      : Run First

The ::catalog-delete signal is emitted before an item in the catalog is about to be deleted.

db :

the RCLibDb that received the signal

iter :

the iter pointed to the item which is about to be deleted

user_data :

user data set when the signal handler was connected.

The "catalog-reordered" signal

void                user_function                      (RCLibDb *db,
                                                        gpointer new_order,
                                                        gpointer user_data)      : Run First

The ::catalog-reordered signal is emitted when the catalog items have been reordered.

db :

the RCLibDb that received the signal

new_order :

an array of integers mapping the current position of each catalog item to its old position before the re-ordering, i.e. new_order[newpos] = oldpos

user_data :

user data set when the signal handler was connected.

The "import-updated" signal

void                user_function                      (RCLibDb *db,
                                                        gint     remaining,
                                                        gpointer user_data)      : Run First

The ::import-updated signal is emitted when a job in the import queue have been processed.

db :

the RCLibDb that received the signal

remaining :

the number of remaing jobs in current import queue

user_data :

user data set when the signal handler was connected.

The "library-added" signal

void                user_function                      (RCLibDb *db,
                                                        gchar   *uri,
                                                        gpointer user_data)      : Run First

The ::library-added signal is emitted when a new music item is added to the music library. This signal is emitted in main thread.

db :

the RCLibDb that received the signal

uri :

the new URI added to the music library

user_data :

user data set when the signal handler was connected.

The "library-changed" signal

void                user_function                      (RCLibDb *db,
                                                        gchar   *uri,
                                                        gpointer user_data)      : Run First

The ::library-added signal is emitted when the data of the music item in the music library is changed. This signal is emitted in main thread.

db :

the RCLibDb that received the signal

uri :

the URI of the music item that changed in the music library

user_data :

user data set when the signal handler was connected.

The "library-deleted" signal

void                user_function                      (RCLibDb *db,
                                                        gchar   *uri,
                                                        gpointer user_data)      : Run First

The ::library-deleted signal is emitted when the data of the music item in the music library is removed. This signal is emitted in main thread.

db :

the RCLibDb that received the signal

uri :

the URI of the music item which is about to be deleted

user_data :

user data set when the signal handler was connected.

The "playlist-added" signal

void                user_function                      (RCLibDb *db,
                                                        gpointer iter,
                                                        gpointer user_data)      : Run First

The ::playlist-added signal is emitted when a new item has been added to the playlist.

db :

the RCLibDb that received the signal

iter :

the iter pointed to the added item

user_data :

user data set when the signal handler was connected.

The "playlist-changed" signal

void                user_function                      (RCLibDb *db,
                                                        gpointer iter,
                                                        gpointer user_data)      : Run First

The ::playlist-changed signal is emitted when an item has been changed in the playlist.

db :

the RCLibDb that received the signal

iter :

the iter pointed to the changed item

user_data :

user data set when the signal handler was connected.

The "playlist-delete" signal

void                user_function                      (RCLibDb *db,
                                                        gpointer iter,
                                                        gpointer user_data)      : Run First

The ::playlist-delete signal is emitted before an item in the playlist is about to be deleted.

db :

the RCLibDb that received the signal

iter :

the iter pointed to the item which is about to be deleted

user_data :

user data set when the signal handler was connected.

The "playlist-reordered" signal

void                user_function                      (RCLibDb *db,
                                                        gpointer iter,
                                                        gpointer new_order,
                                                        gpointer user_data)      : Run First

The ::playlist-reordered signal is emitted when the catalog items have been reordered.

db :

the RCLibDb that received the signal

iter :

the iter pointed to the catalog item which contains the reordered playlist items

new_order :

an array of integers mapping the current position of each playlist item to its old position before the re-ordering, i.e. new_order[newpos] = oldpos

user_data :

user data set when the signal handler was connected.

The "refresh-updated" signal

void                user_function                      (RCLibDb *db,
                                                        gint     remaining,
                                                        gpointer user_data)      : Run First

The ::refresh-updated signal is emitted when a job in the refresh queue have been processed.

db :

the RCLibDb that received the signal

remaining :

the number of remaing jobs in current refresh queue

user_data :

user data set when the signal handler was connected.

The "prop-added" signal

void                user_function                      (RCLibDbLibraryQueryResult *qr,
                                                        guint                      prop_type,
                                                        gchar                     *prop_string,
                                                        gpointer                   user_data)        : Run First

The ::query-result-changed signal is emitted when new property item which the prop)_string pointed to has been added.

qr :

the RCLibDb that received the signal

prop_type :

the property type

prop_string :

the property text of the new item

user_data :

user data set when the signal handler was connected.

The "prop-changed" signal

void                user_function                      (RCLibDbLibraryQueryResult *qr,
                                                        guint                      prop_type,
                                                        gchar                     *prop_string,
                                                        gpointer                   user_data)        : Run First

The ::query-result-changed signal is emitted when the property item which the prop_string pointed to has been changed.

qr :

the RCLibDb that received the signal

prop_type :

the property type

prop_string :

the property text of the item

user_data :

user data set when the signal handler was connected.

The "prop-delete" signal

void                user_function                      (RCLibDbLibraryQueryResult *qr,
                                                        guint                      prop_type,
                                                        gchar                     *prop_string,
                                                        gpointer                   user_data)        : Run First

The ::query-result-changed signal is emitted when the property item which the prop_string pointed to is about to be deleted.

qr :

the RCLibDb that received the signal

prop_type :

the property type

prop_string :

the property text of the item

user_data :

user data set when the signal handler was connected.

The "prop-reordered" signal

void                user_function                      (RCLibDbLibraryQueryResult *qr,
                                                        guint                      prop_type,
                                                        gpointer                   new_order,
                                                        gpointer                   user_data)      : Run First

The ::prop-reordered signal is emitted when the query result property items have been reordered.

qr :

the RCLibDb that received the signal

prop_type :

the property type

new_order :

an array of integers mapping the current position of each playlist item to its old position before the re-ordering, i.e. new_order[newpos] = oldpos

user_data :

user data set when the signal handler was connected.

The "query-result-added" signal

void                user_function                      (RCLibDbLibraryQueryResult *qr,
                                                        gchar                     *uri,
                                                        gpointer                   user_data)      : Run First

The ::query-result-added signal is emitted when a new item has been added to the query result.

qr :

the RCLibDb that received the signal

uri :

the URI of the added item

user_data :

user data set when the signal handler was connected.

The "query-result-changed" signal

void                user_function                      (RCLibDbLibraryQueryResult *qr,
                                                        gchar                     *uri,
                                                        gpointer                   user_data)      : Run First

The ::query-result-changed signal is emitted when the uri which pointed to the item has been changed.

qr :

the RCLibDb that received the signal

uri :

the URI of the changed item

user_data :

user data set when the signal handler was connected.

The "query-result-delete" signal

void                user_function                      (RCLibDbLibraryQueryResult *qr,
                                                        gchar                     *uri,
                                                        gpointer                   user_data)      : Run First

The ::query-result-delete signal is emitted before the uri which pointed to the item removed from the query result.

qr :

the RCLibDb that received the signal

uri :

the URI of the deleted item

user_data :

user data set when the signal handler was connected.

The "query-result-reordered" signal

void                user_function                      (RCLibDbLibraryQueryResult *qr,
                                                        gpointer                   new_order,
                                                        gpointer                   user_data)      : Run First

The ::query-result-reordered signal is emitted when the query result items have been reordered.

qr :

the RCLibDb that received the signal

new_order :

an array of integers mapping the current position of each playlist item to its old position before the re-ordering, i.e. new_order[newpos] = oldpos

user_data :

user data set when the signal handler was connected.