#include <ndn-cxx/key-locator.hpp>
Classes | |
class | Error |
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 () |
Reset KeyLocator to its default-constructed state. More... | |
bool | empty () const |
const Block & | getKeyDigest () const |
Get nested KeyDigest element. More... | |
const Name & | getName () const |
Get nested Name element. More... | |
uint32_t | getType () const |
KeyLocator & | setKeyDigest (const Block &keyDigest) |
Set nested KeyDigest element (whole TLV). More... | |
KeyLocator & | setKeyDigest (const ConstBufferPtr &keyDigest) |
Set nested KeyDigest element value. More... | |
KeyLocator & | setName (const Name &name) |
Set nested Name element. More... | |
void | wireDecode (const Block &wire) |
Decode from wire encoding. More... | |
const Block & | wireEncode () const |
template<encoding::Tag TAG> | |
size_t | wireEncode (EncodingImpl< TAG > &encoder) const |
Prepend wire encoding to encoder . More... | |
Friends | |
std::ostream & | operator<< (std::ostream &os, const KeyLocator &kl) |
bool | operator== (const KeyLocator &lhs, const KeyLocator &rhs) |
Definition at line 31 of file key-locator.hpp.
|
default |
Construct an empty KeyLocator.
empty() == true
ndn::KeyLocator::KeyLocator | ( | const Name & | name | ) |
Construct from Name.
Definition at line 39 of file key-locator.cpp.
|
explicit |
Construct from wire encoding.
Definition at line 34 of file key-locator.cpp.
KeyLocator & ndn::KeyLocator::clear | ( | ) |
Reset KeyLocator to its default-constructed state.
empty() == true
getType() == tlv::Invalid
Definition at line 129 of file key-locator.cpp.
|
inline |
Definition at line 76 of file key-locator.hpp.
const Block & ndn::KeyLocator::getKeyDigest | ( | ) | const |
Get nested KeyDigest
element.
Error | if type is not tlv::KeyDigest |
Definition at line 156 of file key-locator.cpp.
const Name & ndn::KeyLocator::getName | ( | ) | const |
Get nested Name
element.
Definition at line 137 of file key-locator.cpp.
uint32_t ndn::KeyLocator::getType | ( | ) | const |
Definition at line 112 of file key-locator.cpp.
KeyLocator & ndn::KeyLocator::setKeyDigest | ( | const Block & | keyDigest | ) |
Set nested KeyDigest
element (whole TLV).
getType() == tlv::KeyDigest
std::invalid_argument | Block type is not tlv::KeyDigest |
Definition at line 167 of file key-locator.cpp.
KeyLocator & ndn::KeyLocator::setKeyDigest | ( | const ConstBufferPtr & | keyDigest | ) |
Set nested KeyDigest
element value.
keyDigest | buffer to use as TLV-VALUE of the nested KeyDigest element. |
getType() == tlv::KeyDigest
Definition at line 178 of file key-locator.cpp.
KeyLocator & ndn::KeyLocator::setName | ( | const Name & | name | ) |
void ndn::KeyLocator::wireDecode | ( | const Block & | wire | ) |
Decode from wire encoding.
Error | outer TLV type is not KeyLocator |
Definition at line 84 of file key-locator.cpp.
const Block & ndn::KeyLocator::wireEncode | ( | ) | const |
Definition at line 68 of file key-locator.cpp.
size_t ndn::KeyLocator::wireEncode | ( | EncodingImpl< TAG > & | encoder | ) | const |
Prepend wire encoding to encoder
.
Definition at line 46 of file key-locator.cpp.
|
friend |
Definition at line 142 of file key-locator.hpp.
|
friend |
Definition at line 137 of file key-locator.hpp.