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