#include <sync-protocol-adapter.hpp>
Public Member Functions | |
SyncProtocolAdapter (ndn::Face &facePtr, int32_t syncProtocol, const ndn::Name &syncPrefix, const ndn::Name &userPrefix, ndn::time::milliseconds syncInterestLifetime, const SyncUpdateCallback &syncUpdateCallback) | |
void | addUserNode (const ndn::Name &userPrefix) |
Add user node to ChronoSync or PSync. More... | |
void | publishUpdate (const ndn::Name &userPrefix, uint64_t seq) |
Publish update to ChronoSync or PSync. More... | |
Definition at line 36 of file sync-protocol-adapter.hpp.
nlsr::SyncProtocolAdapter::SyncProtocolAdapter | ( | ndn::Face & | facePtr, |
int32_t | syncProtocol, | ||
const ndn::Name & | syncPrefix, | ||
const ndn::Name & | userPrefix, | ||
ndn::time::milliseconds | syncInterestLifetime, | ||
const SyncUpdateCallback & | syncUpdateCallback | ||
) |
Definition at line 31 of file sync-protocol-adapter.cpp.
void nlsr::SyncProtocolAdapter::addUserNode | ( | const ndn::Name & | userPrefix | ) |
Add user node to ChronoSync or PSync.
userPrefix | the Name under which the application will publishData |
Definition at line 68 of file sync-protocol-adapter.cpp.
void nlsr::SyncProtocolAdapter::publishUpdate | ( | const ndn::Name & | userPrefix, |
uint64_t | seq | ||
) |
Publish update to ChronoSync or PSync.
NLSR forces sequences number on the sync protocol as it manages is its own sequence number by storing it in a file.
userPrefix | the Name to be updated |
seq | the sequence of userPrefix |
Definition at line 79 of file sync-protocol-adapter.cpp.