akmhoque | 5335346 | 2014-04-22 08:43:45 -0500 | [diff] [blame] | 1 | #ifndef NLSR_WL_HPP |
| 2 | #define NLSR_WL_HPP |
| 3 | |
| 4 | #include "waiting-list-entry.hpp" |
| 5 | |
| 6 | namespace nlsr { |
| 7 | class WaitingList |
| 8 | { |
| 9 | public: |
| 10 | WaitingList() |
| 11 | : m_waitingTable() |
| 12 | {} |
| 13 | |
| 14 | std::list<WaitingListEntry>& |
| 15 | getWaitingTable() |
| 16 | { |
| 17 | return m_waitingTable; |
| 18 | } |
| 19 | |
| 20 | bool |
| 21 | add(std::string respCert, std::string waitee); |
| 22 | |
| 23 | std::pair<WaitingListEntry, bool> |
| 24 | getWaitingListEntry(std::string respCert); |
| 25 | |
| 26 | bool |
| 27 | remove(std::string respCert); |
| 28 | |
| 29 | private: |
| 30 | std::list<WaitingListEntry> m_waitingTable; |
| 31 | }; |
| 32 | |
| 33 | std::ostream& |
| 34 | operator<<(std::ostream& os, WaitingList wl); |
| 35 | |
| 36 | }//namespace nlsr |
| 37 | |
| 38 | #endif //NLSR_WL_HPP |