blob: 519b00f2e86cf9f21fa529cf559b20a353ead7bc [file] [log] [blame]
Zhiyi Zhang8617a792017-01-17 16:45:56 -08001/* -*- 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
21#ifndef NDNCERT_COMMON_HPP
22#define NDNCERT_COMMON_HPP
23
24#include "ndncert-config.hpp"
25
Zhiyi Zhangdaf2fd72017-01-19 11:31:35 -080026#ifdef HAVE_TESTS
Zhiyi Zhang8617a792017-01-17 16:45:56 -080027#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>
52#include <ndn-cxx/encoding/block.hpp>
53#include <ndn-cxx/lp/nack.hpp>
54#include <ndn-cxx/util/backports.hpp>
55#include <ndn-cxx/util/face-uri.hpp>
56#include <ndn-cxx/util/signal.hpp>
57#include <ndn-cxx/security/v2/key-chain.hpp>
58#include <ndn-cxx/security/validator.hpp>
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
69namespace ndn {
70namespace ndncert {
71
72using std::size_t;
73
74using boost::noncopyable;
75
76using std::shared_ptr;
77using std::unique_ptr;
78using std::weak_ptr;
79using std::make_shared;
80using ndn::make_unique;
81using std::enable_shared_from_this;
82
83using std::function;
84using std::bind;
85
86using ndn::Interest;
87using ndn::Data;
88using ndn::Name;
89using ndn::PartialName;
90using ndn::Block;
91using ndn::time::system_clock;
92using ndn::time::toUnixTimestamp;
93
94} // namespace ndncert
95} // namespace ndn
96
97#endif // NDNCERT_COMMON_HPP