summaryrefslogtreecommitdiff
path: root/src/input
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2018-07-17 21:49:27 +0200
committerMax Kellermann <max@musicpd.org>2018-07-17 22:05:27 +0200
commit0ff0aca2e2391a42900a588f9b6ed4d525509aac (patch)
tree0fd780e23fd5f246baeaec6d68f34979d2364de3 /src/input
parent7b02c0224c839d88bb61ee719d780f6a653eb4e2 (diff)
input/Init: use struct ConfigData
Diffstat (limited to 'src/input')
-rw-r--r--src/input/Init.cxx8
-rw-r--r--src/input/Init.hxx3
2 files changed, 6 insertions, 5 deletions
diff --git a/src/input/Init.cxx b/src/input/Init.cxx
index 12433175b..c9c4d5883 100644
--- a/src/input/Init.cxx
+++ b/src/input/Init.cxx
@@ -21,7 +21,7 @@
#include "Init.hxx"
#include "Registry.hxx"
#include "InputPlugin.hxx"
-#include "config/Global.hxx"
+#include "config/Data.hxx"
#include "config/Option.hxx"
#include "config/Block.hxx"
#include "Log.hxx"
@@ -33,7 +33,7 @@
#include <assert.h>
void
-input_stream_global_init(EventLoop &event_loop)
+input_stream_global_init(const ConfigData &config, EventLoop &event_loop)
{
const ConfigBlock empty;
@@ -45,8 +45,8 @@ input_stream_global_init(EventLoop &event_loop)
assert(plugin->open != nullptr);
const auto *block =
- config_find_block(ConfigBlockOption::INPUT, "plugin",
- plugin->name);
+ config.FindBlock(ConfigBlockOption::INPUT, "plugin",
+ plugin->name);
if (block == nullptr) {
block = &empty;
} else if (!block->GetBlockValue("enabled", true))
diff --git a/src/input/Init.hxx b/src/input/Init.hxx
index 0b73f8b0b..251344b40 100644
--- a/src/input/Init.hxx
+++ b/src/input/Init.hxx
@@ -20,13 +20,14 @@
#ifndef MPD_INPUT_INIT_HXX
#define MPD_INPUT_INIT_HXX
+struct ConfigData;
class EventLoop;
/**
* Initializes this library and all #InputStream implementations.
*/
void
-input_stream_global_init(EventLoop &event_loop);
+input_stream_global_init(const ConfigData &config, EventLoop &event_loop);
/**
* Deinitializes this library and all #InputStream implementations.