2017-09-19 04:46:49 +00:00
|
|
|
#ifndef TASKTASIX_H
|
|
|
|
#define TASKTASIX_H
|
|
|
|
|
|
|
|
#include <QTimer>
|
|
|
|
|
2017-09-19 08:35:43 +00:00
|
|
|
#include "task.h"
|
|
|
|
|
2017-09-19 04:46:49 +00:00
|
|
|
class QNetworkAccessManager;
|
|
|
|
class QNetworkReply;
|
|
|
|
|
2017-09-19 08:35:43 +00:00
|
|
|
class TaskTasix : public Task
|
2017-09-19 04:46:49 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2017-09-19 08:35:43 +00:00
|
|
|
explicit TaskTasix(FortManager *fortManager,
|
|
|
|
QObject *parent = nullptr);
|
2017-09-19 04:46:49 +00:00
|
|
|
|
|
|
|
static QString parseBufer(const QByteArray &buffer);
|
|
|
|
|
|
|
|
signals:
|
2017-09-19 08:35:43 +00:00
|
|
|
void addressesReady(const QString &rangeText);
|
2017-09-19 04:46:49 +00:00
|
|
|
|
|
|
|
public slots:
|
2017-09-19 08:35:43 +00:00
|
|
|
void run() override;
|
|
|
|
void cancel() override;
|
2017-09-19 04:46:49 +00:00
|
|
|
|
|
|
|
private slots:
|
|
|
|
void requestReadyRead();
|
|
|
|
void requestFinished();
|
|
|
|
|
|
|
|
private:
|
|
|
|
QNetworkAccessManager *m_networkManager;
|
|
|
|
QNetworkReply *m_reply;
|
|
|
|
|
|
|
|
QTimer m_timer;
|
|
|
|
|
|
|
|
QByteArray m_buffer;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // TASKTASIX_H
|