2023-12-07 10:41:09 +00:00
|
|
|
#pragma once
|
2024-12-27 15:40:46 +01:00
|
|
|
#include <filesystem>
|
2023-12-07 10:41:09 +00:00
|
|
|
#include <string>
|
|
|
|
|
#include <vector>
|
|
|
|
|
#include "Plugin.hpp"
|
|
|
|
|
|
|
|
|
|
struct SGlobalState {
|
|
|
|
|
std::string headersHashCompiled = "";
|
|
|
|
|
bool dontWarnInstall = false;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
namespace DataState {
|
2024-12-27 15:40:46 +01:00
|
|
|
std::filesystem::path getDataStatePath();
|
|
|
|
|
std::string getHeadersPath();
|
|
|
|
|
std::vector<std::filesystem::path> getPluginStates();
|
|
|
|
|
void ensureStateStoreExists();
|
|
|
|
|
void addNewPluginRepo(const SPluginRepository& repo);
|
|
|
|
|
void removePluginRepo(const std::string& urlOrName);
|
|
|
|
|
bool pluginRepoExists(const std::string& urlOrName);
|
|
|
|
|
void updateGlobalState(const SGlobalState& state);
|
|
|
|
|
SGlobalState getGlobalState();
|
|
|
|
|
bool setPluginEnabled(const std::string& name, bool enabled);
|
|
|
|
|
std::vector<SPluginRepository> getAllRepositories();
|
2023-12-07 10:41:09 +00:00
|
|
|
};
|