akmhoque | 298385a | 2014-02-13 14:13:09 -0600 | [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 | |
akmhoque | b1710aa | 2014-02-19 17:13:36 -0600 | [diff] [blame^] | 8 | namespace nlsr { |
akmhoque | 298385a | 2014-02-13 14:13:09 -0600 | [diff] [blame] | 9 | |
| 10 | using namespace ndn; |
| 11 | using namespace std; |
| 12 | |
akmhoque | 1a48109 | 2014-02-19 16:34:22 -0600 | [diff] [blame] | 13 | class Nlsr; |
akmhoque | 298385a | 2014-02-13 14:13:09 -0600 | [diff] [blame] | 14 | |
| 15 | class interestManager{ |
| 16 | public: |
| 17 | interestManager() |
| 18 | { |
| 19 | } |
akmhoque | 1a48109 | 2014-02-19 16:34:22 -0600 | [diff] [blame] | 20 | void processInterest(Nlsr& pnlsr, const ndn::Name &name, |
akmhoque | 298385a | 2014-02-13 14:13:09 -0600 | [diff] [blame] | 21 | const ndn::Interest &interest); |
akmhoque | 1a48109 | 2014-02-19 16:34:22 -0600 | [diff] [blame] | 22 | void processInterestInfo(Nlsr& pnlsr, string& neighbor, |
akmhoque | 298385a | 2014-02-13 14:13:09 -0600 | [diff] [blame] | 23 | const ndn::Interest &interest); |
akmhoque | 1a48109 | 2014-02-19 16:34:22 -0600 | [diff] [blame] | 24 | void processInterestTimedOut(Nlsr& pnlsr, const ndn::Interest &interest); |
| 25 | void processInterestTimedOutInfo(Nlsr& pnlsr, string& neighbor, |
akmhoque | 298385a | 2014-02-13 14:13:09 -0600 | [diff] [blame] | 26 | const ndn::Interest &interest); |
akmhoque | 1a48109 | 2014-02-19 16:34:22 -0600 | [diff] [blame] | 27 | void expressInterest(Nlsr& pnlsr,const string& interestNamePrefix, int scope, |
akmhoque | 298385a | 2014-02-13 14:13:09 -0600 | [diff] [blame] | 28 | int seconds); |
akmhoque | 1a48109 | 2014-02-19 16:34:22 -0600 | [diff] [blame] | 29 | void sendScheduledInfoInterest(Nlsr& pnlsr, int seconds); |
| 30 | void scheduleInfoInterest(Nlsr& pnlsr, int seconds); |
akmhoque | 298385a | 2014-02-13 14:13:09 -0600 | [diff] [blame] | 31 | |
| 32 | private: |
| 33 | |
| 34 | |
| 35 | }; |
| 36 | |
akmhoque | b1710aa | 2014-02-19 17:13:36 -0600 | [diff] [blame^] | 37 | }//namespace nlsr |
akmhoque | 298385a | 2014-02-13 14:13:09 -0600 | [diff] [blame] | 38 | |
| 39 | #endif |