src: decouple classes from Nlsr object

refs: #1952, #2803, #3960, #4288

Change-Id: Ibe3ac3820f11e8107ee4b13e510d53c27467a6cb
diff --git a/src/nlsr-runner.hpp b/src/nlsr-runner.hpp
index af32e1e..afe653e 100644
--- a/src/nlsr-runner.hpp
+++ b/src/nlsr-runner.hpp
@@ -23,13 +23,11 @@
 #define NLSR_NLSR_RUNNER_HPP
 
 #include "nlsr.hpp"
+#include "conf-parameter.hpp"
 
 #include <ndn-cxx/face.hpp>
 #include <ndn-cxx/util/scheduler.hpp>
 
-// boost needs to be included after ndn-cxx, otherwise there will be conflict with _1, _2, ...
-#include <boost/asio/io_service.hpp>
-
 namespace nlsr {
 
 /*! \brief A wrapper class to instantiate and configure an NLSR object.
@@ -43,14 +41,8 @@
 class NlsrRunner
 {
 public:
-  class ConfFileError : public std::invalid_argument
-  {
-  public:
-    using std::invalid_argument::invalid_argument;
-  };
-
   explicit
-  NlsrRunner(const std::string& configFileName);
+  NlsrRunner(ndn::Face& face, ConfParameter& confParam);
 
   /*! \brief Instantiate, configure, and start the NLSR process.
    *
@@ -67,10 +59,9 @@
   run();
 
 private:
-  boost::asio::io_service m_ioService;
-  ndn::Scheduler m_scheduler;
-  ndn::Face m_face;
+  ndn::Face& m_face;
   ndn::KeyChain m_keyChain;
+  ConfParameter& m_confParam;
   Nlsr m_nlsr;
 };