From 48ec8e67b8cff63cd2d0e08c17e7bb576b4e07a7 Mon Sep 17 00:00:00 2001 From: Andrew Date: Thu, 5 Dec 2013 13:52:55 -0600 Subject: Implement DownloadUpdateTask Installing updates is not implemented yet. That's next. --- logic/updater/UpdateChecker.h | 37 +++++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 12 deletions(-) (limited to 'logic/updater/UpdateChecker.h') 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 @@ -23,18 +23,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 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; -- cgit v1.2.3