blob: 0647382dff85fb9c768be2499a3f3692492202a0 [file] [log] [blame]
akmhoquefa8ee9b2014-03-14 09:06:24 -05001#ifndef NLSR_WLE_HPP
2#define NLSR_WLE_HPP
3
4#include <list>
5#include <iostream>
6
7namespace nlsr
8{
9 class WaitingListEntry
10 {
11 public:
12 WaitingListEntry()
akmhoque05d5fcf2014-04-15 14:58:45 -050013 : m_responsibleCert()
14 , m_waitingCerts()
akmhoquefa8ee9b2014-03-14 09:06:24 -050015 {}
16
17 WaitingListEntry(std::string resCert)
akmhoque05d5fcf2014-04-15 14:58:45 -050018 : m_responsibleCert(resCert)
19 , m_waitingCerts()
akmhoquefa8ee9b2014-03-14 09:06:24 -050020 {}
21
22 std::string getResponsibleCert() const
23 {
akmhoque05d5fcf2014-04-15 14:58:45 -050024 return m_responsibleCert;
akmhoquefa8ee9b2014-03-14 09:06:24 -050025 }
26
27 void setResponsibleCert(std::string resCert)
28 {
akmhoque05d5fcf2014-04-15 14:58:45 -050029 m_responsibleCert=resCert;
akmhoquefa8ee9b2014-03-14 09:06:24 -050030 }
31
32 std::list<std::string> getWaitingCerts() const
33 {
akmhoque05d5fcf2014-04-15 14:58:45 -050034 return m_waitingCerts;
akmhoquefa8ee9b2014-03-14 09:06:24 -050035 }
36
37 bool addWaitee(std::string waiteeName);
38
39 private:
akmhoque05d5fcf2014-04-15 14:58:45 -050040 std::string m_responsibleCert;
41 std::list<std::string> m_waitingCerts;
akmhoquefa8ee9b2014-03-14 09:06:24 -050042 };
43
44 std::ostream& operator<<(std::ostream& os, const WaitingListEntry& we);
45} //end name space
46
47#endif