QXmpp Version: 1.4.0
QXmppRegisterIq.h
1/*
2 * Copyright (C) 2008-2021 The QXmpp developers
3 *
4 * Author:
5 * Jeremy Lainé
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 QXMPPREGISTERIQ_H
26#define QXMPPREGISTERIQ_H
27
28#include "QXmppDataForm.h"
29#include "QXmppIq.h"
30
32class QXmppRegisterIqPrivate;
33
40
41class QXMPP_EXPORT QXmppRegisterIq : public QXmppIq
42{
43public:
45 QXmppRegisterIq(const QXmppRegisterIq &other);
47
49
50 static QXmppRegisterIq createChangePasswordRequest(const QString &username, const QString &newPassword, const QString &to = {});
51 static QXmppRegisterIq createUnregistrationRequest(const QString &to = {});
52
53 QString email() const;
54 void setEmail(const QString &email);
55
56 QXmppDataForm form() const;
57 void setForm(const QXmppDataForm &form);
58
59 QString instructions() const;
60 void setInstructions(const QString &instructions);
61
62 QString password() const;
63 void setPassword(const QString &username);
64
65 QString username() const;
66 void setUsername(const QString &username);
67
68 bool isRegistered() const;
69 void setIsRegistered(bool isRegistered);
70
71 bool isRemove() const;
72 void setIsRemove(bool isRemove);
73
74 QXmppBitsOfBinaryDataList bitsOfBinaryData() const;
75 QXmppBitsOfBinaryDataList &bitsOfBinaryData();
76 void setBitsOfBinaryData(const QXmppBitsOfBinaryDataList &bitsOfBinaryData);
77
79 static bool isRegisterIq(const QDomElement &element);
81
82protected:
84 void parseElementFromChild(const QDomElement &element) override;
85 void toXmlElementFromChild(QXmlStreamWriter *writer) const override;
87
88private:
89 QSharedDataPointer<QXmppRegisterIqPrivate> d;
90};
91
92#endif
Definition: QXmppBitsOfBinaryDataList.h:40
The QXmppDataForm class represents a data form as defined by XEP-0004: Data Forms.
Definition: QXmppDataForm.h:49
The QXmppIq class is the base class for all IQs.
Definition: QXmppIq.h:42
QXmppIq & operator=(const QXmppIq &other)
Assigns other to this IQ.
Definition: QXmppIq.cpp:68
The QXmppRegisterIq class represents a registration IQ as defined by XEP-0077: In-Band Registration.
Definition: QXmppRegisterIq.h:42