From 85b8675e7a11a81bda4b4328e19e433768048911 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 19 Feb 2014 23:17:21 +0100 Subject: db/Interface: add attribute "plugin" The new method IsPlugin() replaces the "is_simple" flag. --- src/db/Interface.hxx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/db/Interface.hxx') 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 +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. */ -- cgit v1.2.3