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