nlsr::SyncProtocolAdapter Class Reference

#include <sync-protocol-adapter.hpp>

Public Member Functions

 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. More...
 
void publishUpdate (const ndn::Name &userPrefix, uint64_t seq)
 Publish update to Sync. More...
 

Detailed Description

Definition at line 45 of file sync-protocol-adapter.hpp.

Constructor & Destructor Documentation

◆ SyncProtocolAdapter()

nlsr::SyncProtocolAdapter::SyncProtocolAdapter ( ndn::Face &  face,
ndn::KeyChain &  keyChain,
SyncProtocol  syncProtocol,
const ndn::Name &  syncPrefix,
const ndn::Name &  userPrefix,
ndn::time::milliseconds  syncInterestLifetime,
SyncUpdateCallback  syncUpdateCallback 
)

Definition at line 33 of file sync-protocol-adapter.cpp.

Member Function Documentation

◆ addUserNode()

void nlsr::SyncProtocolAdapter::addUserNode ( const ndn::Name &  userPrefix)

Add user node to Sync.

Parameters
userPrefixthe Name under which the application will publishData

Definition at line 87 of file sync-protocol-adapter.cpp.

◆ publishUpdate()

void nlsr::SyncProtocolAdapter::publishUpdate ( const ndn::Name &  userPrefix,
uint64_t  seq 
)

Publish update to Sync.

NLSR forces sequences number on the sync protocol as it manages is its own sequence number by storing it in a file.

Parameters
userPrefixthe Name to be updated
seqthe sequence of userPrefix

Definition at line 110 of file sync-protocol-adapter.cpp.