Parsing the version files, part I

This commit is contained in:
Petr Mrázek
2013-07-22 02:01:56 +02:00
parent e2ee6d6d25
commit 18853ca3fa
8 changed files with 258 additions and 63 deletions

View File

@@ -0,0 +1,23 @@
#pragma once
#include <QtCore>
struct FullVersion;
class FullVersionFactory
{
public:
enum Error
{
AllOK, // all parsed OK
ParseError, // the file was corrupted somehow
UnsupportedVersion // the file was meant for a launcher version we don't support (yet)
} m_error;
QString error_string;
public:
FullVersionFactory();
QSharedPointer<FullVersion> parse(QByteArray data);
private:
QSharedPointer<FullVersion> parse4(QJsonObject root, QSharedPointer<FullVersion> product);
QStringList legacyWhitelist;
};