aboutsummaryrefslogtreecommitdiffstats
path: root/src/db/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/db/plugins')
-rw-r--r--src/db/plugins/LazyDatabase.cxx3
-rw-r--r--src/db/plugins/LazyDatabase.hxx3
-rw-r--r--src/db/plugins/ProxyDatabasePlugin.cxx3
-rw-r--r--src/db/plugins/SimpleDatabasePlugin.cxx4
-rw-r--r--src/db/plugins/SimpleDatabasePlugin.hxx3
-rw-r--r--src/db/plugins/UpnpDatabasePlugin.cxx2
6 files changed, 13 insertions, 5 deletions
diff --git a/src/db/plugins/LazyDatabase.cxx b/src/db/plugins/LazyDatabase.cxx
index ffa861e36..2b576b1ee 100644
--- a/src/db/plugins/LazyDatabase.cxx
+++ b/src/db/plugins/LazyDatabase.cxx
@@ -23,6 +23,9 @@
#include <assert.h>
+LazyDatabase::LazyDatabase(Database *_db)
+ :Database(_db->GetPlugin()), db(_db), open(false) {}
+
LazyDatabase::~LazyDatabase()
{
assert(!open);
diff --git a/src/db/plugins/LazyDatabase.hxx b/src/db/plugins/LazyDatabase.hxx
index f3fbef5f3..000b63a98 100644
--- a/src/db/plugins/LazyDatabase.hxx
+++ b/src/db/plugins/LazyDatabase.hxx
@@ -35,8 +35,7 @@ class LazyDatabase final : public Database {
public:
gcc_nonnull_all
- LazyDatabase(Database *_db)
- :db(_db), open(false) {}
+ LazyDatabase(Database *_db);
virtual ~LazyDatabase();
diff --git a/src/db/plugins/ProxyDatabasePlugin.cxx b/src/db/plugins/ProxyDatabasePlugin.cxx
index c09468869..035ded8c3 100644
--- a/src/db/plugins/ProxyDatabasePlugin.cxx
+++ b/src/db/plugins/ProxyDatabasePlugin.cxx
@@ -91,7 +91,8 @@ class ProxyDatabase final : public Database, SocketMonitor, IdleMonitor {
public:
ProxyDatabase(EventLoop &_loop, DatabaseListener &_listener)
- :SocketMonitor(_loop), IdleMonitor(_loop),
+ :Database(proxy_db_plugin),
+ SocketMonitor(_loop), IdleMonitor(_loop),
listener(_listener) {}
static Database *Create(EventLoop &loop, DatabaseListener &listener,
diff --git a/src/db/plugins/SimpleDatabasePlugin.cxx b/src/db/plugins/SimpleDatabasePlugin.cxx
index cd13b70cb..9d8966158 100644
--- a/src/db/plugins/SimpleDatabasePlugin.cxx
+++ b/src/db/plugins/SimpleDatabasePlugin.cxx
@@ -40,6 +40,10 @@
static constexpr Domain simple_db_domain("simple_db");
+inline SimpleDatabase::SimpleDatabase()
+ :Database(simple_db_plugin),
+ path(AllocatedPath::Null()) {}
+
Database *
SimpleDatabase::Create(gcc_unused EventLoop &loop,
gcc_unused DatabaseListener &listener,
diff --git a/src/db/plugins/SimpleDatabasePlugin.hxx b/src/db/plugins/SimpleDatabasePlugin.hxx
index 49e3d987d..83a8dc491 100644
--- a/src/db/plugins/SimpleDatabasePlugin.hxx
+++ b/src/db/plugins/SimpleDatabasePlugin.hxx
@@ -50,8 +50,7 @@ class SimpleDatabase : public Database {
mutable unsigned borrowed_song_count;
#endif
- SimpleDatabase()
- :path(AllocatedPath::Null()) {}
+ SimpleDatabase();
public:
gcc_pure
diff --git a/src/db/plugins/UpnpDatabasePlugin.cxx b/src/db/plugins/UpnpDatabasePlugin.cxx
index f7d3a1932..9348d3297 100644
--- a/src/db/plugins/UpnpDatabasePlugin.cxx
+++ b/src/db/plugins/UpnpDatabasePlugin.cxx
@@ -75,6 +75,8 @@ class UpnpDatabase : public Database {
UPnPDeviceDirectory *discovery;
public:
+ UpnpDatabase():Database(upnp_db_plugin) {}
+
static Database *Create(EventLoop &loop, DatabaseListener &listener,
const config_param &param,
Error &error);