summaryrefslogtreecommitdiffstats
path: root/api/logic/minecraft/ComponentUpdateTask_p.h
blob: 5989cf07ddc99c537acd763ab49195db3dff580c (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
29
30
31
32
#pragma once

#include <cstddef>
#include <QString>
#include <QList>
#include "net/Mode.h"

class ComponentList;

struct RemoteLoadStatus
{
    enum class Type
    {
        Index,
        List,
        Version
    } type = Type::Version;
    size_t componentListIndex = 0;
    bool finished = false;
    bool succeeded = false;
    QString error;
};

struct ComponentUpdateTaskData
{
    ComponentList * m_list = nullptr;
    QList<RemoteLoadStatus> remoteLoadStatusList;
    bool remoteLoadSuccessful = true;
    size_t remoteTasksInProgress = 0;
    ComponentUpdateTask::Mode mode;
    Net::Mode netmode;
};