blob: eac8245fa300fba095308d0d47eeb88eea189f35 [file] [log] [blame]
akmhoquedfa4a5b2014-02-03 20:12:29 -06001#ifndef NLSR_ADL_HPP
2#define NLSR_ADL_HPP
akmhoque87347a32014-01-31 11:00:44 -06003
4#include <ndn-cpp-dev/face.hpp>
akmhoque204e7542014-01-31 16:08:25 -06005#include "nlsr_adjacent.hpp"
akmhoque87347a32014-01-31 11:00:44 -06006#include<list>
7
akmhoquecd552472014-02-01 21:22:16 -06008class nlsr;
9
akmhoque87347a32014-01-31 11:00:44 -060010using namespace std;
11
12class Adl{
13
14public:
15 Adl();
16 ~Adl();
17 int insert(Adjacent& adj);
18 int updateAdjacentStatus(string adjName, int s);
19 int updateAdjacentLinkCost(string adjName, double lc);
akmhoque87347a32014-01-31 11:00:44 -060020 std::list<Adjacent> getAdjList();
akmhoquea8cd6b92014-01-31 20:13:26 -060021 bool isNeighbor(string adjName);
22 void incrementTimedOutInterestCount(string& neighbor);
23 int getTimedOutInterestCount(string& neighbor);
24 int getStatusOfNeighbor(string& neighbor);
25 void setStatusOfNeighbor(string& neighbor, int status);
26 void setTimedOutInterestCount(string& neighbor, int count);
akmhoque87347a32014-01-31 11:00:44 -060027
akmhoquecd552472014-02-01 21:22:16 -060028 bool isAdjLsaBuildable(nlsr& pnlsr);
29 int getNumOfActiveNeighbor();
30
31 int getAdlSize()
32 {
33 return adjList.size();
34 }
35
akmhoquea8cd6b92014-01-31 20:13:26 -060036 void printAdl();
akmhoque87347a32014-01-31 11:00:44 -060037
38private:
39 std::list< Adjacent > adjList;
40};
41
42#endif