summaryrefslogtreecommitdiffstats
path: root/api/logic/minecraft/update/AssetUpdateTask.h
blob: fdfa8f1cc09d8d1a43e38f7ca52b2f3f61e5c96e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#pragma once
#include "tasks/Task.h"
#include "net/NetJob.h"
class MinecraftInstance;

class AssetUpdateTask : public Task
{
    Q_OBJECT
public:
    AssetUpdateTask(MinecraftInstance * inst);
    virtual ~AssetUpdateTask();

    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:
    MinecraftInstance *m_inst;
    NetJobPtr downloadJob;
};