PrismLauncher/api/logic/minecraft/OneSixVersionFormat.h

31 lines
1.3 KiB
C
Raw Normal View History

#pragma once
#include <minecraft/VersionFile.h>
#include <minecraft/PackProfile.h>
#include <minecraft/Library.h>
#include <QJsonDocument>
#include <ProblemProvider.h>
class OneSixVersionFormat
{
public:
2018-07-15 13:51:05 +01:00
// version files / profile patches
static VersionFilePtr versionFileFromJson(const QJsonDocument &doc, const QString &filename, const bool requireOrder);
static QJsonDocument versionFileToJson(const VersionFilePtr &patch);
2018-07-15 13:51:05 +01:00
// libraries
static LibraryPtr libraryFromJson(ProblemContainer & problems, const QJsonObject &libObj, const QString &filename);
2018-07-15 13:51:05 +01:00
static QJsonObject libraryToJson(Library *library);
2018-07-15 13:51:05 +01:00
// DEPRECATED: old 'plus' jar mods generated by the application
static LibraryPtr plusJarModFromJson(ProblemContainer & problems, const QJsonObject &libObj, const QString &filename, const QString &originalName);
2018-07-15 13:51:05 +01:00
// new jar mods derived from libraries
static LibraryPtr jarModFromJson(ProblemContainer & problems, const QJsonObject &libObj, const QString &filename);
2018-07-15 13:51:05 +01:00
static QJsonObject jarModtoJson(Library * jarmod);
2018-07-15 13:51:05 +01:00
// mods, also derived from libraries
static LibraryPtr modFromJson(ProblemContainer & problems, const QJsonObject &libObj, const QString &filename);
2018-07-15 13:51:05 +01:00
static QJsonObject modtoJson(Library * jarmod);
};