2016-08-14 01:33:31 +01:00
|
|
|
#pragma once
|
|
|
|
#include "tasks/Task.h"
|
|
|
|
#include "net/NetJob.h"
|
2017-07-24 08:01:37 +01:00
|
|
|
class MinecraftInstance;
|
2016-08-14 01:33:31 +01:00
|
|
|
|
|
|
|
class AssetUpdateTask : public Task
|
|
|
|
{
|
2017-07-07 18:46:56 +01:00
|
|
|
Q_OBJECT
|
2016-08-14 01:33:31 +01:00
|
|
|
public:
|
2017-07-24 08:01:37 +01:00
|
|
|
AssetUpdateTask(MinecraftInstance * inst);
|
2018-06-28 20:34:56 +01:00
|
|
|
virtual ~AssetUpdateTask();
|
|
|
|
|
2016-08-14 01:33:31 +01:00
|
|
|
void executeTask() override;
|
|
|
|
|
|
|
|
bool canAbort() const override;
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
void assetIndexFinished();
|
|
|
|
void assetIndexFailed(QString reason);
|
|
|
|
void assetsFailed(QString reason);
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
bool abort() override;
|
|
|
|
|
|
|
|
private:
|
2017-07-24 08:01:37 +01:00
|
|
|
MinecraftInstance *m_inst;
|
2016-08-14 01:33:31 +01:00
|
|
|
NetJobPtr downloadJob;
|
|
|
|
};
|