added JSON support to select the services
This commit is contained in:
22
src/json_settings.h
Normal file
22
src/json_settings.h
Normal 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
|
||||
Reference in New Issue
Block a user