PrismLauncher/logic/VersionFactory.h

24 lines
567 B
C
Raw Normal View History

2013-07-22 01:01:56 +01:00
#pragma once
#include <QtCore>
struct FullVersion;
2013-07-27 10:41:45 +01:00
class Rule;
2013-07-22 01:01:56 +01:00
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);
2013-07-27 10:41:45 +01:00
QList<QSharedPointer<Rule> > parse4rules(QJsonObject & baseObj);
2013-07-22 01:01:56 +01:00
};