diff options
author | Petr Mrázek <peterix@gmail.com> | 2013-07-22 02:01:56 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2013-07-22 02:01:56 +0200 |
commit | 18853ca3fa185f5fe5288a1d0c8ed6cf8c678007 (patch) | |
tree | 15ad1dbc73531affaab71bf25e772a4ce1fec5bc /libmultimc/include/fullversionfactory.h | |
parent | e2ee6d6d254285284f07b07cb60409fbda0bf7ad (diff) | |
download | MultiMC-18853ca3fa185f5fe5288a1d0c8ed6cf8c678007.tar MultiMC-18853ca3fa185f5fe5288a1d0c8ed6cf8c678007.tar.gz MultiMC-18853ca3fa185f5fe5288a1d0c8ed6cf8c678007.tar.lz MultiMC-18853ca3fa185f5fe5288a1d0c8ed6cf8c678007.tar.xz MultiMC-18853ca3fa185f5fe5288a1d0c8ed6cf8c678007.zip |
Parsing the version files, part I
Diffstat (limited to 'libmultimc/include/fullversionfactory.h')
-rw-r--r-- | libmultimc/include/fullversionfactory.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/libmultimc/include/fullversionfactory.h b/libmultimc/include/fullversionfactory.h new file mode 100644 index 00000000..673a6a72 --- /dev/null +++ b/libmultimc/include/fullversionfactory.h @@ -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; +};
\ No newline at end of file |