blob: 61265b74c09bccb5fc5b0592c454a65d8944d093 [file] [log] [blame]
akmhoquefdbddb12014-05-02 18:35:19 -05001#ifndef CONF_FILE_PROCESSOR_HPP
2#define CONF_FILE_PROCESSOR_HPP
akmhoque53353462014-04-22 08:43:45 -05003
akmhoquefdbddb12014-05-02 18:35:19 -05004#include <boost/cstdint.hpp>
akmhoque53353462014-04-22 08:43:45 -05005#include "nlsr.hpp"
6
7namespace nlsr {
akmhoqueb6450b12014-04-24 00:01:03 -05008
akmhoque53353462014-04-22 08:43:45 -05009class ConfFileProcessor
10{
11public:
akmhoquefdbddb12014-05-02 18:35:19 -050012 ConfFileProcessor(Nlsr& nlsr, const std::string& cfile)
akmhoqueb6450b12014-04-24 00:01:03 -050013 : m_confFileName(cfile)
14 , m_nlsr(nlsr)
akmhoque53353462014-04-22 08:43:45 -050015 {
16 }
17
akmhoqueb6450b12014-04-24 00:01:03 -050018 int processConfFile();
akmhoque53353462014-04-22 08:43:45 -050019
20private:
21 int
akmhoquefdbddb12014-05-02 18:35:19 -050022 processConfCommand(std::string command);
akmhoque53353462014-04-22 08:43:45 -050023
24 int
akmhoquefdbddb12014-05-02 18:35:19 -050025 processConfCommandNetwork(std::string command);
akmhoque53353462014-04-22 08:43:45 -050026
27 int
akmhoquefdbddb12014-05-02 18:35:19 -050028 processConfCommandSiteName(std::string command);
akmhoque53353462014-04-22 08:43:45 -050029
30 int
akmhoquefdbddb12014-05-02 18:35:19 -050031 processConfCommandRootKeyPrefix(std::string command);
akmhoque53353462014-04-22 08:43:45 -050032
33 int
akmhoquefdbddb12014-05-02 18:35:19 -050034 processConfCommandRouterName(std::string command);
akmhoque53353462014-04-22 08:43:45 -050035
36 int
akmhoquefdbddb12014-05-02 18:35:19 -050037 processConfCommandInterestRetryNumber(std::string command);
akmhoque53353462014-04-22 08:43:45 -050038
39 int
akmhoquefdbddb12014-05-02 18:35:19 -050040 processConfCommandInterestResendTime(std::string command);
akmhoque53353462014-04-22 08:43:45 -050041
42 int
akmhoquefdbddb12014-05-02 18:35:19 -050043 processConfCommandLsaRefreshTime(std::string command);
akmhoque53353462014-04-22 08:43:45 -050044
45 int
akmhoquefdbddb12014-05-02 18:35:19 -050046 processConfCommandMaxFacesPerPrefix(std::string command);
akmhoque53353462014-04-22 08:43:45 -050047
48 int
akmhoquefdbddb12014-05-02 18:35:19 -050049 processConfCommandTunnelType(std::string command);
akmhoque53353462014-04-22 08:43:45 -050050
51 int
akmhoquefdbddb12014-05-02 18:35:19 -050052 processConfCommandChronosyncSyncPrefix(std::string command);
akmhoque53353462014-04-22 08:43:45 -050053
54 int
akmhoquefdbddb12014-05-02 18:35:19 -050055 processConfCommandLogDir(std::string command);
akmhoque53353462014-04-22 08:43:45 -050056
57 int
akmhoquefdbddb12014-05-02 18:35:19 -050058 processConfCommandCertDir(std::string command);
akmhoque53353462014-04-22 08:43:45 -050059
60 int
akmhoquefdbddb12014-05-02 18:35:19 -050061 processConfCommandDebugging(std::string command);
akmhoque53353462014-04-22 08:43:45 -050062
63 int
akmhoquefdbddb12014-05-02 18:35:19 -050064 processConfCommandDetailedLogging(std::string command);
akmhoque53353462014-04-22 08:43:45 -050065
66 int
akmhoquefdbddb12014-05-02 18:35:19 -050067 processConfCommandIsHyperbolicCalc(std::string command);
akmhoque53353462014-04-22 08:43:45 -050068
69 int
akmhoquefdbddb12014-05-02 18:35:19 -050070 processConfCommandHyperbolicCordinate(std::string command);
akmhoque53353462014-04-22 08:43:45 -050071
72 int
akmhoquefdbddb12014-05-02 18:35:19 -050073 processConfCommandNdnNeighbor(std::string command);
akmhoque53353462014-04-22 08:43:45 -050074
75 int
akmhoquefdbddb12014-05-02 18:35:19 -050076 processConfCommandNdnName(std::string command);
akmhoque53353462014-04-22 08:43:45 -050077
78 int
akmhoquefdbddb12014-05-02 18:35:19 -050079 processConfCommandLinkCost(std::string command);
akmhoque53353462014-04-22 08:43:45 -050080
81
82private:
akmhoquefdbddb12014-05-02 18:35:19 -050083 std::string m_confFileName;
akmhoqueb6450b12014-04-24 00:01:03 -050084 Nlsr& m_nlsr;
akmhoque53353462014-04-22 08:43:45 -050085};
86
87} //namespace nlsr
akmhoquefdbddb12014-05-02 18:35:19 -050088#endif //CONF_FILE_PROCESSOR_HPP