22 #ifndef NDN_CXX_PREFIX_ANNOUNCEMENT_HPP
23 #define NDN_CXX_PREFIX_ANNOUNCEMENT_HPP
61 const std::optional<Data>&
77 std::optional<uint64_t> version = std::nullopt)
const;
84 return m_announcedName;
110 std::optional<security::ValidityPeriod>
141 return lhs.m_announcedName == rhs.m_announcedName &&
142 lhs.m_expiration == rhs.m_expiration &&
143 lhs.m_validity == rhs.m_validity;
147 Name m_announcedName;
149 std::optional<security::ValidityPeriod> m_validity;
151 mutable std::optional<Data> m_data;
Represents a Data packet.
Represents an absolute name.
A prefix announcement object that represents an application's intent of registering a prefix toward i...
friend bool operator==(const PrefixAnnouncement &lhs, const PrefixAnnouncement &rhs)
Test whether two prefix announcements have the same name, expiration period, and validity period.
const Name & getAnnouncedName() const
Return announced name.
std::optional< security::ValidityPeriod > getValidityPeriod() const
Return absolute validity period.
const std::optional< Data > & getData() const
Get the Data representing the prefix announcement, if available.
PrefixAnnouncement & setValidityPeriod(std::optional< security::ValidityPeriod > validity)
Set absolute validity period.
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(), std::optional< uint64_t > version=std::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.
The main interface for signing key management.
Signing parameters passed to KeyChain.
Represents an error in TLV encoding or decoding.
Error(const char *expectedType, uint32_t actualType)
::boost::chrono::milliseconds milliseconds
std::ostream & operator<<(std::ostream &os, const Data &data)