2017-09-19 04:46:49 +00:00
|
|
|
#ifndef TASKTASIX_H
|
|
|
|
#define TASKTASIX_H
|
|
|
|
|
2017-09-21 13:24:45 +00:00
|
|
|
#include "taskworker.h"
|
2017-09-19 08:35:43 +00:00
|
|
|
|
2017-10-25 09:51:35 +00:00
|
|
|
class HttpDownloader;
|
2017-09-19 04:46:49 +00:00
|
|
|
|
2017-09-21 13:24:45 +00:00
|
|
|
class TaskTasix : public TaskWorker
|
2017-09-19 04:46:49 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2017-09-21 13:24:45 +00:00
|
|
|
explicit TaskTasix(QObject *parent = nullptr);
|
2017-09-19 04:46:49 +00:00
|
|
|
|
2017-10-25 09:51:35 +00:00
|
|
|
HttpDownloader *downloader() const { return m_downloader; }
|
|
|
|
|
|
|
|
static QString parseTasixBufer(const QByteArray &buffer);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual void startDownloader() const;
|
|
|
|
|
|
|
|
virtual QString parseBufer(const QByteArray &buffer) const {
|
|
|
|
return parseTasixBufer(buffer);
|
|
|
|
}
|
2017-09-19 04:46:49 +00:00
|
|
|
|
|
|
|
signals:
|
|
|
|
|
|
|
|
public slots:
|
2017-09-19 08:35:43 +00:00
|
|
|
void run() override;
|
2017-09-21 13:24:45 +00:00
|
|
|
void cancel(bool success = false) override;
|
|
|
|
|
|
|
|
bool processResult(FortManager *fortManager) override;
|
2017-09-19 04:46:49 +00:00
|
|
|
|
|
|
|
private slots:
|
2017-10-25 09:51:35 +00:00
|
|
|
void downloadFinished(bool success);
|
2017-09-19 04:46:49 +00:00
|
|
|
|
|
|
|
private:
|
2017-10-25 09:51:35 +00:00
|
|
|
HttpDownloader *m_downloader;
|
2017-09-19 04:46:49 +00:00
|
|
|
|
2017-10-03 09:29:54 +00:00
|
|
|
QString m_rangeText;
|
2017-09-19 04:46:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // TASKTASIX_H
|