39 class PendingInterestId;
40 class RegisteredPrefixId;
41 class InterestFilterId;
55 typedef function<void(const Interest&, const lp::Nack&)>
NackCallback;
93 class Error :
public std::runtime_error
98 :
std::runtime_error(what)
167 Face(shared_ptr<Transport> transport =
nullptr);
181 Face(shared_ptr<Transport> transport,
KeyChain& keyChain);
197 const PendingInterestId*
244 const RegisteredPrefixId*
272 const RegisteredPrefixId*
292 const InterestFilterId*
313 const RegisteredPrefixId*
412 bool keepThread =
false)
442 shared_ptr<Transport>
453 shared_ptr<Transport>
454 makeDefaultTransport();
461 construct(shared_ptr<Transport> transport,
KeyChain& keyChain);
464 onReceiveElement(
const Block& blockFromDaemon);
470 shared_ptr<Transport> m_transport;
472 unique_ptr<nfd::Controller> m_nfdController;
475 shared_ptr<Impl> m_impl;
480 #endif // NDN_FACE_HPP
Copyright (c) 2011-2015 Regents of the University of California.
virtual void doProcessEvents(time::milliseconds timeout, bool keepThread)
Error(const std::string &what)
The interface of signing key management.
function< void(const std::string &)> UnregisterPrefixFailureCallback
Callback invoked when unregisterPrefix or unsetInterestFilter command fails.
const RegisteredPrefixId * setInterestFilter(const InterestFilter &interestFilter, const InterestCallback &onInterest, const RegisterPrefixFailureCallback &onFailure, const security::SigningInfo &signingInfo=security::SigningInfo(), uint64_t flags=nfd::ROUTE_FLAG_CHILD_INHERIT)
Set InterestFilter to dispatch incoming matching interest to onInterest callback and register the fil...
declares the set of Interests a producer can serve, which starts with a name prefix, plus an optional regular expression
DummyIoService & getIoService()
Return nullptr (cannot use IoService in simulations), preserved for API compatibility.
Represents a TLV element of NDN packet format.
Represents an Interest packet.
Signing parameters passed to KeyChain.
void unregisterPrefix(const RegisteredPrefixId *registeredPrefixId, const UnregisterPrefixSuccessCallback &onSuccess, const UnregisterPrefixFailureCallback &onFailure)
Unregister prefix from RIB.
represents a Network Nack
void removeAllPendingInterests()
Cancel all previously expressed Interests.
Copyright (c) 2011-2015 Regents of the University of California.
size_t getNPendingInterests() const
Get number of pending Interests.
void shutdown()
Shutdown face operations.
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.
void unsetInterestFilter(const RegisteredPrefixId *registeredPrefixId)
Remove the registered prefix entry with the registeredPrefixId.
function< void(const InterestFilter &, const Interest &)> InterestCallback
Callback invoked when incoming Interest matches the specified InterestFilter.
Face(DummyIoService &ioService)
Create Face using default transport and given io_service.
function< void()> UnregisterPrefixSuccessCallback
Callback invoked when unregisterPrefix or unsetInterestFilter command succeeds.
void put(Data data)
Publish data packet.
OversizedPacketError(char pktType, const Name &name, size_t wireSize)
Constructor.
#define NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PROTECTED
const PendingInterestId * expressInterest(const Interest &interest, const DataCallback &afterSatisfied, const NackCallback &afterNacked, const TimeoutCallback &afterTimeout)
Express Interest.
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.
const RegisteredPrefixId * registerPrefix(const Name &prefix, const RegisterPrefixSuccessCallback &onSuccess, const RegisterPrefixFailureCallback &onFailure, const security::SigningInfo &signingInfo=security::SigningInfo(), uint64_t flags=nfd::ROUTE_FLAG_CHILD_INHERIT)
Register prefix with the connected NDN forwarder.
function< void(const Interest &, const Data &)> DataCallback
Callback invoked when expressed Interest gets satisfied with a Data packet.
void removePendingInterest(const PendingInterestId *pendingInterestId)
Cancel previously expressed Interest.
Exception thrown when attempting to send a packet over size limit.