2022-01-14 08:43:42 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <QList>
|
|
|
|
#include <QMetaType>
|
|
|
|
#include <QString>
|
|
|
|
#include <QVector>
|
|
|
|
#include <QNetworkAccessManager>
|
|
|
|
#include <QObjectPtr.h>
|
|
|
|
#include "net/NetJob.h"
|
2022-01-15 09:25:24 +00:00
|
|
|
#include "BaseInstance.h"
|
2022-01-14 08:43:42 +00:00
|
|
|
|
|
|
|
namespace Modrinth {
|
|
|
|
|
|
|
|
struct ModpackAuthor {
|
|
|
|
QString name;
|
|
|
|
QString url;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct IndexedVersion {
|
|
|
|
QString addonId;
|
|
|
|
QString fileId;
|
|
|
|
QString version;
|
2022-01-15 07:51:47 +00:00
|
|
|
QVector<QString> mcVersion;
|
2022-01-14 08:43:42 +00:00
|
|
|
QString downloadUrl;
|
|
|
|
QString date;
|
2022-01-14 11:47:18 +00:00
|
|
|
QString fileName;
|
2022-01-15 07:51:47 +00:00
|
|
|
QVector<QString> loaders;
|
2022-01-14 08:43:42 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct IndexedPack
|
|
|
|
{
|
|
|
|
QString addonId;
|
|
|
|
QString name;
|
|
|
|
QString description;
|
2022-01-24 06:23:01 +00:00
|
|
|
ModpackAuthor author;
|
2022-01-14 08:43:42 +00:00
|
|
|
QString logoName;
|
|
|
|
QString logoUrl;
|
|
|
|
QString websiteUrl;
|
|
|
|
|
|
|
|
bool versionsLoaded = false;
|
|
|
|
QVector<IndexedVersion> versions;
|
|
|
|
};
|
|
|
|
|
|
|
|
void loadIndexedPack(IndexedPack & m, QJsonObject & obj);
|
2022-01-15 09:25:24 +00:00
|
|
|
void loadIndexedPackVersions(IndexedPack &pack, QJsonArray &arr, const shared_qobject_ptr<QNetworkAccessManager> &network, BaseInstance *inst);
|
2022-01-14 08:43:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Q_DECLARE_METATYPE(Modrinth::IndexedPack)
|