summaryrefslogtreecommitdiffstats
path: root/libmultimc/include/fullversionfactory.h
diff options
context:
space:
mode:
Diffstat (limited to 'libmultimc/include/fullversionfactory.h')
-rw-r--r--libmultimc/include/fullversionfactory.h25
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