blob: e86def2ce3349fa79cb156cbe0bb84777664cbde [file] [log] [blame]
Yingdi Yu92672512015-03-24 13:59:33 -07001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2/**
Alexander Afanasyevbe998ac2017-05-06 13:11:42 -07003 * Copyright (c) 2014-2017, Regents of the University of California
Yingdi Yu92672512015-03-24 13:59:33 -07004 *
Alexander Afanasyevbe998ac2017-05-06 13:11:42 -07005 * This file is part of NDN DeLorean, An Authentication System for Data Archives in
6 * Named Data Networking. See AUTHORS.md for complete list of NDN DeLorean authors
7 * and contributors.
Yingdi Yu92672512015-03-24 13:59:33 -07008 *
Alexander Afanasyevbe998ac2017-05-06 13:11:42 -07009 * NDN DeLorean is free software: you can redistribute it and/or modify it under
10 * the terms of the GNU General Public License as published by the Free Software
11 * Foundation, either version 3 of the License, or (at your option) any later
12 * version.
Yingdi Yu92672512015-03-24 13:59:33 -070013 *
Alexander Afanasyevbe998ac2017-05-06 13:11:42 -070014 * NDN DeLorean is distributed in the hope that it will be useful, but WITHOUT ANY
15 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
16 * PARTICULAR PURPOSE. See the GNU General Public License for more details.
Yingdi Yu92672512015-03-24 13:59:33 -070017 *
Alexander Afanasyevbe998ac2017-05-06 13:11:42 -070018 * You should have received a copy of the GNU General Public License along with NDN
19 * DeLorean, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
Yingdi Yu92672512015-03-24 13:59:33 -070020 */
21
Alexander Afanasyevbe998ac2017-05-06 13:11:42 -070022#ifndef NDN_DELOREAN_CONF_CONFIG_FILE_HPP
23#define NDN_DELOREAN_CONF_CONFIG_FILE_HPP
Yingdi Yu92672512015-03-24 13:59:33 -070024
25#include "common.hpp"
26#include "config.hpp"
27
28namespace nsl {
29namespace conf {
30class ConfigFile
31{
32public:
33 ConfigFile(const std::string& filename);
34
35 void
36 parse();
37
38 const std::string&
39 getConfFileName() const
40 {
41 return m_filename;
42 }
43
44 const Name&
45 getLoggerName() const
46 {
47 return m_loggerName;
48 }
49
50 const std::string&
51 getDbDir() const
52 {
53 return m_dbDir;
54 }
55
56 const ConfigSection&
57 getPolicy() const
58 {
59 return m_policy;
60 }
61
62 const ConfigSection&
63 getValidatorRule() const
64 {
65 return m_validatorRule;
66 }
67
68private:
69 std::string m_filename;
70 Name m_loggerName;
71 std::string m_dbDir;
72 ConfigSection m_policy;
73 ConfigSection m_validatorRule;
74};
75
76} // namespace conf
77} // namespace nsl
78
Alexander Afanasyevbe998ac2017-05-06 13:11:42 -070079#endif // NDN_DELOREAN_CONF_CONFIG_FILE_HPP