c04cee7ff7
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
55 lines
1.0 KiB
C++
55 lines
1.0 KiB
C++
#pragma once
|
|
|
|
#include <QList>
|
|
#include <QMetaType>
|
|
#include <QString>
|
|
#include <QVector>
|
|
#include "modplatform/ModIndex.h"
|
|
|
|
#include "modplatform/ModIndex.h"
|
|
|
|
namespace Flame {
|
|
|
|
struct ModpackAuthor {
|
|
QString name;
|
|
QString url;
|
|
};
|
|
|
|
struct IndexedVersion {
|
|
int addonId;
|
|
int fileId;
|
|
QString version;
|
|
ModPlatform::IndexedVersionType version_type;
|
|
QString mcVersion;
|
|
QString downloadUrl;
|
|
};
|
|
|
|
struct ModpackExtra {
|
|
QString websiteUrl;
|
|
QString wikiUrl;
|
|
QString issuesUrl;
|
|
QString sourceUrl;
|
|
};
|
|
|
|
struct IndexedPack {
|
|
int addonId;
|
|
QString name;
|
|
QString description;
|
|
QList<ModpackAuthor> authors;
|
|
QString logoName;
|
|
QString logoUrl;
|
|
|
|
bool versionsLoaded = false;
|
|
QVector<IndexedVersion> versions;
|
|
|
|
bool extraInfoLoaded = false;
|
|
ModpackExtra extra;
|
|
};
|
|
|
|
void loadIndexedPack(IndexedPack& m, QJsonObject& obj);
|
|
void loadIndexedInfo(IndexedPack&, QJsonObject&);
|
|
void loadIndexedPackVersions(IndexedPack& m, QJsonArray& arr);
|
|
} // namespace Flame
|
|
|
|
Q_DECLARE_METATYPE(Flame::IndexedPack)
|