Add new type Settings & refactor TSettings behavior

into Settings by adding getters/setters

Signed-off-by: Lucca Jiménez Könings <development@jimkoen.com>
This commit is contained in:
Lucca Jiménez Könings
2024-02-18 19:21:07 +01:00
parent 4d7967d5d9
commit 55f5437618
4 changed files with 164 additions and 1 deletions

View File

@@ -37,6 +37,7 @@
namespace fs = std::filesystem;
#include "TConsole.h"
#include "TSettings.h"
struct Version {
uint8_t major;
@@ -65,7 +66,7 @@ public:
std::string Resource { "Resources" };
std::string MapName { "/levels/gridmap_v2/info.json" };
std::string Key {};
std::string Password{};
std::string Password {};
std::string SSLKeyPath { "./.ssl/HttpServer/key.pem" };
std::string SSLCertPath { "./.ssl/HttpServer/cert.pem" };
bool HTTPServerEnabled { false };
@@ -102,6 +103,7 @@ public:
static void SetPPS(const std::string& NewPPS) { mPPS = NewPPS; }
static TSettings Settings;
static struct Settings SettingsSingleton;
static std::vector<std::string> GetBackendUrlsInOrder() {
return {