diff options
author | swirl <swurl@swurl.xyz> | 2022-02-03 13:53:30 -0500 |
---|---|---|
committer | swirl <swurl@swurl.xyz> | 2022-02-03 13:53:30 -0500 |
commit | e8a4902a3dddd08d65bd1284951ae5954439d1f5 (patch) | |
tree | b5936e950cf149366366db156f90e51c25f2257a /launcher/modplatform/modrinth/ModrinthPackIndex.h | |
parent | fcc4420cfec3fcd970ff1f35b8848559c7b5b6ef (diff) | |
parent | e2952061af24e0b9a4639d5ff1eb24c57f65830a (diff) | |
download | PrismLauncher-e8a4902a3dddd08d65bd1284951ae5954439d1f5.tar.gz PrismLauncher-e8a4902a3dddd08d65bd1284951ae5954439d1f5.tar.bz2 PrismLauncher-e8a4902a3dddd08d65bd1284951ae5954439d1f5.zip |
Merge branch 'feature/download_mods' into develop
Diffstat (limited to 'launcher/modplatform/modrinth/ModrinthPackIndex.h')
-rw-r--r-- | launcher/modplatform/modrinth/ModrinthPackIndex.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/launcher/modplatform/modrinth/ModrinthPackIndex.h b/launcher/modplatform/modrinth/ModrinthPackIndex.h new file mode 100644 index 00000000..3a4cd270 --- /dev/null +++ b/launcher/modplatform/modrinth/ModrinthPackIndex.h @@ -0,0 +1,48 @@ +#pragma once + +#include <QList> +#include <QMetaType> +#include <QString> +#include <QVector> +#include <QNetworkAccessManager> +#include <QObjectPtr.h> +#include "net/NetJob.h" +#include "BaseInstance.h" + +namespace Modrinth { + +struct ModpackAuthor { + QString name; + QString url; +}; + +struct IndexedVersion { + QString addonId; + QString fileId; + QString version; + QVector<QString> mcVersion; + QString downloadUrl; + QString date; + QString fileName; + QVector<QString> loaders; +}; + +struct IndexedPack +{ + QString addonId; + QString name; + QString description; + ModpackAuthor author; + QString logoName; + QString logoUrl; + QString websiteUrl; + + bool versionsLoaded = false; + QVector<IndexedVersion> versions; +}; + +void loadIndexedPack(IndexedPack & m, QJsonObject & obj); +void loadIndexedPackVersions(IndexedPack &pack, QJsonArray &arr, const shared_qobject_ptr<QNetworkAccessManager> &network, BaseInstance *inst); +} + +Q_DECLARE_METATYPE(Modrinth::IndexedPack) |