diff options
Diffstat (limited to 'launcher/modplatform/ModAPI.h')
-rw-r--r-- | launcher/modplatform/ModAPI.h | 29 |
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; +}; |