diff options
author | Sefa Eyeoglu <contact@scrumplex.net> | 2023-01-24 14:37:40 +0100 |
---|---|---|
committer | Sefa Eyeoglu <contact@scrumplex.net> | 2023-01-24 14:40:17 +0100 |
commit | 6e841a3b7e5f9270b730a10d991433f37678818a (patch) | |
tree | 0b4f0a6c44b0464bb3eb1d44d94e90b1805fb262 /launcher/modplatform/helpers/NetworkResourceAPI.h | |
parent | 849b92665e0762a38a7e17403015e2b037318aec (diff) | |
parent | 16477a8f6c1fc646208b41b76598ce8e7a60369e (diff) | |
download | PrismLauncher-6e841a3b7e5f9270b730a10d991433f37678818a.tar.gz PrismLauncher-6e841a3b7e5f9270b730a10d991433f37678818a.tar.bz2 PrismLauncher-6e841a3b7e5f9270b730a10d991433f37678818a.zip |
Merge branch 'develop' into remove-updater
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
Diffstat (limited to 'launcher/modplatform/helpers/NetworkResourceAPI.h')
-rw-r--r-- | launcher/modplatform/helpers/NetworkResourceAPI.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/launcher/modplatform/helpers/NetworkResourceAPI.h b/launcher/modplatform/helpers/NetworkResourceAPI.h new file mode 100644 index 00000000..94813bec --- /dev/null +++ b/launcher/modplatform/helpers/NetworkResourceAPI.h @@ -0,0 +1,22 @@ +// SPDX-FileCopyrightText: 2023 flowln <flowlnlnln@gmail.com> +// +// SPDX-License-Identifier: GPL-3.0-only + +#pragma once + +#include "modplatform/ResourceAPI.h" + +class NetworkResourceAPI : public ResourceAPI { + public: + Task::Ptr searchProjects(SearchArgs&&, SearchCallbacks&&) const override; + + Task::Ptr getProject(QString addonId, QByteArray* response) const override; + + Task::Ptr getProjectInfo(ProjectInfoArgs&&, ProjectInfoCallbacks&&) const override; + Task::Ptr getProjectVersions(VersionSearchArgs&&, VersionSearchCallbacks&&) const override; + + protected: + [[nodiscard]] virtual auto getSearchURL(SearchArgs const& args) const -> std::optional<QString> = 0; + [[nodiscard]] virtual auto getInfoURL(QString const& id) const -> std::optional<QString> = 0; + [[nodiscard]] virtual auto getVersionsURL(VersionSearchArgs const& args) const -> std::optional<QString> = 0; +}; |