aboutsummaryrefslogtreecommitdiff
path: root/api/logic/modplatform/flame/FlamePackIndex.h
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@users.noreply.github.com>2021-04-08 22:07:03 +0200
committerGitHub <noreply@github.com>2021-04-08 22:07:03 +0200
commit4ac38991ad66326a7dfd79eedde02489534e9132 (patch)
treecad78a85f9d6542d43441fcf6502575f9b880f7f /api/logic/modplatform/flame/FlamePackIndex.h
parent4ca481b2b34e711112eb7a257fc2385c0dce9dd2 (diff)
parent1f8408c79340c7cc93fa1677021f3d0dc3f75c34 (diff)
downloadPrismLauncher-4ac38991ad66326a7dfd79eedde02489534e9132.tar.gz
PrismLauncher-4ac38991ad66326a7dfd79eedde02489534e9132.tar.bz2
PrismLauncher-4ac38991ad66326a7dfd79eedde02489534e9132.zip
Merge pull request #3691 from phit/feature/fixcurse
NOISSUE Curseforge makeover
Diffstat (limited to 'api/logic/modplatform/flame/FlamePackIndex.h')
-rw-r--r--api/logic/modplatform/flame/FlamePackIndex.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/api/logic/modplatform/flame/FlamePackIndex.h b/api/logic/modplatform/flame/FlamePackIndex.h
new file mode 100644
index 00000000..cdeb2c13
--- /dev/null
+++ b/api/logic/modplatform/flame/FlamePackIndex.h
@@ -0,0 +1,43 @@
+#pragma once
+
+#include <QList>
+#include <QMetaType>
+#include <QString>
+#include <QVector>
+
+#include "multimc_logic_export.h"
+
+namespace Flame {
+
+struct ModpackAuthor {
+ QString name;
+ QString url;
+};
+
+struct IndexedVersion {
+ int addonId;
+ int fileId;
+ QString version;
+ QString mcVersion;
+ QString downloadUrl;
+};
+
+struct IndexedPack
+{
+ int addonId;
+ QString name;
+ QString description;
+ QList<ModpackAuthor> authors;
+ QString logoName;
+ QString logoUrl;
+ QString websiteUrl;
+
+ bool versionsLoaded = false;
+ QVector<IndexedVersion> versions;
+};
+
+MULTIMC_LOGIC_EXPORT void loadIndexedPack(IndexedPack & m, QJsonObject & obj);
+MULTIMC_LOGIC_EXPORT void loadIndexedPackVersions(IndexedPack & m, QJsonArray & arr);
+}
+
+Q_DECLARE_METATYPE(Flame::IndexedPack)