1 | /*␊ |
2 | Copyright 2022 Grégory Soutadé␊ |
3 | ␊ |
4 | This file is part of libgourou.␊ |
5 | ␊ |
6 | libgourou is free software: you can redistribute it and/or modify␊ |
7 | it under the terms of the GNU Lesser General Public License as published by␊ |
8 | the Free Software Foundation, either version 3 of the License, or␊ |
9 | (at your option) any later version.␊ |
10 | ␊ |
11 | libgourou is distributed in the hope that it will be useful,␊ |
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of␊ |
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the␊ |
14 | GNU Lesser General Public License for more details.␊ |
15 | ␊ |
16 | You should have received a copy of the GNU Lesser General Public License␊ |
17 | along with libgourou. If not, see <http://www.gnu.org/licenses/>.␊ |
18 | */␊ |
19 | ␊ |
20 | #ifndef _LOAN_TOKEN_H_␊ |
21 | #define _LOAN_TOKEN_H_␊ |
22 | ␊ |
23 | #include <map>␊ |
24 | ␊ |
25 | #include <pugixml.hpp>␊ |
26 | ␊ |
27 | namespace gourou␊ |
28 | {␊ |
29 | /**␊ |
30 | * @brief This class is a container for a fulfillment object␊ |
31 | */␊ |
32 | class LoanToken␊ |
33 | {␊ |
34 | public:␊ |
35 | ␉/**␊ |
36 | ␉ * @brief Main constructor. Not to be called by user␊ |
37 | ␉ *␊ |
38 | ␉ * @param doc Fulfill reply␊ |
39 | ␉ */␊ |
40 | ␉LoanToken(pugi::xml_document& doc);␊ |
41 | ␊ |
42 | ␉/**␊ |
43 | ␉ * @brief Get a property (id, operatorURL, validity)␊ |
44 | ␉ */␊ |
45 | ␉std::string getProperty(const std::string& property, const std::string& _default=std::string(""));␊ |
46 | ␉std::string operator[](const std::string& property);␊ |
47 | ␊ |
48 | private:␊ |
49 | ␉std::map<std::string, std::string> properties;␊ |
50 | };␊ |
51 | }␊ |
52 | ␊ |
53 | ␊ |
54 | #endif␊ |