blob: ee119f68906a305e603f7065de2fd051e3225d30 [file] [log] [blame]
Obaid5748c0c2014-04-09 18:00:42 -05001#ifndef NRD_CONFIG_HPP
2#define NRD_CONFIG_HPP
3
4#include "common.hpp"
5
6namespace ndn {
7namespace nrd {
8
9typedef boost::property_tree::ptree ConfigSection;
10
11class NrdConfig
12{
13
14public:
15 NrdConfig();
16
17 virtual
18 ~NrdConfig()
19 {
20 }
21
22 void
23 load(const std::string& filename);
24
25 void
26 load(const std::string& input, const std::string& filename);
27
28 void
29 load(std::istream& input, const std::string& filename);
30
31 const ConfigSection&
32 getSecuritySection() const
33 {
34 return m_securitySection;
35 }
36
37private:
38 void
39 process(const ConfigSection& configSection,
40 const std::string& filename);
41
42 void
43 onSectionSecurity(const ConfigSection& section,
44 const std::string& filename);
45
46 const void
47 setSecturitySection(const ConfigSection& securitySection)
48 {
49 m_securitySection = securitySection;
50 }
51
52private:
53 bool m_isSecuritySectionDefined;
54 ConfigSection m_securitySection;
55 std::string m_filename;
56};
57
58}//namespace nrd
59}//namespace ndn
60
61#endif // NRD_CONFIG_HPP