summaryrefslogtreecommitdiffstats
path: root/MultiMC.h
diff options
context:
space:
mode:
authorAndrew <forkk@forkk.net>2013-12-09 12:04:05 -0600
committerAndrew <forkk@forkk.net>2013-12-09 12:04:05 -0600
commit7f52bed9e3f559adcbcf3f3c1c7ac2251964db8c (patch)
tree52097b57dc7d18ec4e35ef3a8e554af2d91545e8 /MultiMC.h
parent9410dd042ea62224fa3e0eb3b525abbdf0c316ee (diff)
parent220e07aef4a34dca9f31ae0c5bb994e5c594125d (diff)
downloadMultiMC-7f52bed9e3f559adcbcf3f3c1c7ac2251964db8c.tar
MultiMC-7f52bed9e3f559adcbcf3f3c1c7ac2251964db8c.tar.gz
MultiMC-7f52bed9e3f559adcbcf3f3c1c7ac2251964db8c.tar.lz
MultiMC-7f52bed9e3f559adcbcf3f3c1c7ac2251964db8c.tar.xz
MultiMC-7f52bed9e3f559adcbcf3f3c1c7ac2251964db8c.zip
Merge branch 'feature_updater' into develop
Diffstat (limited to 'MultiMC.h')
-rw-r--r--MultiMC.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/MultiMC.h b/MultiMC.h
index cae6eee0..22cea029 100644
--- a/MultiMC.h
+++ b/MultiMC.h
@@ -17,6 +17,7 @@ class IconList;
class QNetworkAccessManager;
class ForgeVersionList;
class JavaVersionList;
+class UpdateChecker;
#if defined(MMC)
#undef MMC
@@ -84,6 +85,11 @@ public:
return m_metacache;
}
+ std::shared_ptr<UpdateChecker> updateChecker()
+ {
+ return m_updateChecker;
+ }
+
std::shared_ptr<LWJGLVersionList> lwjgllist();
std::shared_ptr<ForgeVersionList> forgelist();
@@ -92,6 +98,22 @@ public:
std::shared_ptr<JavaVersionList> javalist();
+ /*!
+ * Installs update from the given update files directory.
+ */
+ void installUpdates(const QString& updateFilesDir, bool restartOnFinish=false);
+
+ /*!
+ * Sets MultiMC to install updates from the given directory when it exits.
+ */
+ void setUpdateOnExit(const QString& updateFilesDir);
+
+ /*!
+ * Gets the path to install updates from on exit.
+ * If this is an empty string, no updates should be installed on exit.
+ */
+ QString getExitUpdatePath() const;
+
private:
void initLogger();
@@ -106,6 +128,7 @@ private:
std::shared_ptr<QTranslator> m_mmc_translator;
std::shared_ptr<SettingsObject> m_settings;
std::shared_ptr<InstanceList> m_instances;
+ std::shared_ptr<UpdateChecker> m_updateChecker;
std::shared_ptr<MojangAccountList> m_accounts;
std::shared_ptr<IconList> m_icons;
std::shared_ptr<QNetworkAccessManager> m_qnam;
@@ -117,6 +140,8 @@ private:
QsLogging::DestinationPtr m_fileDestination;
QsLogging::DestinationPtr m_debugDestination;
+ QString m_updateOnExitPath;
+
Status m_status = MultiMC::Failed;
MultiMCVersion m_version;
};