src: decouple classes from Nlsr object
refs: #1952, #2803, #3960, #4288
Change-Id: Ibe3ac3820f11e8107ee4b13e510d53c27467a6cb
diff --git a/src/update/prefix-update-processor.cpp b/src/update/prefix-update-processor.cpp
index 3573ef0..6222198 100644
--- a/src/update/prefix-update-processor.cpp
+++ b/src/update/prefix-update-processor.cpp
@@ -51,11 +51,11 @@
}
PrefixUpdateProcessor::PrefixUpdateProcessor(ndn::mgmt::Dispatcher& dispatcher,
- ndn::Face& face,
+ ndn::security::ValidatorConfig& validator,
NamePrefixList& namePrefixList,
Lsdb& lsdb, const std::string& configFileName)
: CommandManagerBase(dispatcher, namePrefixList, lsdb, "prefix-update")
- , m_validator(std::make_unique<ndn::security::v2::CertificateFetcherDirectFetch>(face))
+ , m_validator(validator)
, m_configFileName(configFileName)
{
NLSR_LOG_DEBUG("Setting dispatcher to capture Interests for: "
@@ -178,14 +178,14 @@
}
ndn::optional<bool>
-PrefixUpdateProcessor::afterAdvertise(const ndn::Name& prefix) {
-
+PrefixUpdateProcessor::afterAdvertise(const ndn::Name& prefix)
+{
return addOrDeletePrefix(prefix, true);
}
ndn::optional<bool>
-PrefixUpdateProcessor::afterWithdraw(const ndn::Name& prefix) {
-
+PrefixUpdateProcessor::afterWithdraw(const ndn::Name& prefix)
+{
return addOrDeletePrefix(prefix, false);
}