mirror of
https://github.com/redstrate/Astra.git
synced 2025-04-21 20:27:45 +00:00
Now the asset updating process is parallelized (especially asset file downloading). There's less wasteful usage of the patcher and game version reading when no patches need to be installed.
34 lines
790 B
C++
34 lines
790 B
C++
// 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
|
|
|
|
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;
|
|
};
|