blob: ad85f01ebf62e26377f8e3127c697958ce3159bb [file] [log] [blame]
#ifndef NLSR_ADL_HPP
#define NLSR_ADL_HPP
#include <ndn-cpp-dev/face.hpp>
#include "nlsr_adjacent.hpp"
#include<list>
namespace nlsr
{
class Nlsr;
using namespace std;
class Adl
{
public:
Adl();
~Adl();
int insert(Adjacent& adj);
int updateAdjacentStatus(string adjName, int s);
int updateAdjacentLinkCost(string adjName, double lc);
std::list<Adjacent>& getAdjList();
bool isNeighbor(string adjName);
void incrementTimedOutInterestCount(string& neighbor);
int getTimedOutInterestCount(string& neighbor);
int getStatusOfNeighbor(string& neighbor);
void setStatusOfNeighbor(string& neighbor, int status);
void setTimedOutInterestCount(string& neighbor, int count);
void addAdjacentsFromAdl(Adl& adl);
bool isAdjLsaBuildable(Nlsr& pnlsr);
int getNumOfActiveNeighbor();
Adjacent getAdjacent(string adjName);
bool isEqual(Adl& adl);
int getSize()
{
return m_adjList.size();
}
void reset()
{
if( m_adjList.size() > 0 )
{
m_adjList.clear();
}
}
void printAdl();
private:
std::list< Adjacent > m_adjList;
};
} //namespace nlsr
#endif