summaryrefslogtreecommitdiff
path: root/src/neighbor
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2018-07-17 23:11:33 +0200
committerMax Kellermann <max@musicpd.org>2018-07-17 23:11:33 +0200
commit4f678aa244156a21e37fee698bc0ad0bb41a477a (patch)
treee8f60ecfb8a5544aec02dc51e4c58a5ab8faf0d9 /src/neighbor
parent3a4a430f6ca3e3afb7e94b5f5738e1862b8b5222 (diff)
neighbor/Glue: use struct ConfigData
Diffstat (limited to 'src/neighbor')
-rw-r--r--src/neighbor/Glue.cxx7
-rw-r--r--src/neighbor/Glue.hxx4
2 files changed, 7 insertions, 4 deletions
diff --git a/src/neighbor/Glue.cxx b/src/neighbor/Glue.cxx
index 8ba1013c7..5118f54a3 100644
--- a/src/neighbor/Glue.cxx
+++ b/src/neighbor/Glue.cxx
@@ -23,7 +23,7 @@
#include "Explorer.hxx"
#include "NeighborPlugin.hxx"
#include "Info.hxx"
-#include "config/Global.hxx"
+#include "config/Data.hxx"
#include "config/Domain.hxx"
#include "config/Block.hxx"
#include "util/RuntimeError.hxx"
@@ -50,9 +50,10 @@ CreateNeighborExplorer(EventLoop &loop, NeighborListener &listener,
}
void
-NeighborGlue::Init(EventLoop &loop, NeighborListener &listener)
+NeighborGlue::Init(const ConfigData &config,
+ EventLoop &loop, NeighborListener &listener)
{
- for (const auto *block = config_get_block(ConfigBlockOption::NEIGHBORS);
+ for (const auto *block = config.GetBlock(ConfigBlockOption::NEIGHBORS);
block != nullptr; block = block->next) {
block->SetUsed();
diff --git a/src/neighbor/Glue.hxx b/src/neighbor/Glue.hxx
index 914419845..732841511 100644
--- a/src/neighbor/Glue.hxx
+++ b/src/neighbor/Glue.hxx
@@ -27,6 +27,7 @@
#include <forward_list>
#include <memory>
+struct ConfigData;
class EventLoop;
class NeighborExplorer;
class NeighborListener;
@@ -64,7 +65,8 @@ public:
/**
* Throws std::runtime_error on error.
*/
- void Init(EventLoop &loop, NeighborListener &listener);
+ void Init(const ConfigData &config, EventLoop &loop,
+ NeighborListener &listener);
void Open();
void Close() noexcept;