QXmpp Version: 1.5.6
Loading...
Searching...
No Matches
QXmppRegisterIq.h
1// SPDX-FileCopyrightText: 2012 Jeremy Lainé <jeremy.laine@m4x.org>
2// SPDX-FileCopyrightText: 2019 Linus Jahn <lnj@kaidan.im>
3//
4// SPDX-License-Identifier: LGPL-2.1-or-later
5
6#ifndef QXMPPREGISTERIQ_H
7#define QXMPPREGISTERIQ_H
8
9#include "QXmppDataForm.h"
10#include "QXmppIq.h"
11
13class QXmppRegisterIqPrivate;
14
21
22class QXMPP_EXPORT QXmppRegisterIq : public QXmppIq
23{
24public:
29
32
33 static QXmppRegisterIq createChangePasswordRequest(const QString &username, const QString &newPassword, const QString &to = {});
34 static QXmppRegisterIq createUnregistrationRequest(const QString &to = {});
35
36 QString email() const;
37 void setEmail(const QString &email);
38
39 QXmppDataForm form() const;
40 void setForm(const QXmppDataForm &form);
41
42 QString instructions() const;
43 void setInstructions(const QString &instructions);
44
45 QString password() const;
46 void setPassword(const QString &username);
47
48 QString username() const;
49 void setUsername(const QString &username);
50
51 bool isRegistered() const;
52 void setIsRegistered(bool isRegistered);
53
54 bool isRemove() const;
55 void setIsRemove(bool isRemove);
56
57 QXmppBitsOfBinaryDataList bitsOfBinaryData() const;
58 QXmppBitsOfBinaryDataList &bitsOfBinaryData();
59 void setBitsOfBinaryData(const QXmppBitsOfBinaryDataList &bitsOfBinaryData);
60
61 QString outOfBandUrl() const;
62 void setOutOfBandUrl(const QString &outOfBandUrl);
63
65 static bool isRegisterIq(const QDomElement &element);
67
68protected:
70 void parseElementFromChild(const QDomElement &element) override;
71 void toXmlElementFromChild(QXmlStreamWriter *writer) const override;
73
74private:
75 QSharedDataPointer<QXmppRegisterIqPrivate> d;
76};
77
78#endif
Definition QXmppBitsOfBinaryDataList.h:16
Definition QXmppDataForm.h:27
The QXmppIq class is the base class for all IQs.
Definition QXmppIq.h:23
The QXmppRegisterIq class represents a registration IQ as defined by XEP-0077: In-Band Registration.
Definition QXmppRegisterIq.h:23
QXmppRegisterIq & operator=(const QXmppRegisterIq &other)
Default assignment operator.
QXmppRegisterIq(QXmppRegisterIq &&)
Default move-constructor.
QXmppRegisterIq & operator=(QXmppRegisterIq &&)
Default move-assignment operator.
QXmppRegisterIq(const QXmppRegisterIq &other)
Default copy-constructor.