From 9936c7a8b63c40f5a710573306e2ac88bd67cede Mon Sep 17 00:00:00 2001 From: James Graham Date: Sun, 30 Apr 2023 19:33:17 +0000 Subject: [PATCH] Document login --- src/login.h | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/src/login.h b/src/login.h index 598e067c5..b1139399a 100644 --- a/src/login.h +++ b/src/login.h @@ -10,19 +10,67 @@ namespace Quotient { class Connection; } + +/** + * @class Login + * + * A helper class for logging into a Matrix account. + */ class Login : public QObject { Q_OBJECT + /** + * @brief Whether the home server for the account is reachable. + */ Q_PROPERTY(bool homeserverReachable READ homeserverReachable NOTIFY homeserverReachableChanged) + + /** + * @brief Whether the connection to the home server is being tested. + * + * True if NeoChat is trying to resolve the home server, false if not started + * or complete. + */ Q_PROPERTY(bool testing READ testing NOTIFY testingChanged) + + /** + * @brief The Matrix ID of the account that is being logged into. + */ Q_PROPERTY(QString matrixId READ matrixId WRITE setMatrixId NOTIFY matrixIdChanged) + + /** + * @brief The password entered by the user to login to the account. + */ Q_PROPERTY(QString password READ password WRITE setPassword NOTIFY passwordChanged) + + /** + * @brief The device name to assign to this session. + */ Q_PROPERTY(QString deviceName READ deviceName WRITE setDeviceName NOTIFY deviceNameChanged) + + /** + * @brief Whether the home server of the account supports single sign on login. + */ Q_PROPERTY(bool supportsSso READ supportsSso NOTIFY loginFlowsChanged STORED false) + + /** + * @brief Whether the home server of the account supports password login. + */ Q_PROPERTY(bool supportsPassword READ supportsPassword NOTIFY loginFlowsChanged STORED false) + + /** + * @brief The URL for the single sign on session. + */ Q_PROPERTY(QUrl ssoUrl READ ssoUrl NOTIFY ssoUrlChanged) + + /** + * @brief Whether login process is ongoing. + */ Q_PROPERTY(bool isLoggingIn READ isLoggingIn NOTIFY isLoggingInChanged) + + /** + * @brief Whether login has successfully completed. + */ Q_PROPERTY(bool isLoggedIn READ isLoggedIn NOTIFY isLoggedInChanged) public: