aboutsummaryrefslogtreecommitdiffstats
path: root/src/DatabaseGlue.hxx
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/DatabaseGlue.hxx (renamed from src/notify.h)48
1 files changed, 27 insertions, 21 deletions
diff --git a/src/notify.h b/src/DatabaseGlue.hxx
index 40821690c..ea26f3242 100644
--- a/src/notify.h
+++ b/src/DatabaseGlue.hxx
@@ -17,37 +17,43 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef MPD_NOTIFY_H
-#define MPD_NOTIFY_H
+#ifndef MPD_DATABASE_GLUE_HXX
+#define MPD_DATABASE_GLUE_HXX
-#include <glib.h>
+#include "gcc.h"
+#include "gerror.h"
-#include <stdbool.h>
-
-struct notify {
- GMutex *mutex;
- GCond *cond;
- bool pending;
-};
-
-void notify_init(struct notify *notify);
-
-void notify_deinit(struct notify *notify);
+struct config_param;
+class Database;
/**
- * Wait for a notification. Return immediately if we have already
- * been notified since we last returned from notify_wait().
+ * Initialize the database library.
+ *
+ * @param param the database configuration block
*/
-void notify_wait(struct notify *notify);
+bool
+DatabaseGlobalInit(const config_param *param, GError **error_r);
+
+void
+DatabaseGlobalDeinit(void);
+
+bool
+DatabaseGlobalOpen(GError **error);
/**
- * Notify the thread. This function never blocks.
+ * Returns the global #Database instance. May return NULL if this MPD
+ * configuration has no database (no music_directory was configured).
*/
-void notify_signal(struct notify *notify);
+gcc_pure
+const Database *
+GetDatabase();
/**
- * Clears a pending notification.
+ * Returns the global #Database instance. May return NULL if this MPD
+ * configuration has no database (no music_directory was configured).
*/
-void notify_clear(struct notify *notify);
+gcc_pure
+const Database *
+GetDatabase(GError **error_r);
#endif