diff options
Diffstat (limited to 'launcher/updater/UpdateChecker.h')
-rw-r--r-- | launcher/updater/UpdateChecker.h | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/launcher/updater/UpdateChecker.h b/launcher/updater/UpdateChecker.h index 13ee4efd..94e4312b 100644 --- a/launcher/updater/UpdateChecker.h +++ b/launcher/updater/UpdateChecker.h @@ -17,6 +17,11 @@ #include "net/NetJob.h" #include "GoUpdate.h" +#include "ExternalUpdater.h" + +#ifdef Q_OS_MAC +#include "MacSparkleUpdater.h" +#endif class UpdateChecker : public QObject { @@ -24,7 +29,7 @@ class UpdateChecker : public QObject public: UpdateChecker(shared_qobject_ptr<QNetworkAccessManager> nam, QString channelUrl, QString currentChannel, int currentBuild); - void checkForUpdate(QString updateChannel, bool notifyNoUpdate); + void checkForUpdate(const QString& updateChannel, bool notifyNoUpdate); /*! * Causes the update checker to download the channel list from the URL specified in config.h (generated by CMake). @@ -54,6 +59,11 @@ public: */ bool hasChannels() const; + /*! + * Returns a pointer to an object that controls the external updater, or nullptr if an external updater is not used. + */ + ExternalUpdater *getExternalUpdater(); + signals: //! Signal emitted when an update is available. Passes the URL for the repo and the ID and name for the version. void updateAvailable(GoUpdate::Status status); @@ -117,5 +127,14 @@ private: QString m_currentRepoUrl; QString m_newRepoUrl; + + /*! + * If not a nullptr, then the updater here will be used instead of the old updater that uses GoUpdate when + * checking for updates. + * + * As a result, signals from this class won't be emitted, and most of the functions in this class other + * than checkForUpdate are not useful. Call functions from this external updater object instead. + */ + ExternalUpdater *m_externalUpdater = nullptr; }; |