2016-02-27 21:02:56 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <minecraft/VersionFile.h>
|
2016-03-07 01:01:28 +00:00
|
|
|
#include <minecraft/Library.h>
|
2016-02-27 21:02:56 +00:00
|
|
|
#include <QJsonDocument>
|
|
|
|
|
2016-03-03 00:40:12 +00:00
|
|
|
#include "multimc_logic_export.h"
|
|
|
|
|
|
|
|
class MULTIMC_LOGIC_EXPORT MojangVersionFormat
|
2016-02-28 18:01:54 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
// version files / profile patches
|
|
|
|
static VersionFilePtr versionFileFromJson(const QJsonDocument &doc, const QString &filename);
|
|
|
|
static QJsonDocument profilePatchToJson(const ProfilePatchPtr &patch);
|
2016-03-07 01:01:28 +00:00
|
|
|
|
|
|
|
// libraries
|
|
|
|
static LibraryPtr libraryFromJson(const QJsonObject &libObj, const QString &filename);
|
|
|
|
static QJsonObject libraryToJson(Library *library);
|
|
|
|
|
|
|
|
private:
|
|
|
|
static QJsonDocument versionFileToJson(VersionFilePtr patch);
|
|
|
|
|
|
|
|
static MojangAssetIndexInfoPtr assetIndexFromJson (const QJsonObject &obj);
|
|
|
|
static MojangDownloadInfoPtr downloadInfoFromJson (const QJsonObject &obj);
|
|
|
|
static MojangLibraryDownloadInfoPtr libDownloadInfoFromJson (const QJsonObject &libObj);
|
|
|
|
static QJsonObject assetIndexToJson (MojangAssetIndexInfoPtr assetidxinfo);
|
|
|
|
static QJsonObject libDownloadInfoToJson (MojangLibraryDownloadInfoPtr libinfo);
|
|
|
|
static QJsonObject downloadInfoToJson (MojangDownloadInfoPtr info);
|
2016-02-28 18:01:54 +00:00
|
|
|
};
|