diff options
author | TakSuyu <taksuyu@gmail.com> | 2013-07-27 12:55:51 -0700 |
---|---|---|
committer | TakSuyu <taksuyu@gmail.com> | 2013-07-27 12:55:51 -0700 |
commit | dc39d093396c9a0ed4f03d81f95fcc8fa5705b65 (patch) | |
tree | b88bf5fa692de82ce3418bdf5c55e9cd9eff37bc /libmultimc/include/fullversionfactory.h | |
parent | 44498f98945b7501486da35c5fdc32f94a2be080 (diff) | |
parent | a7a84d4dbb58565f108cb0886da6cb786e34d10d (diff) | |
download | MultiMC-dc39d093396c9a0ed4f03d81f95fcc8fa5705b65.tar MultiMC-dc39d093396c9a0ed4f03d81f95fcc8fa5705b65.tar.gz MultiMC-dc39d093396c9a0ed4f03d81f95fcc8fa5705b65.tar.lz MultiMC-dc39d093396c9a0ed4f03d81f95fcc8fa5705b65.tar.xz MultiMC-dc39d093396c9a0ed4f03d81f95fcc8fa5705b65.zip |
Merge remote-tracking branch 'upstream/master'
Conflicts:
gui/mainwindow.cpp
Diffstat (limited to 'libmultimc/include/fullversionfactory.h')
-rw-r--r-- | libmultimc/include/fullversionfactory.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/libmultimc/include/fullversionfactory.h b/libmultimc/include/fullversionfactory.h new file mode 100644 index 00000000..60e5c983 --- /dev/null +++ b/libmultimc/include/fullversionfactory.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 |