Get rid of QNAM (now subclassed and less needy). Basic LWJGL download and extraction.

This commit is contained in:
Petr Mrázek
2013-08-07 01:38:18 +02:00
parent 091b7502cf
commit afaa1dc223
35 changed files with 506 additions and 242 deletions

View File

@@ -16,36 +16,25 @@
#pragma once
#include <QObject>
#include <QList>
#include <QNetworkAccessManager>
#include <QUrl>
#include "dlqueue.h"
#include "net/DownloadJob.h"
#include "tasks/Task.h"
#include "libmmc_config.h"
#include "BaseUpdate.h"
class MinecraftVersion;
class BaseInstance;
/*!
* The game update task is the task that handles downloading instances' files.
*/
class LIBMULTIMC_EXPORT OneSixUpdate : public Task
class LIBMULTIMC_EXPORT OneSixUpdate : public BaseUpdate
{
Q_OBJECT
public:
explicit OneSixUpdate(BaseInstance *inst, QObject *parent = 0);
virtual void executeTask();
public slots:
virtual void error(const QString &msg);
private slots:
void updateDownloadProgress(qint64 current, qint64 total);
void versionFileStart();
void versionFileFinished();
void versionFileFailed();
@@ -54,25 +43,7 @@ private slots:
void jarlibFinished();
void jarlibFailed();
signals:
/*!
* \brief Signal emitted when the game update is complete.
*/
void gameUpdateComplete();
/*!
* \brief Signal emitted if an error occurrs during the update.
* \param errorMsg An error message to be displayed to the user.
*/
void gameUpdateError(const QString &errorMsg);
private:
BaseInstance *m_inst;
QString m_subStatusMsg;
QSharedPointer<QNetworkAccessManager> net_manager {new QNetworkAccessManager()};
JobListPtr legacyDownloadJob;
JobListPtr specificVersionDownloadJob;
JobListPtr jarlibDownloadJob;