2018-03-01 00:12:30 +05:30
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "net/NetJob.h"
|
|
|
|
#include <QTemporaryDir>
|
|
|
|
#include <QByteArray>
|
|
|
|
#include <QObject>
|
|
|
|
#include "PackHelpers.h"
|
|
|
|
|
|
|
|
class MULTIMC_LOGIC_EXPORT FtbPackFetchTask : public QObject {
|
|
|
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
FtbPackFetchTask();
|
2018-03-19 07:06:12 +05:30
|
|
|
virtual ~FtbPackFetchTask();
|
2018-03-01 00:12:30 +05:30
|
|
|
|
|
|
|
void fetch();
|
|
|
|
|
|
|
|
private:
|
|
|
|
NetJobPtr jobPtr;
|
|
|
|
Net::Download::Ptr downloadPtr;
|
|
|
|
|
|
|
|
QByteArray modpacksXmlFileData;
|
|
|
|
|
|
|
|
protected slots:
|
|
|
|
void fileDownloadFinished();
|
|
|
|
void fileDownloadFailed(QString reason);
|
|
|
|
|
|
|
|
signals:
|
|
|
|
void finished(FtbModpackList list);
|
|
|
|
void failed(QString reason);
|
|
|
|
|
|
|
|
};
|