QXmpp Version: 1.10.0
QXmppMixIq.h
1// SPDX-FileCopyrightText: 2019 Linus Jahn <lnj@kaidan.im>
2// SPDX-FileCopyrightText: 2023 Melvin Keskin <melvo@olomono.de>
3//
4// SPDX-License-Identifier: LGPL-2.1-or-later
5
6#ifndef QXMPPMIXIQ_H
7#define QXMPPMIXIQ_H
8
9#include "QXmppIq.h"
10#include "QXmppMixConfigItem.h"
11
12#include <QSharedDataPointer>
13
14class QXmppMixInvitation;
15class QXmppMixIqPrivate;
16
17class QXMPP_EXPORT QXmppMixIq : public QXmppIq
18{
19public:
20 enum Type {
26#if QXMPP_DEPRECATED_SINCE(1, 7)
27 UpdateSubscription [[deprecated("Use QXmppMixManager")]],
28#endif
29 SetNick = 6,
31 Destroy
32 };
33
34 QXmppMixIq();
37 ~QXmppMixIq() override;
38
41
42 QXmppMixIq::Type actionType() const;
43 void setActionType(QXmppMixIq::Type);
44
45#if QXMPP_DEPRECATED_SINCE(1, 7)
46 [[deprecated("Use participantId() and channelJid()")]] QString jid() const;
47 [[deprecated("Use setParticipantId() and setChannelJid()")]] void setJid(const QString &);
48#endif
49
50 QString participantId() const;
51 void setParticipantId(const QString &);
52
53#if QXMPP_DEPRECATED_SINCE(1, 7)
54 [[deprecated("Use channelId()")]] QString channelName() const;
55 [[deprecated("Use setChannelId()")]] void setChannelName(const QString &);
56#endif
57
58 QString channelId() const;
59 void setChannelId(const QString &);
60
61 QString channelJid() const;
62 void setChannelJid(const QString &);
63
64#if QXMPP_DEPRECATED_SINCE(1, 7)
65 [[deprecated("Use subscriptions()")]] QStringList nodes() const;
66 [[deprecated("Use setSubscriptions()")]] void setNodes(const QStringList &);
67#endif
68
69 QXmppMixConfigItem::Nodes subscriptions() const;
70 void setSubscriptions(QXmppMixConfigItem::Nodes);
71
72 QString nick() const;
73 void setNick(const QString &);
74
75 std::optional<QXmppMixInvitation> invitation() const;
76 void setInvitation(const std::optional<QXmppMixInvitation> &);
77
79 static bool isMixIq(const QDomElement &);
81
82protected:
84 void parseElementFromChild(const QDomElement &) override;
85 void toXmlElementFromChild(QXmlStreamWriter *) const override;
87
88private:
89 QSharedDataPointer<QXmppMixIqPrivate> d;
90};
91
92Q_DECLARE_METATYPE(QXmppMixIq::Type)
93
94#endif // QXMPPMIXIQ_H
The QXmppIq class is the base class for all IQs.
Definition: QXmppIq.h:23
Type
This enum describes the type of IQ.
Definition: QXmppIq.h:26
Definition: QXmppMixIq.h:18
Type
Definition: QXmppMixIq.h:20
@ Leave
Definition: QXmppMixIq.h:25
@ Join
Definition: QXmppMixIq.h:24
@ Create
Definition: QXmppMixIq.h:30
@ None
Definition: QXmppMixIq.h:21
@ ClientJoin
Definition: QXmppMixIq.h:22
@ ClientLeave
Definition: QXmppMixIq.h:23
QXmppMixIq & operator=(QXmppMixIq &&)
Default move-assignment operator.
QXmppMixIq(QXmppMixIq &&)
Default move-constructor.
QXmppMixIq & operator=(const QXmppMixIq &)
Default assignment operator.
QXmppMixIq(const QXmppMixIq &)
Default copy-constructor.