ndn::util::DummyClientFace Class Reference

a client-side face for unit testing More...

#include <dummy-client-face.hpp>

Inheritance diagram for ndn::util::DummyClientFace:
[legend]
Collaboration diagram for ndn::util::DummyClientFace:
[legend]

Data Structures

class  Options
 options for DummyClientFace More...
 
class  Transport
 

Public Member Functions

 DummyClientFace (const Options &options=Options())
 Create a dummy face with internal IO service. More...
 
 DummyClientFace (security::v1::KeyChain &keyChain, const Options &options=Options())
 Create a dummy face with internal IO service and the specified KeyChain. More...
 
 DummyClientFace (boost::asio::io_service &ioService, const Options &options=Options())
 Create a dummy face with the provided IO service. More...
 
 DummyClientFace (boost::asio::io_service &ioService, security::v1::KeyChain &keyChain, const Options &options=Options())
 Create a dummy face with the provided IO service and the specified KeyChain. More...
 
void receive (const Interest &interest)
 cause the Face to receive an interest More...
 
void receive (const Data &data)
 cause the Face to receive a data More...
 
void receive (const lp::Nack &nack)
 cause the Face to receive a nack More...
 
const PendingInterestId * expressInterest (const Interest &interest, const DataCallback &afterSatisfied, const NackCallback &afterNacked, const TimeoutCallback &afterTimeout)
 Express Interest. More...
 
const PendingInterestId * expressInterest (const Interest &interest, const OnData &onData, const OnTimeout &onTimeout=nullptr)
 Express Interest. More...
 
const PendingInterestId * expressInterest (const Name &name, const Interest &tmpl, const OnData &onData, const OnTimeout &onTimeout=nullptr)
 Express Interest using name and Interest template. More...
 
void removePendingInterest (const PendingInterestId *pendingInterestId)
 Cancel previously expressed Interest. More...
 
void removeAllPendingInterests ()
 Cancel all previously expressed Interests. More...
 
size_t getNPendingInterests () const
 Get number of pending Interests. More...
 
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 filtered prefix with the connected NDN forwarder. More...
 
const RegisteredPrefixId * setInterestFilter (const InterestFilter &interestFilter, const InterestCallback &onInterest, const RegisterPrefixSuccessCallback &onSuccess, 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 filtered prefix with the connected NDN forwarder. More...
 
const InterestFilterId * setInterestFilter (const InterestFilter &interestFilter, const InterestCallback &onInterest)
 Set InterestFilter to dispatch incoming matching interest to onInterest callback. More...
 
const RegisteredPrefixId * setInterestFilter (const InterestFilter &interestFilter, const OnInterest &onInterest, const RegisterPrefixSuccessCallback &onSuccess, const RegisterPrefixFailureCallback &onFailure, const security::v1::IdentityCertificate &certificate, uint64_t flags=nfd::ROUTE_FLAG_CHILD_INHERIT)
 Set InterestFilter to dispatch incoming matching interest to onInterest callback and register the filtered prefix with the connected NDN forwarder. More...
 
const RegisteredPrefixId * setInterestFilter (const InterestFilter &interestFilter, const OnInterest &onInterest, const RegisterPrefixFailureCallback &onFailure, const security::v1::IdentityCertificate &certificate, uint64_t flags=nfd::ROUTE_FLAG_CHILD_INHERIT)
 Set InterestFilter to dispatch incoming matching interest to onInterest callback and register the filtered prefix with the connected NDN forwarder. More...
 
const RegisteredPrefixId * setInterestFilter (const InterestFilter &interestFilter, const OnInterest &onInterest, const RegisterPrefixSuccessCallback &onSuccess, const RegisterPrefixFailureCallback &onFailure, const Name &identity, uint64_t flags=nfd::ROUTE_FLAG_CHILD_INHERIT)
 Set InterestFilter to dispatch incoming matching interest to onInterest callback and register the filtered prefix with the connected NDN forwarder. More...
 
const RegisteredPrefixId * setInterestFilter (const InterestFilter &interestFilter, const OnInterest &onInterest, const RegisterPrefixFailureCallback &onFailure, const Name &identity, uint64_t flags=nfd::ROUTE_FLAG_CHILD_INHERIT)
 Set InterestFilter to dispatch incoming matching interest to onInterest callback and register the filtered prefix with the connected NDN forwarder. More...
 
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. More...
 
const RegisteredPrefixId * registerPrefix (const Name &prefix, const RegisterPrefixSuccessCallback &onSuccess, const RegisterPrefixFailureCallback &onFailure, const security::v1::IdentityCertificate &certificate, uint64_t flags=nfd::ROUTE_FLAG_CHILD_INHERIT)
 Register prefix with the connected NDN forwarder. More...
 
const RegisteredPrefixId * registerPrefix (const Name &prefix, const RegisterPrefixSuccessCallback &onSuccess, const RegisterPrefixFailureCallback &onFailure, const Name &identity, uint64_t flags=nfd::ROUTE_FLAG_CHILD_INHERIT)
 Register prefix with the connected NDN forwarder and call onInterest when a matching interest is received. More...
 
void unsetInterestFilter (const RegisteredPrefixId *registeredPrefixId)
 Remove the registered prefix entry with the registeredPrefixId. More...
 
void unsetInterestFilter (const InterestFilterId *interestFilterId)
 Remove previously set InterestFilter from library's FIB. More...
 
void unregisterPrefix (const RegisteredPrefixId *registeredPrefixId, const UnregisterPrefixSuccessCallback &onSuccess, const UnregisterPrefixFailureCallback &onFailure)
 Unregister prefix from RIB. More...
 
void put (const Data &data)
 Publish data packet. More...
 
void put (const lp::Nack &nack)
 sends a Network NACK More...
 
void processEvents (const time::milliseconds &timeout=time::milliseconds::zero(), bool keepThread=false)
 Process any data to receive or call timeout callbacks. More...
 
void shutdown ()
 Shutdown face operations. More...
 
boost::asio::io_service & getIoService ()
 

Data Fields

std::vector< InterestsentInterests
 Interests sent out of this DummyClientFace. More...
 
std::vector< DatasentData
 Data sent out of this DummyClientFace. More...
 
std::vector< lp::NacksentNacks
 Nacks sent out of this DummyClientFace. More...
 
Signal< DummyClientFace, InterestonSendInterest
 emits whenever an Interest is sent More...
 
Signal< DummyClientFace, DataonSendData
 emits whenever a Data packet is sent More...
 
Signal< DummyClientFace, lp::NackonSendNack
 emits whenever a Nack is sent More...
 

Protected Member Functions

shared_ptr< TransportgetTransport ()
 

Detailed Description

a client-side face for unit testing

Definition at line 34 of file dummy-client-face.hpp.

Constructor & Destructor Documentation

ndn::util::DummyClientFace::DummyClientFace ( const Options options = Options())
explicit

Create a dummy face with internal IO service.

Definition at line 87 of file dummy-client-face.cpp.

ndn::util::DummyClientFace::DummyClientFace ( security::v1::KeyChain keyChain,
const Options options = Options() 
)
explicit

Create a dummy face with internal IO service and the specified KeyChain.

Definition at line 95 of file dummy-client-face.cpp.

ndn::util::DummyClientFace::DummyClientFace ( boost::asio::io_service &  ioService,
const Options options = Options() 
)
explicit

Create a dummy face with the provided IO service.

Definition at line 103 of file dummy-client-face.cpp.

ndn::util::DummyClientFace::DummyClientFace ( boost::asio::io_service &  ioService,
security::v1::KeyChain keyChain,
const Options options = Options() 
)

Create a dummy face with the provided IO service and the specified KeyChain.

Definition at line 112 of file dummy-client-face.cpp.

Member Function Documentation

const PendingInterestId * ndn::Face::expressInterest ( const Interest interest,
const DataCallback afterSatisfied,
const NackCallback afterNacked,
const TimeoutCallback afterTimeout 
)
inherited

Express Interest.

Parameters
interestthe Interest; a copy will be made, so that the caller is not required to maintain the argument unchanged
afterSatisfiedfunction to be invoked if Data is returned
afterNackedfunction to be invoked if Network NACK is returned
afterTimeoutfunction to be invoked if neither Data nor Network NACK is returned within InterestLifetime

Definition at line 166 of file face.cpp.

const PendingInterestId * ndn::Face::expressInterest ( const Interest interest,
const OnData onData,
const OnTimeout onTimeout = nullptr 
)
inherited

Express Interest.

Parameters
interestAn Interest to be expressed
onDataCallback to be called when a matching data packet is received
onTimeout(optional) A function object to call if the interest times out or is Nacked
Returns
The pending interest ID which can be used with removePendingInterest
Exceptions
Errorwhen Interest size exceeds maximum limit (MAX_NDN_PACKET_SIZE)
Deprecated:
use expressInterest(Interest, DataCallback, NackCallback, TimeoutCallback)

Definition at line 187 of file face.cpp.

const PendingInterestId * ndn::Face::expressInterest ( const Name name,
const Interest tmpl,
const OnData onData,
const OnTimeout onTimeout = nullptr 
)
inherited

Express Interest using name and Interest template.

Parameters
nameName of the Interest
tmplInterest template to fill parameters
onDataCallback to be called when a matching data packet is received
onTimeout(optional) A function object to call if the interest times out or is Nacked
Returns
Opaque pending interest ID which can be used with removePendingInterest
Exceptions
Errorwhen Interest size exceeds maximum limit (MAX_NDN_PACKET_SIZE)
Deprecated:
use expressInterest(Interest, DataCallback, NackCallback, TimeoutCallback)

Definition at line 208 of file face.cpp.

boost::asio::io_service& ndn::Face::getIoService ( )
inlineinherited
Returns
reference to IO service object

Definition at line 696 of file face.hpp.

size_t ndn::Face::getNPendingInterests ( ) const
inherited

Get number of pending Interests.

Definition at line 232 of file face.cpp.

shared_ptr< Transport > ndn::Face::getTransport ( )
protectedinherited
Returns
underlying transport

Definition at line 160 of file face.cpp.

void ndn::Face::processEvents ( const time::milliseconds &  timeout = time::milliseconds::zero(),
bool  keepThread = false 
)
inlineinherited

Process any data to receive or call timeout callbacks.

This call will block forever (default timeout == 0) to process IO on the face. To exit, one expected to call face.shutdown() from one of the callback methods.

If positive timeout is specified, then processEvents will exit after this timeout, if not stopped earlier with face.shutdown() or when all active events finish. The call can be called repeatedly, if desired.

If negative timeout is specified, then processEvents will not block and process only pending events.

Parameters
timeoutmaximum time to block the thread
keepThreadKeep thread in a blocked state (in event processing), even when there are no outstanding events (e.g., no Interest/Data is expected)
Exceptions
Thismay throw an exception for reading data or in the callback for processing the data. If you call this from an main event loop, you may want to catch and log/disregard all exceptions.

Definition at line 675 of file face.hpp.

void ndn::Face::put ( const Data data)
inherited

Publish data packet.

This method can be called to satisfy the incoming Interest or to put Data packet into the cache of the local NDN forwarder.

Parameters
dataData packet to publish. It is highly recommended to use Data packet that was created using make_shared<Data>(...). Otherwise, put() will make an extra copy of the Data packet to ensure validity of published Data until asynchronous put() operation finishes.
Exceptions
Errorwhen Data size exceeds maximum limit (MAX_NDN_PACKET_SIZE)

Definition at line 238 of file face.cpp.

void ndn::Face::put ( const lp::Nack nack)
inherited

sends a Network NACK

Parameters
nackthe Nack; a copy will be made, so that the caller is not required to maintain the argument unchanged

Definition at line 271 of file face.cpp.

void ndn::util::DummyClientFace::receive ( const Interest interest)

cause the Face to receive an interest

Definition at line 231 of file dummy-client-face.cpp.

void ndn::util::DummyClientFace::receive ( const Data data)

cause the Face to receive a data

Definition at line 243 of file dummy-client-face.cpp.

void ndn::util::DummyClientFace::receive ( const lp::Nack nack)

cause the Face to receive a nack

Definition at line 254 of file dummy-client-face.cpp.

const RegisteredPrefixId * ndn::Face::registerPrefix ( const Name prefix,
const RegisterPrefixSuccessCallback onSuccess,
const RegisterPrefixFailureCallback onFailure,
const security::SigningInfo signingInfo = security::SigningInfo(),
uint64_t  flags = nfd::ROUTE_FLAG_CHILD_INHERIT 
)
inherited

Register prefix with the connected NDN forwarder.

This method only modifies forwarder's RIB and does not associate any onInterest callbacks. Use setInterestFilter method to dispatch incoming Interests to the right callbacks.

Parameters
prefixA prefix to register with the connected NDN forwarder
onSuccessA callback to be called when prefixRegister command succeeds
onFailureA callback to be called when prefixRegister command fails
signingInfo(optional) Signing parameters. When omitted, a default parameters used in the signature will be used.
flagsPrefix registration flags
Returns
The registered prefix ID which can be used with unregisterPrefix
See also
nfd::RouteFlags

Definition at line 392 of file face.cpp.

const RegisteredPrefixId * ndn::Face::registerPrefix ( const Name prefix,
const RegisterPrefixSuccessCallback onSuccess,
const RegisterPrefixFailureCallback onFailure,
const security::v1::IdentityCertificate certificate,
uint64_t  flags = nfd::ROUTE_FLAG_CHILD_INHERIT 
)
inherited

Register prefix with the connected NDN forwarder.

Deprecated:
Use override with SigningInfo instead of this function

This method only modifies forwarder's RIB and does not associate any onInterest callbacks. Use setInterestFilter method to dispatch incoming Interests to the right callbacks.

Parameters
prefixA prefix to register with the connected NDN forwarder
onSuccessA callback to be called when prefixRegister command succeeds
onFailureA callback to be called when prefixRegister command fails
certificate(optional) A certificate under which the prefix registration command is signed. When omitted, a default certificate of the default identity is used to sign the registration command
flags(optional) RIB flags
Returns
The registered prefix ID which can be used with unregisterPrefix

Definition at line 406 of file face.cpp.

const RegisteredPrefixId * ndn::Face::registerPrefix ( const Name prefix,
const RegisterPrefixSuccessCallback onSuccess,
const RegisterPrefixFailureCallback onFailure,
const Name identity,
uint64_t  flags = nfd::ROUTE_FLAG_CHILD_INHERIT 
)
inherited

Register prefix with the connected NDN forwarder and call onInterest when a matching interest is received.

Deprecated:
Use override with SigningInfo instead of this function

This method only modifies forwarder's RIB and does not associate any onInterest callbacks. Use setInterestFilter method to dispatch incoming Interests to the right callbacks.

Parameters
prefixA prefix to register with the connected NDN forwarder
onSuccessA callback to be called when prefixRegister command succeeds
onFailureA callback to be called when prefixRegister command fails
identityA signing identity. A prefix registration command is signed under the default certificate of this identity
flags(optional) RIB flags
Returns
The registered prefix ID which can be used with unregisterPrefix

Definition at line 420 of file face.cpp.

void ndn::Face::removeAllPendingInterests ( )
inherited

Cancel all previously expressed Interests.

Definition at line 224 of file face.cpp.

void ndn::Face::removePendingInterest ( const PendingInterestId *  pendingInterestId)
inherited

Cancel previously expressed Interest.

Parameters
pendingInterestIdThe ID returned from expressInterest.

Definition at line 216 of file face.cpp.

const RegisteredPrefixId * ndn::Face::setInterestFilter ( const InterestFilter interestFilter,
const InterestCallback onInterest,
const RegisterPrefixFailureCallback onFailure,
const security::SigningInfo signingInfo = security::SigningInfo(),
uint64_t  flags = nfd::ROUTE_FLAG_CHILD_INHERIT 
)
inherited

Set InterestFilter to dispatch incoming matching interest to onInterest callback and register the filtered prefix with the connected NDN forwarder.

This version of setInterestFilter combines setInterestFilter and registerPrefix operations and is intended to be used when only one filter for the same prefix needed to be set. When multiple names sharing the same prefix should be dispatched to different callbacks, use one registerPrefix call, followed (in onSuccess callback) by a series of setInterestFilter calls.

Parameters
interestFilterInterest filter (prefix part will be registered with the forwarder)
onInterestA callback to be called when a matching interest is received
onFailureA callback to be called when prefixRegister command fails
flags(optional) RIB flags
signingInfo(optional) Signing parameters. When omitted, a default parameters used in the signature will be used.
Returns
Opaque registered prefix ID which can be used with unsetInterestFilter or removeRegisteredPrefix

Definition at line 294 of file face.cpp.

const RegisteredPrefixId * ndn::Face::setInterestFilter ( const InterestFilter interestFilter,
const InterestCallback onInterest,
const RegisterPrefixSuccessCallback onSuccess,
const RegisterPrefixFailureCallback onFailure,
const security::SigningInfo signingInfo = security::SigningInfo(),
uint64_t  flags = nfd::ROUTE_FLAG_CHILD_INHERIT 
)
inherited

Set InterestFilter to dispatch incoming matching interest to onInterest callback and register the filtered prefix with the connected NDN forwarder.

This version of setInterestFilter combines setInterestFilter and registerPrefix operations and is intended to be used when only one filter for the same prefix needed to be set. When multiple names sharing the same prefix should be dispatched to different callbacks, use one registerPrefix call, followed (in onSuccess callback) by a series of setInterestFilter calls.

Parameters
interestFilterInterest filter (prefix part will be registered with the forwarder)
onInterestA callback to be called when a matching interest is received
onSuccessA callback to be called when prefixRegister command succeeds
onFailureA callback to be called when prefixRegister command fails
flags(optional) RIB flags
signingInfo(optional) Signing parameters. When omitted, a default parameters used in the signature will be used.
Returns
Opaque registered prefix ID which can be used with unsetInterestFilter or removeRegisteredPrefix

Definition at line 304 of file face.cpp.

const InterestFilterId * ndn::Face::setInterestFilter ( const InterestFilter interestFilter,
const InterestCallback onInterest 
)
inherited

Set InterestFilter to dispatch incoming matching interest to onInterest callback.

Parameters
interestFilterInterest
onInterestA callback to be called when a matching interest is received

This method modifies library's FIB only, and does not register the prefix with the forwarder. It will always succeed. To register prefix with the forwarder, use registerPrefix, or use the setInterestFilter overload taking two callbacks.

Returns
Opaque interest filter ID which can be used with unsetInterestFilter

Definition at line 321 of file face.cpp.

const RegisteredPrefixId * ndn::Face::setInterestFilter ( const InterestFilter interestFilter,
const OnInterest onInterest,
const RegisterPrefixSuccessCallback onSuccess,
const RegisterPrefixFailureCallback onFailure,
const security::v1::IdentityCertificate certificate,
uint64_t  flags = nfd::ROUTE_FLAG_CHILD_INHERIT 
)
inherited

Set InterestFilter to dispatch incoming matching interest to onInterest callback and register the filtered prefix with the connected NDN forwarder.

Deprecated:
Use override with SigningInfo instead of this function

This version of setInterestFilter combines setInterestFilter and registerPrefix operations and is intended to be used when only one filter for the same prefix needed to be set. When multiple names sharing the same prefix should be dispatched to different callbacks, use one registerPrefix call, followed (in onSuccess callback) by a series of setInterestFilter calls.

Parameters
interestFilterInterest filter (prefix part will be registered with the forwarder)
onInterestA callback to be called when a matching interest is received
onSuccessA callback to be called when prefixRegister command succeeds
onFailureA callback to be called when prefixRegister command fails
flags(optional) RIB flags
certificate(optional) A certificate under which the prefix registration command is signed. When omitted, a default certificate of the default identity is used to sign the registration command
Returns
Opaque registered prefix ID which can be used with unsetInterestFilter or removeRegisteredPrefix

Definition at line 336 of file face.cpp.

const RegisteredPrefixId * ndn::Face::setInterestFilter ( const InterestFilter interestFilter,
const OnInterest onInterest,
const RegisterPrefixFailureCallback onFailure,
const security::v1::IdentityCertificate certificate,
uint64_t  flags = nfd::ROUTE_FLAG_CHILD_INHERIT 
)
inherited

Set InterestFilter to dispatch incoming matching interest to onInterest callback and register the filtered prefix with the connected NDN forwarder.

Deprecated:
Use override with SigningInfo instead of this function

This version of setInterestFilter combines setInterestFilter and registerPrefix operations and is intended to be used when only one filter for the same prefix needed to be set. When multiple names sharing the same prefix should be dispatched to different callbacks, use one registerPrefix call, followed (in onSuccess callback) by a series of setInterestFilter calls.

Parameters
interestFilterInterest filter (prefix part will be registered with the forwarder)
onInterestA callback to be called when a matching interest is received
onFailureA callback to be called when prefixRegister command fails
flags(optional) RIB flags
certificate(optional) A certificate under which the prefix registration command is signed. When omitted, a default certificate of the default identity is used to sign the registration command
Returns
Opaque registered prefix ID which can be used with unsetInterestFilter or removeRegisteredPrefix

Definition at line 351 of file face.cpp.

const RegisteredPrefixId * ndn::Face::setInterestFilter ( const InterestFilter interestFilter,
const OnInterest onInterest,
const RegisterPrefixSuccessCallback onSuccess,
const RegisterPrefixFailureCallback onFailure,
const Name identity,
uint64_t  flags = nfd::ROUTE_FLAG_CHILD_INHERIT 
)
inherited

Set InterestFilter to dispatch incoming matching interest to onInterest callback and register the filtered prefix with the connected NDN forwarder.

Deprecated:
Use override with SigningInfo instead of this function

This version of setInterestFilter combines setInterestFilter and registerPrefix operations and is intended to be used when only one filter for the same prefix needed to be set. When multiple names sharing the same prefix should be dispatched to different callbacks, use one registerPrefix call, followed (in onSuccess callback) by a series of setInterestFilter calls.

Parameters
interestFilterInterest filter (prefix part will be registered with the forwarder)
onInterestA callback to be called when a matching interest is received
onSuccessA callback to be called when prefixRegister command succeeds
onFailureA callback to be called when prefixRegister command fails
identityA signing identity. A prefix registration command is signed under the default certificate of this identity
flags(optional) RIB flags
Returns
Opaque registered prefix ID which can be used with removeRegisteredPrefix

Definition at line 365 of file face.cpp.

const RegisteredPrefixId * ndn::Face::setInterestFilter ( const InterestFilter interestFilter,
const OnInterest onInterest,
const RegisterPrefixFailureCallback onFailure,
const Name identity,
uint64_t  flags = nfd::ROUTE_FLAG_CHILD_INHERIT 
)
inherited

Set InterestFilter to dispatch incoming matching interest to onInterest callback and register the filtered prefix with the connected NDN forwarder.

Deprecated:
Use override with SigningInfo instead of this function

This version of setInterestFilter combines setInterestFilter and registerPrefix operations and is intended to be used when only one filter for the same prefix needed to be set. When multiple names sharing the same prefix should be dispatched to different callbacks, use one registerPrefix call, followed (in onSuccess callback) by a series of setInterestFilter calls.

Parameters
interestFilterInterest filter (prefix part will be registered with the forwarder)
onInterestA callback to be called when a matching interest is received
onFailureA callback to be called when prefixRegister command fails
identityA signing identity. A prefix registration command is signed under the default certificate of this identity
flags(optional) RIB flags
Returns
Opaque registered prefix ID which can be used with removeRegisteredPrefix

Definition at line 379 of file face.cpp.

void ndn::Face::shutdown ( )
inherited

Shutdown face operations.

This method cancels all pending operations and closes connection to NDN Forwarder.

Note that this method does not stop IO service and if the same IO service is shared between multiple Faces or with other IO objects (e.g., Scheduler).

Definition at line 497 of file face.cpp.

void ndn::Face::unregisterPrefix ( const RegisteredPrefixId *  registeredPrefixId,
const UnregisterPrefixSuccessCallback onSuccess,
const UnregisterPrefixFailureCallback onFailure 
)
inherited

Unregister prefix from RIB.

unregisterPrefix will use the same credentials as original setInterestFilter/registerPrefix command

If registeredPrefixId was obtained using setInterestFilter, the corresponding InterestFilter will be unset too.

Parameters
registeredPrefixIdThe ID returned from registerPrefix
onSuccessCallback to be called when operation succeeds
onFailureCallback to be called when operation fails

Definition at line 448 of file face.cpp.

void ndn::Face::unsetInterestFilter ( const RegisteredPrefixId *  registeredPrefixId)
inherited

Remove the registered prefix entry with the registeredPrefixId.

This does not affect another registered prefix with a different registeredPrefixId, even it if has the same prefix name. If there is no entry with the registeredPrefixId, do nothing.

unsetInterestFilter will use the same credentials as original setInterestFilter/registerPrefix command

Parameters
registeredPrefixIdThe ID returned from registerPrefix

Definition at line 432 of file face.cpp.

void ndn::Face::unsetInterestFilter ( const InterestFilterId *  interestFilterId)
inherited

Remove previously set InterestFilter from library's FIB.

This method always succeeds and will NOT send any request to the connected forwarder.

Parameters
interestFilterIdThe ID returned from setInterestFilter.

Definition at line 440 of file face.cpp.

Field Documentation

Signal<DummyClientFace, Data> ndn::util::DummyClientFace::onSendData

emits whenever a Data packet is sent

After .put, .processEvents must be called before this signal would be emitted.

Definition at line 160 of file dummy-client-face.hpp.

Signal<DummyClientFace, Interest> ndn::util::DummyClientFace::onSendInterest

emits whenever an Interest is sent

After .expressInterest, .processEvents must be called before this signal would be emitted.

Definition at line 154 of file dummy-client-face.hpp.

Signal<DummyClientFace, lp::Nack> ndn::util::DummyClientFace::onSendNack

emits whenever a Nack is sent

After .put, .processEvents must be called before this signal would be emitted.

Definition at line 166 of file dummy-client-face.hpp.

std::vector<Data> ndn::util::DummyClientFace::sentData

Data sent out of this DummyClientFace.

Sent Data are appended to this container if options.enablePacketLogger is true. User of this class is responsible for cleaning up the container, if necessary. After .put, .processEvents must be called before the Data would show up here.

Definition at line 140 of file dummy-client-face.hpp.

std::vector<Interest> ndn::util::DummyClientFace::sentInterests

Interests sent out of this DummyClientFace.

Sent Interests are appended to this container if options.enablePacketLogger is true. User of this class is responsible for cleaning up the container, if necessary. After .expressInterest, .processEvents must be called before the Interest would show up here.

Definition at line 132 of file dummy-client-face.hpp.

std::vector<lp::Nack> ndn::util::DummyClientFace::sentNacks

Nacks sent out of this DummyClientFace.

Sent Nacks are appended to this container if options.enablePacketLogger is true. User of this class is responsible for cleaning up the container, if necessary. After .put, .processEvents must be called before the NACK would show up here.

Definition at line 148 of file dummy-client-face.hpp.