blob: 86c2e423ef5f2a7293caaf09766971d785e2471e [file] [log] [blame]
akmhoque53353462014-04-22 08:43:45 -05001#ifndef NLSR_DM_HPP
2#define NLSR_DM_HPP
3
akmhoquec8a10f72014-04-25 18:42:55 -05004#include <ndn-cxx/face.hpp>
5#include <ndn-cxx/security/key-chain.hpp>
6#include <ndn-cxx/util/scheduler.hpp>
akmhoque53353462014-04-22 08:43:45 -05007
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