20 #ifndef PSYNC_SEGMENT_PUBLISHER_HPP 21 #define PSYNC_SEGMENT_PUBLISHER_HPP 25 #include <ndn-cxx/face.hpp> 26 #include <ndn-cxx/name.hpp> 27 #include <ndn-cxx/ims/in-memory-storage-fifo.hpp> 28 #include <ndn-cxx/security/key-chain.hpp> 29 #include <ndn-cxx/util/scheduler.hpp> 30 #include <ndn-cxx/util/time.hpp> 44 size_t imsLimit = MAX_SEGMENTS_STORED);
56 publish(
const ndn::Name& interestName,
const ndn::Name& dataName,
57 const ndn::Block& block, ndn::time::milliseconds freshness,
58 const ndn::security::SigningInfo& signingInfo =
59 ndn::security::v2::KeyChain::getDefaultSigningInfo());
71 ndn::util::Scheduler m_scheduler;
72 ndn::KeyChain& m_keyChain;
75 ndn::InMemoryStorageFifo m_ims;
80 #endif // PSYNC_SEGMENT_PUBLISHER_HPP
#define PUBLIC_WITH_TESTS_ELSE_PRIVATE
void publish(const ndn::Name &interestName, const ndn::Name &dataName, const ndn::Block &block, ndn::time::milliseconds freshness, const ndn::security::SigningInfo &signingInfo=ndn::security::v2::KeyChain::getDefaultSigningInfo())
Put all the segments in memory.
Segment Publisher to publish segmented data.
SegmentPublisher(ndn::Face &face, ndn::KeyChain &keyChain, size_t imsLimit=MAX_SEGMENTS_STORED)
bool replyFromStore(const ndn::Name &interestName)
Try to reply from memory, return false if we cannot find the segment.
const int MAX_SEGMENTS_STORED