akmhoque | 5335346 | 2014-04-22 08:43:45 -0500 | [diff] [blame] | 1 | #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 | |
| 10 | namespace nlsr { |
| 11 | class Nlsr; |
| 12 | |
| 13 | class DataManager |
| 14 | { |
| 15 | public: |
akmhoque | b6450b1 | 2014-04-24 00:01:03 -0500 | [diff] [blame^] | 16 | DataManager(Nlsr& nlsr) |
| 17 | : m_nlsr(nlsr) |
| 18 | {} |
akmhoque | 5335346 | 2014-04-22 08:43:45 -0500 | [diff] [blame] | 19 | void |
akmhoque | b6450b1 | 2014-04-24 00:01:03 -0500 | [diff] [blame^] | 20 | processContent(const ndn::Interest& interest, |
akmhoque | 5335346 | 2014-04-22 08:43:45 -0500 | [diff] [blame] | 21 | const ndn::Data& data, InterestManager& im); |
| 22 | private: |
| 23 | void |
akmhoque | b6450b1 | 2014-04-24 00:01:03 -0500 | [diff] [blame^] | 24 | processContentInfo(const std::string& dataName, |
akmhoque | 5335346 | 2014-04-22 08:43:45 -0500 | [diff] [blame] | 25 | std::string& dataContent); |
| 26 | |
| 27 | void |
akmhoque | b6450b1 | 2014-04-24 00:01:03 -0500 | [diff] [blame^] | 28 | processContentLsa(const std::string& dataName, std::string& dataContent); |
akmhoque | 5335346 | 2014-04-22 08:43:45 -0500 | [diff] [blame] | 29 | |
| 30 | void |
akmhoque | b6450b1 | 2014-04-24 00:01:03 -0500 | [diff] [blame^] | 31 | processContentNameLsa(const std::string& lsaKey, |
akmhoque | 5335346 | 2014-04-22 08:43:45 -0500 | [diff] [blame] | 32 | uint32_t lsSeqNo, std::string& dataContent); |
| 33 | |
| 34 | void |
akmhoque | b6450b1 | 2014-04-24 00:01:03 -0500 | [diff] [blame^] | 35 | processContentAdjLsa(const std::string& lsaKey, |
akmhoque | 5335346 | 2014-04-22 08:43:45 -0500 | [diff] [blame] | 36 | uint32_t lsSeqNo, std::string& dataContent); |
| 37 | |
| 38 | void |
akmhoque | b6450b1 | 2014-04-24 00:01:03 -0500 | [diff] [blame^] | 39 | processContentCorLsa(const std::string& lsaKey, |
akmhoque | 5335346 | 2014-04-22 08:43:45 -0500 | [diff] [blame] | 40 | uint32_t lsSeqNo, std::string& dataContent); |
| 41 | |
| 42 | void |
akmhoque | b6450b1 | 2014-04-24 00:01:03 -0500 | [diff] [blame^] | 43 | processContentKeys(const ndn::Data& data); |
| 44 | |
| 45 | private: |
| 46 | Nlsr& m_nlsr; |
akmhoque | 5335346 | 2014-04-22 08:43:45 -0500 | [diff] [blame] | 47 | |
| 48 | |
| 49 | }; |
| 50 | |
| 51 | }//namespace nlsr |
| 52 | |
| 53 | #endif //NLSR_DM_HPP |