db_plugin: introducing a plugin API for the song database
First draft, not really pluggable currently - hard-coded to use the "simple" plugin, and calls several of its internal functions. The API is very simple currently, all searches are still performed over the root "directory" object. Future changes to the API will move those search implementations into the plugin, to allow more efficient implementations, or implementations that don't have the whole tree in memory all the time.
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
#include <sys/time.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
struct config_param;
|
||||
struct directory;
|
||||
|
||||
/**
|
||||
@@ -32,18 +33,12 @@ struct directory;
|
||||
*
|
||||
* @param path the absolute path of the database file
|
||||
*/
|
||||
void
|
||||
db_init(const char *path);
|
||||
bool
|
||||
db_init(const struct config_param *path, GError **error_r);
|
||||
|
||||
void
|
||||
db_finish(void);
|
||||
|
||||
/**
|
||||
* Clear the database.
|
||||
*/
|
||||
void
|
||||
db_clear(void);
|
||||
|
||||
/**
|
||||
* Returns the root directory object. Returns NULL if there is no
|
||||
* configured music directory.
|
||||
|
||||
Reference in New Issue
Block a user