diff options
| author | Trial97 <alexandru.tripon97@gmail.com> | 2023-06-24 20:04:56 +0300 |
|---|---|---|
| committer | Trial97 <alexandru.tripon97@gmail.com> | 2023-06-24 20:04:56 +0300 |
| commit | 81c1a951665962d066a9b51a16f219ff4b160b4e (patch) | |
| tree | a482e2fce09c07290bdd81f2777b059995e98c9b /launcher/modplatform/ResourceAPI.h | |
| parent | f825d7753afd6c00111c9ff9deedeee8ded5b27a (diff) | |
| parent | bcf45c74a1b0b3389c05927637bf8aa95b8e43cf (diff) | |
| download | PrismLauncher-81c1a951665962d066a9b51a16f219ff4b160b4e.tar.gz PrismLauncher-81c1a951665962d066a9b51a16f219ff4b160b4e.tar.bz2 PrismLauncher-81c1a951665962d066a9b51a16f219ff4b160b4e.zip | |
Merge branch 'develop' of https://github.com/PrismLauncher/PrismLauncher into curse
Diffstat (limited to 'launcher/modplatform/ResourceAPI.h')
| -rw-r--r-- | launcher/modplatform/ResourceAPI.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/launcher/modplatform/ResourceAPI.h b/launcher/modplatform/ResourceAPI.h index e24971d5..d3277761 100644 --- a/launcher/modplatform/ResourceAPI.h +++ b/launcher/modplatform/ResourceAPI.h @@ -111,6 +111,16 @@ class ResourceAPI { std::function<void(QJsonDocument&, ModPlatform::IndexedPack)> on_succeed; }; + struct DependencySearchArgs { + ModPlatform::Dependency dependency; + Version mcVersion; + ModLoaderTypes loader; + }; + + struct DependencySearchCallbacks { + std::function<void(QJsonDocument&, const 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 +153,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) { |
