From 753c281f4eb055d684e63472468fd091f2166526 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Wed, 15 Apr 2020 13:05:16 +0200 Subject: Connection: track resolving and login flows jobs; isUsable() This is to prevent the jobs from several resolveServer() / setHomeserver() invocations running in parallel. --- lib/connection.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/connection.h') diff --git a/lib/connection.h b/lib/connection.h index c908b58b..7998afa8 100644 --- a/lib/connection.h +++ b/lib/connection.h @@ -142,6 +142,7 @@ class Connection : public QObject { Q_PROPERTY(QUrl homeserver READ homeserver WRITE setHomeserver NOTIFY homeserverChanged) Q_PROPERTY(QString domain READ domain NOTIFY homeserverChanged) Q_PROPERTY(QVector loginFlows READ loginFlows NOTIFY loginFlowsChanged) + Q_PROPERTY(bool isUsable READ isUsable NOTIFY loginFlowsChanged) Q_PROPERTY(bool supportsSso READ supportsSso NOTIFY loginFlowsChanged) Q_PROPERTY(bool supportsPasswordAuth READ supportsPasswordAuth NOTIFY loginFlowsChanged) Q_PROPERTY(bool cacheState READ cacheState WRITE setCacheState NOTIFY cacheStateChanged) @@ -306,6 +307,8 @@ public: QUrl homeserver() const; /** Get the domain name used for ids/aliases on the server */ QString domain() const; + /** Whether the configured homeserver is known to be reachable and working */ + bool isUsable() const; /** Get the list of supported login flows */ QVector loginFlows() const; /** Check whether the current homeserver supports password auth */ -- cgit v1.2.3