#include <ndn-cxx/key-locator.hpp>
Classes | |
| class | Error |
Public Types | |
| enum | Type { KeyLocator_None = 65535, KeyLocator_Name = 0, KeyLocator_KeyDigest = 1, KeyLocator_Unknown = 255 } |
Public Member Functions | |
| KeyLocator () | |
| construct an empty KeyLocator More... | |
| KeyLocator (const Block &wire) | |
| construct from wire encoding More... | |
| KeyLocator (const Name &name) | |
| construct from Name More... | |
| KeyLocator & | clear () |
| clear KeyLocator More... | |
| bool | empty () const |
| const Block & | getKeyDigest () const |
| get KeyDigest element More... | |
| const Name & | getName () const |
| get Name element More... | |
| Type | getType () const |
| bool | operator!= (const KeyLocator &other) const |
| bool | operator== (const KeyLocator &other) const |
| KeyLocator & | setKeyDigest (const Block &keyDigest) |
| set KeyDigest element More... | |
| KeyLocator & | setKeyDigest (const ConstBufferPtr &keyDigest) |
| set KeyDigest value More... | |
| KeyLocator & | setName (const Name &name) |
| set Name element More... | |
| void | wireDecode (const Block &wire) |
| decode from wire encoding More... | |
| template<encoding::Tag TAG> | |
| size_t | wireEncode (EncodingImpl< TAG > &encoder) const |
| prepend wire encoding More... | |
| const Block & | wireEncode () const |
Definition at line 30 of file key-locator.hpp.
| Enumerator | |
|---|---|
| KeyLocator_None |
indicates KeyLocator is empty (internal use only) |
| KeyLocator_Name |
indicates KeyLocator contains a Name |
| KeyLocator_KeyDigest |
indicates KeyLocator contains a KeyDigest |
| KeyLocator_Unknown |
indicates KeyLocator contains an unknown element |
Definition at line 39 of file key-locator.hpp.
| ndn::KeyLocator::KeyLocator | ( | ) |
construct an empty KeyLocator
Definition at line 35 of file key-locator.cpp.
|
explicit |
construct from wire encoding
Definition at line 40 of file key-locator.cpp.
| ndn::KeyLocator::KeyLocator | ( | const Name & | name | ) |
construct from Name
Definition at line 45 of file key-locator.cpp.
| KeyLocator & ndn::KeyLocator::clear | ( | ) |
clear KeyLocator
type becomes KeyLocator_None
Definition at line 125 of file key-locator.cpp.
|
inline |
Definition at line 91 of file key-locator.hpp.
| const Block & ndn::KeyLocator::getKeyDigest | ( | ) | const |
get KeyDigest element
| Error | if type is not KeyLocator_KeyDigest |
Definition at line 153 of file key-locator.cpp.
| const Name & ndn::KeyLocator::getName | ( | ) | const |
get Name element
| Error | if type is not KeyLocator_Name |
Definition at line 135 of file key-locator.cpp.
|
inline |
Definition at line 97 of file key-locator.hpp.
|
inline |
Definition at line 148 of file key-locator.hpp.
| bool ndn::KeyLocator::operator== | ( | const KeyLocator & | other | ) | const |
Definition at line 184 of file key-locator.cpp.
| KeyLocator & ndn::KeyLocator::setKeyDigest | ( | const Block & | keyDigest | ) |
set KeyDigest element
type becomes KeyLocator_KeyDigest
Definition at line 162 of file key-locator.cpp.
| KeyLocator & ndn::KeyLocator::setKeyDigest | ( | const ConstBufferPtr & | keyDigest | ) |
set KeyDigest value
type becomes KeyLocator_KeyDigest
Definition at line 174 of file key-locator.cpp.
| KeyLocator & ndn::KeyLocator::setName | ( | const Name & | name | ) |
set Name element
type becomes KeyLocator_Name
Definition at line 144 of file key-locator.cpp.
| void ndn::KeyLocator::wireDecode | ( | const Block & | wire | ) |
decode from wire encoding
| Error | outer TLV type is not KeyLocator |
Definition at line 96 of file key-locator.cpp.
| size_t ndn::KeyLocator::wireEncode | ( | EncodingImpl< TAG > & | encoder | ) | const |
prepend wire encoding
| encoder | EncodingBuffer or Estimator |
Definition at line 52 of file key-locator.cpp.
| const Block & ndn::KeyLocator::wireEncode | ( | ) | const |
Definition at line 80 of file key-locator.cpp.