Instance: add Database attribute
Move from db/DatabaseGlue.cxx, eliminating global variable.
This commit is contained in:
@@ -32,31 +32,11 @@ class Error;
|
||||
* Initialize the database library.
|
||||
*
|
||||
* @param param the database configuration block
|
||||
* @param is_simple returns whether this is the "simple" database
|
||||
* plugin
|
||||
*/
|
||||
bool
|
||||
Database *
|
||||
DatabaseGlobalInit(EventLoop &loop, DatabaseListener &listener,
|
||||
const config_param ¶m, Error &error);
|
||||
|
||||
void
|
||||
DatabaseGlobalDeinit(void);
|
||||
|
||||
bool
|
||||
DatabaseGlobalOpen(Error &error);
|
||||
|
||||
/**
|
||||
* Returns the global #Database instance. May return nullptr if this MPD
|
||||
* configuration has no database (no music_directory was configured).
|
||||
*/
|
||||
gcc_const
|
||||
const Database *
|
||||
GetDatabase();
|
||||
|
||||
/**
|
||||
* Returns the global #Database instance. May return nullptr if this MPD
|
||||
* configuration has no database (no music_directory was configured).
|
||||
*/
|
||||
gcc_pure
|
||||
const Database *
|
||||
GetDatabase(Error &error);
|
||||
const config_param ¶m, bool &is_simple, Error &error);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user