update: Refactor to use ndn-cxx dispatcher for prefix update/readvertise

refs: #3728

Change-Id: I3186433ed460850753f033a1d03fe27fd1fe889c
diff --git a/src/nlsr.hpp b/src/nlsr.hpp
index bb67f2d..1a3432a 100644
--- a/src/nlsr.hpp
+++ b/src/nlsr.hpp
@@ -22,21 +22,6 @@
 #ifndef NLSR_NLSR_HPP
 #define NLSR_NLSR_HPP
 
-#include <boost/cstdint.hpp>
-#include <stdexcept>
-#include <boost/throw_exception.hpp>
-
-#include <ndn-cxx/face.hpp>
-#include <ndn-cxx/security/key-chain.hpp>
-#include <ndn-cxx/security/certificate-cache-ttl.hpp>
-#include <ndn-cxx/util/scheduler.hpp>
-#include <ndn-cxx/mgmt/nfd/face-event-notification.hpp>
-#include <ndn-cxx/mgmt/nfd/face-monitor.hpp>
-#include <ndn-cxx/mgmt/dispatcher.hpp>
-#include <ndn-cxx/mgmt/nfd/face-status.hpp>
-#include <ndn-cxx/data.hpp>
-#include <ndn-cxx/encoding/block.hpp>
-
 #include "adjacency-list.hpp"
 #include "common.hpp"
 #include "conf-parameter.hpp"
@@ -54,6 +39,22 @@
 #include "update/nfd-rib-command-processor.hpp"
 #include "utility/name-helper.hpp"
 
+#include <stdexcept>
+
+#include <ndn-cxx/face.hpp>
+#include <ndn-cxx/security/key-chain.hpp>
+#include <ndn-cxx/security/certificate-cache-ttl.hpp>
+#include <ndn-cxx/util/scheduler.hpp>
+#include <ndn-cxx/mgmt/nfd/face-event-notification.hpp>
+#include <ndn-cxx/mgmt/nfd/face-monitor.hpp>
+#include <ndn-cxx/mgmt/dispatcher.hpp>
+#include <ndn-cxx/mgmt/nfd/face-status.hpp>
+#include <ndn-cxx/data.hpp>
+#include <ndn-cxx/encoding/block.hpp>
+
+#include <boost/cstdint.hpp>
+#include <boost/throw_exception.hpp>
+
 namespace nlsr {
 
 static ndn::Name DEFAULT_BROADCAST_PREFIX("/ndn/broadcast");
@@ -334,13 +335,13 @@
   }
 
   ndn::mgmt::Dispatcher&
-  getDispatcher()
+  getLocalhostDispatcher()
   {
     return m_localhostDispatcher;
   }
 
   ndn::mgmt::Dispatcher&
-  getDispatcherRouterName()
+  getRouterNameDispatcher()
   {
     return m_routerNameDispatcher;
   }
@@ -446,6 +447,7 @@
   RoutingTable m_routingTable;
   Fib m_fib;
   NamePrefixTable m_namePrefixTable;
+
   ndn::mgmt::Dispatcher m_localhostDispatcher;
   ndn::mgmt::Dispatcher m_routerNameDispatcher;