23 #ifndef NDN_VALIDITY_PERIOD_HPP
24 #define NDN_VALIDITY_PERIOD_HPP
26 #include "../common.hpp"
27 #include "../lite/security/validity-period-lite.hpp"
56 validityPeriod_.
setPeriod(notBefore, notAfter);
86 validityPeriod_.
clear();
105 validityPeriod_.
setPeriod(notBefore, notAfter);
118 return validityPeriod_.
equals(other.validityPeriod_);
179 validityPeriodLite = validityPeriod_;
189 validityPeriod_ = validityPeriodLite;
195 uint64_t changeCount_;
bool equals(const ValidityPeriodLite &other) const
Check if this is the same validity period as other.
Definition: validity-period-lite.cpp:53
ValidityPeriod()
Create a default ValidityPeriod where the period is not specified.
Definition: validity-period.hpp:41
static ValidityPeriod & getFromSignature(Signature *signature)
If the signature is a type that has a ValidityPeriod, then return it.
Definition: validity-period.cpp:51
bool isValid(MillisecondsSince1970 time=-1.0) const
Check if the time falls within the validity period.
Definition: validity-period.cpp:34
void set(const ValidityPeriodLite &validityPeriodLite)
Clear this meta info, and set the values by copying from validityPeriodLite.
Definition: validity-period.hpp:187
void clear()
Reset to a default ValidityPeriod where the period is not specified.
Definition: validity-period.hpp:84
A ValidityPeriod is used in a Data packet's SignatureInfo and represents the begin and end times of a...
Definition: validity-period.hpp:37
A Signature is an abstract base class providing methods to work with the signature information in a D...
Definition: signature.hpp:35
bool equals(const ValidityPeriod &other) const
Check if this is the same validity period as other.
Definition: validity-period.hpp:116
ValidityPeriod & setPeriod(MillisecondsSince1970 notBefore, MillisecondsSince1970 notAfter)
Set the validity period.
Definition: validity-period.hpp:102
void clear()
Reset to a default ValidityPeriod where the period is not specified.
Definition: validity-period-lite.cpp:39
uint64_t getChangeCount() const
Get the change count, which is incremented each time this object is changed.
Definition: validity-period.hpp:166
double MillisecondsSince1970
The calendar time represented as the number of milliseconds since 1/1/1970.
Definition: common.hpp:119
ValidityPeriodLite & setPeriod(ndn_MillisecondsSince1970 notBefore, ndn_MillisecondsSince1970 notAfter)
Set the validity period.
Definition: validity-period-lite.cpp:46
ndn_MillisecondsSince1970 getNotAfter() const
Get the end of the validity period range.
Definition: validity-period-lite.hpp:60
ndn_MillisecondsSince1970 getNotBefore() const
Get the beginning of the validity period range.
Definition: validity-period-lite.hpp:53
MillisecondsSince1970 getNotBefore() const
Get the beginning of the validity period range.
Definition: validity-period.hpp:72
bool hasPeriod() const
Check if the period has been set.
Definition: validity-period-lite.cpp:33
A ValidityPeriodLite is used in a Data packet's SignatureInfo and represents the begin and end times ...
Definition: validity-period-lite.hpp:33
MillisecondsSince1970 getNotAfter() const
Get the end of the validity period range.
Definition: validity-period.hpp:79
static bool canGetFromSignature(const Signature *signature)
If the signature is a type that has a ValidityPeriod (so that getFromSignature will succeed)...
Definition: validity-period.cpp:44
bool hasPeriod() const
Check if the period has been set.
Definition: validity-period.hpp:65