44 class PendingInterestId;
45 class RegisteredPrefixId;
46 class InterestFilterId;
60 typedef function<void(const Interest&, const lp::Nack&)>
NackCallback;
98 class Error :
public std::runtime_error
103 :
std::runtime_error(what)
141 Face(shared_ptr<Transport> transport =
nullptr);
172 Face(boost::asio::io_service& ioService);
181 Face(
const std::string& host,
const std::string& port =
"6363");
195 Face(shared_ptr<Transport> transport, KeyChain& keyChain);
210 Face(shared_ptr<Transport> transport, boost::asio::io_service& ioService);
226 Face(shared_ptr<Transport> transport, boost::asio::io_service& ioService, KeyChain& keyChain);
242 const PendingInterestId*
243 expressInterest(
const Interest& interest,
244 const DataCallback& afterSatisfied,
245 const NackCallback& afterNacked,
246 const TimeoutCallback& afterTimeout);
254 removePendingInterest(
const PendingInterestId* pendingInterestId);
260 removeAllPendingInterests();
266 getNPendingInterests()
const;
289 const RegisteredPrefixId*
291 const InterestCallback& onInterest,
292 const RegisterPrefixFailureCallback& onFailure,
317 const RegisteredPrefixId*
319 const InterestCallback& onInterest,
320 const RegisterPrefixSuccessCallback& onSuccess,
321 const RegisterPrefixFailureCallback& onFailure,
337 const InterestFilterId*
339 const InterestCallback& onInterest);
358 const RegisteredPrefixId*
359 registerPrefix(
const Name& prefix,
360 const RegisterPrefixSuccessCallback& onSuccess,
361 const RegisterPrefixFailureCallback& onFailure,
378 unsetInterestFilter(
const RegisteredPrefixId* registeredPrefixId);
389 unsetInterestFilter(
const InterestFilterId* interestFilterId);
405 unregisterPrefix(
const RegisteredPrefixId* registeredPrefixId,
406 const UnregisterPrefixSuccessCallback& onSuccess,
407 const UnregisterPrefixFailureCallback& onFailure);
457 bool keepThread =
false)
459 this->doProcessEvents(timeout, keepThread);
476 boost::asio::io_service&
486 shared_ptr<Transport>
491 doProcessEvents(time::milliseconds timeout,
bool keepThread);
497 shared_ptr<Transport>
498 makeDefaultTransport();
505 construct(shared_ptr<Transport> transport, KeyChain& keyChain);
508 onReceiveElement(
const Block& blockFromDaemon);
515 unique_ptr<boost::asio::io_service> m_internalIoService;
517 boost::asio::io_service& m_ioService;
519 shared_ptr<Transport> m_transport;
528 unique_ptr<KeyChain> m_internalKeyChain;
530 unique_ptr<nfd::Controller> m_nfdController;
533 shared_ptr<Impl> m_impl;
538 #endif // NDN_FACE_HPP
Copyright (c) 2013-2017 Regents of the University of California.
Error(const std::string &what)
function< void(const std::string &)> UnregisterPrefixFailureCallback
Callback invoked when unregisterPrefix or unsetInterestFilter command fails.
Copyright (c) 2013-2017 Regents of the University of California.
declares the set of Interests a producer can serve, which starts with a name prefix, plus an optional regular expression
Represents a TLV element of NDN packet format.
represents an Interest packet
Signing parameters passed to KeyChain.
represents a Network Nack
Provide a communication channel with local or remote NDN forwarder.
function< void(const Name &, const std::string &)> RegisterPrefixFailureCallback
Callback invoked when registerPrefix or setInterestFilter command fails.
void processEvents(time::milliseconds timeout=time::milliseconds::zero(), bool keepThread=false)
Process any data to receive or call timeout callbacks.
function< void(const Name &)> RegisterPrefixSuccessCallback
Callback invoked when registerPrefix or setInterestFilter command succeeds.
Represents an absolute name.
boost::asio::io_service & getIoService()
function< void(const InterestFilter &, const Interest &)> InterestCallback
Callback invoked when incoming Interest matches the specified InterestFilter.
function< void()> UnregisterPrefixSuccessCallback
Callback invoked when unregisterPrefix or unsetInterestFilter command succeeds.
function< void(const Interest &)> TimeoutCallback
Callback invoked when expressed Interest times out.
function< void(const Interest &, const lp::Nack &)> NackCallback
Callback invoked when Nack is sent in response to expressed Interest.
Represents a Data packet.
#define NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PROTECTED
function< void(const Interest &, const Data &)> DataCallback
Callback invoked when expressed Interest gets satisfied with a Data packet.
Exception thrown when attempting to send a packet over size limit.