blob: ecdd6c5b380dc8376c673681edb9498c9e9a2a22 [file] [log] [blame]
akmhoque31d1d4b2014-05-05 22:08:14 -05001#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
8namespace nlsr {
9
10class Nlsr;
11
12class HelloProtocol
13{
14
15public:
16 HelloProtocol(Nlsr& nlsr)
17 : m_nlsr(nlsr)
18 {
19 }
20
21public:
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
34private:
35 void
36 processInterestTimedOut(const ndn::Interest& interest);
37
38 void
39 processContent(const ndn::Interest& interest, const ndn::Data& data);
40
41private:
42 Nlsr& m_nlsr;
43 ndn::KeyChain m_keyChain;
akmhoque157b0a42014-05-13 00:26:37 -050044 static const std::string INFO_COMPONENT;
akmhoque31d1d4b2014-05-05 22:08:14 -050045};
46
47} //namespace nlsr
48
49#endif // NLSR_HELLO_PROTOCOL_HPP