sneedmc/launcher/modplatform/flame/FileResolvingTask.h

38 lines
773 B
C
Raw Normal View History

#pragma once
#include "tasks/Task.h"
#include "net/NetJob.h"
#include "PackManifest.h"
2017-04-22 16:51:04 +00:00
namespace Flame
{
class FileResolvingTask : public Task
{
2018-07-15 12:51:05 +00:00
Q_OBJECT
public:
explicit FileResolvingTask(const shared_qobject_ptr<QNetworkAccessManager>& network, Flame::Manifest &toProcess);
2018-07-15 12:51:05 +00:00
virtual ~FileResolvingTask() {};
2018-07-15 12:51:05 +00:00
const Flame::Manifest &getResults() const
{
return m_toProcess;
}
protected:
2018-07-15 12:51:05 +00:00
virtual void executeTask() override;
protected slots:
2018-07-15 12:51:05 +00:00
void netJobFinished();
private: /* data */
shared_qobject_ptr<QNetworkAccessManager> m_network;
2018-07-15 12:51:05 +00:00
Flame::Manifest m_toProcess;
std::shared_ptr<QByteArray> result;
NetJob::Ptr m_dljob;
void modrinthCheckFinished();
QMap<File *, QByteArray *> blockedProjects;
};
}