22 #ifndef NDN_CXX_PREFIX_ANNOUNCEMENT_HPP
23 #define NDN_CXX_PREFIX_ANNOUNCEMENT_HPP
77 optional<uint64_t> version = nullopt)
const;
84 return m_announcedName;
110 optional<security::ValidityPeriod>
130 mutable optional<Data> m_data;
131 Name m_announcedName;
133 optional<security::ValidityPeriod> m_validity;
146 return !(lhs == rhs);
Represents a Data packet.
Represents an absolute name.
A prefix announcement object that represents an application's intent of registering a prefix toward i...
const Name & getAnnouncedName() const
Return announced name.
optional< security::ValidityPeriod > getValidityPeriod() const
Return absolute validity period.
PrefixAnnouncement & setValidityPeriod(optional< security::ValidityPeriod > validity)
Set absolute validity period.
const optional< Data > & getData() const
Get the Data representing the prefix announcement, if available.
time::milliseconds getExpiration() const
Return relative expiration period.
PrefixAnnouncement & setExpiration(time::milliseconds expiration)
Set relative expiration period.
PrefixAnnouncement()
Construct an empty prefix announcement.
PrefixAnnouncement & setAnnouncedName(Name name)
Set announced name.
const Data & toData(KeyChain &keyChain, const ndn::security::SigningInfo &si=security::SigningInfo(), optional< uint64_t > version=nullopt) const
Create a Data packet representing the prefix announcement, if it does not exist.
static const name::Component & getKeywordComponent()
Returns the well-known keyword name component used for prefix announcements (32=PA)
Represents a name component.
Signing parameters passed to KeyChain.
Represents an error in TLV encoding or decoding.
Error(const char *expectedType, uint32_t actualType)
boost::chrono::milliseconds milliseconds
bool operator!=(const Data &lhs, const Data &rhs)
bool operator==(const Data &lhs, const Data &rhs)
std::ostream & operator<<(std::ostream &os, const Data &data)