QXmpp: QXmppIbbIq.h Source File

QXmpp Version: 1.14.4

Loading...
Searching...
No Matches
QXmppIbbIq.h
1// SPDX-FileCopyrightText: 2010 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 QXMPPIBBIQ_H
7#define QXMPPIBBIQ_H
8
9#include "QXmppIq.h"
10
11 class QXmppIbbOpenIq : public QXmppIq
12{
13public:
14 QXmppIbbOpenIq();
15
16 long blockSize() const;
17 void setBlockSize(long block_size);
18
19 QString sid() const;
20 void setSid(const QString &sid);
21
23 static constexpr std::tuple PayloadXmlTag = { u"open", QXmpp::Private::ns_ibb };
24 [[deprecated("Use QXmpp::isIqElement()")]]
25 static bool isIbbOpenIq(const QDomElement &element);
26
27protected:
28 void parseElementFromChild(const QDomElement &element) override;
29 void toXmlElementFromChild(QXmlStreamWriter *writer) const override;
31
32private:
33 long m_block_size;
34 QString m_sid;
35};
36
37 class QXmppIbbCloseIq : public QXmppIq
38{
39public:
40 QXmppIbbCloseIq();
41
42 QString sid() const;
43 void setSid(const QString &sid);
44
46 static constexpr std::tuple PayloadXmlTag = { u"close", QXmpp::Private::ns_ibb };
47 [[deprecated("Use QXmpp::isIqElement()")]]
48 static bool isIbbCloseIq(const QDomElement &element);
49
50protected:
51 void parseElementFromChild(const QDomElement &element) override;
52 void toXmlElementFromChild(QXmlStreamWriter *writer) const override;
54
55private:
56 QString m_sid;
57};
58
59class QXMPP_EXPORT QXmppIbbDataIq : public QXmppIq
60{
61public:
62 QXmppIbbDataIq();
63
64 quint16 sequence() const;
65 void setSequence(quint16 seq);
66
67 QString sid() const;
68 void setSid(const QString &sid);
69
70 QByteArray payload() const;
71 void setPayload(const QByteArray &data);
72
74 static constexpr std::tuple PayloadXmlTag = { u"data", QXmpp::Private::ns_ibb };
75 [[deprecated("Use QXmpp::isIqElement()")]]
76 static bool isIbbDataIq(const QDomElement &element);
77
78protected:
79 void parseElementFromChild(const QDomElement &element) override;
80 void toXmlElementFromChild(QXmlStreamWriter *writer) const override;
82
83private:
84 quint16 m_seq;
85 QString m_sid;
86 QByteArray m_payload;
87};
88
89#endif // QXMPPIBBIQS_H
QXmppIbbCloseIq::sid
QString sid() const
Definition QXmppIbbIq.cpp:103
QXmppIbbCloseIq::setSid
void setSid(const QString &sid)
Definition QXmppIbbIq.cpp:112
QXmppIbbOpenIq::setBlockSize
void setBlockSize(long block_size)
Definition QXmppIbbIq.cpp:45
QXmppIbbOpenIq::sid
QString sid() const
Definition QXmppIbbIq.cpp:54
QXmppIbbOpenIq::setSid
void setSid(const QString &sid)
Definition QXmppIbbIq.cpp:63
QXmppIbbOpenIq::blockSize
long blockSize() const
Definition QXmppIbbIq.cpp:36
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