From d4eacb56b30baaef801f42545398a4f29755fadf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Mon, 7 Mar 2016 02:01:28 +0100 Subject: NOISSUE make new Mojang version format pass through MultiMC structures Not yet used effectively, but it is read and written properly --- logic/minecraft/MojangVersionFormat.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'logic/minecraft/MojangVersionFormat.h') diff --git a/logic/minecraft/MojangVersionFormat.h b/logic/minecraft/MojangVersionFormat.h index cd87d68e..67066647 100644 --- a/logic/minecraft/MojangVersionFormat.h +++ b/logic/minecraft/MojangVersionFormat.h @@ -1,6 +1,7 @@ #pragma once #include +#include #include #include "multimc_logic_export.h" @@ -11,4 +12,18 @@ public: // version files / profile patches static VersionFilePtr versionFileFromJson(const QJsonDocument &doc, const QString &filename); static QJsonDocument profilePatchToJson(const ProfilePatchPtr &patch); + + // 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); }; -- cgit v1.2.3