22 #ifndef NDN_CXX_UTIL_NOTIFICATION_STREAM_HPP
23 #define NDN_CXX_UTIL_NOTIFICATION_STREAM_HPP
36 template<
typename Notification>
45 , m_keyChain(keyChain)
55 Name dataName = m_prefix;
58 auto data = make_shared<Data>(dataName);
59 data->setContent(notification.wireEncode());
60 data->setFreshnessPeriod(1_s);
62 m_keyChain.
sign(*data);
72 uint64_t m_sequenceNo = 0;
Provide a communication channel with local or remote NDN forwarder.
void put(const Data &data)
Publish a Data packet.
Represents an absolute name.
Name & appendSequenceNumber(uint64_t seqNo)
Append a sequence number component.
A concept check for TLV abstraction with a wireEncode() method.
The main interface for signing key management.
void sign(Data &data, const SigningInfo ¶ms=SigningInfo())
Sign a Data packet according to the supplied signing information.
A facility to publish notifications.
virtual ~NotificationStream()=default
NotificationStream(Face &face, const Name &prefix, KeyChain &keyChain)
void postNotification(const Notification ¬ification)