diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2020-03-15 14:53:27 +0100 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2020-03-15 14:53:27 +0100 |
commit | d02a510a586db1a89476cd283ea24a281e9bb6af (patch) | |
tree | 83b26c3898e25feca6984f7e14ea8771628ae280 /lib/connection.h | |
parent | a0008f808859ee491bf0a1bc683748a42c5e209a (diff) | |
download | libquotient-d02a510a586db1a89476cd283ea24a281e9bb6af.tar.gz libquotient-d02a510a586db1a89476cd283ea24a281e9bb6af.zip |
Connection: loginWithToken(); connectWithToken() -> assumeIdentity()
Diffstat (limited to 'lib/connection.h')
-rw-r--r-- | lib/connection.h | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/lib/connection.h b/lib/connection.h index 9d89ca43..8f2abd0f 100644 --- a/lib/connection.h +++ b/lib/connection.h @@ -505,11 +505,23 @@ public slots: /** Determine and set the homeserver from MXID */ void resolveServer(const QString& mxid); - void connectToServer(const QString& user, const QString& password, + void connectToServer(const QString& userId, const QString& password, const QString& initialDeviceName, const QString& deviceId = {}); + void loginWithToken(const QByteArray& loginToken, + const QString& initialDeviceName, + const QString& deviceId = {}); + void assumeIdentity(const QString& userId, const QString& accessToken, + const QString& deviceId); + /*! @deprecated + * Use assumeIdentity() if you have an access token or + * loginWithToken() if you have a login token. + */ void connectWithToken(const QString& userId, const QString& accessToken, - const QString& deviceId); + const QString& deviceId) + { + assumeIdentity(userId, accessToken, deviceId); + } /// Explicitly request capabilities from the server void reloadCapabilities(); @@ -856,9 +868,6 @@ private: * @param connectFn - a function to execute once the HS URL is good */ void checkAndConnect(const QString& userId, std::function<void()> connectFn); - void doConnectToServer(const QString& user, const QString& password, - const QString& initialDeviceName, - const QString& deviceId = {}); static room_factory_t _roomFactory; static user_factory_t _userFactory; |