2021-11-23 14:37:37 -05:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
#include <QTemporaryDir>
|
|
|
|
|
2021-11-23 15:34:23 -05:00
|
|
|
class LauncherCore;
|
2021-11-23 14:37:37 -05:00
|
|
|
class QNetworkReply;
|
2021-11-23 15:34:23 -05:00
|
|
|
struct ProfileSettings;
|
2021-11-23 14:37:37 -05:00
|
|
|
|
|
|
|
class AssetUpdater : public QObject {
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2021-11-23 15:34:23 -05:00
|
|
|
AssetUpdater(LauncherCore& launcher);
|
2021-11-23 14:37:37 -05:00
|
|
|
|
2021-11-23 15:34:23 -05:00
|
|
|
void update(const ProfileSettings& profile);
|
2021-11-23 14:37:37 -05:00
|
|
|
void finishDownload(QNetworkReply* reply);
|
|
|
|
void beginInstall();
|
|
|
|
|
|
|
|
signals:
|
|
|
|
void finishedUpdating();
|
|
|
|
|
|
|
|
private:
|
2021-11-23 15:34:23 -05:00
|
|
|
LauncherCore& launcher;
|
2021-11-23 14:37:37 -05:00
|
|
|
|
|
|
|
QTemporaryDir tempDir;
|
|
|
|
};
|