Removed AccountTask

Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
Trial97
2024-05-14 00:20:32 +03:00
parent 3336f8107c
commit e285a85fe8
17 changed files with 143 additions and 276 deletions

View File

@ -3,18 +3,31 @@
#include <QNetworkReply>
#include <QObject>
#include "AccountTask.h"
#include "QObjectPtr.h"
#include "minecraft/auth/AccountData.h"
/**
* Enum for describing the state of the current task.
* Used by the getStateMessage function to determine what the status message should be.
*/
enum class AccountTaskState {
STATE_CREATED,
STATE_WORKING,
STATE_SUCCEEDED,
STATE_DISABLED, //!< MSA Client ID has changed. Tell user to reloginn
STATE_FAILED_SOFT, //!< soft failure. authentication went through partially
STATE_FAILED_HARD, //!< hard failure. main tokens are invalid
STATE_FAILED_GONE, //!< hard failure. main tokens are invalid, and the account no longer exists
STATE_OFFLINE //!< soft failure. authentication failed in the first step in a 'soft' way
};
class AuthStep : public QObject {
Q_OBJECT
public:
using Ptr = shared_qobject_ptr<AuthStep>;
public:
explicit AuthStep(AccountData* data);
explicit AuthStep(AccountData* data) : QObject(nullptr), m_data(data){};
virtual ~AuthStep() noexcept = default;
virtual QString describe() = 0;