Jeff Thompson | 25b4e61 | 2013-10-10 16:03:24 -0700 | [diff] [blame] | 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */ |
Jeff Thompson | aa4e6db | 2013-07-15 17:25:23 -0700 | [diff] [blame] | 2 | /** |
Alexander Afanasyev | dfa52c4 | 2014-04-24 21:10:11 -0700 | [diff] [blame] | 3 | * Copyright (c) 2013-2014, Regents of the University of California. |
| 4 | * All rights reserved. |
| 5 | * |
| 6 | * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions). |
| 7 | * See AUTHORS.md for complete list of ndn-cxx authors and contributors. |
| 8 | * |
| 9 | * This file licensed under New BSD License. See COPYING for detailed information about |
| 10 | * ndn-cxx library copyright, permissions, and redistribution restrictions. |
| 11 | * |
| 12 | * Based on code originally written by Jeff Thompson <jefft0@remap.ucla.edu> |
Jeff Thompson | aa4e6db | 2013-07-15 17:25:23 -0700 | [diff] [blame] | 13 | */ |
| 14 | |
Jeff Thompson | b9e3c8e | 2013-08-02 11:42:51 -0700 | [diff] [blame] | 15 | #ifndef NDN_FACE_HPP |
Jeff Thompson | a0d18c9 | 2013-08-06 13:55:32 -0700 | [diff] [blame] | 16 | #define NDN_FACE_HPP |
Jeff Thompson | aa4e6db | 2013-07-15 17:25:23 -0700 | [diff] [blame] | 17 | |
Alexander Afanasyev | 0222fba | 2014-02-09 23:16:02 -0800 | [diff] [blame] | 18 | #include "common.hpp" |
| 19 | #include "interest.hpp" |
| 20 | #include "data.hpp" |
Alexander Afanasyev | 984ad19 | 2014-05-02 19:11:15 -0700 | [diff] [blame] | 21 | #include "security/identity-certificate.hpp" |
Alexander Afanasyev | 0222fba | 2014-02-09 23:16:02 -0800 | [diff] [blame] | 22 | |
Alexander Afanasyev | e2e0d75 | 2014-01-03 13:30:30 -0800 | [diff] [blame] | 23 | #include "transport/transport.hpp" |
| 24 | #include "transport/unix-transport.hpp" |
Alexander Afanasyev | 20d2c58 | 2014-01-26 15:32:51 -0800 | [diff] [blame] | 25 | #include "transport/tcp-transport.hpp" |
Jeff Thompson | beb8b7d | 2013-07-16 15:49:21 -0700 | [diff] [blame] | 26 | |
Alexander Afanasyev | aa0e7da | 2014-03-17 14:37:33 -0700 | [diff] [blame] | 27 | #include "util/scheduler.hpp" |
Alexander Afanasyev | 0222fba | 2014-02-09 23:16:02 -0800 | [diff] [blame] | 28 | #include "detail/registered-prefix.hpp" |
| 29 | #include "detail/pending-interest.hpp" |
| 30 | |
Jeff Thompson | aa4e6db | 2013-07-15 17:25:23 -0700 | [diff] [blame] | 31 | namespace ndn { |
| 32 | |
Alexander Afanasyev | ee8bb1e | 2014-05-02 17:39:54 -0700 | [diff] [blame] | 33 | namespace nfd { |
| 34 | class Controller; |
| 35 | } |
Alexander Afanasyev | ee8bb1e | 2014-05-02 17:39:54 -0700 | [diff] [blame] | 36 | |
Jeff Thompson | fe08e5a | 2013-08-13 11:15:59 -0700 | [diff] [blame] | 37 | /** |
Alexander Afanasyev | 984ad19 | 2014-05-02 19:11:15 -0700 | [diff] [blame] | 38 | * @brief Callback called when expressed Interest gets satisfied with Data packet |
Alexander Afanasyev | 0222fba | 2014-02-09 23:16:02 -0800 | [diff] [blame] | 39 | */ |
| 40 | typedef function<void(const Interest&, Data&)> OnData; |
| 41 | |
| 42 | /** |
Alexander Afanasyev | 984ad19 | 2014-05-02 19:11:15 -0700 | [diff] [blame] | 43 | * @brief Callback called when expressed Interest times out |
Alexander Afanasyev | 0222fba | 2014-02-09 23:16:02 -0800 | [diff] [blame] | 44 | */ |
| 45 | typedef function<void(const Interest&)> OnTimeout; |
| 46 | |
| 47 | /** |
Alexander Afanasyev | 984ad19 | 2014-05-02 19:11:15 -0700 | [diff] [blame] | 48 | * @brief Callback called when incoming Interest matches the specified InterestFilter |
Alexander Afanasyev | 0222fba | 2014-02-09 23:16:02 -0800 | [diff] [blame] | 49 | */ |
Alexander Afanasyev | 9016496 | 2014-03-06 08:29:59 +0000 | [diff] [blame] | 50 | typedef function<void (const InterestFilter&, const Interest&)> OnInterest; |
Alexander Afanasyev | 0222fba | 2014-02-09 23:16:02 -0800 | [diff] [blame] | 51 | |
| 52 | /** |
Alexander Afanasyev | 984ad19 | 2014-05-02 19:11:15 -0700 | [diff] [blame] | 53 | * @brief Callback called when registerPrefix or setInterestFilter command succeeds |
Alexander Afanasyev | 0222fba | 2014-02-09 23:16:02 -0800 | [diff] [blame] | 54 | */ |
Alexander Afanasyev | 984ad19 | 2014-05-02 19:11:15 -0700 | [diff] [blame] | 55 | typedef function<void(const Name&)> RegisterPrefixSuccessCallback; |
Alexander Afanasyev | 0222fba | 2014-02-09 23:16:02 -0800 | [diff] [blame] | 56 | |
Alexander Afanasyev | 984ad19 | 2014-05-02 19:11:15 -0700 | [diff] [blame] | 57 | /** |
| 58 | * @brief Callback called when registerPrefix or setInterestFilter command fails |
| 59 | */ |
| 60 | typedef function<void(const Name&, const std::string&)> RegisterPrefixFailureCallback; |
| 61 | |
| 62 | /** |
| 63 | * @brief Callback called when unregisterPrefix or unsetInterestFilter command succeeds |
| 64 | */ |
| 65 | typedef function<void()> UnregisterPrefixSuccessCallback; |
| 66 | |
| 67 | /** |
| 68 | * @brief Callback called when unregisterPrefix or unsetInterestFilter command fails |
| 69 | */ |
| 70 | typedef function<void(const std::string&)> UnregisterPrefixFailureCallback; |
Alexander Afanasyev | 0222fba | 2014-02-09 23:16:02 -0800 | [diff] [blame] | 71 | |
| 72 | |
| 73 | /** |
| 74 | * @brief Abstraction to communicate with local or remote NDN forwarder |
Jeff Thompson | fe08e5a | 2013-08-13 11:15:59 -0700 | [diff] [blame] | 75 | */ |
Alexander Afanasyev | 8460afb | 2014-02-15 20:31:42 -0800 | [diff] [blame] | 76 | class Face : noncopyable |
| 77 | { |
Jeff Thompson | aa4e6db | 2013-07-15 17:25:23 -0700 | [diff] [blame] | 78 | public: |
Alexander Afanasyev | fdbfc6d | 2014-04-14 15:12:11 -0700 | [diff] [blame] | 79 | class Error : public std::runtime_error |
| 80 | { |
| 81 | public: |
| 82 | explicit |
| 83 | Error(const std::string& what) |
| 84 | : std::runtime_error(what) |
| 85 | { |
| 86 | } |
| 87 | }; |
Alexander Afanasyev | b790d95 | 2014-01-24 12:07:53 -0800 | [diff] [blame] | 88 | |
| 89 | /** |
Alexander Afanasyev | 691c3ce | 2014-04-23 14:28:04 -0700 | [diff] [blame] | 90 | * @brief Create a new Face using the default transport (UnixTransport) |
| 91 | * |
Steve DiBenedetto | c07b3a2 | 2014-03-19 12:32:52 -0600 | [diff] [blame] | 92 | * @throws ConfigFile::Error on configuration file parse failure |
| 93 | * @throws Face::Error on unsupported protocol |
Alexander Afanasyev | b790d95 | 2014-01-24 12:07:53 -0800 | [diff] [blame] | 94 | */ |
Alexander Afanasyev | f7ca320 | 2014-02-14 22:28:31 -0800 | [diff] [blame] | 95 | Face(); |
Alexander Afanasyev | e2e0d75 | 2014-01-03 13:30:30 -0800 | [diff] [blame] | 96 | |
| 97 | /** |
Alexander Afanasyev | 691c3ce | 2014-04-23 14:28:04 -0700 | [diff] [blame] | 98 | * @brief Create a new Face using the default transport (UnixTransport) |
| 99 | * |
| 100 | * @deprecated This constructor is deprecated. Use `Face(boost::asio::io_service&)` |
| 101 | * instead. |
| 102 | * |
| 103 | * @param ioService A shared pointer to boost::io_service object that should control all |
| 104 | * IO operations |
Steve DiBenedetto | c07b3a2 | 2014-03-19 12:32:52 -0600 | [diff] [blame] | 105 | * @throws ConfigFile::Error on configuration file parse failure |
| 106 | * @throws Face::Error on unsupported protocol |
Jeff Thompson | fe08e5a | 2013-08-13 11:15:59 -0700 | [diff] [blame] | 107 | */ |
Alexander Afanasyev | f7ca320 | 2014-02-14 22:28:31 -0800 | [diff] [blame] | 108 | explicit |
Alexander Afanasyev | 7682ccb | 2014-02-20 10:29:35 -0800 | [diff] [blame] | 109 | Face(const shared_ptr<boost::asio::io_service>& ioService); |
| 110 | |
Jeff Thompson | fe08e5a | 2013-08-13 11:15:59 -0700 | [diff] [blame] | 111 | /** |
Alexander Afanasyev | 691c3ce | 2014-04-23 14:28:04 -0700 | [diff] [blame] | 112 | * @brief Create a new Face using the default transport (UnixTransport) |
| 113 | * |
| 114 | * @par Usage examples: |
| 115 | * |
| 116 | * Face face1; |
| 117 | * Face face2(face1.getIoService()); |
| 118 | * |
| 119 | * // Now the following ensures that events on both faces are processed |
| 120 | * face1.processEvents(); |
| 121 | * // or face1.getIoService().run(); |
| 122 | * |
| 123 | * @par or |
| 124 | * |
| 125 | * boost::asio::io_service ioService; |
| 126 | * Face face1(ioService); |
| 127 | * Face face2(ioService); |
| 128 | * ... |
| 129 | * |
| 130 | * ioService.run(); |
| 131 | * |
| 132 | * @param ioService A reference to boost::io_service object that should control all |
| 133 | * IO operations. |
| 134 | * @throws ConfigFile::Error on configuration file parse failure |
| 135 | * @throws Face::Error on unsupported protocol |
| 136 | */ |
| 137 | explicit |
| 138 | Face(boost::asio::io_service& ioService); |
| 139 | |
| 140 | /** |
| 141 | * @brief Create a new Face using TcpTransport |
| 142 | * |
Alexander Afanasyev | 984ad19 | 2014-05-02 19:11:15 -0700 | [diff] [blame] | 143 | * @param host The host of the NDN forwarder |
| 144 | * @param port (optional) The port or service name of the NDN forwarder (**default**: "6363") |
| 145 | * |
Steve DiBenedetto | c07b3a2 | 2014-03-19 12:32:52 -0600 | [diff] [blame] | 146 | * @throws Face::Error on unsupported protocol |
Jeff Thompson | fe08e5a | 2013-08-13 11:15:59 -0700 | [diff] [blame] | 147 | */ |
Alexander Afanasyev | 7682ccb | 2014-02-20 10:29:35 -0800 | [diff] [blame] | 148 | Face(const std::string& host, const std::string& port = "6363"); |
Alexander Afanasyev | 0222fba | 2014-02-09 23:16:02 -0800 | [diff] [blame] | 149 | |
| 150 | /** |
Alexander Afanasyev | 691c3ce | 2014-04-23 14:28:04 -0700 | [diff] [blame] | 151 | * @brief Create a new Face using the given Transport |
Alexander Afanasyev | 984ad19 | 2014-05-02 19:11:15 -0700 | [diff] [blame] | 152 | * |
| 153 | * @param transport A shared_ptr to a Transport object used for communication |
| 154 | * |
Steve DiBenedetto | c07b3a2 | 2014-03-19 12:32:52 -0600 | [diff] [blame] | 155 | * @throws Face::Error on unsupported protocol |
Alexander Afanasyev | 0222fba | 2014-02-09 23:16:02 -0800 | [diff] [blame] | 156 | */ |
Alexander Afanasyev | f7ca320 | 2014-02-14 22:28:31 -0800 | [diff] [blame] | 157 | explicit |
| 158 | Face(const shared_ptr<Transport>& transport); |
Alexander Afanasyev | 0222fba | 2014-02-09 23:16:02 -0800 | [diff] [blame] | 159 | |
| 160 | /** |
Alexander Afanasyev | 691c3ce | 2014-04-23 14:28:04 -0700 | [diff] [blame] | 161 | * @brief Create a new Face using the given Transport and IO service object |
Alexander Afanasyev | 0222fba | 2014-02-09 23:16:02 -0800 | [diff] [blame] | 162 | * |
Alexander Afanasyev | 691c3ce | 2014-04-23 14:28:04 -0700 | [diff] [blame] | 163 | * @sa Face(boost::asio::io_service&) |
Alexander Afanasyev | 0222fba | 2014-02-09 23:16:02 -0800 | [diff] [blame] | 164 | * |
Steve DiBenedetto | c07b3a2 | 2014-03-19 12:32:52 -0600 | [diff] [blame] | 165 | * @throws Face::Error on unsupported protocol |
Alexander Afanasyev | 0222fba | 2014-02-09 23:16:02 -0800 | [diff] [blame] | 166 | */ |
| 167 | Face(const shared_ptr<Transport>& transport, |
Alexander Afanasyev | 691c3ce | 2014-04-23 14:28:04 -0700 | [diff] [blame] | 168 | boost::asio::io_service& ioService); |
Alexander Afanasyev | 7682ccb | 2014-02-20 10:29:35 -0800 | [diff] [blame] | 169 | |
Alexander Afanasyev | ee8bb1e | 2014-05-02 17:39:54 -0700 | [diff] [blame] | 170 | |
| 171 | ~Face(); |
Alexander Afanasyev | fdbfc6d | 2014-04-14 15:12:11 -0700 | [diff] [blame] | 172 | |
Jeff Thompson | 4fe4551 | 2013-08-23 14:06:38 -0700 | [diff] [blame] | 173 | /** |
Alexander Afanasyev | 0222fba | 2014-02-09 23:16:02 -0800 | [diff] [blame] | 174 | * @brief Express Interest |
| 175 | * |
Alexander Afanasyev | 984ad19 | 2014-05-02 19:11:15 -0700 | [diff] [blame] | 176 | * @param interest An Interest to be expressed |
| 177 | * @param onData Callback to be called when a matching data packet is received |
| 178 | * @param onTimeout (optional) A function object to call if the interest times out |
Alexander Afanasyev | 0222fba | 2014-02-09 23:16:02 -0800 | [diff] [blame] | 179 | * |
Alexander Afanasyev | 984ad19 | 2014-05-02 19:11:15 -0700 | [diff] [blame] | 180 | * @return The pending interest ID which can be used with removePendingInterest |
Jeff Thompson | 4fe4551 | 2013-08-23 14:06:38 -0700 | [diff] [blame] | 181 | */ |
Alexander Afanasyev | b790d95 | 2014-01-24 12:07:53 -0800 | [diff] [blame] | 182 | const PendingInterestId* |
Alexander Afanasyev | 0222fba | 2014-02-09 23:16:02 -0800 | [diff] [blame] | 183 | expressInterest(const Interest& interest, |
| 184 | const OnData& onData, const OnTimeout& onTimeout = OnTimeout()); |
Jeff Thompson | 4fe4551 | 2013-08-23 14:06:38 -0700 | [diff] [blame] | 185 | |
| 186 | /** |
Alexander Afanasyev | 0222fba | 2014-02-09 23:16:02 -0800 | [diff] [blame] | 187 | * @brief Express Interest using name and Interest template |
| 188 | * |
| 189 | * @param name Name of the Interest |
| 190 | * @param tmpl Interest template to fill parameters |
Alexander Afanasyev | 984ad19 | 2014-05-02 19:11:15 -0700 | [diff] [blame] | 191 | * @param onData Callback to be called when a matching data packet is received |
| 192 | * @param onTimeout (optional) A function object to call if the interest times out |
Alexander Afanasyev | 0222fba | 2014-02-09 23:16:02 -0800 | [diff] [blame] | 193 | * |
Alexander Afanasyev | 984ad19 | 2014-05-02 19:11:15 -0700 | [diff] [blame] | 194 | * @return Opaque pending interest ID which can be used with removePendingInterest |
Jeff Thompson | 7aec025 | 2013-08-22 17:29:57 -0700 | [diff] [blame] | 195 | */ |
Alexander Afanasyev | b790d95 | 2014-01-24 12:07:53 -0800 | [diff] [blame] | 196 | const PendingInterestId* |
Alexander Afanasyev | 0222fba | 2014-02-09 23:16:02 -0800 | [diff] [blame] | 197 | expressInterest(const Name& name, |
Alexander Afanasyev | 7682ccb | 2014-02-20 10:29:35 -0800 | [diff] [blame] | 198 | const Interest& tmpl, |
Alexander Afanasyev | 0222fba | 2014-02-09 23:16:02 -0800 | [diff] [blame] | 199 | const OnData& onData, const OnTimeout& onTimeout = OnTimeout()); |
Alexander Afanasyev | fdbfc6d | 2014-04-14 15:12:11 -0700 | [diff] [blame] | 200 | |
Jeff Thompson | 1109514 | 2013-10-01 16:20:28 -0700 | [diff] [blame] | 201 | /** |
Alexander Afanasyev | 984ad19 | 2014-05-02 19:11:15 -0700 | [diff] [blame] | 202 | * @brief Cancel previously expressed Interest |
Alexander Afanasyev | 691c3ce | 2014-04-23 14:28:04 -0700 | [diff] [blame] | 203 | * |
Jeff Thompson | 1109514 | 2013-10-01 16:20:28 -0700 | [diff] [blame] | 204 | * @param pendingInterestId The ID returned from expressInterest. |
| 205 | */ |
| 206 | void |
Alexander Afanasyev | 7682ccb | 2014-02-20 10:29:35 -0800 | [diff] [blame] | 207 | removePendingInterest(const PendingInterestId* pendingInterestId); |
Alexander Afanasyev | fdbfc6d | 2014-04-14 15:12:11 -0700 | [diff] [blame] | 208 | |
Jeff Thompson | 432c8be | 2013-08-09 16:16:08 -0700 | [diff] [blame] | 209 | /** |
Alexander Afanasyev | 984ad19 | 2014-05-02 19:11:15 -0700 | [diff] [blame] | 210 | * @brief Set InterestFilter to dispatch incoming matching interest to onInterest |
| 211 | * callback and register the filtered prefix with the connected NDN forwarder |
| 212 | * |
| 213 | * This version of setInterestFilter combines setInterestFilter and registerPrefix |
| 214 | * operations and is intended to be used when only one filter for the same prefix needed |
| 215 | * to be set. When multiple names sharing the same prefix should be dispatched to |
| 216 | * different callbacks, use one registerPrefix call, followed (in onSuccess callback) by |
| 217 | * a series of setInterestFilter calls. |
Alexander Afanasyev | 691c3ce | 2014-04-23 14:28:04 -0700 | [diff] [blame] | 218 | * |
Alexander Afanasyev | 9016496 | 2014-03-06 08:29:59 +0000 | [diff] [blame] | 219 | * @param interestFilter Interest filter (prefix part will be registered with the forwarder) |
Alexander Afanasyev | 984ad19 | 2014-05-02 19:11:15 -0700 | [diff] [blame] | 220 | * @param onInterest A callback to be called when a matching interest is received |
| 221 | * @param onSuccess A callback to be called when prefixRegister command succeeds |
| 222 | * @param onFailure A callback to be called when prefixRegister command fails |
| 223 | * @param certificate (optional) A certificate under which the prefix registration |
| 224 | * command interest is signed. When omitted, a default certificate |
| 225 | * of the default identity is used to sign the registration command |
Alexander Afanasyev | 691c3ce | 2014-04-23 14:28:04 -0700 | [diff] [blame] | 226 | * |
Alexander Afanasyev | 984ad19 | 2014-05-02 19:11:15 -0700 | [diff] [blame] | 227 | * @return Opaque registered prefix ID which can be used with unsetInterestFilter or |
| 228 | * removeRegisteredPrefix |
Jeff Thompson | 86507bc | 2013-08-23 20:51:38 -0700 | [diff] [blame] | 229 | */ |
Alexander Afanasyev | b790d95 | 2014-01-24 12:07:53 -0800 | [diff] [blame] | 230 | const RegisteredPrefixId* |
Alexander Afanasyev | 9016496 | 2014-03-06 08:29:59 +0000 | [diff] [blame] | 231 | setInterestFilter(const InterestFilter& interestFilter, |
Alexander Afanasyev | 0222fba | 2014-02-09 23:16:02 -0800 | [diff] [blame] | 232 | const OnInterest& onInterest, |
Alexander Afanasyev | 984ad19 | 2014-05-02 19:11:15 -0700 | [diff] [blame] | 233 | const RegisterPrefixSuccessCallback& onSuccess, |
| 234 | const RegisterPrefixFailureCallback& onFailure, |
| 235 | const IdentityCertificate& certificate = IdentityCertificate()); |
Jeff Thompson | 1109514 | 2013-10-01 16:20:28 -0700 | [diff] [blame] | 236 | |
| 237 | /** |
Alexander Afanasyev | 984ad19 | 2014-05-02 19:11:15 -0700 | [diff] [blame] | 238 | * @deprecated Use the other overload |
Yingdi Yu | e66bf2a | 2014-04-28 17:07:36 -0700 | [diff] [blame] | 239 | */ |
| 240 | const RegisteredPrefixId* |
Alexander Afanasyev | 9016496 | 2014-03-06 08:29:59 +0000 | [diff] [blame] | 241 | setInterestFilter(const InterestFilter& interestFilter, |
Yingdi Yu | e66bf2a | 2014-04-28 17:07:36 -0700 | [diff] [blame] | 242 | const OnInterest& onInterest, |
Alexander Afanasyev | 984ad19 | 2014-05-02 19:11:15 -0700 | [diff] [blame] | 243 | const RegisterPrefixFailureCallback& onFailure, |
| 244 | const IdentityCertificate& certificate = IdentityCertificate()); |
Yingdi Yu | e66bf2a | 2014-04-28 17:07:36 -0700 | [diff] [blame] | 245 | |
| 246 | /** |
Alexander Afanasyev | 984ad19 | 2014-05-02 19:11:15 -0700 | [diff] [blame] | 247 | * @brief Set InterestFilter to dispatch incoming matching interest to onInterest |
| 248 | * callback and register the filtered prefix with the connected NDN forwarder |
| 249 | * |
| 250 | * This version of setInterestFilter combines setInterestFilter and registerPrefix |
| 251 | * operations and is intended to be used when only one filter for the same prefix needed |
| 252 | * to be set. When multiple names sharing the same prefix should be dispatched to |
| 253 | * different callbacks, use one registerPrefix call, followed (in onSuccess callback) by |
| 254 | * a series of setInterestFilter calls. |
Yingdi Yu | e66bf2a | 2014-04-28 17:07:36 -0700 | [diff] [blame] | 255 | * |
Alexander Afanasyev | 9016496 | 2014-03-06 08:29:59 +0000 | [diff] [blame] | 256 | * @param interestFilter Interest filter (prefix part will be registered with the forwarder) |
Alexander Afanasyev | 984ad19 | 2014-05-02 19:11:15 -0700 | [diff] [blame] | 257 | * @param onInterest A callback to be called when a matching interest is received |
| 258 | * @param onSuccess A callback to be called when prefixRegister command succeeds |
| 259 | * @param onFailure A callback to be called when prefixRegister command fails |
| 260 | * @param identity A signing identity. A command interest is signed under the default |
| 261 | * certificate of this identity |
Yingdi Yu | e66bf2a | 2014-04-28 17:07:36 -0700 | [diff] [blame] | 262 | * |
Alexander Afanasyev | 984ad19 | 2014-05-02 19:11:15 -0700 | [diff] [blame] | 263 | * @return Opaque registered prefix ID which can be used with removeRegisteredPrefix |
Yingdi Yu | e66bf2a | 2014-04-28 17:07:36 -0700 | [diff] [blame] | 264 | */ |
| 265 | const RegisteredPrefixId* |
Alexander Afanasyev | 9016496 | 2014-03-06 08:29:59 +0000 | [diff] [blame] | 266 | setInterestFilter(const InterestFilter& interestFilter, |
Yingdi Yu | e66bf2a | 2014-04-28 17:07:36 -0700 | [diff] [blame] | 267 | const OnInterest& onInterest, |
Alexander Afanasyev | 984ad19 | 2014-05-02 19:11:15 -0700 | [diff] [blame] | 268 | const RegisterPrefixSuccessCallback& onSuccess, |
| 269 | const RegisterPrefixFailureCallback& onFailure, |
Yingdi Yu | e66bf2a | 2014-04-28 17:07:36 -0700 | [diff] [blame] | 270 | const Name& identity); |
| 271 | |
| 272 | /** |
Alexander Afanasyev | 984ad19 | 2014-05-02 19:11:15 -0700 | [diff] [blame] | 273 | * @deprecated Use the other overload |
| 274 | */ |
| 275 | const RegisteredPrefixId* |
| 276 | setInterestFilter(const InterestFilter& interestFilter, |
| 277 | const OnInterest& onInterest, |
| 278 | const RegisterPrefixFailureCallback& onFailure, |
| 279 | const Name& identity); |
| 280 | |
| 281 | /** |
| 282 | * @brief Set InterestFilter to dispatch incoming matching interest to onInterest callback |
| 283 | * |
| 284 | * @param interestFilter Interest |
| 285 | * @param onInterest A callback to be called when a matching interest is received |
| 286 | * |
| 287 | * This method modifies library's FIB only, and does not register the prefix with the |
| 288 | * forwarder. It will always succeed. To register prefix with the forwarder, use |
| 289 | * registerPrefix, or use the setInterestFilter overload taking two callbacks. |
| 290 | * |
| 291 | * @return Opaque interest filter ID which can be used with unsetInterestFilter |
| 292 | */ |
| 293 | const InterestFilterId* |
| 294 | setInterestFilter(const InterestFilter& interestFilter, |
| 295 | const OnInterest& onInterest); |
| 296 | |
| 297 | |
| 298 | /** |
| 299 | * @brief Register prefix with the connected NDN forwarder |
| 300 | * |
| 301 | * This method only modifies forwarder's RIB (or FIB) and does not associate any |
| 302 | * onInterest callbacks. Use setInterestFilter method to dispatch incoming Interests to |
| 303 | * the right callbacks. |
| 304 | * |
| 305 | * @param prefix A prefix to register with the connected NDN forwarder |
| 306 | * @param onSuccess A callback to be called when prefixRegister command succeeds |
| 307 | * @param onFailure A callback to be called when prefixRegister command fails |
| 308 | * @param certificate (optional) A certificate under which the prefix registration |
| 309 | * command interest is signed. When omitted, a default certificate |
| 310 | * of the default identity is used to sign the registration command |
| 311 | * |
| 312 | * @return The registered prefix ID which can be used with unregisterPrefix |
| 313 | */ |
| 314 | const RegisteredPrefixId* |
| 315 | registerPrefix(const Name& prefix, |
| 316 | const RegisterPrefixSuccessCallback& onSuccess, |
| 317 | const RegisterPrefixFailureCallback& onFailure, |
| 318 | const IdentityCertificate& certificate = IdentityCertificate()); |
| 319 | |
| 320 | /** |
| 321 | * @brief Register prefix with the connected NDN forwarder and call onInterest when a matching |
| 322 | * interest is received. |
| 323 | * |
| 324 | * This method only modifies forwarder's RIB (or FIB) and does not associate any |
| 325 | * onInterest callbacks. Use setInterestFilter method to dispatch incoming Interests to |
| 326 | * the right callbacks. |
| 327 | * |
| 328 | * @param prefix A prefix to register with the connected NDN forwarder |
| 329 | * @param onSuccess A callback to be called when prefixRegister command succeeds |
| 330 | * @param onFailure A callback to be called when prefixRegister command fails |
| 331 | * @param identity A signing identity. A command interest is signed under the default |
| 332 | * certificate of this identity |
| 333 | * |
| 334 | * @return The registered prefix ID which can be used with unregisterPrefix |
| 335 | */ |
| 336 | const RegisteredPrefixId* |
| 337 | registerPrefix(const Name& prefix, |
| 338 | const RegisterPrefixSuccessCallback& onSuccess, |
| 339 | const RegisterPrefixFailureCallback& onFailure, |
| 340 | const Name& identity); |
| 341 | |
| 342 | |
| 343 | /** |
Alexander Afanasyev | 691c3ce | 2014-04-23 14:28:04 -0700 | [diff] [blame] | 344 | * @brief Remove the registered prefix entry with the registeredPrefixId from the |
| 345 | * pending interest table. |
| 346 | * |
| 347 | * This does not affect another registered prefix with a different registeredPrefixId, |
| 348 | * even it if has the same prefix name. If there is no entry with the |
| 349 | * registeredPrefixId, do nothing. |
| 350 | * |
Alexander Afanasyev | ee8bb1e | 2014-05-02 17:39:54 -0700 | [diff] [blame] | 351 | * unsetInterestFilter will use the same credentials as original |
| 352 | * setInterestFilter/registerPrefix command |
| 353 | * |
Alexander Afanasyev | 984ad19 | 2014-05-02 19:11:15 -0700 | [diff] [blame] | 354 | * @param registeredPrefixId The ID returned from registerPrefix |
Jeff Thompson | 1109514 | 2013-10-01 16:20:28 -0700 | [diff] [blame] | 355 | */ |
| 356 | void |
Alexander Afanasyev | 7682ccb | 2014-02-20 10:29:35 -0800 | [diff] [blame] | 357 | unsetInterestFilter(const RegisteredPrefixId* registeredPrefixId); |
Alexander Afanasyev | a557d5a | 2013-12-28 21:59:03 -0800 | [diff] [blame] | 358 | |
Alexander Afanasyev | ee8bb1e | 2014-05-02 17:39:54 -0700 | [diff] [blame] | 359 | /** |
Alexander Afanasyev | 984ad19 | 2014-05-02 19:11:15 -0700 | [diff] [blame] | 360 | * @brief Remove previously set InterestFilter from library's FIB |
| 361 | * |
| 362 | * This method always succeeds and will **NOT** send any request to the connected |
| 363 | * forwarder. |
| 364 | * |
| 365 | * @param interestFilterId The ID returned from setInterestFilter. |
| 366 | */ |
| 367 | void |
| 368 | unsetInterestFilter(const InterestFilterId* interestFilterId); |
| 369 | |
| 370 | /** |
| 371 | * @brief Deregister prefix from RIB (or FIB) |
| 372 | * |
| 373 | * unregisterPrefix will use the same credentials as original |
| 374 | * setInterestFilter/registerPrefix command |
| 375 | * |
| 376 | * If registeredPrefixId was obtained using setInterestFilter, the corresponding |
| 377 | * InterestFilter will be unset too. |
| 378 | * |
Alexander Afanasyev | 770827c | 2014-05-13 17:42:55 -0700 | [diff] [blame^] | 379 | * @param registeredPrefixId The ID returned from registerPrefix |
| 380 | * @param onSuccess Callback to be called when operation succeeds |
| 381 | * @param onFailure Callback to be called when operation fails |
Alexander Afanasyev | 984ad19 | 2014-05-02 19:11:15 -0700 | [diff] [blame] | 382 | */ |
| 383 | void |
| 384 | unregisterPrefix(const RegisteredPrefixId* registeredPrefixId, |
| 385 | const UnregisterPrefixSuccessCallback& onSuccess, |
| 386 | const UnregisterPrefixFailureCallback& onFailure); |
| 387 | |
| 388 | /** |
Alexander Afanasyev | ee8bb1e | 2014-05-02 17:39:54 -0700 | [diff] [blame] | 389 | * @brief (FOR DEBUG PURPOSES ONLY) Request direct NFD FIB management |
| 390 | */ |
Yingdi Yu | e66bf2a | 2014-04-28 17:07:36 -0700 | [diff] [blame] | 391 | void |
Alexander Afanasyev | ee8bb1e | 2014-05-02 17:39:54 -0700 | [diff] [blame] | 392 | setDirectFibManagement(bool isDirectFibManagementRequested = false); |
Yingdi Yu | e66bf2a | 2014-04-28 17:07:36 -0700 | [diff] [blame] | 393 | |
Alexander Afanasyev | 0222fba | 2014-02-09 23:16:02 -0800 | [diff] [blame] | 394 | /** |
Alexander Afanasyev | a557d5a | 2013-12-28 21:59:03 -0800 | [diff] [blame] | 395 | * @brief Publish data packet |
| 396 | * |
Alexander Afanasyev | 691c3ce | 2014-04-23 14:28:04 -0700 | [diff] [blame] | 397 | * This method can be called to satisfy the incoming Interest or to put Data packet into |
| 398 | * the cache of the local NDN forwarder |
Alexander Afanasyev | a557d5a | 2013-12-28 21:59:03 -0800 | [diff] [blame] | 399 | */ |
| 400 | void |
Alexander Afanasyev | 7682ccb | 2014-02-20 10:29:35 -0800 | [diff] [blame] | 401 | put(const Data& data); |
Alexander Afanasyev | fdbfc6d | 2014-04-14 15:12:11 -0700 | [diff] [blame] | 402 | |
Jeff Thompson | 86507bc | 2013-08-23 20:51:38 -0700 | [diff] [blame] | 403 | /** |
Alexander Afanasyev | 691c3ce | 2014-04-23 14:28:04 -0700 | [diff] [blame] | 404 | * @brief Process any data to receive or call timeout callbacks. |
Alexander Afanasyev | a557d5a | 2013-12-28 21:59:03 -0800 | [diff] [blame] | 405 | * |
| 406 | * This call will block forever (default timeout == 0) to process IO on the face. |
| 407 | * To exit, one expected to call face.shutdown() from one of the callback methods. |
| 408 | * |
Alexander Afanasyev | 691c3ce | 2014-04-23 14:28:04 -0700 | [diff] [blame] | 409 | * If positive timeout is specified, then processEvents will exit after this timeout, if |
| 410 | * not stopped earlier with face.shutdown() or when all active events finish. The call |
| 411 | * can be called repeatedly, if desired. |
Alexander Afanasyev | a557d5a | 2013-12-28 21:59:03 -0800 | [diff] [blame] | 412 | * |
Alexander Afanasyev | 691c3ce | 2014-04-23 14:28:04 -0700 | [diff] [blame] | 413 | * If negative timeout is specified, then processEvents will not block and process only |
| 414 | * pending events. |
Alexander Afanasyev | f75a0aa | 2014-01-09 14:29:22 -0800 | [diff] [blame] | 415 | * |
Alexander Afanasyev | 984ad19 | 2014-05-02 19:11:15 -0700 | [diff] [blame] | 416 | * @param timeout maximum time to block the thread |
Alexander Afanasyev | 691c3ce | 2014-04-23 14:28:04 -0700 | [diff] [blame] | 417 | * @param keepThread Keep thread in a blocked state (in event processing), even when |
| 418 | * there are no outstanding events (e.g., no Interest/Data is expected) |
| 419 | * |
| 420 | * @throw This may throw an exception for reading data or in the callback for processing |
| 421 | * the data. If you call this from an main event loop, you may want to catch and |
| 422 | * log/disregard all exceptions. |
Jeff Thompson | 432c8be | 2013-08-09 16:16:08 -0700 | [diff] [blame] | 423 | */ |
Alexander Afanasyev | fdbfc6d | 2014-04-14 15:12:11 -0700 | [diff] [blame] | 424 | void |
Alexander Afanasyev | aa0e7da | 2014-03-17 14:37:33 -0700 | [diff] [blame] | 425 | processEvents(const time::milliseconds& timeout = time::milliseconds::zero(), |
| 426 | bool keepThread = false); |
Jeff Thompson | 432c8be | 2013-08-09 16:16:08 -0700 | [diff] [blame] | 427 | |
Alexander Afanasyev | 691c3ce | 2014-04-23 14:28:04 -0700 | [diff] [blame] | 428 | /** |
| 429 | * @brief Shutdown face operations |
| 430 | * |
| 431 | * This method cancels all pending operations and closes connection to NDN Forwarder. |
| 432 | * |
| 433 | * Note that this method does not stop IO service and if the same IO service is shared |
| 434 | * between multiple Faces or with other IO objects (e.g., Scheduler). |
| 435 | */ |
Alexander Afanasyev | fdbfc6d | 2014-04-14 15:12:11 -0700 | [diff] [blame] | 436 | void |
Jeff Thompson | 0050abe | 2013-09-17 12:50:25 -0700 | [diff] [blame] | 437 | shutdown(); |
Yingdi Yu | 0d92081 | 2014-01-30 14:50:57 -0800 | [diff] [blame] | 438 | |
Alexander Afanasyev | 691c3ce | 2014-04-23 14:28:04 -0700 | [diff] [blame] | 439 | /** |
| 440 | * @brief Get shared_ptr of the IO service object |
| 441 | * |
| 442 | * @deprecated Use getIoService instead |
| 443 | */ |
Alexander Afanasyev | fdbfc6d | 2014-04-14 15:12:11 -0700 | [diff] [blame] | 444 | shared_ptr<boost::asio::io_service> |
Alexander Afanasyev | 691c3ce | 2014-04-23 14:28:04 -0700 | [diff] [blame] | 445 | ioService() |
| 446 | { |
| 447 | return m_ioService; |
| 448 | } |
| 449 | |
| 450 | /** |
| 451 | * @brief Get reference to IO service object |
| 452 | */ |
| 453 | boost::asio::io_service& |
| 454 | getIoService() |
| 455 | { |
| 456 | return *m_ioService; |
| 457 | } |
Alexander Afanasyev | 0222fba | 2014-02-09 23:16:02 -0800 | [diff] [blame] | 458 | |
| 459 | private: |
Steve DiBenedetto | c07b3a2 | 2014-03-19 12:32:52 -0600 | [diff] [blame] | 460 | |
| 461 | /** |
| 462 | * @throws Face::Error on unsupported protocol |
| 463 | */ |
Alexander Afanasyev | 0222fba | 2014-02-09 23:16:02 -0800 | [diff] [blame] | 464 | void |
Alexander Afanasyev | 7682ccb | 2014-02-20 10:29:35 -0800 | [diff] [blame] | 465 | construct(const shared_ptr<Transport>& transport, |
Alexander Afanasyev | 505646e | 2014-02-24 20:13:37 -0800 | [diff] [blame] | 466 | const shared_ptr<boost::asio::io_service>& ioService); |
Steve DiBenedetto | c07b3a2 | 2014-03-19 12:32:52 -0600 | [diff] [blame] | 467 | |
| 468 | bool |
| 469 | isSupportedNfdProtocol(const std::string& protocol); |
| 470 | |
| 471 | bool |
| 472 | isSupportedNrdProtocol(const std::string& protocol); |
| 473 | |
Alexander Afanasyev | 691c3ce | 2014-04-23 14:28:04 -0700 | [diff] [blame] | 474 | class ProcessEventsTimeout |
| 475 | { |
| 476 | }; |
| 477 | |
Alexander Afanasyev | 0222fba | 2014-02-09 23:16:02 -0800 | [diff] [blame] | 478 | typedef std::list<shared_ptr<PendingInterest> > PendingInterestTable; |
Alexander Afanasyev | 9016496 | 2014-03-06 08:29:59 +0000 | [diff] [blame] | 479 | typedef std::list<shared_ptr<InterestFilterRecord> > InterestFilterTable; |
Alexander Afanasyev | 0222fba | 2014-02-09 23:16:02 -0800 | [diff] [blame] | 480 | typedef std::list<shared_ptr<RegisteredPrefix> > RegisteredPrefixTable; |
Alexander Afanasyev | fdbfc6d | 2014-04-14 15:12:11 -0700 | [diff] [blame] | 481 | |
Alexander Afanasyev | 0222fba | 2014-02-09 23:16:02 -0800 | [diff] [blame] | 482 | void |
Alexander Afanasyev | 6d48bc1 | 2014-02-18 00:10:51 -0800 | [diff] [blame] | 483 | asyncExpressInterest(const shared_ptr<const Interest>& interest, |
Alexander Afanasyev | 0222fba | 2014-02-09 23:16:02 -0800 | [diff] [blame] | 484 | const OnData& onData, const OnTimeout& onTimeout); |
| 485 | |
| 486 | void |
Alexander Afanasyev | 6d48bc1 | 2014-02-18 00:10:51 -0800 | [diff] [blame] | 487 | asyncRemovePendingInterest(const PendingInterestId* pendingInterestId); |
Alexander Afanasyev | 0222fba | 2014-02-09 23:16:02 -0800 | [diff] [blame] | 488 | |
| 489 | void |
Alexander Afanasyev | 984ad19 | 2014-05-02 19:11:15 -0700 | [diff] [blame] | 490 | afterPrefixRegistered(const shared_ptr<RegisteredPrefix>& registeredPrefix, |
| 491 | const RegisterPrefixSuccessCallback& onSuccess); |
Alexander Afanasyev | 9016496 | 2014-03-06 08:29:59 +0000 | [diff] [blame] | 492 | |
| 493 | void |
Alexander Afanasyev | 984ad19 | 2014-05-02 19:11:15 -0700 | [diff] [blame] | 494 | asyncSetInterestFilter(const shared_ptr<InterestFilterRecord>& interestFilterRecord); |
Alexander Afanasyev | 12dfbad | 2014-02-11 14:42:46 -0800 | [diff] [blame] | 495 | |
| 496 | void |
Alexander Afanasyev | 984ad19 | 2014-05-02 19:11:15 -0700 | [diff] [blame] | 497 | asyncUnsetInterestFilter(const InterestFilterId* interestFilterId); |
| 498 | |
| 499 | void |
| 500 | asyncUnregisterPrefix(const RegisteredPrefixId* registeredPrefixId, |
| 501 | const UnregisterPrefixSuccessCallback& onSuccess, |
| 502 | const UnregisterPrefixFailureCallback& onFailure); |
| 503 | |
| 504 | void |
| 505 | finalizeUnregisterPrefix(RegisteredPrefixTable::iterator item, |
| 506 | const UnregisterPrefixSuccessCallback& onSuccess); |
Alexander Afanasyev | fdbfc6d | 2014-04-14 15:12:11 -0700 | [diff] [blame] | 507 | |
| 508 | void |
Alexander Afanasyev | 6d48bc1 | 2014-02-18 00:10:51 -0800 | [diff] [blame] | 509 | onReceiveElement(const Block& wire); |
Alexander Afanasyev | 0222fba | 2014-02-09 23:16:02 -0800 | [diff] [blame] | 510 | |
Alexander Afanasyev | 7dced46 | 2014-03-19 15:12:32 -0700 | [diff] [blame] | 511 | void |
| 512 | asyncShutdown(); |
Alexander Afanasyev | fdbfc6d | 2014-04-14 15:12:11 -0700 | [diff] [blame] | 513 | |
Alexander Afanasyev | 0222fba | 2014-02-09 23:16:02 -0800 | [diff] [blame] | 514 | static void |
| 515 | fireProcessEventsTimeout(const boost::system::error_code& error); |
| 516 | |
Alexander Afanasyev | 42c8185 | 2014-02-25 21:37:26 -0800 | [diff] [blame] | 517 | void |
| 518 | satisfyPendingInterests(Data& data); |
| 519 | |
| 520 | void |
| 521 | processInterestFilters(Interest& interest); |
Alexander Afanasyev | fdbfc6d | 2014-04-14 15:12:11 -0700 | [diff] [blame] | 522 | |
Alexander Afanasyev | 0222fba | 2014-02-09 23:16:02 -0800 | [diff] [blame] | 523 | void |
| 524 | checkPitExpire(); |
Yingdi Yu | f9fa52f | 2014-02-06 12:27:32 -0800 | [diff] [blame] | 525 | |
Alexander Afanasyev | ee8bb1e | 2014-05-02 17:39:54 -0700 | [diff] [blame] | 526 | template<class SignatureGenerator> |
| 527 | const RegisteredPrefixId* |
Alexander Afanasyev | 984ad19 | 2014-05-02 19:11:15 -0700 | [diff] [blame] | 528 | registerPrefixImpl(const Name& prefix, |
| 529 | const shared_ptr<InterestFilterRecord>& filter, |
| 530 | const RegisterPrefixSuccessCallback& onSuccess, |
| 531 | const RegisterPrefixFailureCallback& onFailure, |
| 532 | const SignatureGenerator& signatureGenerator); |
Alexander Afanasyev | ee8bb1e | 2014-05-02 17:39:54 -0700 | [diff] [blame] | 533 | |
Jeff Thompson | b982b6d | 2013-07-15 18:15:45 -0700 | [diff] [blame] | 534 | private: |
Alexander Afanasyev | f39c537 | 2014-02-17 19:42:56 -0800 | [diff] [blame] | 535 | shared_ptr<boost::asio::io_service> m_ioService; |
Alexander Afanasyev | 691c3ce | 2014-04-23 14:28:04 -0700 | [diff] [blame] | 536 | shared_ptr<boost::asio::io_service::work> m_ioServiceWork; // if thread needs to be preserved |
Alexander Afanasyev | aa0e7da | 2014-03-17 14:37:33 -0700 | [diff] [blame] | 537 | shared_ptr<monotonic_deadline_timer> m_pitTimeoutCheckTimer; |
Alexander Afanasyev | f39c537 | 2014-02-17 19:42:56 -0800 | [diff] [blame] | 538 | bool m_pitTimeoutCheckTimerActive; |
Alexander Afanasyev | aa0e7da | 2014-03-17 14:37:33 -0700 | [diff] [blame] | 539 | shared_ptr<monotonic_deadline_timer> m_processEventsTimeoutTimer; |
Alexander Afanasyev | fdbfc6d | 2014-04-14 15:12:11 -0700 | [diff] [blame] | 540 | |
Alexander Afanasyev | f39c537 | 2014-02-17 19:42:56 -0800 | [diff] [blame] | 541 | shared_ptr<Transport> m_transport; |
Alexander Afanasyev | 0222fba | 2014-02-09 23:16:02 -0800 | [diff] [blame] | 542 | |
Alexander Afanasyev | f39c537 | 2014-02-17 19:42:56 -0800 | [diff] [blame] | 543 | PendingInterestTable m_pendingInterestTable; |
Alexander Afanasyev | 9016496 | 2014-03-06 08:29:59 +0000 | [diff] [blame] | 544 | InterestFilterTable m_interestFilterTable; |
Alexander Afanasyev | f39c537 | 2014-02-17 19:42:56 -0800 | [diff] [blame] | 545 | RegisteredPrefixTable m_registeredPrefixTable; |
Alexander Afanasyev | 0222fba | 2014-02-09 23:16:02 -0800 | [diff] [blame] | 546 | |
Alexander Afanasyev | ee8bb1e | 2014-05-02 17:39:54 -0700 | [diff] [blame] | 547 | nfd::Controller* m_nfdController; |
| 548 | bool m_isDirectNfdFibManagementRequested; |
Steve DiBenedetto | c07b3a2 | 2014-03-19 12:32:52 -0600 | [diff] [blame] | 549 | |
| 550 | ConfigFile m_config; |
Jeff Thompson | aa4e6db | 2013-07-15 17:25:23 -0700 | [diff] [blame] | 551 | }; |
| 552 | |
Steve DiBenedetto | c07b3a2 | 2014-03-19 12:32:52 -0600 | [diff] [blame] | 553 | inline bool |
| 554 | Face::isSupportedNfdProtocol(const std::string& protocol) |
| 555 | { |
| 556 | return protocol == "nfd-0.1"; |
| 557 | } |
| 558 | |
| 559 | inline bool |
| 560 | Face::isSupportedNrdProtocol(const std::string& protocol) |
| 561 | { |
| 562 | return protocol == "nrd-0.1"; |
| 563 | } |
| 564 | |
Alexander Afanasyev | ee8bb1e | 2014-05-02 17:39:54 -0700 | [diff] [blame] | 565 | inline void |
| 566 | Face::setDirectFibManagement(bool isDirectFibManagementRequested/* = false*/) |
Steve DiBenedetto | c07b3a2 | 2014-03-19 12:32:52 -0600 | [diff] [blame] | 567 | { |
Alexander Afanasyev | ee8bb1e | 2014-05-02 17:39:54 -0700 | [diff] [blame] | 568 | m_isDirectNfdFibManagementRequested = isDirectFibManagementRequested; |
Steve DiBenedetto | c07b3a2 | 2014-03-19 12:32:52 -0600 | [diff] [blame] | 569 | } |
| 570 | |
Alexander Afanasyev | 0222fba | 2014-02-09 23:16:02 -0800 | [diff] [blame] | 571 | } // namespace ndn |
Jeff Thompson | aa4e6db | 2013-07-15 17:25:23 -0700 | [diff] [blame] | 572 | |
Alexander Afanasyev | 0222fba | 2014-02-09 23:16:02 -0800 | [diff] [blame] | 573 | #endif // NDN_FACE_HPP |