aboutsummaryrefslogtreecommitdiff
path: root/src/base/QXmppRegisterIq.h
diff options
context:
space:
mode:
authorLinus Jahn <lnj@kaidan.im>2020-02-01 16:50:34 +0100
committerLNJ <lnj@kaidan.im>2020-02-03 00:11:35 +0100
commit2dd54da9620028e1c051c3d4a9a6121ccab3f866 (patch)
treeed68af9a65531f2a4ae46313cf8cd3beb0ad1cbb /src/base/QXmppRegisterIq.h
parentb9c58b05300a292437c9554181970c7e1933b19e (diff)
downloadqxmpp-2dd54da9620028e1c051c3d4a9a6121ccab3f866.tar.gz
QXmppRegisterIq: Add utility methods to create common requests
This adds utility methods to create an unregistration or a change password request in one line.
Diffstat (limited to 'src/base/QXmppRegisterIq.h')
-rw-r--r--src/base/QXmppRegisterIq.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/base/QXmppRegisterIq.h b/src/base/QXmppRegisterIq.h
index f952541d..83b53bc1 100644
--- a/src/base/QXmppRegisterIq.h
+++ b/src/base/QXmppRegisterIq.h
@@ -47,7 +47,7 @@ public:
enum RegisterType {
None, ///< No special register IQ.
- Registered, ///< Used by the service to indicate that an account is already registered.
+ Registered, ///< Used by the service to indicate that an account is registered.
Remove ///< Used by the client to request account removal.
};
@@ -57,6 +57,9 @@ public:
QXmppRegisterIq &operator=(const QXmppRegisterIq &other);
+ static QXmppRegisterIq createChangePasswordRequest(const QString &username, const QString &newPassword, const QString &to = {});
+ static QXmppRegisterIq createUnregistrationRequest(const QString &to = {});
+
QString email() const;
void setEmail(const QString &email);