aboutsummaryrefslogtreecommitdiff
path: root/launcher/modplatform/ModAPI.h
diff options
context:
space:
mode:
authordada513 <dada513@protonmail.com>2022-03-28 20:55:06 +0200
committerdada513 <dada513@protonmail.com>2022-03-28 20:55:06 +0200
commit341eb16a4c0571cc66068c0bdd85d8d8955869b7 (patch)
treea2214b34b0b6a49add241d044aaeda5151396733 /launcher/modplatform/ModAPI.h
parent3a7eeff135f92c807fdc066cb06d835f295b66d3 (diff)
parent87cf38a3770dd7f55fbae79ca3a4958155289af7 (diff)
downloadPrismLauncher-341eb16a4c0571cc66068c0bdd85d8d8955869b7.tar.gz
PrismLauncher-341eb16a4c0571cc66068c0bdd85d8d8955869b7.tar.bz2
PrismLauncher-341eb16a4c0571cc66068c0bdd85d8d8955869b7.zip
Merge branch 'develop' of https://github.com/PolyMC/PolyMC into flatpak_properly
Diffstat (limited to 'launcher/modplatform/ModAPI.h')
-rw-r--r--launcher/modplatform/ModAPI.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/launcher/modplatform/ModAPI.h b/launcher/modplatform/ModAPI.h
new file mode 100644
index 00000000..5c7c6349
--- /dev/null
+++ b/launcher/modplatform/ModAPI.h
@@ -0,0 +1,29 @@
+#pragma once
+
+#include <QString>
+
+namespace ModPlatform {
+class ListModel;
+}
+
+class ModAPI {
+ protected:
+ using CallerType = ModPlatform::ListModel;
+
+ public:
+ virtual ~ModAPI() = default;
+
+ // https://docs.curseforge.com/?http#tocS_ModLoaderType
+ enum ModLoaderType { Any = 0, Forge = 1, Cauldron = 2, LiteLoader = 3, Fabric = 4 };
+
+ struct SearchArgs {
+ int offset;
+ QString search;
+ QString sorting;
+ ModLoaderType mod_loader;
+ QString version;
+ };
+
+ virtual void searchMods(CallerType* caller, SearchArgs&& args) const = 0;
+ virtual void getVersions(CallerType* caller, const QString& addonId) const = 0;
+};