1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-04-20 19:57:45 +00:00

Add some more documentation to Account, AssetUpdater and LauncherCore

This commit is contained in:
Joshua Goins 2023-10-11 14:40:56 -04:00
parent ca4d47349b
commit 0df05c79ad
3 changed files with 11 additions and 13 deletions

View file

@ -76,8 +76,10 @@ public:
Q_INVOKABLE QString getOTP(); Q_INVOKABLE QString getOTP();
Q_INVOKABLE void setOTPSecret(const QString &secret); Q_INVOKABLE void setOTPSecret(const QString &secret);
/// Returns the path to the FFXIV config folder
[[nodiscard]] QDir getConfigDir() const; [[nodiscard]] QDir getConfigDir() const;
/// Updates FFXIV.cfg with some recommended options like turning the opening cutscene movie off
void updateConfig(); void updateConfig();
Q_SIGNALS: Q_SIGNALS:

View file

@ -20,6 +20,8 @@ class AssetUpdater : public QObject
public: public:
explicit AssetUpdater(Profile &profile, LauncherCore &launcher, QObject *parent = nullptr); explicit AssetUpdater(Profile &profile, LauncherCore &launcher, QObject *parent = nullptr);
/// Checks for any asset updates. (This currently only means Dalamud.)
/// \return False if the asset update failed, which should be considered fatal and Dalamud should not be used.
QCoro::Task<bool> update(); QCoro::Task<bool> update();
private: private:

View file

@ -76,23 +76,17 @@ public:
ProfileManager *profileManager(); ProfileManager *profileManager();
AccountManager *accountManager(); AccountManager *accountManager();
/// Initializes the Steamworks API.
void initializeSteam(); void initializeSteam();
/* /// Begins the login process, and may call SquareBoot or SapphireLauncher depending on the profile type.
* Begins the login process, and may call SquareBoot or SapphireLauncher depending on the profile type. /// It's designed to be opaque as possible to the caller.
* It's designed to be opaque as possible to the caller. /// \note The login process is asynchronous.
*
* The login process is asynchronous.
*/
Q_INVOKABLE void login(Profile *profile, const QString &username, const QString &password, const QString &oneTimePassword); Q_INVOKABLE void login(Profile *profile, const QString &username, const QString &password, const QString &oneTimePassword);
/* /// Attempts to log into a profile without LoginInformation, which may or may not work depending on a combination of the password failing, OTP not being
* Attempts to log into a profile without LoginInformation, which may or may not work depending on a combination of /// available to auto-generate, among other things. The launcher will still warn the user about any possible errors, however the call site will need to
* the password failing, OTP not being available to auto-generate, among other things. /// check the result to see whether they need to "reset" or show a failed state or not. \note The login process is asynchronous.
*
* The launcher will still warn the user about any possible errors, however the call site will need to check the
* result to see whether they need to "reset" or show a failed state or not.
*/
Q_INVOKABLE bool autoLogin(Profile *profile); Q_INVOKABLE bool autoLogin(Profile *profile);
void buildRequest(const Profile &settings, QNetworkRequest &request); void buildRequest(const Profile &settings, QNetworkRequest &request);