2022-03-03 03:05:59 +05:30
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <QList>
|
|
|
|
#include <QMetaType>
|
|
|
|
#include <QString>
|
|
|
|
#include <QVariant>
|
|
|
|
#include <QVector>
|
|
|
|
|
|
|
|
namespace ModPlatform {
|
|
|
|
|
2022-04-22 00:15:20 +05:30
|
|
|
enum class Provider {
|
2022-04-14 03:46:36 +05:30
|
|
|
MODRINTH,
|
|
|
|
FLAME
|
|
|
|
};
|
|
|
|
|
|
|
|
class ProviderCapabilities {
|
|
|
|
public:
|
2022-04-20 05:40:12 +05:30
|
|
|
auto name(Provider) -> const char*;
|
|
|
|
auto hashType(Provider) -> QString;
|
2022-04-14 03:46:36 +05:30
|
|
|
};
|
|
|
|
|
2022-03-03 03:05:59 +05:30
|
|
|
struct ModpackAuthor {
|
|
|
|
QString name;
|
|
|
|
QString url;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct IndexedVersion {
|
|
|
|
QVariant addonId;
|
|
|
|
QVariant fileId;
|
|
|
|
QString version;
|
|
|
|
QVector<QString> mcVersion;
|
|
|
|
QString downloadUrl;
|
|
|
|
QString date;
|
|
|
|
QString fileName;
|
|
|
|
QVector<QString> loaders = {};
|
2022-04-22 00:15:20 +05:30
|
|
|
QString hash;
|
2022-03-03 03:05:59 +05:30
|
|
|
};
|
|
|
|
|
|
|
|
struct IndexedPack {
|
|
|
|
QVariant addonId;
|
2022-04-14 03:46:36 +05:30
|
|
|
Provider provider;
|
2022-03-03 03:05:59 +05:30
|
|
|
QString name;
|
|
|
|
QString description;
|
|
|
|
QList<ModpackAuthor> authors;
|
|
|
|
QString logoName;
|
|
|
|
QString logoUrl;
|
|
|
|
QString websiteUrl;
|
|
|
|
|
|
|
|
bool versionsLoaded = false;
|
|
|
|
QVector<IndexedVersion> versions;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace ModPlatform
|
|
|
|
|
|
|
|
Q_DECLARE_METATYPE(ModPlatform::IndexedPack)
|
2022-04-14 03:46:36 +05:30
|
|
|
Q_DECLARE_METATYPE(ModPlatform::Provider)
|