aboutsummaryrefslogtreecommitdiff
path: root/launcher/minecraft/auth/steps
diff options
context:
space:
mode:
authorswirl <swurl@swurl.xyz>2022-02-03 13:59:25 -0500
committerswirl <swurl@swurl.xyz>2022-02-03 13:59:25 -0500
commit2c62a34c2f47961e343b8aae37cd76ed7520593e (patch)
treedfa09fc140c9757b52ceffff9a61c19accd22036 /launcher/minecraft/auth/steps
parente8a4902a3dddd08d65bd1284951ae5954439d1f5 (diff)
parent2177aa2a6b248088f76b463c43d04c65126195bf (diff)
downloadPrismLauncher-2c62a34c2f47961e343b8aae37cd76ed7520593e.tar.gz
PrismLauncher-2c62a34c2f47961e343b8aae37cd76ed7520593e.tar.bz2
PrismLauncher-2c62a34c2f47961e343b8aae37cd76ed7520593e.zip
Merge branch 'feature/offline_mode' into develop
Diffstat (limited to 'launcher/minecraft/auth/steps')
-rw-r--r--launcher/minecraft/auth/steps/OfflineStep.cpp18
-rw-r--r--launcher/minecraft/auth/steps/OfflineStep.h19
2 files changed, 37 insertions, 0 deletions
diff --git a/launcher/minecraft/auth/steps/OfflineStep.cpp b/launcher/minecraft/auth/steps/OfflineStep.cpp
new file mode 100644
index 00000000..dc092bfd
--- /dev/null
+++ b/launcher/minecraft/auth/steps/OfflineStep.cpp
@@ -0,0 +1,18 @@
+#include "OfflineStep.h"
+
+#include "Application.h"
+
+OfflineStep::OfflineStep(AccountData* data) : AuthStep(data) {}
+OfflineStep::~OfflineStep() noexcept = default;
+
+QString OfflineStep::describe() {
+ return tr("Creating offline account.");
+}
+
+void OfflineStep::rehydrate() {
+ // NOOP
+}
+
+void OfflineStep::perform() {
+ emit finished(AccountTaskState::STATE_WORKING, tr("Created offline account."));
+}
diff --git a/launcher/minecraft/auth/steps/OfflineStep.h b/launcher/minecraft/auth/steps/OfflineStep.h
new file mode 100644
index 00000000..436597cd
--- /dev/null
+++ b/launcher/minecraft/auth/steps/OfflineStep.h
@@ -0,0 +1,19 @@
+#pragma once
+#include <QObject>
+
+#include "QObjectPtr.h"
+#include "minecraft/auth/AuthStep.h"
+
+#include <katabasis/DeviceFlow.h>
+
+class OfflineStep : public AuthStep {
+ Q_OBJECT
+public:
+ explicit OfflineStep(AccountData *data);
+ virtual ~OfflineStep() noexcept;
+
+ void perform() override;
+ void rehydrate() override;
+
+ QString describe() override;
+};