aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/connection.cpp7
-rw-r--r--lib/connection.h15
2 files changed, 15 insertions, 7 deletions
diff --git a/lib/connection.cpp b/lib/connection.cpp
index 41ecee67..229a6564 100644
--- a/lib/connection.cpp
+++ b/lib/connection.cpp
@@ -312,9 +312,10 @@ inline UserIdentifier make3rdPartyIdentifier(const QString& medium,
{ QStringLiteral("address"), address } } };
}
-void Connection::connectToServer(const QString& userId, const QString& password,
- const QString& initialDeviceName,
- const QString& deviceId)
+void Connection::loginWithPassword(const QString& userId,
+ const QString& password,
+ const QString& initialDeviceName,
+ const QString& deviceId)
{
checkAndConnect(userId, [=] {
d->loginToServer(LoginFlows::Password.type, makeUserIdentifier(userId),
diff --git a/lib/connection.h b/lib/connection.h
index b0263732..32d6df79 100644
--- a/lib/connection.h
+++ b/lib/connection.h
@@ -509,15 +509,22 @@ public slots:
/** Determine and set the homeserver from MXID */
void resolveServer(const QString& mxid);
- void connectToServer(const QString& userId, const QString& password,
- const QString& initialDeviceName,
- const QString& deviceId = {});
+ void loginWithPassword(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
+ /*! \deprecated Use loginWithPassword instead */
+ void connectToServer(const QString& userId, const QString& password,
+ const QString& initialDeviceName,
+ const QString& deviceId = {})
+ {
+ loginWithPassword(userId, password, initialDeviceName, deviceId);
+ }
+ /*! \deprecated
* Use assumeIdentity() if you have an access token or
* loginWithToken() if you have a login token.
*/