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);
186 Face(shared_ptr<Transport> transport,
KeyChain& keyChain);
201 Face(shared_ptr<Transport> transport, boost::asio::io_service& ioService);
217 Face(shared_ptr<Transport> transport, boost::asio::io_service& ioService,
KeyChain& keyChain);
233 const PendingInterestId*
234 expressInterest(
const Interest& interest,
235 const DataCallback& afterSatisfied,
236 const NackCallback& afterNacked,
237 const TimeoutCallback& afterTimeout);
245 removePendingInterest(
const PendingInterestId* pendingInterestId);
251 removeAllPendingInterests();
257 getNPendingInterests()
const;
280 const RegisteredPrefixId*
282 const InterestCallback& onInterest,
283 const RegisterPrefixFailureCallback& onFailure,
308 const RegisteredPrefixId*
310 const InterestCallback& onInterest,
311 const RegisterPrefixSuccessCallback& onSuccess,
312 const RegisterPrefixFailureCallback& onFailure,
328 const InterestFilterId*
330 const InterestCallback& onInterest);
349 const RegisteredPrefixId*
350 registerPrefix(
const Name& prefix,
351 const RegisterPrefixSuccessCallback& onSuccess,
352 const RegisterPrefixFailureCallback& onFailure,
369 unsetInterestFilter(
const RegisteredPrefixId* registeredPrefixId);
380 unsetInterestFilter(
const InterestFilterId* interestFilterId);
396 unregisterPrefix(
const RegisteredPrefixId* registeredPrefixId,
397 const UnregisterPrefixSuccessCallback& onSuccess,
398 const UnregisterPrefixFailureCallback& onFailure);
448 bool keepThread =
false)
450 this->doProcessEvents(
timeout, keepThread);
467 boost::asio::io_service&
470 return *
static_cast<boost::asio::io_service*
>(
nullptr);
477 shared_ptr<Transport>
488 shared_ptr<Transport>
489 makeDefaultTransport();
496 construct(shared_ptr<Transport> transport,
KeyChain& keyChain);
499 onReceiveElement(
const Block& blockFromDaemon);
505 shared_ptr<Transport> m_transport;
507 unique_ptr<nfd::Controller> m_nfdController;
510 shared_ptr<Impl> m_impl;
515 #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 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
boost::posix_time::time_duration milliseconds(long duration)
Represents a TLV element of NDN packet format.
represents an Interest packet
Signing parameters passed to KeyChain.
represents a Network Nack
Copyright (c) 2011-2015 Regents of the University of California.
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()
Return nullptr (cannot use IoService in simulations), preserved for API compatibility.
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.
#define NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PROTECTED
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.
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.