22 #ifndef NDN_CXX_PREFIX_ANNOUNCEMENT_HPP 23 #define NDN_CXX_PREFIX_ANNOUNCEMENT_HPP 39 using tlv::Error::Error;
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 Copyright (c) 2011-2015 Regents of the University of California.
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.
const Data & toData(KeyChain &keyChain, const ndn::security::SigningInfo &si=KeyChain::getDefaultSigningInfo(), optional< uint64_t > version=nullopt) const
Create a Data packet representing the prefix announcement, if it does not exist.
bool operator!=(const Data &lhs, const Data &rhs)
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.
static const SigningInfo & getDefaultSigningInfo()
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.
const nullopt_t nullopt((nullopt_t::init()))
represents an error in TLV encoding or decoding