akmhoque | fdbddb1 | 2014-05-02 18:35:19 -0500 | [diff] [blame^] | 1 | #ifndef NLSR_DATA_MANAGER_HPP |
| 2 | #define NLSR_DATA_MANAGER_HPP |
| 3 | |
| 4 | #include <boost/cstdint.hpp> |
akmhoque | 5335346 | 2014-04-22 08:43:45 -0500 | [diff] [blame] | 5 | |
akmhoque | c8a10f7 | 2014-04-25 18:42:55 -0500 | [diff] [blame] | 6 | #include <ndn-cxx/face.hpp> |
| 7 | #include <ndn-cxx/security/key-chain.hpp> |
| 8 | #include <ndn-cxx/util/scheduler.hpp> |
akmhoque | 5335346 | 2014-04-22 08:43:45 -0500 | [diff] [blame] | 9 | |
| 10 | #include "interest-manager.hpp" |
| 11 | |
| 12 | namespace nlsr { |
| 13 | class Nlsr; |
| 14 | |
| 15 | class DataManager |
| 16 | { |
| 17 | public: |
akmhoque | b6450b1 | 2014-04-24 00:01:03 -0500 | [diff] [blame] | 18 | DataManager(Nlsr& nlsr) |
| 19 | : m_nlsr(nlsr) |
| 20 | {} |
akmhoque | 5335346 | 2014-04-22 08:43:45 -0500 | [diff] [blame] | 21 | void |
akmhoque | b6450b1 | 2014-04-24 00:01:03 -0500 | [diff] [blame] | 22 | processContent(const ndn::Interest& interest, |
akmhoque | 5335346 | 2014-04-22 08:43:45 -0500 | [diff] [blame] | 23 | const ndn::Data& data, InterestManager& im); |
| 24 | private: |
| 25 | void |
akmhoque | b6450b1 | 2014-04-24 00:01:03 -0500 | [diff] [blame] | 26 | processContentInfo(const std::string& dataName, |
akmhoque | 5335346 | 2014-04-22 08:43:45 -0500 | [diff] [blame] | 27 | std::string& dataContent); |
| 28 | |
| 29 | void |
akmhoque | b6450b1 | 2014-04-24 00:01:03 -0500 | [diff] [blame] | 30 | processContentLsa(const std::string& dataName, std::string& dataContent); |
akmhoque | 5335346 | 2014-04-22 08:43:45 -0500 | [diff] [blame] | 31 | |
| 32 | void |
akmhoque | b6450b1 | 2014-04-24 00:01:03 -0500 | [diff] [blame] | 33 | processContentNameLsa(const std::string& lsaKey, |
akmhoque | 5335346 | 2014-04-22 08:43:45 -0500 | [diff] [blame] | 34 | uint32_t lsSeqNo, std::string& dataContent); |
| 35 | |
| 36 | void |
akmhoque | b6450b1 | 2014-04-24 00:01:03 -0500 | [diff] [blame] | 37 | processContentAdjLsa(const std::string& lsaKey, |
akmhoque | 5335346 | 2014-04-22 08:43:45 -0500 | [diff] [blame] | 38 | uint32_t lsSeqNo, std::string& dataContent); |
| 39 | |
| 40 | void |
akmhoque | b6450b1 | 2014-04-24 00:01:03 -0500 | [diff] [blame] | 41 | processContentCorLsa(const std::string& lsaKey, |
akmhoque | 5335346 | 2014-04-22 08:43:45 -0500 | [diff] [blame] | 42 | uint32_t lsSeqNo, std::string& dataContent); |
| 43 | |
| 44 | void |
akmhoque | b6450b1 | 2014-04-24 00:01:03 -0500 | [diff] [blame] | 45 | processContentKeys(const ndn::Data& data); |
| 46 | |
| 47 | private: |
| 48 | Nlsr& m_nlsr; |
akmhoque | 5335346 | 2014-04-22 08:43:45 -0500 | [diff] [blame] | 49 | |
| 50 | |
| 51 | }; |
| 52 | |
| 53 | }//namespace nlsr |
| 54 | |
akmhoque | fdbddb1 | 2014-05-02 18:35:19 -0500 | [diff] [blame^] | 55 | #endif //NLSR_DATA_MANAGER_HPP |