src: decouple classes from Nlsr object
refs: #1952, #2803, #3960, #4288
Change-Id: Ibe3ac3820f11e8107ee4b13e510d53c27467a6cb
diff --git a/src/publisher/dataset-interest-handler.cpp b/src/publisher/dataset-interest-handler.cpp
index 6e2e7d1..6fe9d4f 100644
--- a/src/publisher/dataset-interest-handler.cpp
+++ b/src/publisher/dataset-interest-handler.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2014-2018, The University of Memphis,
+ * Copyright (c) 2014-2019, The University of Memphis,
* Regents of the University of California,
* Arizona Board of Regents.
*
@@ -36,13 +36,11 @@
const ndn::PartialName NAMES_DATASET = ndn::PartialName("lsdb/names");
const ndn::PartialName RT_DATASET = ndn::PartialName("routing-table");
-DatasetInterestHandler::DatasetInterestHandler(const Lsdb& lsdb,
- const RoutingTable& rt,
- ndn::mgmt::Dispatcher& dispatcher,
- const ndn::Face& face,
- const ndn::KeyChain& keyChain)
- : m_lsdb(lsdb)
- , m_dispatcher(dispatcher)
+DatasetInterestHandler::DatasetInterestHandler(ndn::mgmt::Dispatcher& dispatcher,
+ const Lsdb& lsdb,
+ const RoutingTable& rt)
+ : m_dispatcher(dispatcher)
+ , m_lsdb(lsdb)
, m_routingTableEntries(rt.getRoutingTableEntry())
, m_dryRoutingTableEntries(rt.getDryRoutingTableEntry())
{
diff --git a/src/publisher/dataset-interest-handler.hpp b/src/publisher/dataset-interest-handler.hpp
index 6e5169d..2822ae5 100644
--- a/src/publisher/dataset-interest-handler.hpp
+++ b/src/publisher/dataset-interest-handler.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2014-2018, The University of Memphis,
+ * Copyright (c) 2014-2019, The University of Memphis,
* Regents of the University of California,
* Arizona Board of Regents.
*
@@ -72,23 +72,9 @@
}
};
- DatasetInterestHandler(const Lsdb& lsdb,
- const RoutingTable& rt,
- ndn::mgmt::Dispatcher& dispatcher,
- const ndn::Face& face,
- const ndn::KeyChain& keyChain);
-
- ndn::Name&
- getRouterNameCommandPrefix()
- {
- return m_routerNamePrefix;
- }
-
- void
- setRouterNameCommandPrefix(const ndn::Name& routerName) {
- m_routerNamePrefix = routerName;
- m_routerNamePrefix.append(Lsdb::NAME_COMPONENT);
- }
+ DatasetInterestHandler(ndn::mgmt::Dispatcher& dispatcher,
+ const Lsdb& lsdb,
+ const RoutingTable& rt);
private:
/*! \brief set dispatcher for localhost or remote router
@@ -126,10 +112,8 @@
ndn::mgmt::StatusDatasetContext& context);
private:
- const Lsdb& m_lsdb;
- ndn::Name m_routerNamePrefix;
-
ndn::mgmt::Dispatcher& m_dispatcher;
+ const Lsdb& m_lsdb;
const std::list<RoutingTableEntry>& m_routingTableEntries;
const std::list<RoutingTableEntry>& m_dryRoutingTableEntries;