28 #ifndef NDN_UTIL_NOTIFICATION_STREAM_HPP 29 #define NDN_UTIL_NOTIFICATION_STREAM_HPP 31 #include "../name.hpp" 32 #include "../face.hpp" 33 #include "../security/v2/key-chain.hpp" 43 template<
typename Notification>
52 , m_keyChain(keyChain)
63 Name dataName = m_prefix;
66 shared_ptr<Data> data = make_shared<Data>(dataName);
67 data->setContent(notification.wireEncode());
68 data->setFreshnessPeriod(time::seconds(1));
70 m_keyChain.sign(*data);
80 uint64_t m_sequenceNo;
86 #endif // NDN_UTIL_NOTIFICATION_STREAM_HPP Copyright (c) 2013-2017 Regents of the University of California.
provides a publisher of Notification Stream
void postNotification(const Notification ¬ification)
virtual ~NotificationStream()=default
Provide a communication channel with local or remote NDN forwarder.
NotificationStream(Face &face, const Name &prefix, KeyChain &keyChain)
Name & appendSequenceNumber(uint64_t seqNo)
Append a sequence number component.
Represents an absolute name.
void put(Data data)
Publish data packet.
BOOST_CONCEPT_ASSERT((WireEncodable< Notification >))
a concept check for TLV abstraction with .wireEncode method