Top | ![]() |
![]() |
![]() |
![]() |
void | (*DmapIdRecordFunc) () |
guint | dmap_db_add () |
guint | dmap_db_add_with_id () |
guint | dmap_db_add_path () |
DmapRecord * | dmap_db_lookup_by_id () |
guint | dmap_db_lookup_id_by_location () |
void | dmap_db_foreach () |
gulong | dmap_db_count () |
GHashTable * | dmap_db_apply_filter () |
void (*DmapIdRecordFunc) (guint id
,DmapRecord *record
,gpointer user_data
);
The type of function passed to dmap_db_foreach()
.
guint dmap_db_add_with_id (DmapDb *db
,DmapRecord *record
,guint id
);
Add a record to the database and assign it the given ID.
guint dmap_db_add_path (DmapDb *db
,const gchar *path
);
Create a record and add it to the database.
DmapRecord * dmap_db_lookup_by_id (const DmapDb *db
,guint id
);
the database record corresponding to id
. This record should
be unrefed by the calling code when no longer required.
If you are implementing a full database using this API, then you probably want to increment the reference count before returning a record pointer.
On the other hand, if you are implementing an adapter class and the records are stored elsewhere, then you will probably return a transient record. That is, once the user is done using it, the returned record should be free'd because it is a adapter copy of the real record. In this case, the reference count should not be incremented before returning a record pointer.
[transfer full]
guint dmap_db_lookup_id_by_location (const DmapDb *db
,const gchar *location
);
void dmap_db_foreach (const DmapDb *db
,DmapIdRecordFunc func
,gpointer data
);
Apply a function to each record in a media database.
GHashTable * dmap_db_apply_filter (DmapDb *db
,GSList *filter_def
);