represents a Prefix Announcement More...
#include <prefix-announcement.hpp>
Classes | |
class | Error |
Public Member Functions | |
PrefixAnnouncement () | |
PrefixAnnouncement (const Block &block) | |
PrefixAnnouncement (shared_ptr< const Data > data) | |
template<encoding::Tag TAG> | |
size_t | wireEncode (EncodingImpl< TAG > &encoder) const |
void | wireDecode (const Block &wire) |
Name | getAnnouncedName () const |
Get announced name. More... | |
shared_ptr< const Data > | getData () const |
PrefixAnnouncement & | setData (shared_ptr< const Data > data) |
represents a Prefix Announcement
This type wraps a Data, and is intended for self-learning. The Name of Data starts with /self-learning prefix, ends with a version component, and the components in the middle refer to the announced name prefix. The MetaInfo and Content of the Data must be empty.
Definition at line 40 of file prefix-announcement.hpp.
|
default |
|
explicit |
Definition at line 34 of file prefix-announcement.cpp.
References wireDecode().
|
explicit |
Definition at line 39 of file prefix-announcement.cpp.
References setData().
size_t ndn::lp::PrefixAnnouncement::wireEncode | ( | EncodingImpl< TAG > & | encoder | ) | const |
Definition at line 46 of file prefix-announcement.cpp.
References ndn::lp::tlv::PrefixAnnouncement.
void ndn::lp::PrefixAnnouncement::wireDecode | ( | const Block & | wire | ) |
Definition at line 58 of file prefix-announcement.cpp.
References ndn::tlv::Data, ndn::Block::get(), ndn::Block::parse(), ndn::lp::tlv::PrefixAnnouncement, setData(), ndn::to_string(), and ndn::Block::type().
Referenced by PrefixAnnouncement().
Name ndn::lp::PrefixAnnouncement::getAnnouncedName | ( | ) | const |
Get announced name.
Error | PrefixAnnouncement is empty |
Definition at line 69 of file prefix-announcement.cpp.
References ndn::Name::at(), ndn::Name::getSubName(), ndn::name::Component::isVersion(), ndn::lp::SELF_LEARNING_PREFIX, and ndn::Name::size().
|
inline |
Definition at line 75 of file prefix-announcement.hpp.
PrefixAnnouncement & ndn::lp::PrefixAnnouncement::setData | ( | shared_ptr< const Data > | data | ) |
Definition at line 83 of file prefix-announcement.cpp.
References ndn::lp::SELF_LEARNING_PREFIX.
Referenced by PrefixAnnouncement(), and wireDecode().