1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-04-20 11:47:46 +00:00

Move more LauncherCore API to private, reduce surface area

Trying to wrangle this giant class still
This commit is contained in:
Joshua Goins 2023-10-11 13:29:32 -04:00
parent 61fff13502
commit 5be109e60b
4 changed files with 12 additions and 12 deletions

View file

@ -103,19 +103,10 @@ public:
*/ */
void launchGame(Profile &settings, const LoginAuth &auth); void launchGame(Profile &settings, const LoginAuth &auth);
/*
* This just wraps it in wine if needed.
*/
void launchExecutable(const Profile &settings, QProcess *process, const QStringList &args, bool isGame, bool needsRegistrySetup);
void addRegistryKey(const Profile &settings, QString key, QString value, QString data);
void buildRequest(const Profile &settings, QNetworkRequest &request); void buildRequest(const Profile &settings, QNetworkRequest &request);
void setSSL(QNetworkRequest &request); void setSSL(QNetworkRequest &request);
void setupIgnoreSSL(QNetworkReply *reply); void setupIgnoreSSL(QNetworkReply *reply);
void readInitialInformation();
Q_INVOKABLE GameInstaller *createInstaller(Profile *profile); Q_INVOKABLE GameInstaller *createInstaller(Profile *profile);
Q_INVOKABLE CompatibilityToolInstaller *createCompatInstaller(); Q_INVOKABLE CompatibilityToolInstaller *createCompatInstaller();
@ -151,6 +142,15 @@ signals:
void autoLoginProfileChanged(); void autoLoginProfileChanged();
private: private:
/*
* This just wraps it in wine if needed.
*/
void launchExecutable(const Profile &settings, QProcess *process, const QStringList &args, bool isGame, bool needsRegistrySetup);
void addRegistryKey(const Profile &settings, QString key, QString value, QString data);
void readInitialInformation();
QCoro::Task<> beginLogin(LoginInformation &info); QCoro::Task<> beginLogin(LoginInformation &info);
/* /*

View file

@ -10,7 +10,7 @@ class LauncherCore;
class SteamAPI : public QObject class SteamAPI : public QObject
{ {
public: public:
explicit SteamAPI(LauncherCore &core, QObject *parent = nullptr); explicit SteamAPI(QObject *parent = nullptr);
~SteamAPI() override; ~SteamAPI() override;
void setLauncherMode(bool isLauncher); void setLauncherMode(bool isLauncher);

View file

@ -681,7 +681,7 @@ void LauncherCore::clearAvatarCache()
void LauncherCore::initializeSteam() void LauncherCore::initializeSteam()
{ {
m_isSteam = true; m_isSteam = true;
m_steamApi = new SteamAPI(*this, this); m_steamApi = new SteamAPI(this);
m_steamApi->setLauncherMode(true); m_steamApi->setLauncherMode(true);
} }

View file

@ -10,7 +10,7 @@
#include "astra_log.h" #include "astra_log.h"
#include "launchercore.h" #include "launchercore.h"
SteamAPI::SteamAPI(LauncherCore &core, QObject *parent) SteamAPI::SteamAPI(QObject *parent)
: QObject(parent) : QObject(parent)
{ {
#ifdef ENABLE_STEAM #ifdef ENABLE_STEAM