22 #ifndef NDN_CXX_PREFIX_ANNOUNCEMENT_HPP 23 #define NDN_CXX_PREFIX_ANNOUNCEMENT_HPP 74 optional<uint64_t> version = nullopt)
const;
81 return m_announcedName;
107 optional<security::ValidityPeriod>
120 mutable optional<Data> m_data;
121 Name m_announcedName;
122 time::milliseconds m_expiration = 0_ms;
123 optional<security::ValidityPeriod> m_validity;
135 return !(lhs == rhs);
147 #endif // NDN_CXX_PREFIX_ANNOUNCEMENT_HPP
The interface of signing key management.
std::ostream & operator<<(std::ostream &os, const Data &data)
PrefixAnnouncement & setValidityPeriod(optional< security::ValidityPeriod > validity)
Set absolute validity period.
bool operator!=(const Data &lhs, const Data &rhs)
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.
Signing parameters passed to KeyChain.
A prefix announcement object that represents an application's intent of registering a prefix toward i...
PrefixAnnouncement & setExpiration(time::milliseconds expiration)
Set relative expiration period.
const Name & getAnnouncedName() const
Return announced name.
Represents an absolute name.
PrefixAnnouncement & setAnnouncedName(Name name)
Set announced name.
optional< security::ValidityPeriod > getValidityPeriod() const
Return absolute validity period.
bool operator==(const Data &lhs, const Data &rhs)
PrefixAnnouncement()
Construct an empty prefix announcement.
time::milliseconds getExpiration() const
Return relative expiration period.
const optional< Data > & getData() const
Get the Data representing the prefix announcement, if available.
Represents a Data packet.
Error(const char *expectedType, uint32_t actualType)
represents an error in TLV encoding or decoding