summaryrefslogtreecommitdiffstats
path: root/logic/OneSixVersionBuilder.h
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2014-02-01 19:37:16 +0100
committerPetr Mrázek <peterix@gmail.com>2014-02-01 19:37:16 +0100
commit1936bd181f57a554ce0dd757ffe9419100eb47f4 (patch)
treea22660979335746b930c88f353b4e29f1bbe9a2a /logic/OneSixVersionBuilder.h
parentb4b6091372310f4a811180cffde3ea5611881e6c (diff)
parent8637cce4333aaf56a231d5fab866b0e770436783 (diff)
downloadMultiMC-1936bd181f57a554ce0dd757ffe9419100eb47f4.tar
MultiMC-1936bd181f57a554ce0dd757ffe9419100eb47f4.tar.gz
MultiMC-1936bd181f57a554ce0dd757ffe9419100eb47f4.tar.lz
MultiMC-1936bd181f57a554ce0dd757ffe9419100eb47f4.tar.xz
MultiMC-1936bd181f57a554ce0dd757ffe9419100eb47f4.zip
Merge branch 'feature_derpstances' of https://github.com/02JanDal/MultiMC5 into feature_derpstances
Conflicts: gui/dialogs/OneSixModEditDialog.cpp logic/OneSixUpdate.cpp
Diffstat (limited to 'logic/OneSixVersionBuilder.h')
-rw-r--r--logic/OneSixVersionBuilder.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/logic/OneSixVersionBuilder.h b/logic/OneSixVersionBuilder.h
new file mode 100644
index 00000000..ac8c13bf
--- /dev/null
+++ b/logic/OneSixVersionBuilder.h
@@ -0,0 +1,43 @@
+/* Copyright 2013 MultiMC Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#pragma once
+
+#include <QString>
+
+class OneSixVersion;
+class OneSixInstance;
+class QWidget;
+class QJsonObject;
+class QFileInfo;
+class VersionFile;
+
+class OneSixVersionBuilder
+{
+ OneSixVersionBuilder();
+public:
+ static bool build(OneSixVersion *version, OneSixInstance *instance, QWidget *widgetParent, const bool excludeCustom);
+ static bool read(OneSixVersion *version, const QJsonObject &obj);
+
+private:
+ OneSixVersion *m_version;
+ OneSixInstance *m_instance;
+ QWidget *m_widgetParent;
+
+ bool build(const bool excludeCustom);
+ bool read(const QJsonObject &obj);
+
+ bool read(const QFileInfo &fileInfo, const bool requireOrder, VersionFile *out);
+};