48 #ifndef NDN_UTIL_NOTIFICATION_STREAM_HPP
49 #define NDN_UTIL_NOTIFICATION_STREAM_HPP
51 #include "../name.hpp"
52 #include "../face.hpp"
53 #include "../security/v1/key-chain.hpp"
64 template<
typename Notification>
73 , m_keyChain(keyChain)
86 Name dataName = m_prefix;
89 shared_ptr<Data> data = make_shared<Data>(dataName);
90 data->setContent(notification.wireEncode());
91 data->setFreshnessPeriod(time::seconds(1));
93 m_keyChain.sign(*data);
103 uint64_t m_sequenceNo;
109 #endif // NDN_UTIL_NOTIFICATION_STREAM_HPP
virtual ~NotificationStream()
Copyright (c) 2013-2016 Regents of the University of California.
provides a publisher of Notification Stream
Name & appendSequenceNumber(uint64_t seqNo)
Append sequence number using NDN naming conventions.
void postNotification(const Notification ¬ification)
Provide a communication channel with local or remote NDN forwarder.
NotificationStream(Face &face, const Name &prefix, KeyChain &keyChain)
Name abstraction to represent an absolute name.
a concept check for TLV abstraction with .wireEncode method
void put(const Data &data)
Publish data packet.