PrismLauncher/launcher/minecraft/auth/Parsers.h
Petr Mrázek 3c46d8a412 GH-4071 Heavily refactor and rearchitect account system
This makes the account system much more modular
and makes it treat errors as something recoverable,
unless they come directly from the MSA refresh token
becoming invalid.
2021-12-04 01:18:05 +01:00

20 lines
713 B
C++

#pragma once
#include "AccountData.h"
namespace Parsers
{
bool getDateTime(QJsonValue value, QDateTime & out);
bool getString(QJsonValue value, QString & out);
bool getNumber(QJsonValue value, double & out);
bool getNumber(QJsonValue value, int64_t & out);
bool getBool(QJsonValue value, bool & out);
bool parseXTokenResponse(QByteArray &data, Katabasis::Token &output, QString name);
bool parseMojangResponse(QByteArray &data, Katabasis::Token &output);
bool parseMinecraftProfile(QByteArray &data, MinecraftProfile &output);
bool parseMinecraftEntitlements(QByteArray &data, MinecraftEntitlement &output);
bool parseRolloutResponse(QByteArray &data, bool& result);
}