2020-09-13 11:44:34 +08:00
|
|
|
#include"Boss/Mod/ChannelCandidateInvestigator/Gumshoe.hpp"
|
2021-12-07 15:58:21 +08:00
|
|
|
#include"Boss/Mod/ChannelCandidateInvestigator/Janitor.hpp"
|
2020-09-13 11:44:34 +08:00
|
|
|
#include"Boss/Mod/ChannelCandidateInvestigator/Main.hpp"
|
|
|
|
|
#include"Boss/Mod/ChannelCandidateInvestigator/Manager.hpp"
|
|
|
|
|
#include"Boss/Mod/ChannelCandidateInvestigator/Secretary.hpp"
|
2020-09-15 18:11:35 +08:00
|
|
|
#include"Ev/Io.hpp"
|
2020-09-13 11:44:34 +08:00
|
|
|
#include"Util/make_unique.hpp"
|
|
|
|
|
|
|
|
|
|
namespace Boss { namespace Mod { namespace ChannelCandidateInvestigator {
|
|
|
|
|
|
|
|
|
|
Main::Main(Main&& o) : secretary(std::move(o.secretary))
|
2021-12-07 15:58:21 +08:00
|
|
|
, janitor(std::move(o.janitor))
|
2020-09-13 11:44:34 +08:00
|
|
|
, gumshoe(std::move(o.gumshoe))
|
|
|
|
|
, manager(std::move(o.manager))
|
|
|
|
|
{ }
|
|
|
|
|
Main::~Main() {}
|
|
|
|
|
|
2020-09-14 21:29:06 +08:00
|
|
|
Main::Main( S::Bus& bus
|
|
|
|
|
, InternetConnectionMonitor& imon
|
2020-09-13 11:44:34 +08:00
|
|
|
) : secretary(Util::make_unique<Secretary>())
|
2021-12-07 15:58:21 +08:00
|
|
|
, janitor(Util::make_unique<Janitor>(bus))
|
2020-09-13 11:44:34 +08:00
|
|
|
, gumshoe(Util::make_unique<Gumshoe>(bus))
|
|
|
|
|
{
|
|
|
|
|
manager = Util::make_unique<Manager>( bus
|
|
|
|
|
, *secretary
|
2021-12-07 15:58:21 +08:00
|
|
|
, *janitor
|
2020-09-13 11:44:34 +08:00
|
|
|
, *gumshoe
|
2020-09-14 21:29:06 +08:00
|
|
|
, imon
|
2020-09-13 11:44:34 +08:00
|
|
|
);
|
|
|
|
|
}
|
2020-09-15 18:11:35 +08:00
|
|
|
Ev::Io<std::vector<std::pair<Ln::NodeId, Ln::NodeId>>>
|
|
|
|
|
Main::get_channel_candidates() {
|
|
|
|
|
return manager->get_channel_candidates();
|
|
|
|
|
}
|
2020-09-13 11:44:34 +08:00
|
|
|
|
|
|
|
|
}}}
|