diff options
author | Petr Mrázek <peterix@gmail.com> | 2013-07-29 00:59:35 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2013-07-29 00:59:35 +0200 |
commit | 2e0cbf393a5320dbf5448ca44a9b5905314b0be8 (patch) | |
tree | 4baac9cf015ca7b15d83de33c705e0d8d4497d30 /backend/VersionFactory.h | |
parent | 8808a8b108b82916eaf30f9aca50cd3ab16af230 (diff) | |
download | PrismLauncher-2e0cbf393a5320dbf5448ca44a9b5905314b0be8.tar.gz PrismLauncher-2e0cbf393a5320dbf5448ca44a9b5905314b0be8.tar.bz2 PrismLauncher-2e0cbf393a5320dbf5448ca44a9b5905314b0be8.zip |
Massive renaming in the backend folder, all around restructure in the same.
Diffstat (limited to 'backend/VersionFactory.h')
-rw-r--r-- | backend/VersionFactory.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/backend/VersionFactory.h b/backend/VersionFactory.h new file mode 100644 index 00000000..60e5c983 --- /dev/null +++ b/backend/VersionFactory.h @@ -0,0 +1,25 @@ +#pragma once +#include <QtCore> + +struct FullVersion; +class Rule; + +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); + QList<QSharedPointer<Rule> > parse4rules(QJsonObject & baseObj); + QStringList legacyWhitelist; +};
\ No newline at end of file |