Zhiyi Zhang | 8617a79 | 2017-01-17 16:45:56 -0800 | [diff] [blame] | 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
| 2 | /** |
| 3 | * Copyright (c) 2017, Regents of the University of California. |
| 4 | * |
| 5 | * This file is part of ndncert, a certificate management system based on NDN. |
| 6 | * |
| 7 | * ndncert is free software: you can redistribute it and/or modify it under the terms |
| 8 | * of the GNU General Public License as published by the Free Software Foundation, either |
| 9 | * version 3 of the License, or (at your option) any later version. |
| 10 | * |
| 11 | * ndncert is distributed in the hope that it will be useful, but WITHOUT ANY |
| 12 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A |
| 13 | * PARTICULAR PURPOSE. See the GNU General Public License for more details. |
| 14 | * |
| 15 | * You should have received copies of the GNU General Public License along with |
| 16 | * ndncert, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>. |
| 17 | * |
| 18 | * See AUTHORS.md for complete list of ndncert authors and contributors. |
| 19 | */ |
| 20 | |
Zhiyi Zhang | b6fab0f | 2017-09-21 16:26:27 -0700 | [diff] [blame] | 21 | #ifndef NDNCERT_NDNCERT_COMMON_HPP |
| 22 | #define NDNCERT_NDNCERT_COMMON_HPP |
Zhiyi Zhang | 8617a79 | 2017-01-17 16:45:56 -0800 | [diff] [blame] | 23 | |
| 24 | #include "ndncert-config.hpp" |
| 25 | |
Zhiyi Zhang | daf2fd7 | 2017-01-19 11:31:35 -0800 | [diff] [blame] | 26 | #ifdef HAVE_TESTS |
Zhiyi Zhang | 8617a79 | 2017-01-17 16:45:56 -0800 | [diff] [blame] | 27 | #define VIRTUAL_WITH_TESTS virtual |
| 28 | #define PUBLIC_WITH_TESTS_ELSE_PROTECTED public |
| 29 | #define PUBLIC_WITH_TESTS_ELSE_PRIVATE public |
| 30 | #define PROTECTED_WITH_TESTS_ELSE_PRIVATE protected |
| 31 | #else |
| 32 | #define VIRTUAL_WITH_TESTS |
| 33 | #define PUBLIC_WITH_TESTS_ELSE_PROTECTED protected |
| 34 | #define PUBLIC_WITH_TESTS_ELSE_PRIVATE private |
| 35 | #define PROTECTED_WITH_TESTS_ELSE_PRIVATE private |
| 36 | #endif |
| 37 | |
| 38 | #include <cstddef> |
| 39 | #include <cstdint> |
| 40 | #include <functional> |
| 41 | #include <list> |
| 42 | #include <map> |
| 43 | #include <memory> |
| 44 | #include <set> |
| 45 | #include <string> |
| 46 | #include <unordered_map> |
| 47 | #include <utility> |
| 48 | |
| 49 | #include <ndn-cxx/interest.hpp> |
| 50 | #include <ndn-cxx/data.hpp> |
| 51 | #include <ndn-cxx/name.hpp> |
Zhiyi Zhang | b6fab0f | 2017-09-21 16:26:27 -0700 | [diff] [blame] | 52 | #include <ndn-cxx/face.hpp> |
| 53 | #include <ndn-cxx/link.hpp> |
Zhiyi Zhang | 8617a79 | 2017-01-17 16:45:56 -0800 | [diff] [blame] | 54 | #include <ndn-cxx/encoding/block.hpp> |
| 55 | #include <ndn-cxx/lp/nack.hpp> |
| 56 | #include <ndn-cxx/util/backports.hpp> |
Zhiyi Zhang | 8617a79 | 2017-01-17 16:45:56 -0800 | [diff] [blame] | 57 | #include <ndn-cxx/util/signal.hpp> |
Zhiyi Zhang | b6fab0f | 2017-09-21 16:26:27 -0700 | [diff] [blame] | 58 | #include <ndn-cxx/security/key-chain.hpp> |
Zhiyi Zhang | 8617a79 | 2017-01-17 16:45:56 -0800 | [diff] [blame] | 59 | #include <ndn-cxx/security/v2/certificate.hpp> |
| 60 | |
| 61 | #include <boost/algorithm/string.hpp> |
| 62 | #include <boost/assert.hpp> |
| 63 | #include <boost/noncopyable.hpp> |
| 64 | #include <boost/property_tree/ptree.hpp> |
| 65 | #include <boost/property_tree/json_parser.hpp> |
| 66 | #include <boost/property_tree/info_parser.hpp> |
| 67 | #include <boost/throw_exception.hpp> |
| 68 | |
| 69 | namespace ndn { |
| 70 | namespace ndncert { |
| 71 | |
| 72 | using std::size_t; |
| 73 | |
| 74 | using boost::noncopyable; |
| 75 | |
| 76 | using std::shared_ptr; |
| 77 | using std::unique_ptr; |
| 78 | using std::weak_ptr; |
| 79 | using std::make_shared; |
| 80 | using ndn::make_unique; |
| 81 | using std::enable_shared_from_this; |
| 82 | |
| 83 | using std::function; |
| 84 | using std::bind; |
| 85 | |
| 86 | using ndn::Interest; |
| 87 | using ndn::Data; |
| 88 | using ndn::Name; |
| 89 | using ndn::PartialName; |
| 90 | using ndn::Block; |
| 91 | using ndn::time::system_clock; |
| 92 | using ndn::time::toUnixTimestamp; |
| 93 | |
| 94 | } // namespace ndncert |
| 95 | } // namespace ndn |
| 96 | |
Zhiyi Zhang | b6fab0f | 2017-09-21 16:26:27 -0700 | [diff] [blame] | 97 | #endif // NDNCERT_NDNCERT_COMMON_HPP |