From cf6281a5a758e4b93d67f7fd5804a8cff60ddbf9 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 1 Feb 2014 00:26:34 +0100 Subject: Instance: add Database attribute Move from db/DatabaseGlue.cxx, eliminating global variable. --- src/db/DatabaseGlue.hxx | 28 ++++------------------------ 1 file changed, 4 insertions(+), 24 deletions(-) (limited to 'src/db/DatabaseGlue.hxx') 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 -- cgit v1.2.3