diff options
author | Max Kellermann <max@duempel.org> | 2014-02-01 00:26:34 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-02-04 11:22:33 +0100 |
commit | cf6281a5a758e4b93d67f7fd5804a8cff60ddbf9 (patch) | |
tree | 7368011b1ecf5ae6db6dcafb676fddf03ff9d823 /src/db/DatabaseGlue.hxx | |
parent | f00710a57e80738c33255eaa1347ab776fbce869 (diff) | |
download | mpd-cf6281a5a758e4b93d67f7fd5804a8cff60ddbf9.tar.gz mpd-cf6281a5a758e4b93d67f7fd5804a8cff60ddbf9.tar.xz mpd-cf6281a5a758e4b93d67f7fd5804a8cff60ddbf9.zip |
Instance: add Database attribute
Move from db/DatabaseGlue.cxx, eliminating global variable.
Diffstat (limited to 'src/db/DatabaseGlue.hxx')
-rw-r--r-- | src/db/DatabaseGlue.hxx | 28 |
1 files changed, 4 insertions, 24 deletions
diff --git a/src/db/DatabaseGlue.hxx b/src/db/DatabaseGlue.hxx index 78032edb2..f562b6d41 100644 --- a/src/db/DatabaseGlue.hxx +++ b/src/db/DatabaseGlue.hxx @@ -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 |