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> 41 size_t imsLimit = 100);
53 publish(
const ndn::Name& interestName,
const ndn::Name& dataName,
54 const ndn::Block& block, ndn::time::milliseconds freshness,
55 const ndn::security::SigningInfo& signingInfo = ndn::security::SigningInfo());
67 publish(
const ndn::Name& interestName,
const ndn::Name& dataName,
68 const ndn::ConstBufferPtr& buffer, ndn::time::milliseconds freshness,
69 const ndn::security::SigningInfo& signingInfo = ndn::security::SigningInfo());
81 ndn::Scheduler m_scheduler;
82 ndn::KeyChain& m_keyChain;
85 ndn::InMemoryStorageFifo m_ims;
90 #endif // PSYNC_SEGMENT_PUBLISHER_HPP SegmentPublisher(ndn::Face &face, ndn::KeyChain &keyChain, size_t imsLimit=100)
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::SigningInfo())
Put all the segments in memory.
Segment Publisher to publish segmented data.
#define PSYNC_PUBLIC_WITH_TESTS_ELSE_PRIVATE
bool replyFromStore(const ndn::Name &interestName)
Try to reply from memory, return false if we cannot find the segment.