blob: e86abd227481434fd76f8f491f0e04aa83f46abc [file] [log] [blame]
Steve DiBenedetto24b9a642014-04-07 15:45:39 -06001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2/**
3 * Copyright (c) 2014 Regents of the University of California,
4 * Arizona Board of Regents,
5 * Colorado State University,
6 * University Pierre & Marie Curie, Sorbonne University,
7 * Washington University in St. Louis,
8 * Beijing Institute of Technology
9 *
10 * This file is part of NFD (Named Data Networking Forwarding Daemon).
11 * See AUTHORS.md for complete list of NFD authors and contributors.
12 *
13 * NFD is free software: you can redistribute it and/or modify it under the terms
14 * of the GNU General Public License as published by the Free Software Foundation,
15 * either version 3 of the License, or (at your option) any later version.
16 *
17 * NFD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
18 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
19 * PURPOSE. See the GNU General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public License along with
22 * NFD, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
23 **/
24
25#ifndef NFD_MGMT_GENERAL_CONFIG_SECTION_HPP
26#define NFD_MGMT_GENERAL_CONFIG_SECTION_HPP
27
Vince Lehmanee7c8442015-07-16 16:42:19 -050028#include <ndn-cxx/name.hpp>
29
Steve DiBenedetto24b9a642014-04-07 15:45:39 -060030namespace nfd {
31
32class ConfigFile;
33
34namespace general {
35
36void
37setConfigFile(ConfigFile& configFile);
38
Vince Lehmanee7c8442015-07-16 16:42:19 -050039class RouterName
40{
41public:
42 /**
43 * \brief Return the router name constructed from the network, site, and
44 * router variables.
45 *
46 * The router name is constructed in the following manner:
47 * /<network>/<site>/<ROUTER_MARKER>/<router>
48 *
49 * \return The constructed router name if the network, site, and router
50 * configuration options are non-empty; otherwise, an empty ndn::Name.
51 */
52 const ndn::Name
53 getName() const;
54
55public:
56 ndn::PartialName network;
57 ndn::PartialName site;
58 ndn::PartialName router;
59
60 static const ndn::PartialName ROUTER_MARKER;
61};
62
63const RouterName&
64getRouterName();
65
Steve DiBenedetto24b9a642014-04-07 15:45:39 -060066} // namespace general
67
68} // namespace nfd
69
70#endif // NFD_MGMT_GENERAL_CONFIG_SECTION_HPP