summaryrefslogtreecommitdiff
path: root/hyprpm/src/core/Plugin.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'hyprpm/src/core/Plugin.hpp')
-rw-r--r--hyprpm/src/core/Plugin.hpp23
1 files changed, 22 insertions, 1 deletions
diff --git a/hyprpm/src/core/Plugin.hpp b/hyprpm/src/core/Plugin.hpp
index e66031c9..a8c74084 100644
--- a/hyprpm/src/core/Plugin.hpp
+++ b/hyprpm/src/core/Plugin.hpp
@@ -14,6 +14,27 @@ struct SPluginRepository {
std::string url;
std::string rev;
std::string name;
+ std::string author;
std::vector<SPlugin> plugins;
std::string hash;
-}; \ No newline at end of file
+};
+
+enum ePluginRepoIdentifierType {
+ IDENTIFIER_URL,
+ IDENTIFIER_NAME,
+ IDENTIFIER_AUTHOR_NAME
+};
+
+struct SPluginRepoIdentifier {
+ ePluginRepoIdentifierType type;
+ std::string url = "";
+ std::string name = "";
+ std::string author = "";
+
+ static SPluginRepoIdentifier fromString(const std::string& string);
+ static SPluginRepoIdentifier fromUrl(const std::string& Url);
+ static SPluginRepoIdentifier fromName(const std::string& name);
+ static SPluginRepoIdentifier fromAuthorName(const std::string& author, const std::string& name);
+ std::string toString() const;
+ bool matches(const std::string& url, const std::string& name, const std::string& author) const;
+};