PrismLauncher/launcher/modplatform/helpers/NetworkModAPI.h
flow 52c45c2d32
feat: add some mod api calls
- Get Project: Already existed but required a specific caller type. This
  is more general.
- Get Projects: A single call to multiple of the above

Both providers support these calls.

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-17 11:33:43 -03:00

18 lines
663 B
C++

#pragma once
#include "modplatform/ModAPI.h"
class NetworkModAPI : public ModAPI {
public:
void searchMods(CallerType* caller, SearchArgs&& args) const override;
void getModInfo(CallerType* caller, ModPlatform::IndexedPack& pack) override;
void getVersions(CallerType* caller, VersionSearchArgs&& args) const override;
auto getProject(QString addonId, QByteArray* response) const -> NetJob::Ptr override;
protected:
virtual auto getModSearchURL(SearchArgs& args) const -> QString = 0;
virtual auto getModInfoURL(QString& id) const -> QString = 0;
virtual auto getVersionsURL(VersionSearchArgs& args) const -> QString = 0;
};