added JSON support to select the services

This commit is contained in:
2025-05-27 21:33:15 +02:00
parent d9d0643dfc
commit 1e9a377c2a
19 changed files with 26060 additions and 139 deletions

22
src/json_settings.h Normal file
View File

@@ -0,0 +1,22 @@
#ifndef JSON_SETTINGS_H
#define JSON_SETTINGS_H
#include <vector>
#include <string>
#include <expected>
#include <optional>
struct Service {
std::string name;
std::string service;
};
struct AppSettings {
static std::expected<AppSettings, std::string> loadAppSettings();
std::optional<const std::string&> getId(std::string_view name);
std::vector<Service> services;
};
#endif // JSON_SETTINGS_H