NOISSUE even more version file refactors
There is no end to them in sight
This commit is contained in:
parent
a0b47aee5b
commit
9497b7e96c
16 changed files with 290 additions and 216 deletions
|
@ -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);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue