input/Init: use struct ConfigData
This commit is contained in:
@@ -570,7 +570,8 @@ try {
|
||||
}
|
||||
|
||||
client_manager_init();
|
||||
input_stream_global_init(instance->io_thread.GetEventLoop());
|
||||
input_stream_global_init(GetGlobalConfig(),
|
||||
instance->io_thread.GetEventLoop());
|
||||
playlist_list_global_init();
|
||||
|
||||
#ifdef ENABLE_DAEMON
|
||||
|
@@ -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 = ∅
|
||||
} else if (!block->GetBlockValue("enabled", true))
|
||||
|
@@ -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.
|
||||
|
Reference in New Issue
Block a user