2022-03-07 19:46:08 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "modplatform/ModAPI.h"
|
|
|
|
|
|
|
|
class NetworkModAPI : public ModAPI {
|
|
|
|
public:
|
|
|
|
void searchMods(CallerType* caller, SearchArgs&& args) const override;
|
2022-07-18 23:15:02 +01:00
|
|
|
void getModInfo(ModPlatform::IndexedPack& pack, std::function<void(QJsonDocument&, ModPlatform::IndexedPack&)> callback) override;
|
2022-07-18 23:22:31 +01:00
|
|
|
void getVersions(VersionSearchArgs&& args, std::function<void(QJsonDocument&, QString)> callback) const override;
|
2022-03-07 19:46:08 +00:00
|
|
|
|
2022-06-28 11:09:58 +01:00
|
|
|
auto getProject(QString addonId, QByteArray* response) const -> NetJob* override;
|
2022-06-19 18:29:21 +01:00
|
|
|
|
2022-03-07 19:46:08 +00:00
|
|
|
protected:
|
2022-03-08 14:12:35 +00:00
|
|
|
virtual auto getModSearchURL(SearchArgs& args) const -> QString = 0;
|
2022-05-24 13:38:48 +01:00
|
|
|
virtual auto getModInfoURL(QString& id) const -> QString = 0;
|
2022-03-24 21:39:53 +00:00
|
|
|
virtual auto getVersionsURL(VersionSearchArgs& args) const -> QString = 0;
|
2022-03-07 19:46:08 +00:00
|
|
|
};
|