diff options
author | Trial97 <alexandru.tripon97@gmail.com> | 2023-07-02 13:14:19 +0300 |
---|---|---|
committer | Trial97 <alexandru.tripon97@gmail.com> | 2023-07-02 13:14:19 +0300 |
commit | 7ac2a23bc8083f0320d73af32f62ad97a407557b (patch) | |
tree | fc4004dacb288ebefce9420099cc29f67383d41a /launcher/modplatform/ResourceAPI.h | |
parent | f8adb508ab0152af76829e0fdee92b451dcc1acf (diff) | |
parent | b51f1f1d41a6153c37b1d61a04df8ece5004cc27 (diff) | |
download | PrismLauncher-7ac2a23bc8083f0320d73af32f62ad97a407557b.tar.gz PrismLauncher-7ac2a23bc8083f0320d73af32f62ad97a407557b.tar.bz2 PrismLauncher-7ac2a23bc8083f0320d73af32f62ad97a407557b.zip |
Merge branch 'develop' of https://github.com/PrismLauncher/PrismLauncher into catpacks
Diffstat (limited to 'launcher/modplatform/ResourceAPI.h')
-rw-r--r-- | launcher/modplatform/ResourceAPI.h | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/launcher/modplatform/ResourceAPI.h b/launcher/modplatform/ResourceAPI.h index 34f33779..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; @@ -121,12 +131,12 @@ class ResourceAPI { qWarning() << "TODO"; return nullptr; } - [[nodiscard]] virtual Task::Ptr getProject(QString addonId, QByteArray* response) const + [[nodiscard]] virtual Task::Ptr getProject(QString addonId, std::shared_ptr<QByteArray> response) const { qWarning() << "TODO"; return nullptr; } - [[nodiscard]] virtual Task::Ptr getProjects(QStringList addonIds, QByteArray* response) const + [[nodiscard]] virtual Task::Ptr getProjects(QStringList addonIds, std::shared_ptr<QByteArray> response) const { qWarning() << "TODO"; return nullptr; @@ -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) { |