QXmpp Version: 1.10.0
QXmppMixIq_p.h
1// SPDX-FileCopyrightText: 2023 Melvin Keskin <melvo@olomono.de>
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4
5#ifndef QXMPPMIXIQ_P_H
6#define QXMPPMIXIQ_P_H
7
8#include "QXmppIq.h"
9#include "QXmppMixConfigItem.h"
10#include "QXmppMixInvitation.h"
11
12class QXMPP_EXPORT QXmppMixSubscriptionUpdateIq : public QXmppIq
13{
14public:
15 QXmppMixSubscriptionUpdateIq();
16
17 QXMPP_PRIVATE_DECLARE_RULE_OF_SIX(QXmppMixSubscriptionUpdateIq)
18
19 QXmppMixConfigItem::Nodes additions() const;
20 void setAdditions(QXmppMixConfigItem::Nodes);
21
22 QXmppMixConfigItem::Nodes removals() const;
23 void setRemovals(QXmppMixConfigItem::Nodes);
24
25 static bool isMixSubscriptionUpdateIq(const QDomElement &);
26
27protected:
28 void parseElementFromChild(const QDomElement &) override;
29 void toXmlElementFromChild(QXmlStreamWriter *) const override;
30
31private:
32 QXmppMixConfigItem::Nodes m_additions;
33 QXmppMixConfigItem::Nodes m_removals;
34};
35
36class QXMPP_EXPORT QXmppMixInvitationRequestIq : public QXmppIq
37{
38public:
39 QXmppMixInvitationRequestIq();
40
41 QXMPP_PRIVATE_DECLARE_RULE_OF_SIX(QXmppMixInvitationRequestIq)
42
43 QString inviteeJid() const;
44 void setInviteeJid(const QString &);
45
46 static bool isMixInvitationRequestIq(const QDomElement &);
47
48protected:
49 void parseElementFromChild(const QDomElement &) override;
50 void toXmlElementFromChild(QXmlStreamWriter *) const override;
51
52private:
53 QString m_inviteeJid;
54};
55
56class QXMPP_EXPORT QXmppMixInvitationResponseIq : public QXmppIq
57{
58public:
59 QXmppMixInvitationResponseIq();
60
61 QXMPP_PRIVATE_DECLARE_RULE_OF_SIX(QXmppMixInvitationResponseIq)
62
63 QXmppMixInvitation invitation() const;
64 void setInvitation(const QXmppMixInvitation &);
65
66 static bool isMixInvitationResponseIq(const QDomElement &);
67
68protected:
69 void parseElementFromChild(const QDomElement &) override;
70 void toXmlElementFromChild(QXmlStreamWriter *) const override;
71
72private:
73 QXmppMixInvitation m_invitation;
74};
75
76namespace QXmpp::Private {
77
78QXMPP_EXPORT QVector<QString> mixNodesToList(QXmppMixConfigItem::Nodes nodes);
79QXMPP_EXPORT QXmppMixConfigItem::Nodes listToMixNodes(const QVector<QString> &nodeList);
80
81} // namespace QXmpp::Private
82
83#endif // QXMPPMIXIQ_P_H
The QXmppIq class is the base class for all IQs.
Definition: QXmppIq.h:23