summaryrefslogtreecommitdiff
path: root/hyprpm/src/core/DataState.hpp
diff options
context:
space:
mode:
authorTuur Vanhoutte <4633209+zjeffer@users.noreply.github.com>2024-12-27 15:40:46 +0100
committerGitHub <noreply@github.com>2024-12-27 14:40:46 +0000
commit43ca66779b7d267cc6c52bdea75d3ff8eb60132f (patch)
tree0c4590d7def526cc88d5602f96781755db7e6c45 /hyprpm/src/core/DataState.hpp
parente75e2cdac79417ffdbbbe903f72668953483a4e7 (diff)
hyprpm: use glaze to parse hyprctl plugin list (#8812)
* Use std::filesystem::path in hyprpm DataState to avoid concatenating strings with (folder + "/" + file) * Added getPluginStates helper method in DataState * Small clang-tidy improvements
Diffstat (limited to 'hyprpm/src/core/DataState.hpp')
-rw-r--r--hyprpm/src/core/DataState.hpp22
1 files changed, 12 insertions, 10 deletions
diff --git a/hyprpm/src/core/DataState.hpp b/hyprpm/src/core/DataState.hpp
index 70788f72..ebb550ba 100644
--- a/hyprpm/src/core/DataState.hpp
+++ b/hyprpm/src/core/DataState.hpp
@@ -1,4 +1,5 @@
#pragma once
+#include <filesystem>
#include <string>
#include <vector>
#include "Plugin.hpp"
@@ -9,14 +10,15 @@ struct SGlobalState {
};
namespace DataState {
- std::string getDataStatePath();
- std::string getHeadersPath();
- 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();
+ 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();
}; \ No newline at end of file