akmhoque | 31d1d4b | 2014-05-05 22:08:14 -0500 | [diff] [blame] | 1 | #ifndef NLSR_HELLO_PROTOCOL_HPP |
| 2 | #define NLSR_HELLO_PROTOCOL_HPP |
| 3 | |
| 4 | #include <boost/cstdint.hpp> |
| 5 | #include <ndn-cxx/face.hpp> |
| 6 | #include <ndn-cxx/util/scheduler.hpp> |
| 7 | |
| 8 | namespace nlsr { |
| 9 | |
| 10 | class Nlsr; |
| 11 | |
| 12 | class HelloProtocol |
| 13 | { |
| 14 | |
| 15 | public: |
| 16 | HelloProtocol(Nlsr& nlsr) |
| 17 | : m_nlsr(nlsr) |
| 18 | { |
| 19 | } |
| 20 | |
| 21 | public: |
| 22 | void |
| 23 | scheduleInterest(uint32_t seconds); |
| 24 | |
| 25 | void |
| 26 | expressInterest(const ndn::Name& interestNamePrefix, uint32_t seconds); |
| 27 | |
| 28 | void |
| 29 | sendScheduledInterest(uint32_t seconds); |
| 30 | |
| 31 | void |
| 32 | processInterest(const ndn::Name& name, const ndn::Interest& interest); |
| 33 | |
| 34 | private: |
| 35 | void |
| 36 | processInterestTimedOut(const ndn::Interest& interest); |
| 37 | |
| 38 | void |
| 39 | processContent(const ndn::Interest& interest, const ndn::Data& data); |
| 40 | |
| 41 | private: |
| 42 | Nlsr& m_nlsr; |
| 43 | ndn::KeyChain m_keyChain; |
akmhoque | 157b0a4 | 2014-05-13 00:26:37 -0500 | [diff] [blame^] | 44 | static const std::string INFO_COMPONENT; |
akmhoque | 31d1d4b | 2014-05-05 22:08:14 -0500 | [diff] [blame] | 45 | }; |
| 46 | |
| 47 | } //namespace nlsr |
| 48 | |
| 49 | #endif // NLSR_HELLO_PROTOCOL_HPP |