diff options
author | Max Kellermann <max@duempel.org> | 2014-01-30 20:29:48 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-01-30 20:39:40 +0100 |
commit | 4465e2c46bbed438377dc4a99df333bd5c058d5e (patch) | |
tree | cbc1d27aad939689f44b0ac3542a6ca1777b9dc1 /src/Instance.hxx | |
parent | 34b309b99aa2f274308f19974c428e1c7ac5d66f (diff) | |
download | mpd-4465e2c46bbed438377dc4a99df333bd5c058d5e.tar.gz mpd-4465e2c46bbed438377dc4a99df333bd5c058d5e.tar.xz mpd-4465e2c46bbed438377dc4a99df333bd5c058d5e.zip |
db: add compile-time option to disable database
Diffstat (limited to 'src/Instance.hxx')
-rw-r--r-- | src/Instance.hxx | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/src/Instance.hxx b/src/Instance.hxx index d67ff9a51..a2c141dc7 100644 --- a/src/Instance.hxx +++ b/src/Instance.hxx @@ -21,7 +21,6 @@ #define MPD_INSTANCE_HXX #include "check.h" -#include "db/DatabaseListener.hxx" #include "Compiler.h" #ifdef ENABLE_NEIGHBOR_PLUGINS @@ -29,26 +28,42 @@ class NeighborGlue; #endif +#ifdef ENABLE_DATABASE +#include "db/DatabaseListener.hxx" class UpdateService; +#endif + class ClientList; struct Partition; struct Instance final - : public DatabaseListener +#if defined(ENABLE_DATABASE) || defined(ENABLE_NEIGHBOR_PLUGINS) + : +#endif +#ifdef ENABLE_DATABASE + public DatabaseListener #ifdef ENABLE_NEIGHBOR_PLUGINS - , public NeighborListener + , +#endif +#endif +#ifdef ENABLE_NEIGHBOR_PLUGINS + public NeighborListener #endif { #ifdef ENABLE_NEIGHBOR_PLUGINS NeighborGlue *neighbors; #endif +#ifdef ENABLE_DATABASE UpdateService *update; +#endif ClientList *client_list; Partition *partition; +#ifdef ENABLE_DATABASE + void DeleteSong(const char *uri); /** @@ -57,6 +72,8 @@ struct Instance final */ void DatabaseModified(); +#endif + /** * A tag in the play queue has been modified by the player * thread. Propagate the change to all subsystems. @@ -69,7 +86,9 @@ struct Instance final void SyncWithPlayer(); private: +#ifdef ENABLE_DATABASE virtual void OnDatabaseModified(); +#endif #ifdef ENABLE_NEIGHBOR_PLUGINS /* virtual methods from class NeighborListener */ |