QXmpp Version: 1.11.3
 
Loading...
Searching...
No Matches
QXmppBindIq.h
1// SPDX-FileCopyrightText: 2011 Manjeet Dahiya <manjeetdahiya@gmail.com>
2// SPDX-FileCopyrightText: 2010 Jeremy Lainé <jeremy.laine@m4x.org>
3//
4// SPDX-License-Identifier: LGPL-2.1-or-later
5
6#ifndef QXMPPBINDIQ_H
7#define QXMPPBINDIQ_H
8
9#include "QXmppIq.h"
10
17class QXMPP_EXPORT QXmppBindIq : public QXmppIq
18{
19public:
20 static QXmppBindIq bindAddressIq(const QString &resource);
21
22 QString jid() const;
23 void setJid(const QString &);
24
25 QString resource() const;
26 void setResource(const QString &);
27
29 static constexpr std::tuple PayloadXmlTag = { u"bind", QXmpp::Private::ns_bind };
30 [[deprecated("Use QXmpp::isIqElement()")]]
31 static bool isBindIq(const QDomElement &element);
32
33protected:
34 void parseElementFromChild(const QDomElement &element) override;
35 void toXmlElementFromChild(QXmlStreamWriter *writer) const override;
37
38private:
39 QString m_jid;
40 QString m_resource;
41};
42
43#endif // QXMPPBIND_H
The QXmppBindIq class represents an IQ used for resource binding as defined by RFC 3921.
Definition QXmppBindIq.h:18
QString resource() const
Returns the requested resource.
Definition QXmppBindIq.cpp:42
void setResource(const QString &)
Sets the requested resource.
Definition QXmppBindIq.cpp:48
QString jid() const
Returns the bound JID.
Definition QXmppBindIq.cpp:30
void setJid(const QString &)
Sets the bound JID.
Definition QXmppBindIq.cpp:36
static QXmppBindIq bindAddressIq(const QString &resource)
Creates a Bind IQ of type set with the specified resource.
Definition QXmppBindIq.cpp:21
QXmppIq(QXmppIq::Type type=QXmppIq::Get)
Definition QXmppIq.cpp:39