From 4465e2c46bbed438377dc4a99df333bd5c058d5e Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 30 Jan 2014 20:29:48 +0100 Subject: db: add compile-time option to disable database --- src/Instance.hxx | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) (limited to 'src/Instance.hxx') 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 */ -- cgit v1.2.3