summaryrefslogtreecommitdiffstats
path: root/logic/minecraft/onesix/OneSixVersionFormat.h
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2016-02-28 19:01:54 +0100
committerPetr Mrázek <peterix@gmail.com>2016-02-28 19:01:54 +0100
commit9497b7e96cfac6e60a53fe05c0ca945ecc839533 (patch)
treea7b129de1109995e4416304e0e873af44bcca5ee /logic/minecraft/onesix/OneSixVersionFormat.h
parenta0b47aee5ba8d96e5ceec12798be9f63a16dbcd5 (diff)
downloadMultiMC-9497b7e96cfac6e60a53fe05c0ca945ecc839533.tar
MultiMC-9497b7e96cfac6e60a53fe05c0ca945ecc839533.tar.gz
MultiMC-9497b7e96cfac6e60a53fe05c0ca945ecc839533.tar.lz
MultiMC-9497b7e96cfac6e60a53fe05c0ca945ecc839533.tar.xz
MultiMC-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.h24
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);
+};