An Interest holds a Name and other fields for an interest. More...
#include <interest.hpp>
Public Member Functions | |
| Interest () | |
| Create a new Interest with an empty name and "none" for all values. More... | |
| Interest (const Name &name) | |
| Create a new Interest with the given name and "none" for other values. More... | |
| Interest (const Name &name, const time::milliseconds &interestLifetime) | |
| Create a new Interest with the given name and interest lifetime and "none" for other values. More... | |
| Interest (const Name &name, const Selectors &selectors, int scope, const time::milliseconds &interestLifetime, uint32_t nonce=0) | |
| Interest (const Name &name, int minSuffixComponents, int maxSuffixComponents, const Exclude &exclude, int childSelector, bool mustBeFresh, int scope, const time::milliseconds &interestLifetime, uint32_t nonce=0) | |
| Create a new Interest for the given name and values. More... | |
| Interest (const Block &wire) | |
| Create from wire encoding. More... | |
| template<bool T> | |
| size_t | wireEncode (EncodingImpl< T > &block) const |
| Fast encoding or block size estimation. More... | |
| const Block & | wireEncode () const |
| Encode to a wire format. More... | |
| void | wireDecode (const Block &wire) |
| Decode from the wire format. More... | |
| bool | hasWire () const |
| Check if already has wire. More... | |
| std::string | toUri () const |
| Encode the name according to the "NDN URI Scheme". More... | |
| bool | hasSelectors () const |
| bool | hasGuiders () const |
| bool | matchesName (const Name &name) const |
| Check if Interest name matches the given name (using ndn_Name_match) and the given name also conforms to the interest selectors. More... | |
| bool | matchesData (const Data &data) const |
Determines whether this Interest can be satisfied by data. More... | |
| const Name & | getName () const |
| Interest & | setName (const Name &name) |
| const Selectors & | getSelectors () const |
| Interest & | setSelectors (const Selectors &selectors) |
| int | getScope () const |
| Interest & | setScope (int scope) |
| const time::milliseconds & | getInterestLifetime () const |
| Interest & | setInterestLifetime (const time::milliseconds &interestLifetime) |
| const uint32_t & | getNonce () const |
| Get Interest's nonce. More... | |
| Interest & | setNonce (uint32_t nonce) |
| nfd::LocalControlHeader & | getLocalControlHeader () |
| const nfd::LocalControlHeader & | getLocalControlHeader () const |
| uint64_t | getIncomingFaceId () const |
| Interest & | setIncomingFaceId (uint64_t incomingFaceId) |
| uint64_t | getNextHopFaceId () const |
| Interest & | setNextHopFaceId (uint64_t nextHopFaceId) |
| int | getMinSuffixComponents () const |
| Interest & | setMinSuffixComponents (int minSuffixComponents) |
| int | getMaxSuffixComponents () const |
| Interest & | setMaxSuffixComponents (int maxSuffixComponents) |
| const KeyLocator & | getPublisherPublicKeyLocator () const |
| Interest & | setPublisherPublicKeyLocator (const KeyLocator &keyLocator) |
| const Exclude & | getExclude () const |
| Interest & | setExclude (const Exclude &exclude) |
| int | getChildSelector () const |
| Interest & | setChildSelector (int childSelector) |
| int | getMustBeFresh () const |
| Interest & | setMustBeFresh (bool mustBeFresh) |
| bool | operator== (const Interest &other) const |
| bool | operator!= (const Interest &other) const |
Friends | |
| class | nfd::LocalControlHeader |
An Interest holds a Name and other fields for an interest.
Definition at line 24 of file interest.hpp.
|
inline |
Create a new Interest with an empty name and "none" for all values.
Definition at line 30 of file interest.hpp.
|
inline |
Create a new Interest with the given name and "none" for other values.
| name | The name for the interest. |
Definition at line 42 of file interest.hpp.
|
inline |
Create a new Interest with the given name and interest lifetime and "none" for other values.
| name | The name for the interest. |
| interestLifetimeMilliseconds | The interest lifetime in time::milliseconds, or -1 for none. |
Definition at line 55 of file interest.hpp.
|
inline |
Definition at line 63 of file interest.hpp.
|
inline |
Create a new Interest for the given name and values.
| name | |
| minSuffixComponents | |
| maxSuffixComponents | |
| exclude | |
| childSelector | |
| mustBeFresh | |
| scope | |
| interestLifetime | |
| nonce |
Definition at line 91 of file interest.hpp.
|
inlineexplicit |
Create from wire encoding.
Definition at line 111 of file interest.hpp.
|
inline |
Definition at line 384 of file interest.hpp.
|
inline |
Definition at line 368 of file interest.hpp.
|
inline |
Definition at line 280 of file interest.hpp.
|
inline |
Definition at line 230 of file interest.hpp.
|
inline |
Definition at line 266 of file interest.hpp.
|
inline |
Definition at line 272 of file interest.hpp.
|
inline |
Definition at line 336 of file interest.hpp.
|
inline |
Definition at line 320 of file interest.hpp.
|
inline |
Definition at line 400 of file interest.hpp.
|
inline |
Definition at line 182 of file interest.hpp.
|
inline |
Definition at line 298 of file interest.hpp.
| const uint32_t & ndn::Interest::getNonce | ( | ) | const |
Get Interest's nonce.
If nonce was not set before this call, it will be automatically assigned to a random value
Const reference needed for C decoding
Definition at line 17 of file interest.cpp.
|
inline |
Definition at line 352 of file interest.hpp.
|
inline |
Definition at line 214 of file interest.hpp.
|
inline |
Definition at line 198 of file interest.hpp.
|
inline |
Definition at line 457 of file interest.hpp.
|
inline |
Definition at line 451 of file interest.hpp.
|
inline |
Check if already has wire.
Definition at line 586 of file interest.hpp.
| bool ndn::Interest::matchesData | ( | const Data & | data | ) | const |
Determines whether this Interest can be satisfied by data.
This method considers Name, MinSuffixComponents, MaxSuffixComponents, PublisherPublicKeyLocator, and Exclude. This method does not consider ChildSelector and MustBeFresh.
Definition at line 54 of file interest.cpp.
| bool ndn::Interest::matchesName | ( | const Name & | name | ) | const |
Check if Interest name matches the given name (using ndn_Name_match) and the given name also conforms to the interest selectors.
| self | A pointer to the ndn_Interest struct. |
| name | A pointer to the name to check. |
Definition at line 27 of file interest.cpp.
|
inline |
Definition at line 421 of file interest.hpp.
|
inline |
Definition at line 415 of file interest.hpp.
|
inline |
Definition at line 390 of file interest.hpp.
Definition at line 374 of file interest.hpp.
|
inline |
Definition at line 286 of file interest.hpp.
|
inline |
Definition at line 236 of file interest.hpp.
|
inline |
Definition at line 342 of file interest.hpp.
|
inline |
Definition at line 326 of file interest.hpp.
|
inline |
Definition at line 406 of file interest.hpp.
Definition at line 188 of file interest.hpp.
|
inline |
Definition at line 304 of file interest.hpp.
|
inline |
Definition at line 256 of file interest.hpp.
|
inline |
Definition at line 358 of file interest.hpp.
|
inline |
Definition at line 220 of file interest.hpp.
Definition at line 204 of file interest.hpp.
|
inline |
Encode the name according to the "NDN URI Scheme".
If there are interest selectors, append "?" and added the selectors as a query string. For example "/test/name?ndn.ChildSelector=1".
Definition at line 443 of file interest.hpp.
|
inline |
Decode from the wire format.
Definition at line 528 of file interest.hpp.
|
inline |
Fast encoding or block size estimation.
Definition at line 466 of file interest.hpp.
|
inline |
Encode to a wire format.
Definition at line 512 of file interest.hpp.
|
friend |
Definition at line 436 of file interest.hpp.