blob: 1a752ca4699ddfc384f0e69ade959da1d130db30 [file] [log] [blame]
akmhoquefa8ee9b2014-03-14 09:06:24 -05001#ifndef NLSR_WL_HPP
2#define NLSR_WL_HPP
3
4#include "nlsr_wle.hpp"
5
6namespace nlsr
7{
8 class WaitingList
9 {
10 public:
11 WaitingList()
akmhoque05d5fcf2014-04-15 14:58:45 -050012 : m_waitingTable()
akmhoquefa8ee9b2014-03-14 09:06:24 -050013 {}
14
15 std::list<WaitingListEntry>& getWaitingTable()
16 {
akmhoque05d5fcf2014-04-15 14:58:45 -050017 return m_waitingTable;
akmhoquefa8ee9b2014-03-14 09:06:24 -050018 }
19
akmhoque05d5fcf2014-04-15 14:58:45 -050020 bool add(std::string respCert, std::string waitee);
akmhoquefa8ee9b2014-03-14 09:06:24 -050021 std::pair<WaitingListEntry, bool> getWaitingListEntry(std::string respCert);
akmhoque05d5fcf2014-04-15 14:58:45 -050022 bool remove(std::string respCert);
akmhoquefa8ee9b2014-03-14 09:06:24 -050023
24 private:
akmhoque05d5fcf2014-04-15 14:58:45 -050025 std::list<WaitingListEntry> m_waitingTable;
akmhoquefa8ee9b2014-03-14 09:06:24 -050026 };
27
28 std::ostream& operator<<(std::ostream& os, WaitingList wl);
29}
30
31#endif