QXmpp Version: 1.5.6
Loading...
Searching...
No Matches
QXmppRegistrationManager.h
1// SPDX-FileCopyrightText: 2019 Melvin Keskin <melvo@olomono.de>
2// SPDX-FileCopyrightText: 2019 Linus Jahn <lnj@kaidan.im>
3//
4// SPDX-License-Identifier: LGPL-2.1-or-later
5
6#ifndef QXMPPREGISTRATIONMANAGER_H
7#define QXMPPREGISTRATIONMANAGER_H
8
9#include "QXmppClientExtension.h"
10#include "QXmppRegisterIq.h"
11
12class QXmppRegistrationManagerPrivate;
13
222{
223 Q_OBJECT
224
226 Q_PROPERTY(bool supportedByServer READ supportedByServer NOTIFY supportedByServerChanged)
227
228public:
231
232 QStringList discoveryFeatures() const override;
233
234 void changePassword(const QString &newPassword);
235 void deleteAccount();
236
237 // documentation needs to be here, see https://stackoverflow.com/questions/49192523/
249 bool supportedByServer() const;
250
251 void requestRegistrationForm(const QString &service = {});
252
253 void setRegistrationFormToSend(const QXmppRegisterIq &iq);
254 void setRegistrationFormToSend(const QXmppDataForm &dataForm);
255 void sendCachedRegistrationForm();
256
257 bool registerOnConnectEnabled() const;
258 void setRegisterOnConnectEnabled(bool enabled);
259
261 bool handleStanza(const QDomElement &stanza) override;
263
264Q_SIGNALS:
272
280 void passwordChanged(const QString &newPassword);
281
288
305
310
315
323
339
340protected:
341 void setClient(QXmppClient *client) override;
342
343private Q_SLOTS:
344 void handleDiscoInfo(const QXmppDiscoveryIq &iq);
345
346private:
347 void setSupportedByServer(bool supportedByServer);
348
349 const std::unique_ptr<QXmppRegistrationManagerPrivate> d;
350};
351
352#endif // QXMPPREGISTRATIONMANAGER_H
The QXmppClientExtension class is the base class for QXmppClient extensions.
Definition QXmppClientExtension.h:33
virtual void setClient(QXmppClient *client)
Definition QXmppClientExtension.cpp:88
virtual QStringList discoveryFeatures() const
Definition QXmppClientExtension.cpp:22
virtual bool handleStanza(const QDomElement &stanza)
You need to implement this method to process incoming XMPP stanzas.
Definition QXmppClientExtension.cpp:51
The QXmppClient class is the main class for using QXmpp.
Definition QXmppClient.h:84
Definition QXmppDataForm.h:27
Definition QXmppDiscoveryIq.h:18
The QXmppRegisterIq class represents a registration IQ as defined by XEP-0077: In-Band Registration.
Definition QXmppRegisterIq.h:23
The QXmppRegistrationManager class manages in-band registration and account management tasks like cha...
Definition QXmppRegistrationManager.h:222
void registrationFormReceived(const QXmppRegisterIq &iq)
void passwordChangeFailed(QXmppStanza::Error error)
void passwordChanged(const QString &newPassword)
void registrationFailed(const QXmppStanza::Error &error)
void accountDeletionFailed(QXmppStanza::Error error)
The Error class represents a stanza error.
Definition QXmppStanza.h:94