akmhoque | 5335346 | 2014-04-22 08:43:45 -0500 | [diff] [blame] | 1 | #ifndef NLSR_IM_HPP |
| 2 | #define NLSR_IM_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 | namespace nlsr { |
| 9 | |
| 10 | class Nlsr; |
| 11 | |
| 12 | class InterestManager |
| 13 | { |
| 14 | public: |
akmhoque | b6450b1 | 2014-04-24 00:01:03 -0500 | [diff] [blame] | 15 | InterestManager(Nlsr& nlsr) |
| 16 | : m_nlsr(nlsr) |
akmhoque | 5335346 | 2014-04-22 08:43:45 -0500 | [diff] [blame] | 17 | { |
| 18 | } |
| 19 | void |
akmhoque | b6450b1 | 2014-04-24 00:01:03 -0500 | [diff] [blame] | 20 | processInterest(const ndn::Name& name, const ndn::Interest& interest); |
akmhoque | 5335346 | 2014-04-22 08:43:45 -0500 | [diff] [blame] | 21 | |
| 22 | void |
akmhoque | b6450b1 | 2014-04-24 00:01:03 -0500 | [diff] [blame] | 23 | processInterestInfo(const std::string& neighbor, const ndn::Interest& interest); |
akmhoque | 5335346 | 2014-04-22 08:43:45 -0500 | [diff] [blame] | 24 | |
| 25 | void |
akmhoque | b6450b1 | 2014-04-24 00:01:03 -0500 | [diff] [blame] | 26 | processInterestLsa(const ndn::Interest& interest); |
akmhoque | 5335346 | 2014-04-22 08:43:45 -0500 | [diff] [blame] | 27 | |
| 28 | void |
akmhoque | b6450b1 | 2014-04-24 00:01:03 -0500 | [diff] [blame] | 29 | processInterestForNameLsa(const ndn::Interest& interest, |
| 30 | const std::string& lsaKey, uint32_t interestedlsSeqNo); |
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 | processInterestForAdjLsa(const ndn::Interest& interest, |
| 34 | const std::string& lsaKey, uint32_t interestedlsSeqNo); |
akmhoque | 5335346 | 2014-04-22 08:43:45 -0500 | [diff] [blame] | 35 | |
| 36 | void |
akmhoque | b6450b1 | 2014-04-24 00:01:03 -0500 | [diff] [blame] | 37 | processInterestForCorLsa(const ndn::Interest& interest, |
| 38 | const std::string& lsaKey, uint32_t interestedlsSeqNo); |
akmhoque | 5335346 | 2014-04-22 08:43:45 -0500 | [diff] [blame] | 39 | |
| 40 | void |
akmhoque | b6450b1 | 2014-04-24 00:01:03 -0500 | [diff] [blame] | 41 | processInterestKeys(const ndn::Interest& interest); |
akmhoque | 5335346 | 2014-04-22 08:43:45 -0500 | [diff] [blame] | 42 | |
| 43 | void |
akmhoque | b6450b1 | 2014-04-24 00:01:03 -0500 | [diff] [blame] | 44 | processInterestTimedOut(const ndn::Interest& interest); |
akmhoque | 5335346 | 2014-04-22 08:43:45 -0500 | [diff] [blame] | 45 | |
| 46 | void |
akmhoque | b6450b1 | 2014-04-24 00:01:03 -0500 | [diff] [blame] | 47 | processInterestTimedOutInfo(const std::string& neighbor, |
akmhoque | 5335346 | 2014-04-22 08:43:45 -0500 | [diff] [blame] | 48 | const ndn::Interest& interest); |
| 49 | |
| 50 | void |
akmhoque | b6450b1 | 2014-04-24 00:01:03 -0500 | [diff] [blame] | 51 | processInterestTimedOutLsa(const ndn::Interest& interest); |
akmhoque | 5335346 | 2014-04-22 08:43:45 -0500 | [diff] [blame] | 52 | |
| 53 | void |
akmhoque | b6450b1 | 2014-04-24 00:01:03 -0500 | [diff] [blame] | 54 | expressInterest(const std::string& interestNamePrefix, int scope, int seconds); |
akmhoque | 5335346 | 2014-04-22 08:43:45 -0500 | [diff] [blame] | 55 | |
| 56 | void |
akmhoque | b6450b1 | 2014-04-24 00:01:03 -0500 | [diff] [blame] | 57 | sendScheduledInfoInterest(int seconds); |
akmhoque | 5335346 | 2014-04-22 08:43:45 -0500 | [diff] [blame] | 58 | |
| 59 | void |
akmhoque | b6450b1 | 2014-04-24 00:01:03 -0500 | [diff] [blame] | 60 | scheduleInfoInterest(int seconds); |
akmhoque | 5335346 | 2014-04-22 08:43:45 -0500 | [diff] [blame] | 61 | |
| 62 | private: |
akmhoque | b6450b1 | 2014-04-24 00:01:03 -0500 | [diff] [blame] | 63 | Nlsr& m_nlsr; |
akmhoque | 5335346 | 2014-04-22 08:43:45 -0500 | [diff] [blame] | 64 | |
Yingdi Yu | 0c21782 | 2014-04-24 14:22:42 -0700 | [diff] [blame^] | 65 | ndn::KeyChain m_keyChain; |
akmhoque | 5335346 | 2014-04-22 08:43:45 -0500 | [diff] [blame] | 66 | }; |
| 67 | |
| 68 | }//namespace nlsr |
| 69 | |
| 70 | #endif //NLSR_IM_HPP |