22 #ifndef NLSR_SYNC_PROTOCOL_ADAPTER_HPP
23 #define NLSR_SYNC_PROTOCOL_ADAPTER_HPP
27 #include <ndn-cxx/face.hpp>
28 #include <ndn-cxx/security/key-chain.hpp>
30 #ifdef HAVE_CHRONOSYNC
31 #include <ChronoSync/logic.hpp>
34 #include <PSync/full-producer.hpp>
37 #include <ndn-svs/core.hpp>
43 uint64_t seqNo, uint64_t incomingFaceId)>;
49 ndn::KeyChain& keyChain,
51 const ndn::Name& syncPrefix,
52 const ndn::Name& userPrefix,
53 ndn::time::milliseconds syncInterestLifetime,
75 #ifdef HAVE_CHRONOSYNC
84 onChronoSyncUpdate(
const std::vector<chronosync::MissingDataInfo>& updates);
96 onPSyncUpdate(
const std::vector<psync::MissingDataInfo>& updates);
108 onSvsUpdate(
const std::vector<ndn::svs::MissingDataInfo>& updates);
115 #ifdef HAVE_CHRONOSYNC
116 std::shared_ptr<chronosync::Logic> m_chronoSyncLogic;
119 std::shared_ptr<psync::FullProducer> m_psyncLogic;
122 std::shared_ptr<ndn::svs::SVSyncCore> m_svsCore;
void publishUpdate(const ndn::Name &userPrefix, uint64_t seq)
Publish update to Sync.
SyncProtocolAdapter(ndn::Face &face, ndn::KeyChain &keyChain, SyncProtocol syncProtocol, const ndn::Name &syncPrefix, const ndn::Name &userPrefix, ndn::time::milliseconds syncInterestLifetime, SyncUpdateCallback syncUpdateCallback)
void addUserNode(const ndn::Name &userPrefix)
Add user node to Sync.
Copyright (c) 2014-2020, The University of Memphis, Regents of the University of California.
std::function< void(const ndn::Name &updateName, uint64_t seqNo, uint64_t incomingFaceId)> SyncUpdateCallback
#define PUBLIC_WITH_TESTS_ELSE_PRIVATE