akmhoque | fa8ee9b | 2014-03-14 09:06:24 -0500 | [diff] [blame] | 1 | #ifndef NLSR_WLE_HPP |
| 2 | #define NLSR_WLE_HPP |
| 3 | |
| 4 | #include <list> |
| 5 | #include <iostream> |
| 6 | |
| 7 | namespace nlsr |
| 8 | { |
| 9 | class WaitingListEntry |
| 10 | { |
| 11 | public: |
| 12 | WaitingListEntry() |
akmhoque | 05d5fcf | 2014-04-15 14:58:45 -0500 | [diff] [blame^] | 13 | : m_responsibleCert() |
| 14 | , m_waitingCerts() |
akmhoque | fa8ee9b | 2014-03-14 09:06:24 -0500 | [diff] [blame] | 15 | {} |
| 16 | |
| 17 | WaitingListEntry(std::string resCert) |
akmhoque | 05d5fcf | 2014-04-15 14:58:45 -0500 | [diff] [blame^] | 18 | : m_responsibleCert(resCert) |
| 19 | , m_waitingCerts() |
akmhoque | fa8ee9b | 2014-03-14 09:06:24 -0500 | [diff] [blame] | 20 | {} |
| 21 | |
| 22 | std::string getResponsibleCert() const |
| 23 | { |
akmhoque | 05d5fcf | 2014-04-15 14:58:45 -0500 | [diff] [blame^] | 24 | return m_responsibleCert; |
akmhoque | fa8ee9b | 2014-03-14 09:06:24 -0500 | [diff] [blame] | 25 | } |
| 26 | |
| 27 | void setResponsibleCert(std::string resCert) |
| 28 | { |
akmhoque | 05d5fcf | 2014-04-15 14:58:45 -0500 | [diff] [blame^] | 29 | m_responsibleCert=resCert; |
akmhoque | fa8ee9b | 2014-03-14 09:06:24 -0500 | [diff] [blame] | 30 | } |
| 31 | |
| 32 | std::list<std::string> getWaitingCerts() const |
| 33 | { |
akmhoque | 05d5fcf | 2014-04-15 14:58:45 -0500 | [diff] [blame^] | 34 | return m_waitingCerts; |
akmhoque | fa8ee9b | 2014-03-14 09:06:24 -0500 | [diff] [blame] | 35 | } |
| 36 | |
| 37 | bool addWaitee(std::string waiteeName); |
| 38 | |
| 39 | private: |
akmhoque | 05d5fcf | 2014-04-15 14:58:45 -0500 | [diff] [blame^] | 40 | std::string m_responsibleCert; |
| 41 | std::list<std::string> m_waitingCerts; |
akmhoque | fa8ee9b | 2014-03-14 09:06:24 -0500 | [diff] [blame] | 42 | }; |
| 43 | |
| 44 | std::ostream& operator<<(std::ostream& os, const WaitingListEntry& we); |
| 45 | } //end name space |
| 46 | |
| 47 | #endif |