Files
dropshell/source/src/config.hpp
Your Name 622ea5d83d
All checks were successful
Build-Test-Publish / build (linux/amd64) (push) Successful in 1m12s
Build-Test-Publish / build (linux/arm64) (push) Successful in 3m49s
feat: Update 4 files
2025-09-01 20:05:35 +12:00

54 lines
1.1 KiB
C++

#pragma once
#include <string>
#include <vector>
#define JSON_INLINE_ALL
#include <nlohmann/json.hpp>
namespace dropshell {
class tRegistryEntry {
public:
tRegistryEntry(nlohmann::json json);
~tRegistryEntry();
public:
std::string name;
std::string url;
std::string token;
bool valid;
};
class config {
public:
config();
~config();
bool load_config();
bool save_config(bool create_aux_directories);
bool is_config_set() const;
static bool is_agent_installed();
std::vector<tRegistryEntry> get_template_registry_urls();
std::vector<std::string> get_local_template_paths();
std::vector<std::string> get_local_server_definition_paths();
std::string get_server_create_path();
std::string get_template_create_path();
std::string get_backups_path();
std::string get_log_level() const;
void apply_log_level();
private:
nlohmann::json mConfig;
bool mIsConfigSet;
};
config & gConfig();
} // namespace dropshell