summaryrefslogtreecommitdiffstats
path: root/backend/tasks/GameUpdateTask.h
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2013-08-03 23:58:39 +0200
committerPetr Mrázek <peterix@gmail.com>2013-08-03 23:58:39 +0200
commit4f73091bb5bdbdb91329b9a4ef647fc8286d423c (patch)
tree6bc63a2d9ca2265cd7ee6dcf683219b73e25a24e /backend/tasks/GameUpdateTask.h
parent13b1b98f7cf8a3b3b2c15dd42f96537b02c00711 (diff)
downloadMultiMC-4f73091bb5bdbdb91329b9a4ef647fc8286d423c.tar
MultiMC-4f73091bb5bdbdb91329b9a4ef647fc8286d423c.tar.gz
MultiMC-4f73091bb5bdbdb91329b9a4ef647fc8286d423c.tar.lz
MultiMC-4f73091bb5bdbdb91329b9a4ef647fc8286d423c.tar.xz
MultiMC-4f73091bb5bdbdb91329b9a4ef647fc8286d423c.zip
Errr... I forgot.
Diffstat (limited to 'backend/tasks/GameUpdateTask.h')
-rw-r--r--backend/tasks/GameUpdateTask.h81
1 files changed, 4 insertions, 77 deletions
diff --git a/backend/tasks/GameUpdateTask.h b/backend/tasks/GameUpdateTask.h
index ea0cf658..f13f42d1 100644
--- a/backend/tasks/GameUpdateTask.h
+++ b/backend/tasks/GameUpdateTask.h
@@ -24,12 +24,10 @@
#include "dlqueue.h"
#include "Task.h"
-#include "tasks/LoginResponse.h"
-#include "BaseInstance.h"
-
#include "libmmc_config.h"
class MinecraftVersion;
+class BaseInstance;
/*!
* The game update task is the task that handles downloading instances' files.
@@ -37,58 +35,14 @@ class MinecraftVersion;
class LIBMULTIMC_EXPORT GameUpdateTask : public Task
{
Q_OBJECT
-
- /*!
- * The task's state.
- * A certain state message will be shown depending on what this is set to.
- */
- Q_PROPERTY(int state READ state WRITE setState)
-
- /*!
- * The substatus message.
- * This will be next to the the state message in the task's status.
- */
- Q_PROPERTY(QString subStatus READ subStatus WRITE setSubStatus)
public:
- explicit GameUpdateTask(const LoginResponse &response, BaseInstance *inst, QObject *parent = 0);
-
-
- /////////////////////////
- // EXECUTION FUNCTIONS //
- /////////////////////////
+ explicit GameUpdateTask(BaseInstance *inst, QObject *parent = 0);
virtual void executeTask();
- //////////////////////
- // STATE AND STATUS //
- //////////////////////
-
- virtual int state() const;
- virtual void setState(int state, bool resetSubStatus = true);
-
- virtual QString subStatus() const;
- virtual void setSubStatus(const QString &msg);
-
- /*!
- * Gets the message that will be displated for the given state.
- */
- virtual QString getStateMessage(int state);
-
-private:
- void getLegacyJar();
- void determineNewVersion();
-
public slots:
-
- /*!
- * Updates the status message based on the state and substatus message.
- */
- virtual void updateStatus();
-
-
virtual void error(const QString &msg);
-
private slots:
void updateDownloadProgress(qint64 current, qint64 total);
@@ -103,7 +57,7 @@ signals:
* \brief Signal emitted when the game update is complete.
* \param response The login response received from login task.
*/
- void gameUpdateComplete(const LoginResponse &response);
+ void gameUpdateComplete();
/*!
* \brief Signal emitted if an error occurrs during the update.
@@ -112,37 +66,10 @@ signals:
void gameUpdateError(const QString &errorMsg);
private:
- ///////////
- // STUFF //
- ///////////
-
BaseInstance *m_inst;
- LoginResponse m_response;
-
- ////////////////////////////
- // STATE AND STATUS STUFF //
- ////////////////////////////
-
- int m_updateState;
+
QString m_subStatusMsg;
- enum UpdateState
- {
- // Initializing
- StateInit = 0,
-
- // Determining files to download
- StateDetermineURLs,
-
- // Downloading files
- StateDownloadFiles,
-
- // Installing files
- StateInstall,
-
- // Finished
- StateFinished
- };
JobListPtr legacyDownloadJob;
JobListPtr specificVersionDownloadJob;
JobListPtr jarlibDownloadJob;