pollymc/api/logic/modplatform/ftb/FtbPackDownloader.h

40 lines
686 B
C
Raw Normal View History

#include <QString>
#include <QUrl>
#include <QList>
#include <QObject>
#include "FtbPackFetchTask.h"
#include "tasks/Task.h"
#include "net/NetJob.h"
#include "PackHelpers.h"
#include "Env.h"
#pragma once
2018-03-19 07:06:12 +05:30
class MULTIMC_LOGIC_EXPORT FtbPackDownloader : public QObject
{
Q_OBJECT
public:
FtbPackDownloader();
2018-03-19 07:06:12 +05:30
virtual ~FtbPackDownloader();
void fetchModpacks(bool force);
FtbModpackList getModpacks();
signals:
void ready();
void packFetchFailed();
2018-03-19 07:06:12 +05:30
private slots:
void fetchSuccess(FtbModpackList modlist);
void fetchFailed(QString reason);
2018-03-19 07:06:12 +05:30
private:
QMap<QString, FtbModpack> fetchedPacks;
bool fetching = false;
bool done = false;
FtbPackFetchTask *fetchTask = 0;
};