diff options
Diffstat (limited to 'src/Instance.hxx')
-rw-r--r-- | src/Instance.hxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/Instance.hxx b/src/Instance.hxx index ea60072cb..9e3f92458 100644 --- a/src/Instance.hxx +++ b/src/Instance.hxx @@ -30,9 +30,11 @@ class NeighborGlue; #ifdef ENABLE_DATABASE #include "db/DatabaseListener.hxx" +class Database; class UpdateService; #endif +class Error; class ClientList; struct Partition; @@ -55,6 +57,8 @@ struct Instance final #endif #ifdef ENABLE_DATABASE + Database *database; + UpdateService *update; #endif @@ -69,6 +73,12 @@ struct Instance final } #ifdef ENABLE_DATABASE + /** + * Returns the global #Database instance. May return nullptr + * if this MPD configuration has no database (no + * music_directory was configured). + */ + Database *GetDatabase(Error &error); void DeleteSong(const char *uri); |