aboutsummaryrefslogtreecommitdiffstats
path: root/src/db/Interface.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-02-19 23:17:21 +0100
committerMax Kellermann <max@duempel.org>2014-02-19 23:17:21 +0100
commit85b8675e7a11a81bda4b4328e19e433768048911 (patch)
treefa69fa3360f8790331ddf874608d6411aecc14d4 /src/db/Interface.hxx
parentae594ad92c1a6dc4aee3e83fa4ab94075b0170c1 (diff)
downloadmpd-85b8675e7a11a81bda4b4328e19e433768048911.tar.gz
mpd-85b8675e7a11a81bda4b4328e19e433768048911.tar.xz
mpd-85b8675e7a11a81bda4b4328e19e433768048911.zip
db/Interface: add attribute "plugin"
The new method IsPlugin() replaces the "is_simple" flag.
Diffstat (limited to 'src/db/Interface.hxx')
-rw-r--r--src/db/Interface.hxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/db/Interface.hxx b/src/db/Interface.hxx
index 4ce927336..11e2da12e 100644
--- a/src/db/Interface.hxx
+++ b/src/db/Interface.hxx
@@ -26,18 +26,32 @@
#include <time.h>
+struct DatabasePlugin;
struct DatabaseStats;
struct DatabaseSelection;
struct LightSong;
class Error;
class Database {
+ const DatabasePlugin &plugin;
+
public:
+ Database(const DatabasePlugin &_plugin)
+ :plugin(_plugin) {}
+
/**
* Free instance data.
*/
virtual ~Database() {}
+ const DatabasePlugin &GetPlugin() const {
+ return plugin;
+ }
+
+ bool IsPlugin(const DatabasePlugin &other) const {
+ return &plugin == &other;
+ }
+
/**
* Open the database. Read it into memory if applicable.
*/