An InterestLite holds a NameLite and other fields for an interest. More...
#include <interest-lite.hpp>
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... | |
| NameLite & | getName () |
| const NameLite & | getName () const |
| int | getMinSuffixComponents () const |
| int | getMaxSuffixComponents () const |
| bool | getCanBePrefix () const |
| Get the CanBePrefix flag. More... | |
| const KeyLocatorLite & | getKeyLocator () const |
| KeyLocatorLite & | getKeyLocator () |
| ExcludeLite & | getExclude () |
| const ExcludeLite & | getExclude () const |
| int | getChildSelector () const |
| bool | getMustBeFresh () const |
| Return true if the content must be fresh. More... | |
| Milliseconds | getInterestLifetimeMilliseconds () const |
| const BlobLite & | getNonce () const |
| const BlobLite & | getForwardingHintWireEncoding () const |
| Get the forwarding hint, encoded as a sequence of delegations without the outer TLV type and length (which has already been removed). More... | |
| const BlobLite & | getLinkWireEncoding () const |
| int | getSelectedDelegationIndex () const |
| ndn_Error | setName (const NameLite &name) |
| Set this interest's name to have the values from the given name. More... | |
| InterestLite & | setMinSuffixComponents (int minSuffixComponents) |
| Set the min suffix components count. More... | |
| InterestLite & | setMaxSuffixComponents (int maxSuffixComponents) |
| Set the max suffix components count. More... | |
| InterestLite & | setCanBePrefix (bool canBePrefix) |
| Set the CanBePrefix flag. More... | |
| InterestLite & | setChildSelector (int childSelector) |
| Set the child selector. More... | |
| InterestLite & | setMustBeFresh (bool mustBeFresh) |
| Set the MustBeFresh flag. More... | |
| InterestLite & | setInterestLifetimeMilliseconds (Milliseconds interestLifetimeMilliseconds) |
| Set the interest lifetime. More... | |
| InterestLite & | setNonce (const BlobLite &nonce) |
| Set the interest nonce. More... | |
| InterestLite & | setForwardingHintWireEncoding (const BlobLite &forwardingHintWireEncoding) |
| Set the forwarding hint, encoded as a sequence of delegations without the outer TLV type and length (which will be added later). More... | |
| InterestLite & | setLinkWireEncoding (const BlobLite &linkWireEncoding) |
| Set the link wire encoding. More... | |
| InterestLite & | setSelectedDelegationIndex (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 InterestLite & | downCast (ndn_Interest &interest) |
| Downcast the reference to the ndn_Interest struct to a InterestLite. More... | |
| static const InterestLite & | downCast (const ndn_Interest &interest) |
Friends | |
| class | Tlv0_2WireFormatLite |
An InterestLite holds a NameLite and other fields for an interest.
| 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.
| nameComponents | The 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. |
| maxNameComponents | The number of elements in the allocated nameComponents array. |
| excludeEntries | The 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. |
| maxExcludeEntries | The number of elements in the allocated excludeEntries array. |
| keyNameComponents | The 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. |
| maxKeyNameComponents | The number of elements in the allocated keyNameComponents array. |
|
inlinestatic |
Downcast the reference to the ndn_Interest struct to a InterestLite.
| interest | A reference to the ndn_Interest struct. |
| bool ndn::InterestLite::getCanBePrefix | ( | ) | const |
Get the CanBePrefix flag.
If not specified, the default is true.
|
inline |
Get the forwarding hint, encoded as a sequence of delegations without the outer TLV type and length (which has already been removed).
| bool ndn::InterestLite::getMustBeFresh | ( | ) | const |
Return true if the content must be fresh.
The default is true.
| ndn_Error ndn::InterestLite::set | ( | const InterestLite & | other | ) |
Set this interest object to have the values from the other interest.
| other | The other InterestLite to get values from. |
| InterestLite & ndn::InterestLite::setCanBePrefix | ( | bool | canBePrefix | ) |
Set the CanBePrefix flag.
| canBePrefix | True if the Interest name can be a prefix. If you do not set this flag, the default value is true. |
|
inline |
Set the child selector.
| childSelector | The child selector. If not specified, set to -1. |
|
inline |
Set the forwarding hint, encoded as a sequence of delegations without the outer TLV type and length (which will be added later).
| nonce | The encoding value. This does not copy the bytes of the encoding. |
|
inline |
Set the interest lifetime.
| interestLifetimeMilliseconds | The interest lifetime in milliseconds. If not specified, set to -1. |
|
inline |
Set the link wire encoding.
| linkWireEncoding | The encoding value. This does not copy the bytes of the encoding. |
|
inline |
Set the max suffix components count.
| maxSuffixComponents | The max suffix components count. If not specified, set to -1. |
|
inline |
Set the min suffix components count.
| minSuffixComponents | The min suffix components count. If not specified, set to -1. |
| InterestLite & ndn::InterestLite::setMustBeFresh | ( | bool | mustBeFresh | ) |
Set the MustBeFresh flag.
| mustBeFresh | True if the content must be fresh, otherwise false. If you do not set this flag, the default value is true. |
|
inline |
Set this interest's name to have the values from the given name.
| name | The name to get values from. |
|
inline |
Set the interest nonce.
| nonce | The nonce value. This does not copy the bytes of the nonce. |
|
inline |
Set the selected delegation index.
| selectedDelegationIndex | The selected delegation index. If not specified, set to -1. |
1.8.6