Public Member Functions | Static Public Member Functions | Friends | List of all members
ndn::InterestLite Class Reference

An InterestLite holds a NameLite and other fields for an interest. More...

#include <interest-lite.hpp>

Inheritance diagram for ndn::InterestLite:
ndn_Interest

Public Member Functions

 InterestLite (ndn_NameComponent *nameComponents, size_t maxNameComponents, ndn_ExcludeEntry *excludeEntries, size_t maxExcludeEntries, ndn_NameComponent *keyNameComponents, size_t maxKeyNameComponents)
 Create an InterestLite with the pre-allocated nameComponents and excludeEntries, and defaults for all the values. More...
 
NameLitegetName ()
 
const NameLitegetName () const
 
int getMinSuffixComponents () const
 
int getMaxSuffixComponents () const
 
const KeyLocatorLitegetKeyLocator () const
 
KeyLocatorLitegetKeyLocator ()
 
ExcludeLitegetExclude ()
 
const ExcludeLitegetExclude () const
 
int getChildSelector () const
 
bool getMustBeFresh () const
 Return true if the content must be fresh. More...
 
Milliseconds getInterestLifetimeMilliseconds () const
 
const BlobLitegetNonce () const
 
const BlobLitegetLinkWireEncoding () const
 
int getSelectedDelegationIndex () const
 
ndn_Error setName (const NameLite &name)
 Set this interest's name to have the values from the given name. More...
 
InterestLitesetMinSuffixComponents (int minSuffixComponents)
 Set the min suffix components count. More...
 
InterestLitesetMaxSuffixComponents (int maxSuffixComponents)
 Set the max suffix components count. More...
 
InterestLitesetChildSelector (int childSelector)
 Set the child selector. More...
 
InterestLitesetMustBeFresh (bool mustBeFresh)
 Set the MustBeFresh flag. More...
 
InterestLitesetInterestLifetimeMilliseconds (Milliseconds interestLifetimeMilliseconds)
 Set the interest lifetime. More...
 
InterestLitesetNonce (const BlobLite &nonce)
 Set the interest nonce. More...
 
InterestLitesetLinkWireEncoding (const BlobLite &linkWireEncoding)
 Set the link wire encoding. More...
 
InterestLitesetSelectedDelegationIndex (int selectedDelegationIndex)
 Set the selected delegation index. More...
 
ndn_Error set (const InterestLite &other)
 Set this interest object to have the values from the other interest. More...
 

Static Public Member Functions

static InterestLitedownCast (ndn_Interest &interest)
 Downcast the reference to the ndn_Interest struct to a InterestLite. More...
 
static const InterestLitedownCast (const ndn_Interest &interest)
 

Friends

class Tlv0_1_1WireFormatLite
 

Detailed Description

An InterestLite holds a NameLite and other fields for an interest.

Constructor & Destructor Documentation

ndn::InterestLite::InterestLite ( ndn_NameComponent nameComponents,
size_t  maxNameComponents,
ndn_ExcludeEntry excludeEntries,
size_t  maxExcludeEntries,
ndn_NameComponent keyNameComponents,
size_t  maxKeyNameComponents 
)

Create an InterestLite with the pre-allocated nameComponents and excludeEntries, and defaults for all the values.

Parameters
nameComponentsThe pre-allocated array of ndn_NameComponent. Instead of an array of NameLite::Component, this is an array of the underlying ndn_NameComponent struct so that it doesn't run the default constructor unnecessarily.
maxNameComponentsThe number of elements in the allocated nameComponents array.
excludeEntriesThe pre-allocated array of ndn_ExcludeEntry. Instead of an array of ExcludeLite::Entry, this is an array of the underlying ndn_ExcludeEntry struct so that it doesn't run the default constructor unnecessarily.
maxExcludeEntriesThe number of elements in the allocated excludeEntries array.
keyNameComponentsThe pre-allocated array of ndn_NameComponent for the keyLocator. Instead of an array of NameLite::Component, this is an array of the underlying ndn_NameComponent struct so that it doesn't run the default constructor unnecessarily.
maxKeyNameComponentsThe number of elements in the allocated keyNameComponents array.

Member Function Documentation

static InterestLite& ndn::InterestLite::downCast ( ndn_Interest interest)
inlinestatic

Downcast the reference to the ndn_Interest struct to a InterestLite.

Parameters
interestA reference to the ndn_Interest struct.
Returns
The same reference as InterestLite.
bool ndn::InterestLite::getMustBeFresh ( ) const

Return true if the content must be fresh.

The default is true.

Returns
true if must be fresh, otherwise false.
ndn_Error ndn::InterestLite::set ( const InterestLite other)

Set this interest object to have the values from the other interest.

Parameters
otherThe other InterestLite to get values from.
Returns
0 for success, or an error code if there is not enough room in this object's name components array or exclude entries array.
InterestLite& ndn::InterestLite::setChildSelector ( int  childSelector)
inline

Set the child selector.

Parameters
childSelectorThe child selector. If not specified, set to -1.
Returns
This InterestLite so that you can chain calls to update values.
InterestLite& ndn::InterestLite::setInterestLifetimeMilliseconds ( Milliseconds  interestLifetimeMilliseconds)
inline

Set the interest lifetime.

Parameters
interestLifetimeMillisecondsThe interest lifetime in milliseconds. If not specified, set to -1.
Returns
This InterestLite so that you can chain calls to update values.
InterestLite& ndn::InterestLite::setLinkWireEncoding ( const BlobLite linkWireEncoding)
inline

Set the link wire encoding.

Parameters
linkWireEncodingThe encoding value. This does not copy the bytes of the encoding.
Returns
This InterestLite so that you can chain calls to update values.
InterestLite& ndn::InterestLite::setMaxSuffixComponents ( int  maxSuffixComponents)
inline

Set the max suffix components count.

Parameters
maxSuffixComponentsThe max suffix components count. If not specified, set to -1.
Returns
This InterestLite so that you can chain calls to update values.
InterestLite& ndn::InterestLite::setMinSuffixComponents ( int  minSuffixComponents)
inline

Set the min suffix components count.

Parameters
minSuffixComponentsThe min suffix components count. If not specified, set to -1.
Returns
This InterestLite so that you can chain calls to update values.
InterestLite & ndn::InterestLite::setMustBeFresh ( bool  mustBeFresh)

Set the MustBeFresh flag.

Parameters
mustBeFreshTrue if the content must be fresh, otherwise false. If you do not set this flag, the default value is true.
Returns
This InterestLite so that you can chain calls to update values.
ndn_Error ndn::InterestLite::setName ( const NameLite name)
inline

Set this interest's name to have the values from the given name.

Parameters
nameThe name to get values from.
Returns
0 for success, or an error code if there is not enough room in this object's name components array.
InterestLite& ndn::InterestLite::setNonce ( const BlobLite nonce)
inline

Set the interest nonce.

Parameters
nonceThe nonce value. This does not copy the bytes of the nonce.
Returns
This InterestLite so that you can chain calls to update values.
InterestLite& ndn::InterestLite::setSelectedDelegationIndex ( int  selectedDelegationIndex)
inline

Set the selected delegation index.

Parameters
selectedDelegationIndexThe selected delegation index. If not specified, set to -1.
Returns
This InterestLite so that you can chain calls to update values.

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