aboutsummaryrefslogtreecommitdiffstats
path: root/src/db/plugins/ProxyDatabasePlugin.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2015-01-21 22:13:44 +0100
committerMax Kellermann <max@duempel.org>2015-01-21 23:56:33 +0100
commit4fa5538e2bed36903b403e1aaee2462d22b456dc (patch)
tree292b66e10e6b97e2363fde34a81c027a67d3a9fe /src/db/plugins/ProxyDatabasePlugin.cxx
parent84e74173de85a3897cfe67150297987f8c8bf52e (diff)
downloadmpd-4fa5538e2bed36903b403e1aaee2462d22b456dc.tar.gz
mpd-4fa5538e2bed36903b403e1aaee2462d22b456dc.tar.xz
mpd-4fa5538e2bed36903b403e1aaee2462d22b456dc.zip
config/Param: split block-specific attributes to new struct ConfigBlock
The old struct config_param remains only for top-level string options.
Diffstat (limited to 'src/db/plugins/ProxyDatabasePlugin.cxx')
-rw-r--r--src/db/plugins/ProxyDatabasePlugin.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/db/plugins/ProxyDatabasePlugin.cxx b/src/db/plugins/ProxyDatabasePlugin.cxx
index 1a94000b2..67c651e83 100644
--- a/src/db/plugins/ProxyDatabasePlugin.cxx
+++ b/src/db/plugins/ProxyDatabasePlugin.cxx
@@ -30,7 +30,7 @@
#include "db/Stats.hxx"
#include "SongFilter.hxx"
#include "Compiler.h"
-#include "config/Param.hxx"
+#include "config/Block.hxx"
#include "tag/TagBuilder.hxx"
#include "tag/Tag.hxx"
#include "util/Error.hxx"
@@ -97,7 +97,7 @@ public:
listener(_listener) {}
static Database *Create(EventLoop &loop, DatabaseListener &listener,
- const config_param &param,
+ const ConfigBlock &block,
Error &error);
virtual bool Open(Error &error) override;
@@ -129,7 +129,7 @@ public:
}
private:
- bool Configure(const config_param &param, Error &error);
+ bool Configure(const ConfigBlock &block, Error &error);
bool Connect(Error &error);
bool CheckConnection(Error &error);
@@ -321,10 +321,10 @@ SendConstraints(mpd_connection *connection, const DatabaseSelection &selection)
Database *
ProxyDatabase::Create(EventLoop &loop, DatabaseListener &listener,
- const config_param &param, Error &error)
+ const ConfigBlock &block, Error &error)
{
ProxyDatabase *db = new ProxyDatabase(loop, listener);
- if (!db->Configure(param, error)) {
+ if (!db->Configure(block, error)) {
delete db;
db = nullptr;
}
@@ -333,11 +333,11 @@ ProxyDatabase::Create(EventLoop &loop, DatabaseListener &listener,
}
bool
-ProxyDatabase::Configure(const config_param &param, gcc_unused Error &error)
+ProxyDatabase::Configure(const ConfigBlock &block, gcc_unused Error &error)
{
- host = param.GetBlockValue("host", "");
- port = param.GetBlockValue("port", 0u);
- keepalive = param.GetBlockValue("keepalive", false);
+ host = block.GetBlockValue("host", "");
+ port = block.GetBlockValue("port", 0u);
+ keepalive = block.GetBlockValue("keepalive", false);
return true;
}