This commit is contained in:
38
source/src/config.hpp
Normal file
38
source/src/config.hpp
Normal file
@ -0,0 +1,38 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include "utils/json.hpp"
|
||||
|
||||
namespace dropshell {
|
||||
|
||||
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::string get_local_tempfiles_path();
|
||||
std::string get_local_backup_path();
|
||||
std::string get_local_template_cache_path();
|
||||
std::vector<std::string> get_template_registry_urls();
|
||||
std::vector<std::string> get_template_local_paths();
|
||||
std::vector<std::string> get_local_server_definition_paths();
|
||||
|
||||
std::string get_template_upload_registry_url();
|
||||
std::string get_template_upload_registry_token();
|
||||
|
||||
private:
|
||||
nlohmann::json mConfig;
|
||||
bool mIsConfigSet;
|
||||
};
|
||||
|
||||
|
||||
config & gConfig();
|
||||
|
||||
} // namespace dropshell
|
Reference in New Issue
Block a user