QXmpp Version: 1.4.0
Loading...
Searching...
No Matches
QXmppRegistrationManager.h
1/*
2 * Copyright (C) 2008-2021 The QXmpp developers
3 *
4 * Author:
5 * Melvin Keskin
6 * Linus Jahn
7 *
8 * Source:
9 * https://github.com/qxmpp-project/qxmpp
10 *
11 * This file is a part of QXmpp library.
12 *
13 * This library is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU Lesser General Public
15 * License as published by the Free Software Foundation; either
16 * version 2.1 of the License, or (at your option) any later version.
17 *
18 * This library is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 * Lesser General Public License for more details.
22 *
23 */
24
25#ifndef QXMPPREGISTRATIONMANAGER_H
26#define QXMPPREGISTRATIONMANAGER_H
27
28#include "QXmppClientExtension.h"
29#include "QXmppRegisterIq.h"
30
31#include <QScopedPointer>
32
33class QXmppRegistrationManagerPrivate;
34
243{
244 Q_OBJECT
245
247 Q_PROPERTY(bool supportedByServer READ supportedByServer NOTIFY supportedByServerChanged)
248
249public:
252
253 QStringList discoveryFeatures() const override;
254
255 void changePassword(const QString &newPassword);
256 void deleteAccount();
257
258 // documentation needs to be here, see https://stackoverflow.com/questions/49192523/
270 bool supportedByServer() const;
271
272 void requestRegistrationForm(const QString &service = {});
273
274 void setRegistrationFormToSend(const QXmppRegisterIq &iq);
275 void setRegistrationFormToSend(const QXmppDataForm &dataForm);
276 void sendCachedRegistrationForm();
277
278 bool registerOnConnectEnabled() const;
279 void setRegisterOnConnectEnabled(bool enabled);
280
282 bool handleStanza(const QDomElement &stanza) override;
284
285Q_SIGNALS:
293
301 void passwordChanged(const QString &newPassword);
302
309
326
331
336
344
360
361protected:
362 void setClient(QXmppClient *client) override;
363
364private Q_SLOTS:
365 void handleDiscoInfo(const QXmppDiscoveryIq &iq);
366
367private:
368 void setSupportedByServer(bool supportedByServer);
369
370 QScopedPointer<QXmppRegistrationManagerPrivate> d;
371};
372
373#endif // QXMPPREGISTRATIONMANAGER_H
The QXmppClientExtension class is the base class for QXmppClient extensions.
Definition QXmppClientExtension.h:47
virtual void setClient(QXmppClient *client)
Definition QXmppClientExtension.cpp:79
virtual QStringList discoveryFeatures() const
Definition QXmppClientExtension.cpp:54
virtual bool handleStanza(const QDomElement &stanza)=0
You need to implement this method to process incoming XMPP stanzas.
The QXmppClient class is the main class for using QXmpp.
Definition QXmppClient.h:94
The QXmppDataForm class represents a data form as defined by XEP-0004: Data Forms.
Definition QXmppDataForm.h:49
QXmppDiscoveryIq represents a discovery IQ request or result containing a list of features and other ...
Definition QXmppDiscoveryIq.h:44
The QXmppRegisterIq class represents a registration IQ as defined by XEP-0077: In-Band Registration.
Definition QXmppRegisterIq.h:42
The QXmppRegistrationManager class manages in-band registration and account management tasks like cha...
Definition QXmppRegistrationManager.h:243
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:106