Loading...
Searching...
No Matches
QXmppRegisterIq.h
// SPDX-FileCopyrightText: 2012 Jeremy Lainé <jeremy.laine@m4x.org>
// SPDX-FileCopyrightText: 2019 Linus Jahn <lnj@kaidan.im>
//
// SPDX-License-Identifier: LGPL-2.1-or-later
#ifndef QXMPPREGISTERIQ_H
#define QXMPPREGISTERIQ_H
#include "QXmppDataForm.h"
#include "QXmppIq.h"
class QXmppBitsOfBinaryDataList;
class QXmppRegisterIqPrivate;
class QXMPP_EXPORT QXmppRegisterIq : public QXmppIq
{
public:
QXmppRegisterIq();
QXmppRegisterIq(const QXmppRegisterIq &other);
QXmppRegisterIq(QXmppRegisterIq &&);
~QXmppRegisterIq() override;
QXmppRegisterIq &operator=(const QXmppRegisterIq &other);
QXmppRegisterIq &operator=(QXmppRegisterIq &&);
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);
QXmppDataForm form() const;
void setForm(const QXmppDataForm &form);
QString instructions() const;
void setInstructions(const QString &instructions);
QString password() const;
void setPassword(const QString &username);
QString username() const;
void setUsername(const QString &username);
bool isRegistered() const;
void setIsRegistered(bool isRegistered);
bool isRemove() const;
void setIsRemove(bool isRemove);
QXmppBitsOfBinaryDataList bitsOfBinaryData() const;
QXmppBitsOfBinaryDataList &bitsOfBinaryData();
void setBitsOfBinaryData(const QXmppBitsOfBinaryDataList &bitsOfBinaryData);
QString outOfBandUrl() const;
void setOutOfBandUrl(const QString &outOfBandUrl);
static constexpr std::tuple PayloadXmlTag = { u"query", QXmpp::Private::ns_register };
[[deprecated("Use QXmpp::isIqElement()")]]
static bool isRegisterIq(const QDomElement &element);
protected:
void parseElementFromChild(const QDomElement &element) override;
void toXmlElementFromChild(QXmlStreamWriter *writer) const override;
private:
QSharedDataPointer<QXmppRegisterIqPrivate> d;
};
#endif
QXmppBitsOfBinaryDataList
Definition QXmppBitsOfBinaryDataList.h:16
QXmppIq::QXmppIq
QXmppIq(QXmppIq::Type type=QXmppIq::Get)
Definition QXmppIq.cpp:39
QXmppRegisterIq
The QXmppRegisterIq class represents a registration IQ as defined by XEP-0077: In-Band Registration.
Definition QXmppRegisterIq.h:23
QXmppRegisterIq::username
QString username() const
Returns the username for this registration IQ.
Definition QXmppRegisterIq.cpp:144
QXmppRegisterIq::operator=
QXmppRegisterIq & operator=(const QXmppRegisterIq &other)
Default assignment operator.
QXmppRegisterIq::createChangePasswordRequest
static QXmppRegisterIq createChangePasswordRequest(const QString &username, const QString &newPassword, const QString &to={})
Definition QXmppRegisterIq.cpp:68
QXmppRegisterIq::QXmppRegisterIq
QXmppRegisterIq(QXmppRegisterIq &&)
Default move-constructor.
QXmppRegisterIq::operator=
QXmppRegisterIq & operator=(QXmppRegisterIq &&)
Default move-assignment operator.
QXmppRegisterIq::QXmppRegisterIq
QXmppRegisterIq(const QXmppRegisterIq &other)
Default copy-constructor.
QXmppStanza::to
QString to() const
Definition QXmppStanza.cpp:714