aboutsummaryrefslogtreecommitdiff
path: root/launcher/modplatform/ResourceAPI.h
diff options
context:
space:
mode:
Diffstat (limited to 'launcher/modplatform/ResourceAPI.h')
-rw-r--r--launcher/modplatform/ResourceAPI.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/launcher/modplatform/ResourceAPI.h b/launcher/modplatform/ResourceAPI.h
index 34f33779..a8e144dc 100644
--- a/launcher/modplatform/ResourceAPI.h
+++ b/launcher/modplatform/ResourceAPI.h
@@ -111,6 +111,24 @@ class ResourceAPI {
std::function<void(QJsonDocument&, ModPlatform::IndexedPack)> on_succeed;
};
+ struct DependencySearchArgs {
+ ModPlatform::Dependency dependency;
+ Version mcVersion;
+ ModLoaderTypes loader;
+
+ DependencySearchArgs(DependencySearchArgs const&) = default;
+ void operator=(DependencySearchArgs other)
+ {
+ dependency = other.dependency;
+ mcVersion = other.mcVersion;
+ loader = other.loader;
+ }
+ };
+
+ struct DependencySearchCallbacks {
+ std::function<void(QJsonDocument&, ModPlatform::Dependency)> on_succeed;
+ };
+
public:
/** Gets a list of available sorting methods for this API. */
[[nodiscard]] virtual auto getSortingMethods() const -> QList<SortingMethod> = 0;
@@ -143,6 +161,12 @@ class ResourceAPI {
return nullptr;
}
+ [[nodiscard]] virtual Task::Ptr getDependencyVersion(DependencySearchArgs&&, DependencySearchCallbacks&&) const
+ {
+ qWarning() << "TODO";
+ return nullptr;
+ }
+
static auto getModLoaderString(ModLoaderType type) -> const QString
{
switch (type) {