diff options
author | Petr Mrázek <peterix@gmail.com> | 2016-02-28 19:01:54 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2016-02-28 19:01:54 +0100 |
commit | 9497b7e96cfac6e60a53fe05c0ca945ecc839533 (patch) | |
tree | a7b129de1109995e4416304e0e873af44bcca5ee /logic/minecraft/onesix/OneSixVersionFormat.h | |
parent | a0b47aee5ba8d96e5ceec12798be9f63a16dbcd5 (diff) | |
download | PrismLauncher-9497b7e96cfac6e60a53fe05c0ca945ecc839533.tar.gz PrismLauncher-9497b7e96cfac6e60a53fe05c0ca945ecc839533.tar.bz2 PrismLauncher-9497b7e96cfac6e60a53fe05c0ca945ecc839533.zip |
NOISSUE even more version file refactors
There is no end to them in sight
Diffstat (limited to 'logic/minecraft/onesix/OneSixVersionFormat.h')
-rw-r--r-- | logic/minecraft/onesix/OneSixVersionFormat.h | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/logic/minecraft/onesix/OneSixVersionFormat.h b/logic/minecraft/onesix/OneSixVersionFormat.h index ab21a6a0..9d16cced 100644 --- a/logic/minecraft/onesix/OneSixVersionFormat.h +++ b/logic/minecraft/onesix/OneSixVersionFormat.h @@ -2,10 +2,24 @@ #include <minecraft/VersionFile.h> #include <minecraft/MinecraftProfile.h> +#include <minecraft/RawLibrary.h> #include <QJsonDocument> -namespace OneSixVersionFormat { - std::shared_ptr<MinecraftProfile> readProfileFromSingleFile(const QJsonObject &obj); - VersionFilePtr fromJson(const QJsonDocument &doc, const QString &filename, const bool requireOrder); - QJsonDocument toJson(const ProfilePatchPtr &patch, bool saveOrder); -} +class OneSixVersionFormat +{ +public: + // whole profiles from single file + static std::shared_ptr<MinecraftProfile> profileFromSingleJson(const QJsonObject &obj); + + // version files / profile patches + static VersionFilePtr versionFileFromJson(const QJsonDocument &doc, const QString &filename, const bool requireOrder); + static QJsonDocument profilePatchToJson(const ProfilePatchPtr &patch, bool saveOrder); + + // libraries + static RawLibraryPtr libraryFromJson(const QJsonObject &libObj, const QString &filename); + static QJsonObject libraryToJson(RawLibrary *library); + + // jar mods + static JarmodPtr jarModFromJson(const QJsonObject &libObj, const QString &filename, const QString &originalName); + static QJsonObject jarModtoJson(Jarmod * jarmod); +}; |