aboutsummaryrefslogtreecommitdiff
path: root/connection.h
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2017-11-25 19:59:47 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2017-11-25 19:59:47 +0900
commitad12695aceabc7db7cbdfdd760175c65f4f3d0d1 (patch)
tree8b5110f18a4329e80cbb640ada77e92a77b976d1 /connection.h
parentca70d70f441d93a1da431a8fa3e927396e2abf70 (diff)
downloadlibquotient-ad12695aceabc7db7cbdfdd760175c65f4f3d0d1.tar.gz
libquotient-ad12695aceabc7db7cbdfdd760175c65f4f3d0d1.zip
Make Connection::resolveServer() work as it should
Closes #119; many thanks to @r0kk3rz for prodding me into that.
Diffstat (limited to 'connection.h')
-rw-r--r--connection.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/connection.h b/connection.h
index da211371..cd74b512 100644
--- a/connection.h
+++ b/connection.h
@@ -75,6 +75,8 @@ namespace QMatrixClient
*/
ForgetRoomJob* forgetRoom(const QString& id);
+ // FIXME: Convert Q_INVOKABLEs to Q_PROPERTIES
+ // (breaks back-compatibility)
Q_INVOKABLE QUrl homeserver() const;
Q_INVOKABLE User* user(const QString& userId);
Q_INVOKABLE User* user();
@@ -153,7 +155,12 @@ namespace QMatrixClient
}
public slots:
- void resolveServer(const QString& domain);
+ /** Set the homeserver base URL */
+ void setHomeserver(const QUrl& baseUrl);
+
+ /** Determine and set the homeserver from domain or MXID */
+ void resolveServer(const QString& mxidOrDomain);
+
void connectToServer(const QString& user, const QString& password,
const QString& initialDeviceName,
const QString& deviceId = {});
@@ -190,6 +197,7 @@ namespace QMatrixClient
const QString& from) const;
signals:
void resolved();
+ void homeserverChanged(QUrl baseUrl);
void connected();
void reconnected(); //< Unused; use connected() instead
void loggedOut();