aboutsummaryrefslogtreecommitdiff
path: root/lib/connection.h
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2020-04-15 13:05:16 +0200
committerKitsune Ral <Kitsune-Ral@users.sf.net>2020-04-15 13:07:06 +0200
commit753c281f4eb055d684e63472468fd091f2166526 (patch)
tree5862bd41c592a7330cdbb67adf1632569133e5e9 /lib/connection.h
parentb27e4e2b75180c920deef1399487228f79882f47 (diff)
downloadlibquotient-753c281f4eb055d684e63472468fd091f2166526.tar.gz
libquotient-753c281f4eb055d684e63472468fd091f2166526.zip
Connection: track resolving and login flows jobs; isUsable()
This is to prevent the jobs from several resolveServer() / setHomeserver() invocations running in parallel.
Diffstat (limited to 'lib/connection.h')
-rw-r--r--lib/connection.h3
1 files changed, 3 insertions, 0 deletions
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<GetLoginFlowsJob::LoginFlow> 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<GetLoginFlowsJob::LoginFlow> loginFlows() const;
/** Check whether the current homeserver supports password auth */