22 #ifndef NDN_CXX_PREFIX_ANNOUNCEMENT_HPP 23 #define NDN_CXX_PREFIX_ANNOUNCEMENT_HPP 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);
159 #endif // NDN_CXX_PREFIX_ANNOUNCEMENT_HPP Copyright (c) 2011-2015 Regents of the University of California.
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.
Represents a name component.
static const name::Component & getKeywordComponent()
Returns the well-known keyword name component used for prefix announcements (32=PA) ...
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.
const nullopt_t nullopt((nullopt_t::init()))
Error(const char *expectedType, uint32_t actualType)
represents an error in TLV encoding or decoding
boost::chrono::milliseconds milliseconds