1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-04-22 04:37:46 +00:00
astra/launcher/include/squarelauncher.h

35 lines
790 B
C
Raw Normal View History

// SPDX-FileCopyrightText: 2023 Joshua Goins <josh@redstrate.com>
// SPDX-License-Identifier: GPL-3.0-or-later
#pragma once
#include <qcorotask.h>
#include "launchercore.h"
#include "patcher.h"
class SquareLauncher : public QObject
{
Q_OBJECT
2023-09-17 08:32:47 -04:00
public:
explicit SquareLauncher(LauncherCore &window, QObject *parent = nullptr);
using StoredInfo = std::pair<QString, QUrl>;
QCoro::Task<std::optional<StoredInfo>> getStored(const LoginInformation &info);
QCoro::Task<> login(const LoginInformation &info);
QCoro::Task<> registerSession(const LoginInformation &info);
private:
static QCoro::Task<QString> getBootHash(const LoginInformation &info);
Patcher *patcher = nullptr;
QString SID, username;
LoginAuth auth;
LauncherCore &window;
};