diff options
author | Trial97 <alexandru.tripon97@gmail.com> | 2023-06-28 17:46:01 +0300 |
---|---|---|
committer | Trial97 <alexandru.tripon97@gmail.com> | 2023-06-28 17:46:01 +0300 |
commit | c23bf2fd226d7e27b33b94b9c3509b1abcaa6fe3 (patch) | |
tree | 5b99cdd84af9ef4d6bda225311689f76dead1a8a /launcher/modplatform/ResourceAPI.h | |
parent | 0063d52952f654fb11031b3b8f0fb684202e2f1c (diff) | |
parent | faec21d572549793293bf41127e384811f8a66dc (diff) | |
download | PrismLauncher-c23bf2fd226d7e27b33b94b9c3509b1abcaa6fe3.tar.gz PrismLauncher-c23bf2fd226d7e27b33b94b9c3509b1abcaa6fe3.tar.bz2 PrismLauncher-c23bf2fd226d7e27b33b94b9c3509b1abcaa6fe3.zip |
Merge branch 'develop' of https://github.com/PrismLauncher/PrismLauncher into settings
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) { |