File name format change and Removed warning messages (Except warning from boost for Logging)
Change-Id: If3a3a5411d377d925527fc3e8809c228a9a81e26
diff --git a/src/nlsr.hpp b/src/nlsr.hpp
index 40a7de0..bef8189 100644
--- a/src/nlsr.hpp
+++ b/src/nlsr.hpp
@@ -5,258 +5,286 @@
#include <ndn-cpp-dev/security/key-chain.hpp>
#include <ndn-cpp-dev/util/scheduler.hpp>
-#include "nlsr_conf_param.hpp"
-#include "nlsr_adl.hpp"
-#include "nlsr_npl.hpp"
-#include "communication/nlsr_im.hpp"
-#include "communication/nlsr_dm.hpp"
-#include "nlsr_lsdb.hpp"
-#include "nlsr_sm.hpp"
-#include "route/nlsr_rt.hpp"
-#include "route/nlsr_npt.hpp"
-#include "route/nlsr_fib.hpp"
-#include "utility/nlsr_logger.hpp"
-#include "security/nlsr_km.hpp"
-#include "communication/nlsr_slh.hpp"
+#include "conf-parameter.hpp"
+#include "adl.hpp"
+#include "npl.hpp"
+#include "communication/interest-manager.hpp"
+#include "communication/data-manager.hpp"
+#include "lsdb.hpp"
+#include "sequencing-manager.hpp"
+#include "route/routing-table.hpp"
+#include "route/npt.hpp"
+#include "route/fib.hpp"
+#include "security/key-manager.hpp"
+#include "communication/sync-logic-handler.hpp"
-namespace nlsr
+namespace nlsr {
+
+inline static void
+NullDeleter(boost::asio::io_service* variable)
{
+ // do nothing
+}
- using namespace ndn;
- using namespace std;
+class Nlsr
+{
+public:
+ Nlsr()
+ : m_io(new boost::asio::io_service)
+ , m_nlsrFace(new Face(ndn::shared_ptr<boost::asio::io_service>(&*m_io,
+ &NullDeleter)))
+ , m_scheduler(*m_io)
+ , m_confParam()
+ , m_adl()
+ , m_npl()
+ , m_im()
+ , m_dm()
+ , m_sm()
+ , m_km()
+ , m_isDaemonProcess(false)
+ , m_configFileName("nlsr.conf")
+ , m_nlsrLsdb()
+ , m_adjBuildCount(0)
+ , m_isBuildAdjLsaSheduled(false)
+ , m_isRouteCalculationScheduled(false)
+ , m_isRoutingTableCalculating(false)
+ , m_routingTable()
+ , m_npt()
+ , m_fib()
+ , m_slh(m_io)
+ {}
- inline static void
- NullDeleter(boost::asio::io_service* variable)
+ void
+ registrationFailed(const ndn::Name& name);
+
+ void
+ setInterestFilterNlsr(const string& name);
+
+ void
+ startEventLoop();
+
+ int
+ usage(const string& progname);
+
+ std::string
+ getConfFileName()
{
- // do nothing
+ return m_configFileName;
}
- class Nlsr
+ void
+ setConfFileName(const string& fileName)
{
- public:
- Nlsr()
- : m_io(new boost::asio::io_service)
- , m_nlsrFace(new Face(shared_ptr<boost::asio::io_service>(&*m_io, &NullDeleter)))
- , m_scheduler(*m_io)
- , m_confParam()
- , m_adl()
- , m_npl()
- , m_im()
- , m_dm()
- , m_sm()
- , m_km()
- , isDaemonProcess(false)
- , m_configFileName("nlsr.conf")
- , m_nlsrLsdb()
- , m_adjBuildCount(0)
- , isBuildAdjLsaSheduled(0)
- , isRouteCalculationScheduled(0)
- , isRoutingTableCalculating(0)
- , m_routingTable()
- , m_npt()
- , m_fib()
- , m_slh(m_io)
- , m_nlsrLogger()
- {}
+ m_configFileName = fileName;
+ }
- void nlsrRegistrationFailed(const ndn::Name& name);
+ bool
+ getIsSetDaemonProcess()
+ {
+ return m_isDaemonProcess;
+ }
- void setInterestFilterNlsr(const string& name);
- void startEventLoop();
+ void
+ setIsDaemonProcess(bool value)
+ {
+ m_isDaemonProcess = value;
+ }
- int usage(const string& progname);
+ ConfParameter&
+ getConfParameter()
+ {
+ return m_confParam;
+ }
- string getConfFileName()
- {
- return m_configFileName;
- }
+ Adl&
+ getAdl()
+ {
+ return m_adl;
+ }
- void setConfFileName(const string& fileName)
- {
- m_configFileName=fileName;
- }
+ Npl&
+ getNpl()
+ {
+ return m_npl;
+ }
- bool getIsSetDaemonProcess()
- {
- return isDaemonProcess;
- }
+ ndn::shared_ptr<boost::asio::io_service>&
+ getIo()
+ {
+ return m_io;
+ }
- void setIsDaemonProcess(bool value)
- {
- isDaemonProcess=value;
- }
+ ndn::Scheduler&
+ getScheduler()
+ {
+ return m_scheduler;
+ }
- ConfParameter& getConfParameter()
- {
- return m_confParam;
- }
+ ndn::shared_ptr<ndn::Face>
+ getNlsrFace()
+ {
+ return m_nlsrFace;
+ }
- Adl& getAdl()
- {
- return m_adl;
- }
-
- Npl& getNpl()
- {
- return m_npl;
- }
-
- ndn::shared_ptr<boost::asio::io_service>& getIo()
- {
- return m_io;
- }
-
- ndn::Scheduler& getScheduler()
- {
- return m_scheduler;
- }
-
- ndn::shared_ptr<ndn::Face> getNlsrFace()
- {
- return m_nlsrFace;
- }
-
- KeyManager& getKeyManager()
- {
- return m_km;
- }
+ KeyManager&
+ getKeyManager()
+ {
+ return m_km;
+ }
- InterestManager& getIm()
- {
- return m_im;
- }
+ InterestManager&
+ getIm()
+ {
+ return m_im;
+ }
- DataManager& getDm()
- {
- return m_dm;
- }
+ DataManager&
+ getDm()
+ {
+ return m_dm;
+ }
- SequencingManager& getSm()
- {
- return m_sm;
- }
+ SequencingManager&
+ getSm()
+ {
+ return m_sm;
+ }
- Lsdb& getLsdb()
- {
- return m_nlsrLsdb;
- }
+ Lsdb&
+ getLsdb()
+ {
+ return m_nlsrLsdb;
+ }
- RoutingTable& getRoutingTable()
- {
- return m_routingTable;
- }
+ RoutingTable&
+ getRoutingTable()
+ {
+ return m_routingTable;
+ }
- Npt& getNpt()
- {
- return m_npt;
- }
+ Npt&
+ getNpt()
+ {
+ return m_npt;
+ }
- Fib& getFib()
- {
- return m_fib;
- }
+ Fib&
+ getFib()
+ {
+ return m_fib;
+ }
- long int getAdjBuildCount()
- {
- return m_adjBuildCount;
- }
+ long int
+ getAdjBuildCount()
+ {
+ return m_adjBuildCount;
+ }
- void incrementAdjBuildCount()
- {
- m_adjBuildCount++;
- }
+ void
+ incrementAdjBuildCount()
+ {
+ m_adjBuildCount++;
+ }
- void setAdjBuildCount(long int abc)
- {
- m_adjBuildCount=abc;
- }
+ void
+ setAdjBuildCount(long int abc)
+ {
+ m_adjBuildCount = abc;
+ }
- int getIsBuildAdjLsaSheduled()
- {
- return isBuildAdjLsaSheduled;
- }
+ int
+ getIsBuildAdjLsaSheduled()
+ {
+ return m_isBuildAdjLsaSheduled;
+ }
- void setIsBuildAdjLsaSheduled(bool iabls)
- {
- isBuildAdjLsaSheduled=iabls;
- }
+ void
+ setIsBuildAdjLsaSheduled(bool iabls)
+ {
+ m_isBuildAdjLsaSheduled = iabls;
+ }
- void setApiPort(int ap)
- {
- m_apiPort=ap;
- }
+ void
+ setApiPort(int ap)
+ {
+ m_apiPort = ap;
+ }
- int getApiPort()
- {
- return m_apiPort;
- }
+ int
+ getApiPort()
+ {
+ return m_apiPort;
+ }
- bool getIsRoutingTableCalculating()
- {
- return isRoutingTableCalculating;
- }
+ bool
+ getIsRoutingTableCalculating()
+ {
+ return m_isRoutingTableCalculating;
+ }
- void setIsRoutingTableCalculating(bool irtc)
- {
- isRoutingTableCalculating=irtc;
- }
+ void
+ setIsRoutingTableCalculating(bool irtc)
+ {
+ m_isRoutingTableCalculating = irtc;
+ }
- bool getIsRouteCalculationScheduled()
- {
- return isRouteCalculationScheduled;
- }
+ bool
+ getIsRouteCalculationScheduled()
+ {
+ return m_isRouteCalculationScheduled;
+ }
- void setIsRouteCalculationScheduled(bool ircs)
- {
- isRouteCalculationScheduled=ircs;
- }
+ void
+ setIsRouteCalculationScheduled(bool ircs)
+ {
+ m_isRouteCalculationScheduled = ircs;
+ }
- SyncLogicHandler& getSlh()
- {
- return m_slh;
- }
+ SyncLogicHandler&
+ getSlh()
+ {
+ return m_slh;
+ }
- NlsrLogger& getNlsrLogger()
- {
- return m_nlsrLogger;
- }
+ void
+ initialize();
- void initialize();
-
- private:
- ConfParameter m_confParam;
- Adl m_adl;
- Npl m_npl;
- ndn::shared_ptr<boost::asio::io_service> m_io;
- ndn::Scheduler m_scheduler;
- ndn::shared_ptr<ndn::Face> m_nlsrFace;
- InterestManager m_im;
- DataManager m_dm;
- SequencingManager m_sm;
- KeyManager m_km;
- bool isDaemonProcess;
- string m_configFileName;
- int m_apiPort;
-
- Lsdb m_nlsrLsdb;
- RoutingTable m_routingTable;
- Npt m_npt;
- Fib m_fib;
- SyncLogicHandler m_slh;
- NlsrLogger m_nlsrLogger;
-
- long int m_adjBuildCount;
- bool isBuildAdjLsaSheduled;
- bool isRouteCalculationScheduled;
- bool isRoutingTableCalculating;
+private:
+ ndn::shared_ptr<boost::asio::io_service> m_io;
+ ndn::shared_ptr<ndn::Face> m_nlsrFace;
+ ndn::Scheduler m_scheduler;
+ ConfParameter m_confParam;
+ Adl m_adl;
+ Npl m_npl;
+ InterestManager m_im;
+ DataManager m_dm;
+ SequencingManager m_sm;
+ KeyManager m_km;
+ bool m_isDaemonProcess;
+ string m_configFileName;
+ Lsdb m_nlsrLsdb;
- };
+
+ long int m_adjBuildCount;
+ bool m_isBuildAdjLsaSheduled;
+ bool m_isRouteCalculationScheduled;
+ bool m_isRoutingTableCalculating;
+
+ RoutingTable m_routingTable;
+ Npt m_npt;
+ Fib m_fib;
+ SyncLogicHandler m_slh;
+
+ int m_apiPort;
+
+
+};
} //namespace nlsr
-#endif
+#endif //NLSR_HPP