aboutsummaryrefslogtreecommitdiffstats
path: root/src/output/plugins/PipeOutputPlugin.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/output/plugins/PipeOutputPlugin.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/output/plugins/PipeOutputPlugin.cxx')
-rw-r--r--src/output/plugins/PipeOutputPlugin.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/output/plugins/PipeOutputPlugin.cxx b/src/output/plugins/PipeOutputPlugin.cxx
index ea9300cf3..1e34ea98d 100644
--- a/src/output/plugins/PipeOutputPlugin.cxx
+++ b/src/output/plugins/PipeOutputPlugin.cxx
@@ -40,10 +40,10 @@ class PipeOutput {
PipeOutput()
:base(pipe_output_plugin) {}
- bool Configure(const config_param &param, Error &error);
+ bool Configure(const ConfigBlock &block, Error &error);
public:
- static PipeOutput *Create(const config_param &param, Error &error);
+ static PipeOutput *Create(const ConfigBlock &block, Error &error);
bool Open(AudioFormat &audio_format, Error &error);
@@ -58,12 +58,12 @@ public:
static constexpr Domain pipe_output_domain("pipe_output");
inline bool
-PipeOutput::Configure(const config_param &param, Error &error)
+PipeOutput::Configure(const ConfigBlock &block, Error &error)
{
- if (!base.Configure(param, error))
+ if (!base.Configure(block, error))
return false;
- cmd = param.GetBlockValue("command", "");
+ cmd = block.GetBlockValue("command", "");
if (cmd.empty()) {
error.Set(config_domain,
"No \"command\" parameter specified");
@@ -74,11 +74,11 @@ PipeOutput::Configure(const config_param &param, Error &error)
}
inline PipeOutput *
-PipeOutput::Create(const config_param &param, Error &error)
+PipeOutput::Create(const ConfigBlock &block, Error &error)
{
PipeOutput *po = new PipeOutput();
- if (!po->Configure(param, error)) {
+ if (!po->Configure(block, error)) {
delete po;
return nullptr;
}