blob: ce10b88458c12887ad8876189bb4226872a00cae [file] [log] [blame]
akmhoquefdbddb12014-05-02 18:35:19 -05001#ifndef NLSR_DATA_MANAGER_HPP
2#define NLSR_DATA_MANAGER_HPP
3
4#include <boost/cstdint.hpp>
akmhoque53353462014-04-22 08:43:45 -05005
akmhoquec8a10f72014-04-25 18:42:55 -05006#include <ndn-cxx/face.hpp>
7#include <ndn-cxx/security/key-chain.hpp>
8#include <ndn-cxx/util/scheduler.hpp>
akmhoque53353462014-04-22 08:43:45 -05009
10#include "interest-manager.hpp"
11
12namespace nlsr {
13class Nlsr;
14
15class DataManager
16{
17public:
akmhoqueb6450b12014-04-24 00:01:03 -050018 DataManager(Nlsr& nlsr)
19 : m_nlsr(nlsr)
20 {}
akmhoque53353462014-04-22 08:43:45 -050021 void
akmhoqueb6450b12014-04-24 00:01:03 -050022 processContent(const ndn::Interest& interest,
akmhoque53353462014-04-22 08:43:45 -050023 const ndn::Data& data, InterestManager& im);
24private:
25 void
akmhoqueb6450b12014-04-24 00:01:03 -050026 processContentInfo(const std::string& dataName,
akmhoque53353462014-04-22 08:43:45 -050027 std::string& dataContent);
28
29 void
akmhoqueb6450b12014-04-24 00:01:03 -050030 processContentLsa(const std::string& dataName, std::string& dataContent);
akmhoque53353462014-04-22 08:43:45 -050031
32 void
akmhoqueb6450b12014-04-24 00:01:03 -050033 processContentNameLsa(const std::string& lsaKey,
akmhoque53353462014-04-22 08:43:45 -050034 uint32_t lsSeqNo, std::string& dataContent);
35
36 void
akmhoqueb6450b12014-04-24 00:01:03 -050037 processContentAdjLsa(const std::string& lsaKey,
akmhoque53353462014-04-22 08:43:45 -050038 uint32_t lsSeqNo, std::string& dataContent);
39
40 void
akmhoqueb6450b12014-04-24 00:01:03 -050041 processContentCorLsa(const std::string& lsaKey,
akmhoque53353462014-04-22 08:43:45 -050042 uint32_t lsSeqNo, std::string& dataContent);
43
44 void
akmhoqueb6450b12014-04-24 00:01:03 -050045 processContentKeys(const ndn::Data& data);
46
47private:
48 Nlsr& m_nlsr;
akmhoque53353462014-04-22 08:43:45 -050049
50
51};
52
53}//namespace nlsr
54
akmhoquefdbddb12014-05-02 18:35:19 -050055#endif //NLSR_DATA_MANAGER_HPP