blob: ece3fca268fbec485895226b5f15ae66768c2c29 [file] [log] [blame]
akmhoque53353462014-04-22 08:43:45 -05001#ifndef NLSR_DM_HPP
2#define NLSR_DM_HPP
3
4#include <ndn-cpp-dev/face.hpp>
5#include <ndn-cpp-dev/security/key-chain.hpp>
6#include <ndn-cpp-dev/util/scheduler.hpp>
7
8#include "interest-manager.hpp"
9
10namespace nlsr {
11class Nlsr;
12
13class DataManager
14{
15public:
akmhoqueb6450b12014-04-24 00:01:03 -050016 DataManager(Nlsr& nlsr)
17 : m_nlsr(nlsr)
18 {}
akmhoque53353462014-04-22 08:43:45 -050019 void
akmhoqueb6450b12014-04-24 00:01:03 -050020 processContent(const ndn::Interest& interest,
akmhoque53353462014-04-22 08:43:45 -050021 const ndn::Data& data, InterestManager& im);
22private:
23 void
akmhoqueb6450b12014-04-24 00:01:03 -050024 processContentInfo(const std::string& dataName,
akmhoque53353462014-04-22 08:43:45 -050025 std::string& dataContent);
26
27 void
akmhoqueb6450b12014-04-24 00:01:03 -050028 processContentLsa(const std::string& dataName, std::string& dataContent);
akmhoque53353462014-04-22 08:43:45 -050029
30 void
akmhoqueb6450b12014-04-24 00:01:03 -050031 processContentNameLsa(const std::string& lsaKey,
akmhoque53353462014-04-22 08:43:45 -050032 uint32_t lsSeqNo, std::string& dataContent);
33
34 void
akmhoqueb6450b12014-04-24 00:01:03 -050035 processContentAdjLsa(const std::string& lsaKey,
akmhoque53353462014-04-22 08:43:45 -050036 uint32_t lsSeqNo, std::string& dataContent);
37
38 void
akmhoqueb6450b12014-04-24 00:01:03 -050039 processContentCorLsa(const std::string& lsaKey,
akmhoque53353462014-04-22 08:43:45 -050040 uint32_t lsSeqNo, std::string& dataContent);
41
42 void
akmhoqueb6450b12014-04-24 00:01:03 -050043 processContentKeys(const ndn::Data& data);
44
45private:
46 Nlsr& m_nlsr;
akmhoque53353462014-04-22 08:43:45 -050047
48
49};
50
51}//namespace nlsr
52
53#endif //NLSR_DM_HPP