QXmpp Version: 1.10.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
15
16class QXMPP_EXPORT QXmppBindIq : public QXmppIq
17{
18public:
19 static QXmppBindIq bindAddressIq(const QString &resource);
20
21 QString jid() const;
22 void setJid(const QString &);
23
24 QString resource() const;
25 void setResource(const QString &);
26
28 static bool isBindIq(const QDomElement &element);
30
31protected:
33 void parseElementFromChild(const QDomElement &element) override;
34 void toXmlElementFromChild(QXmlStreamWriter *writer) const override;
36
37private:
38 QString m_jid;
39 QString m_resource;
40};
41
42#endif // QXMPPBIND_H
The QXmppBindIq class represents an IQ used for resource binding as defined by RFC 3921.
Definition QXmppBindIq.h:17
QString resource() const
Returns the requested resource.
Definition QXmppBindIq.cpp:41
void setResource(const QString &)
Sets the requested resource.
Definition QXmppBindIq.cpp:47
QString jid() const
Returns the bound JID.
Definition QXmppBindIq.cpp:29
void setJid(const QString &)
Sets the bound JID.
Definition QXmppBindIq.cpp:35
static QXmppBindIq bindAddressIq(const QString &resource)
Creates a Bind IQ of type set with the specified resource.
Definition QXmppBindIq.cpp:20
QXmppIq(QXmppIq::Type type=QXmppIq::Get)
Definition QXmppIq.cpp:34