summaryrefslogtreecommitdiffstats
path: root/api/logic/modplatform/modpacksch/PackManifest.h
blob: 518fffbf83563ff2e1b124595ee2b1dcb405a285 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
#pragma once

#include <QString>
#include <QVector>
#include <QUrl>
#include <QJsonObject>
#include <QMetaType>

#include "multimc_logic_export.h"

namespace ModpacksCH
{

struct Specs
{
    int id;
    int minimum;
    int recommended;
};

struct Tag
{
    int id;
    QString name;
};

struct Art
{
    int id;
    QString url;
    QString type;
    int width;
    int height;
    bool compressed;
    QString sha1;
    int size;
    int64_t updated;
};

struct Author
{
    int id;
    QString name;
    QString type;
    QString website;
    int64_t updated;
};

struct VersionInfo
{
    int id;
    QString name;
    QString type;
    int64_t updated;
    Specs specs;
};

struct Modpack
{
    int id;
    QString name;
    QString synopsis;
    QString description;
    QString type;
    bool featured;
    int installs;
    int plays;
    int64_t updated;
    int64_t refreshed;
    QVector<Art> art;
    QVector<Author> authors;
    QVector<VersionInfo> versions;
    QVector<Tag> tags;
};

struct VersionTarget
{
    int id;
    QString type;
    QString name;
    QString version;
    int64_t updated;
};

struct VersionFile
{
    int id;
    QString type;
    QString path;
    QString name;
    QString version;
    QString url;
    QString sha1;
    int size;
    bool clientOnly;
    bool serverOnly;
    bool optional;
    int64_t updated;
};

struct Version
{
    int id;
    int parent;
    QString name;
    QString type;
    int installs;
    int plays;
    int64_t updated;
    int64_t refreshed;
    Specs specs;
    QVector<VersionTarget> targets;
    QVector<VersionFile> files;
};

struct VersionChangelog
{
    QString content;
    int64_t updated;
};

MULTIMC_LOGIC_EXPORT void loadModpack(Modpack & m, QJsonObject & obj);

MULTIMC_LOGIC_EXPORT void loadVersion(Version & m, QJsonObject & obj);
}

Q_DECLARE_METATYPE(ModpacksCH::Modpack)