[ndnSIM] Hack rib::Service so it can be used in ndnSIM directly
Change-Id: Iefc1e294d376d85c61530fd828f93871cd2e4b17
diff --git a/daemon/rib/service.hpp b/daemon/rib/service.hpp
index ca5f57b..21f7d77 100644
--- a/daemon/rib/service.hpp
+++ b/daemon/rib/service.hpp
@@ -52,26 +52,7 @@
class Service : noncopyable
{
public:
- /**
- * \brief create NFD-RIB service
- * \param configFile absolute or relative path of configuration file
- * \param keyChain the KeyChain
- * \throw std::logic_error Instance of rib::Service has been already constructed
- * \throw std::logic_error Instance of rib::Service is not constructed on RIB thread
- */
- Service(const std::string& configFile, ndn::KeyChain& keyChain);
-
- /**
- * \brief create NFD-RIB service
- * \param configSection parsed configuration section
- * \param keyChain the KeyChain
- * \note This constructor overload is more appropriate for integrated environments,
- * such as NS-3 or android. Error messages related to configuration file
- * will use "internal://nfd.conf" as configuration filename.
- * \throw std::logic_error Instance of rib::Service has been already constructed
- * \throw std::logic_error Instance of rib::Service is not constructed on RIB thread
- */
- Service(const ConfigSection& configSection, ndn::KeyChain& keyChain);
+ Service(const ConfigSection& configSection, ndn::Face& face, ndn::KeyChain& keyChain);
/**
* \brief Destructor
@@ -94,7 +75,7 @@
private:
template<typename ConfigParseFunc>
- Service(ndn::KeyChain& keyChain, shared_ptr<ndn::Transport> localNfdTransport,
+ Service(ndn::KeyChain& keyChain, ndn::Face& face,
const ConfigParseFunc& configParse);
void
@@ -107,10 +88,9 @@
applyConfig(const ConfigSection& section, const std::string& filename);
private:
- static Service* s_instance;
-
ndn::KeyChain& m_keyChain;
- ndn::Face m_face;
+ ndn::Face& m_face;
+ ndn::util::Scheduler m_scheduler;
ndn::nfd::Controller m_nfdController;
Rib m_rib;