summaryrefslogtreecommitdiffstats
path: root/api/logic/status/StatusChecker.h
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2016-05-28 19:54:17 +0200
committerPetr Mrázek <peterix@gmail.com>2016-06-05 23:55:39 +0200
commita1abbd9e05c80584d831b1d12c27c5f7d731cece (patch)
tree3324eaf37efa228e07a0e3136952673f0bc3405a /api/logic/status/StatusChecker.h
parenta750f6e63c783730380c19788deff2acfb3f4836 (diff)
downloadMultiMC-a1abbd9e05c80584d831b1d12c27c5f7d731cece.tar
MultiMC-a1abbd9e05c80584d831b1d12c27c5f7d731cece.tar.gz
MultiMC-a1abbd9e05c80584d831b1d12c27c5f7d731cece.tar.lz
MultiMC-a1abbd9e05c80584d831b1d12c27c5f7d731cece.tar.xz
MultiMC-a1abbd9e05c80584d831b1d12c27c5f7d731cece.zip
NOISSUE refactor *Download into more, smaller pieces
* Download is now Download. * Download uses Sink subclasses to process various events. * Validators can be used to further customize the Sink behaviour.
Diffstat (limited to 'api/logic/status/StatusChecker.h')
-rw-r--r--api/logic/status/StatusChecker.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/api/logic/status/StatusChecker.h b/api/logic/status/StatusChecker.h
index c1a54dba..452248f4 100644
--- a/api/logic/status/StatusChecker.h
+++ b/api/logic/status/StatusChecker.h
@@ -26,35 +26,35 @@
class MULTIMC_LOGIC_EXPORT StatusChecker : public QObject
{
Q_OBJECT
-public:
+public: /* con/des */
StatusChecker();
+public: /* methods */
QString getLastLoadErrorMsg() const;
-
bool isLoadingStatus() const;
-
QMap<QString, QString> getStatusEntries() const;
- void Q_SLOT reloadStatus();
-
-protected:
- virtual void timerEvent(QTimerEvent *);
-
signals:
void statusLoading(bool loading);
void statusChanged(QMap<QString, QString> newStatus);
+public slots:
+ void reloadStatus();
+
+protected: /* methods */
+ virtual void timerEvent(QTimerEvent *);
+
protected slots:
void statusDownloadFinished();
void statusDownloadFailed(QString reason);
+ void succeed();
+ void fail(const QString& errorMsg);
-protected:
+protected: /* data */
QMap<QString, QString> m_prevEntries;
QMap<QString, QString> m_statusEntries;
NetJobPtr m_statusNetJob;
QString m_lastLoadError;
-
- void Q_SLOT succeed();
- void Q_SLOT fail(const QString& errorMsg);
+ QByteArray dataSink;
};