29 const boost::property_tree::ptree &cfg,
44 for (
auto &&itr :
config_.get_child(
"module_config"))
47 std::vector<std::string> auth_sources;
48 std::vector<std::string> connects;
49 std::vector<std::string> binds;
51 for (
auto &&srcs : itr.second.get_child(
"sources"))
54 auto name = srcs.second.get<std::string>(
"");
55 auth_sources.push_back(name);
58 if (itr.second.get_child_optional(
"connect"))
60 for (
auto &&srcs : itr.second.get_child(
"connect"))
62 xmlnne_(
"endpoint", srcs.first);
63 auto name = srcs.second.get<std::string>(
"");
64 connects.push_back(name);
68 if (itr.second.get_child_optional(
"bind"))
70 for (
auto &&srcs : itr.second.get_child(
"bind"))
72 xmlnne_(
"endpoint", srcs.first);
73 auto name = srcs.second.get<std::string>(
"");
74 binds.push_back(name);
78 if (!(connects.empty() || binds.empty()))
80 ERROR(
"Bind or connect. Not both !");
85 int protocol_id = extractor.
get<
int>(
"protocol");
90 ERROR(
"Cannot instanciate a protocol number " << protocol_id);
93 auto ni = std::make_unique<NotifierInstance>(
94 ctx_,
reactor_, auth_sources, connects, binds, std::move(protocol));