blob: fc231d33bbe3e25ce63953e2546d626c384f5e92 [file] [log] [blame]
akmhoqueba094742014-02-28 11:47:21 -06001#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 "nlsr_im.hpp"
9
10namespace nlsr
11{
12
akmhoque5a44dd42014-03-12 18:11:32 -050013 using namespace ndn;
14 using namespace std;
akmhoqueba094742014-02-28 11:47:21 -060015
akmhoque5a44dd42014-03-12 18:11:32 -050016 class Nlsr;
akmhoqueba094742014-02-28 11:47:21 -060017
akmhoque5a44dd42014-03-12 18:11:32 -050018 class DataManager
19 {
20 public:
akmhoque05d5fcf2014-04-15 14:58:45 -050021 void processContent(Nlsr& pnlsr, const ndn::Interest& interest,
22 const ndn::Data& data, InterestManager& im);
akmhoque5a44dd42014-03-12 18:11:32 -050023 private:
24 void processContentInfo(Nlsr& pnlsr, string& dataName,
25 string& dataContent);
26 void processContentLsa(Nlsr& pnlsr, string& dataName,
27 string& dataContent);
28 void processContentNameLsa(Nlsr& pnlsr, string lsaKey,
29 uint32_t lsSeqNo, string& dataContent);
30 void processContentAdjLsa(Nlsr& pnlsr, string lsaKey,
31 uint32_t lsSeqNo, string& dataContent);
32 void processContentCorLsa(Nlsr& pnlsr, string lsaKey,
33 uint32_t lsSeqNo, string& dataContent);
34 void processContentKeys(Nlsr& pnlsr, const ndn::Data& data);
akmhoqueba094742014-02-28 11:47:21 -060035
akmhoque5a44dd42014-03-12 18:11:32 -050036
37 };
akmhoqueba094742014-02-28 11:47:21 -060038
39}//namespace nlsr
40#endif