33 #define NDN_FACE_KEEP_DEPRECATED_REGISTRATION_SIGNING 35 #ifdef NDN_FACE_KEEP_DEPRECATED_REGISTRATION_SIGNING 37 #endif // NDN_FACE_KEEP_DEPRECATED_REGISTRATION_SIGNING 49 class PendingInterestId;
50 class RegisteredPrefixId;
51 class InterestFilterId;
56 using security::KeyChain;
65 typedef function<void(const Interest&, Data&)>
OnData;
75 typedef function<void (const InterestFilter&, const Interest&)>
OnInterest;
103 class Error :
public std::runtime_error
108 :
std::runtime_error(what)
149 Face(boost::asio::io_service& ioService);
165 const PendingInterestId*
166 expressInterest(
const Interest& interest,
167 const OnData& onData,
const OnTimeout& onTimeout =
OnTimeout());
181 const PendingInterestId*
184 const OnData& onData,
const OnTimeout& onTimeout =
OnTimeout());
192 removePendingInterest(
const PendingInterestId* pendingInterestId);
198 getNPendingInterests()
const;
221 const RegisteredPrefixId*
223 const OnInterest& onInterest,
224 const RegisterPrefixFailureCallback& onFailure,
249 const RegisteredPrefixId*
251 const OnInterest& onInterest,
252 const RegisterPrefixSuccessCallback& onSuccess,
253 const RegisterPrefixFailureCallback& onFailure,
269 const InterestFilterId*
271 const OnInterest& onInterest);
273 #ifdef NDN_FACE_KEEP_DEPRECATED_REGISTRATION_SIGNING 297 const RegisteredPrefixId*
299 const OnInterest& onInterest,
300 const RegisterPrefixSuccessCallback& onSuccess,
301 const RegisterPrefixFailureCallback& onFailure,
327 const RegisteredPrefixId*
329 const OnInterest& onInterest,
330 const RegisterPrefixFailureCallback& onFailure,
355 const RegisteredPrefixId*
357 const OnInterest& onInterest,
358 const RegisterPrefixSuccessCallback& onSuccess,
359 const RegisterPrefixFailureCallback& onFailure,
360 const Name& identity,
383 const RegisteredPrefixId*
385 const OnInterest& onInterest,
386 const RegisterPrefixFailureCallback& onFailure,
387 const Name& identity,
389 #endif // NDN_FACE_KEEP_DEPRECATED_REGISTRATION_SIGNING 406 const RegisteredPrefixId*
407 registerPrefix(
const Name& prefix,
408 const RegisterPrefixSuccessCallback& onSuccess,
409 const RegisterPrefixFailureCallback& onFailure,
413 #ifdef NDN_FACE_KEEP_DEPRECATED_REGISTRATION_SIGNING 432 const RegisteredPrefixId*
433 registerPrefix(
const Name& prefix,
434 const RegisterPrefixSuccessCallback& onSuccess,
435 const RegisterPrefixFailureCallback& onFailure,
457 const RegisteredPrefixId*
458 registerPrefix(
const Name& prefix,
459 const RegisterPrefixSuccessCallback& onSuccess,
460 const RegisterPrefixFailureCallback& onFailure,
461 const Name& identity,
463 #endif // NDN_FACE_KEEP_DEPRECATED_REGISTRATION_SIGNING 478 unsetInterestFilter(
const RegisteredPrefixId* registeredPrefixId);
489 unsetInterestFilter(
const InterestFilterId* interestFilterId);
505 unregisterPrefix(
const RegisteredPrefixId* registeredPrefixId,
506 const UnregisterPrefixSuccessCallback& onSuccess,
507 const UnregisterPrefixFailureCallback& onFailure);
523 put(
const Data& data);
530 processEvents(
const time::milliseconds& timeout = time::milliseconds::zero(),
531 bool keepThread =
false);
547 boost::asio::io_service&
550 return *
static_cast<boost::asio::io_service*
>(
nullptr);
567 unique_ptr<KeyChain> m_internalKeyChain;
569 unique_ptr<nfd::Controller> m_nfdController;
570 unique_ptr<Impl> m_impl;
575 #endif // NDN_FACE_HPP Copyright (c) 2011-2015 Regents of the University of California.
Error(const std::string &what)
function< void(const std::string &)> UnregisterPrefixFailureCallback
Callback called when unregisterPrefix or unsetInterestFilter command fails.
Copyright (c) 2013-2015 Regents of the University of California.
represents an Interest packet
function< void(const Interest &)> OnTimeout
Callback called when expressed Interest times out.
function< void(const InterestFilter &, const Interest &)> OnInterest
Callback called when incoming Interest matches the specified InterestFilter.
Copyright (c) 2013-2014 Regents of the University of California.
Signing parameters passed to KeyChain.
Copyright (c) 2011-2015 Regents of the University of California.
Abstraction to communicate with local or remote NDN forwarder.
function< void(const Name &, const std::string &)> RegisterPrefixFailureCallback
Callback called when registerPrefix or setInterestFilter command fails.
function< void(const Name &)> RegisterPrefixSuccessCallback
Callback called when registerPrefix or setInterestFilter command succeeds.
Name abstraction to represent an absolute name.
ndn cxx Face
Copyright (c) 2013-2015 Regents of the University of California.
boost::asio::io_service & getIoService()
Return nullptr (kept for compatibility)
function< void(const Interest &, Data &)> OnData
Callback called when expressed Interest gets satisfied with Data packet.
function< void()> UnregisterPrefixSuccessCallback
Callback called when unregisterPrefix or unsetInterestFilter command succeeds.