diff options
author | Andrew <forkk@forkk.net> | 2013-12-05 13:52:55 -0600 |
---|---|---|
committer | Andrew <forkk@forkk.net> | 2013-12-05 13:52:55 -0600 |
commit | 48ec8e67b8cff63cd2d0e08c17e7bb576b4e07a7 (patch) | |
tree | eedc5fecd50dc395bbc686a5e798d626ebc62a82 /logic/updater/UpdateChecker.h | |
parent | bf94aaea7527a8f5b9f3b8c1ab6ff4e88cbd748f (diff) | |
download | MultiMC-48ec8e67b8cff63cd2d0e08c17e7bb576b4e07a7.tar MultiMC-48ec8e67b8cff63cd2d0e08c17e7bb576b4e07a7.tar.gz MultiMC-48ec8e67b8cff63cd2d0e08c17e7bb576b4e07a7.tar.lz MultiMC-48ec8e67b8cff63cd2d0e08c17e7bb576b4e07a7.tar.xz MultiMC-48ec8e67b8cff63cd2d0e08c17e7bb576b4e07a7.zip |
Implement DownloadUpdateTask
Installing updates is not implemented yet. That's next.
Diffstat (limited to 'logic/updater/UpdateChecker.h')
-rw-r--r-- | logic/updater/UpdateChecker.h | 37 |
1 files changed, 25 insertions, 12 deletions
diff --git a/logic/updater/UpdateChecker.h b/logic/updater/UpdateChecker.h index 829f7303..59fb8e47 100644 --- a/logic/updater/UpdateChecker.h +++ b/logic/updater/UpdateChecker.h @@ -24,18 +24,6 @@ class UpdateChecker : public QObject Q_OBJECT public: -signals: - //! Signal emitted when an update is available. Passes the URL for the repo and the ID and name for the version. - void updateAvailable(QString repoUrl, QString versionName, int versionId); - -private slots: - void updateCheckFinished(); - void updateCheckFailed(); - - void chanListDownloadFinished(); - void chanListDownloadFailed(); - -public: UpdateChecker(); void checkForUpdate(); @@ -56,6 +44,31 @@ public: QString url; }; + /*! + * Returns a the current channel list. + * If the channel list hasn't been loaded, this list will be empty. + */ + QList<ChannelListEntry> getChannelList() const; + + /*! + * Returns true if the channel list is empty. + */ + bool hasChannels() const; + +signals: + //! Signal emitted when an update is available. Passes the URL for the repo and the ID and name for the version. + void updateAvailable(QString repoUrl, QString versionName, int versionId); + + //! Signal emitted when the channel list finishes loading or fails to load. + void channelListLoaded(); + +private slots: + void updateCheckFinished(); + void updateCheckFailed(); + + void chanListDownloadFinished(); + void chanListDownloadFailed(); + private: NetJobPtr indexJob; NetJobPtr chanListJob; |