summaryrefslogtreecommitdiffstats
path: root/logic/minecraft/onesix/OneSixVersionFormat.h
diff options
context:
space:
mode:
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);
+};