Public Member Functions | List of all members
ndn::PendingInterestTable::Entry Class Reference

Entry holds the callbacks and other fields for an entry in the pending interest table. More...

#include <pending-interest-table.hpp>

Public Member Functions

 Entry (uint64_t pendingInterestId, const ptr_lib::shared_ptr< const Interest > &interest, const OnData &onData, const OnTimeout &onTimeout, const OnNetworkNack &onNetworkNack)
 Create a new Entry with the given fields. More...
 
uint64_t getPendingInterestId ()
 Get the pendingInterestId given to the constructor. More...
 
const ptr_lib::shared_ptr< const Interest > & getInterest ()
 Get the interest given to the constructor (from Face.expressInterest). More...
 
const OnDatagetOnData ()
 Get the OnData callback given to the constructor. More...
 
const OnNetworkNackgetOnNetworkNack ()
 Get the OnNetworkNack callback given to the constructor. More...
 
void setIsRemoved ()
 Set the isRemoved flag which is returned by getIsRemoved().
 
bool getIsRemoved ()
 Check if setIsRemoved() was called. More...
 
void callTimeout ()
 Call onTimeout_ (if defined). More...
 

Detailed Description

Entry holds the callbacks and other fields for an entry in the pending interest table.

Constructor & Destructor Documentation

ndn::PendingInterestTable::Entry::Entry ( uint64_t  pendingInterestId,
const ptr_lib::shared_ptr< const Interest > &  interest,
const OnData onData,
const OnTimeout onTimeout,
const OnNetworkNack onNetworkNack 
)
inline

Create a new Entry with the given fields.

Note: You should not call this directly but call PendingInterestTable::add.

Member Function Documentation

void ndn::PendingInterestTable::Entry::callTimeout ( )

Call onTimeout_ (if defined).

This ignores exceptions from the call to onTimeout_.

const ptr_lib::shared_ptr<const Interest>& ndn::PendingInterestTable::Entry::getInterest ( )
inline

Get the interest given to the constructor (from Face.expressInterest).

Returns
The interest. NOTE: You must not change the interest object - if you need to change it then make a copy.
bool ndn::PendingInterestTable::Entry::getIsRemoved ( )
inline

Check if setIsRemoved() was called.

Returns
True if setIsRemoved() was called.
const OnData& ndn::PendingInterestTable::Entry::getOnData ( )
inline

Get the OnData callback given to the constructor.

Returns
The OnData callback.
const OnNetworkNack& ndn::PendingInterestTable::Entry::getOnNetworkNack ( )
inline

Get the OnNetworkNack callback given to the constructor.

Returns
The OnNetworkNack callback.
uint64_t ndn::PendingInterestTable::Entry::getPendingInterestId ( )
inline

Get the pendingInterestId given to the constructor.

Returns
The pendingInterestId.

The documentation for this class was generated from the following files: