QXmpp: QXmppIq.h Source File

QXmpp Version: 1.14.4

Loading...
Searching...
No Matches
QXmppIq.h
1// SPDX-FileCopyrightText: 2009 Manjeet Dahiya <manjeetdahiya@gmail.com>
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4
5#ifndef QXMPPIQ_H
6#define QXMPPIQ_H
7
8#include "QXmppStanza.h"
9
10// forward declarations of QXmlStream* classes will not work on Mac, we need to
11// include the whole header.
12// See http://lists.trolltech.com/qt-interest/2008-07/thread00798-0.html
13// for an explanation.
14#include <QXmlStreamWriter>
15
16class QXmppIqPrivate;
17
21
22 class QXMPP_EXPORT QXmppIq : public QXmppStanza
23{
24public:
26 enum Type {
27 Error = 0,
28 Get,
29 Set,
30 Result
31 };
32
33 QXmppIq(QXmppIq::Type type = QXmppIq::Get);
34 QXmppIq(const QXmppIq &other);
35 QXmppIq(QXmppIq &&);
36 ~QXmppIq() override;
37
38 QXmppIq &operator=(const QXmppIq &other);
39 QXmppIq &operator=(QXmppIq &&);
40
41 QXmppIq::Type type() const;
42 void setType(QXmppIq::Type);
43
44 bool isXmppStanza() const override;
45
47 void parse(const QDomElement &element) override;
48 void toXml(QXmlStreamWriter *writer) const override;
49
50 virtual void parseElementFromChild(const QDomElement &element);
51 virtual void toXmlElementFromChild(QXmlStreamWriter *writer) const;
53
54private:
55 QSharedDataPointer<QXmppIqPrivate> d;
56};
57
58Q_DECLARE_METATYPE(QXmppIq::Type)
59
60#endif // QXMPPIQ_H
QXmppIq
The QXmppIq class is the base class for all IQs.
Definition QXmppIq.h:23
QXmppIq::QXmppIq
QXmppIq(QXmppIq::Type type=QXmppIq::Get)
Definition QXmppIq.cpp:39
QXmppIq::QXmppIq
QXmppIq(QXmppIq &&)
Default move-constructor.
QXmppIq::QXmppIq
QXmppIq(const QXmppIq &other)
Constructs a copy of other.
QXmppIq::Type
Type
This enum describes the type of IQ.
Definition QXmppIq.h:26
QXmppIq::Error
@ Error
Error response.
Definition QXmppIq.h:27
QXmppIq::Set
@ Set
Set request.
Definition QXmppIq.h:29
QXmppIq::Get
@ Get
Get request.
Definition QXmppIq.h:28
QXmppIq::Result
@ Result
Result.
Definition QXmppIq.h:30
QXmppIq::setType
void setType(QXmppIq::Type)
Definition QXmppIq.cpp:70
QXmppIq::operator=
QXmppIq & operator=(const QXmppIq &other)
Assigns other to this IQ.
QXmppIq::operator=
QXmppIq & operator=(QXmppIq &&)
Move-assignment operator.
QXmppIq::type
QXmppIq::Type type() const
Definition QXmppIq.cpp:60
QXmppNonza::parse
virtual void parse(const QDomElement &)=0
QXmppNonza::toXml
virtual void toXml(QXmlStreamWriter *writer) const =0
QXmppNonza::isXmppStanza
virtual bool isXmppStanza() const
Definition QXmppNonza.h:19
QXmppStanza::QXmppStanza
QXmppStanza(const QString &from=QString(), const QString &to=QString())
Definition QXmppStanza.cpp:693