Steve DiBenedetto | 24b9a64 | 2014-04-07 15:45:39 -0600 | [diff] [blame] | 1 | /* -*- 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 Lehman | ee7c844 | 2015-07-16 16:42:19 -0500 | [diff] [blame^] | 28 | #include <ndn-cxx/name.hpp> |
| 29 | |
Steve DiBenedetto | 24b9a64 | 2014-04-07 15:45:39 -0600 | [diff] [blame] | 30 | namespace nfd { |
| 31 | |
| 32 | class ConfigFile; |
| 33 | |
| 34 | namespace general { |
| 35 | |
| 36 | void |
| 37 | setConfigFile(ConfigFile& configFile); |
| 38 | |
Vince Lehman | ee7c844 | 2015-07-16 16:42:19 -0500 | [diff] [blame^] | 39 | class RouterName |
| 40 | { |
| 41 | public: |
| 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 | |
| 55 | public: |
| 56 | ndn::PartialName network; |
| 57 | ndn::PartialName site; |
| 58 | ndn::PartialName router; |
| 59 | |
| 60 | static const ndn::PartialName ROUTER_MARKER; |
| 61 | }; |
| 62 | |
| 63 | const RouterName& |
| 64 | getRouterName(); |
| 65 | |
Steve DiBenedetto | 24b9a64 | 2014-04-07 15:45:39 -0600 | [diff] [blame] | 66 | } // namespace general |
| 67 | |
| 68 | } // namespace nfd |
| 69 | |
| 70 | #endif // NFD_MGMT_GENERAL_CONFIG_SECTION_HPP |