summaryrefslogtreecommitdiff
path: root/src/playlist
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2018-07-17 22:10:32 +0200
committerMax Kellermann <max@musicpd.org>2018-07-17 22:10:32 +0200
commit61a119b607e082978f7e8695cba22867253129bc (patch)
tree43e837b58e8cbb6c769f4b0549b242265c735257 /src/playlist
parentea5096ac905e9871adf72f5abcb26b14a7a88812 (diff)
playlist/Registry: use struct ConfigData
Diffstat (limited to 'src/playlist')
-rw-r--r--src/playlist/PlaylistRegistry.cxx8
-rw-r--r--src/playlist/PlaylistRegistry.hxx3
2 files changed, 6 insertions, 5 deletions
diff --git a/src/playlist/PlaylistRegistry.cxx b/src/playlist/PlaylistRegistry.cxx
index 8736546b2..62f5e03b8 100644
--- a/src/playlist/PlaylistRegistry.cxx
+++ b/src/playlist/PlaylistRegistry.cxx
@@ -36,7 +36,7 @@
#include "util/UriUtil.hxx"
#include "util/StringUtil.hxx"
#include "util/Macros.hxx"
-#include "config/Global.hxx"
+#include "config/Data.hxx"
#include "config/Block.hxx"
#include <assert.h>
@@ -75,15 +75,15 @@ static bool playlist_plugins_enabled[n_playlist_plugins];
if (playlist_plugins_enabled[playlist_plugin_iterator - playlist_plugins])
void
-playlist_list_global_init(void)
+playlist_list_global_init(const ConfigData &config)
{
const ConfigBlock empty;
for (unsigned i = 0; playlist_plugins[i] != nullptr; ++i) {
const struct playlist_plugin *plugin = playlist_plugins[i];
const auto *param =
- config_find_block(ConfigBlockOption::PLAYLIST_PLUGIN,
- "name", plugin->name);
+ config.FindBlock(ConfigBlockOption::PLAYLIST_PLUGIN,
+ "name", plugin->name);
if (param == nullptr)
param = &empty;
else if (!param->GetBlockValue("enabled", true))
diff --git a/src/playlist/PlaylistRegistry.hxx b/src/playlist/PlaylistRegistry.hxx
index a651818f6..9f56dddf1 100644
--- a/src/playlist/PlaylistRegistry.hxx
+++ b/src/playlist/PlaylistRegistry.hxx
@@ -23,6 +23,7 @@
#include "input/Ptr.hxx"
#include "Compiler.h"
+struct ConfigData;
class Mutex;
class SongEnumerator;
@@ -38,7 +39,7 @@ extern const struct playlist_plugin *const playlist_plugins[];
* Initializes all playlist plugins.
*/
void
-playlist_list_global_init();
+playlist_list_global_init(const ConfigData &config);
/**
* Deinitializes all playlist plugins.