| 1 | /* |
| 2 | * This is the source code of tgnet library v. 1.1 |
| 3 | * It is licensed under GNU GPL v. 2 or later. |
| 4 | * You should have received a copy of the license in this archive (see LICENSE). |
| 5 | * |
| 6 | * Copyright Nikolai Kudashov, 2015-2018. |
| 7 | */ |
| 8 | |
| 9 | #ifndef CONFIG_H |
| 10 | #define CONFIG_H |
| 11 | |
| 12 | #include <string> |
| 13 | #include "NativeByteBuffer.h" |
| 14 | |
| 15 | class Config { |
| 16 | |
| 17 | public: |
| 18 | Config(int32_t instance, std::string fileName); |
| 19 | |
| 20 | NativeByteBuffer *readConfig(); |
| 21 | void writeConfig(NativeByteBuffer *buffer); |
| 22 | |
| 23 | private: |
| 24 | int32_t instanceNum; |
| 25 | std::string configPath; |
| 26 | std::string backupPath; |
| 27 | }; |
| 28 | |
| 29 | #endif |
| 30 | |