2022-03-03 02:01:23 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <QString>
|
|
|
|
|
2022-03-07 19:22:57 +00:00
|
|
|
namespace ModPlatform {
|
|
|
|
class ListModel;
|
|
|
|
}
|
|
|
|
|
2022-03-03 02:01:23 +00:00
|
|
|
class ModAPI {
|
2022-03-07 19:22:57 +00:00
|
|
|
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 };
|
2022-03-03 02:01:23 +00:00
|
|
|
|
2022-03-07 19:22:57 +00:00
|
|
|
struct SearchArgs {
|
|
|
|
int offset;
|
|
|
|
QString search;
|
|
|
|
QString sorting;
|
|
|
|
ModLoaderType mod_loader;
|
|
|
|
QString version;
|
|
|
|
};
|
2022-03-06 19:45:39 +00:00
|
|
|
|
2022-03-07 19:46:08 +00:00
|
|
|
virtual void searchMods(CallerType* caller, SearchArgs&& args) const = 0;
|
|
|
|
virtual void getVersions(CallerType* caller, const QString& addonId) const = 0;
|
2022-03-03 02:01:23 +00:00
|
|
|
};
|