akmhoque | 298385a | 2014-02-13 14:13:09 -0600 | [diff] [blame] | 1 | #ifndef CONF_PROCESSOR_HPP |
| 2 | #define CONF_PROCESSOR_HPP |
| 3 | |
akmhoque | 1fd8c1e | 2014-02-19 19:41:49 -0600 | [diff] [blame] | 4 | #include "nlsr.hpp" |
akmhoque | 298385a | 2014-02-13 14:13:09 -0600 | [diff] [blame] | 5 | |
akmhoque | 1fd8c1e | 2014-02-19 19:41:49 -0600 | [diff] [blame] | 6 | namespace nlsr |
| 7 | { |
akmhoque | b1710aa | 2014-02-19 17:13:36 -0600 | [diff] [blame] | 8 | |
akmhoque | 5a44dd4 | 2014-03-12 18:11:32 -0500 | [diff] [blame] | 9 | using namespace std; |
akmhoque | 298385a | 2014-02-13 14:13:09 -0600 | [diff] [blame] | 10 | |
akmhoque | 5a44dd4 | 2014-03-12 18:11:32 -0500 | [diff] [blame] | 11 | class ConfFileProcessor |
| 12 | { |
| 13 | public: |
| 14 | ConfFileProcessor() |
akmhoque | 05d5fcf | 2014-04-15 14:58:45 -0500 | [diff] [blame] | 15 | :m_confFileName() |
akmhoque | 1fd8c1e | 2014-02-19 19:41:49 -0600 | [diff] [blame] | 16 | { |
akmhoque | 5a44dd4 | 2014-03-12 18:11:32 -0500 | [diff] [blame] | 17 | } |
| 18 | ConfFileProcessor(const string& cfile) |
| 19 | { |
akmhoque | 05d5fcf | 2014-04-15 14:58:45 -0500 | [diff] [blame] | 20 | m_confFileName=cfile; |
akmhoque | 5a44dd4 | 2014-03-12 18:11:32 -0500 | [diff] [blame] | 21 | } |
akmhoque | 298385a | 2014-02-13 14:13:09 -0600 | [diff] [blame] | 22 | |
akmhoque | 5a44dd4 | 2014-03-12 18:11:32 -0500 | [diff] [blame] | 23 | int processConfFile(Nlsr& pnlsr); |
akmhoque | 298385a | 2014-02-13 14:13:09 -0600 | [diff] [blame] | 24 | |
akmhoque | 5a44dd4 | 2014-03-12 18:11:32 -0500 | [diff] [blame] | 25 | private: |
| 26 | int processConfCommand(Nlsr& pnlsr, string command); |
| 27 | int processConfCommandNetwork(Nlsr& pnlsr, string command); |
| 28 | int processConfCommandSiteName(Nlsr& pnlsr, string command); |
| 29 | int processConfCommandRootKeyPrefix(Nlsr& pnlsr, string command); |
| 30 | int processConfCommandRouterName(Nlsr& pnlsr, string command); |
| 31 | int processConfCommandInterestRetryNumber(Nlsr& pnlsr, string command); |
| 32 | int processConfCommandInterestResendTime(Nlsr& pnlsr, string command); |
| 33 | int processConfCommandLsaRefreshTime(Nlsr& pnlsr, string command); |
| 34 | int processConfCommandMaxFacesPerPrefix(Nlsr& pnlsr, string command); |
| 35 | int processConfCommandTunnelType(Nlsr& pnlsr, string command); |
akmhoque | 298385a | 2014-02-13 14:13:09 -0600 | [diff] [blame] | 36 | |
akmhoque | 5a44dd4 | 2014-03-12 18:11:32 -0500 | [diff] [blame] | 37 | int processConfCommandChronosyncSyncPrefix(Nlsr& pnlsr, string command); |
| 38 | int processConfCommandLogDir(Nlsr& pnlsr, string command); |
| 39 | int processConfCommandCertDir(Nlsr& pnlsr, string command); |
| 40 | int processConfCommandDebugging(Nlsr& pnlsr, string command); |
| 41 | int processConfCommandDetailedLogging(Nlsr& pnlsr, string command); |
| 42 | int processConfCommandIsHyperbolicCalc(Nlsr& pnlsr, string command); |
akmhoque | 298385a | 2014-02-13 14:13:09 -0600 | [diff] [blame] | 43 | |
akmhoque | 5a44dd4 | 2014-03-12 18:11:32 -0500 | [diff] [blame] | 44 | int processConfCommandHyperbolicCordinate(Nlsr& pnlsr, string command); |
| 45 | |
| 46 | int processConfCommandNdnNeighbor(Nlsr& pnlsr, string command); |
| 47 | int processConfCommandNdnName(Nlsr& pnlsr, string command); |
| 48 | int processConfCommandLinkCost(Nlsr& pnlsr, string command); |
akmhoque | 298385a | 2014-02-13 14:13:09 -0600 | [diff] [blame] | 49 | |
akmhoque | 1fd8c1e | 2014-02-19 19:41:49 -0600 | [diff] [blame] | 50 | |
akmhoque | 5a44dd4 | 2014-03-12 18:11:32 -0500 | [diff] [blame] | 51 | private: |
akmhoque | 05d5fcf | 2014-04-15 14:58:45 -0500 | [diff] [blame] | 52 | string m_confFileName; |
akmhoque | 5a44dd4 | 2014-03-12 18:11:32 -0500 | [diff] [blame] | 53 | }; |
akmhoque | 298385a | 2014-02-13 14:13:09 -0600 | [diff] [blame] | 54 | |
akmhoque | b1710aa | 2014-02-19 17:13:36 -0600 | [diff] [blame] | 55 | } //namespace nlsr |
akmhoque | 298385a | 2014-02-13 14:13:09 -0600 | [diff] [blame] | 56 | #endif |