QXmpp: QXmppMixIq.h Source File

QXmpp Version: 1.14.4

Loading...
Searching...
No Matches
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
17 class QXMPP_EXPORT QXmppMixIq : public QXmppIq
18{
19public:
20 enum Type {
21 None,
22 ClientJoin,
23 ClientLeave,
24 Join,
25 Leave,
26#if QXMPP_DEPRECATED_SINCE(1, 7)
27 UpdateSubscription [[deprecated("Use QXmppMixManager")]],
28#endif
29 SetNick = 6,
30 Create,
31 Destroy
32 };
33
34 QXmppMixIq();
35 QXmppMixIq(const QXmppMixIq &);
36 QXmppMixIq(QXmppMixIq &&);
37 ~QXmppMixIq() override;
38
39 QXmppMixIq &operator=(const QXmppMixIq &);
40 QXmppMixIq &operator=(QXmppMixIq &&);
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()")]]
47 QString jid() const;
48 [[deprecated("Use setParticipantId() and setChannelJid()")]]
49 void setJid(const QString &);
50#endif
51
52 QString participantId() const;
53 void setParticipantId(const QString &);
54
55#if QXMPP_DEPRECATED_SINCE(1, 7)
56 [[deprecated("Use channelId()")]]
57 QString channelName() const;
58 [[deprecated("Use setChannelId()")]]
59 void setChannelName(const QString &);
60#endif
61
62 QString channelId() const;
63 void setChannelId(const QString &);
64
65 QString channelJid() const;
66 void setChannelJid(const QString &);
67
68#if QXMPP_DEPRECATED_SINCE(1, 7)
69 [[deprecated("Use subscriptions()")]]
70 QStringList nodes() const;
71 [[deprecated("Use setSubscriptions()")]]
72 void setNodes(const QStringList &);
73#endif
74
75 QXmppMixConfigItem::Nodes subscriptions() const;
76 void setSubscriptions(QXmppMixConfigItem::Nodes);
77
78 QString nick() const;
79 void setNick(const QString &);
80
81 std::optional<QXmppMixInvitation> invitation() const;
82 void setInvitation(const std::optional<QXmppMixInvitation> &);
83
85 static bool isMixIq(const QDomElement &);
87
88protected:
90 void parseElementFromChild(const QDomElement &) override;
91 void toXmlElementFromChild(QXmlStreamWriter *) const override;
93
94private:
95 QSharedDataPointer<QXmppMixIqPrivate> d;
96};
97
98Q_DECLARE_METATYPE(QXmppMixIq::Type)
99
100#endif // QXMPPMIXIQ_H
QXmppIq::QXmppIq
QXmppIq(QXmppIq::Type type=QXmppIq::Get)
Definition QXmppIq.cpp:39
QXmppMixIq
Definition QXmppMixIq.h:18
QXmppMixIq::invitation
std::optional< QXmppMixInvitation > invitation() const
Definition QXmppMixIq.cpp:547
QXmppMixIq::setSubscriptions
void setSubscriptions(QXmppMixConfigItem::Nodes)
Definition QXmppMixIq.cpp:515
QXmppMixIq::setChannelName
void setChannelName(const QString &)
Definition QXmppMixIq.cpp:414
QXmppMixIq::Type
Type
Definition QXmppMixIq.h:20
QXmppMixIq::Destroy
@ Destroy
Definition QXmppMixIq.h:31
QXmppMixIq::Leave
@ Leave
Definition QXmppMixIq.h:25
QXmppMixIq::None
@ None
Definition QXmppMixIq.h:21
QXmppMixIq::ClientLeave
@ ClientLeave
Definition QXmppMixIq.h:23
QXmppMixIq::ClientJoin
@ ClientJoin
Definition QXmppMixIq.h:22
QXmppMixIq::Join
@ Join
Definition QXmppMixIq.h:24
QXmppMixIq::UpdateSubscription
@ UpdateSubscription
Definition QXmppMixIq.h:27
QXmppMixIq::Create
@ Create
Definition QXmppMixIq.h:30
QXmppMixIq::SetNick
@ SetNick
Definition QXmppMixIq.h:29
QXmppMixIq::operator=
QXmppMixIq & operator=(QXmppMixIq &&)
Default move-assignment operator.
QXmppMixIq::setParticipantId
void setParticipantId(const QString &)
Definition QXmppMixIq.cpp:385
QXmppMixIq::nodes
QStringList nodes() const
Definition QXmppMixIq.cpp:478
QXmppMixIq::actionType
QXmppMixIq::Type actionType() const
Definition QXmppMixIq.cpp:568
QXmppMixIq::setNick
void setNick(const QString &)
Definition QXmppMixIq.cpp:535
QXmppMixIq::participantId
QString participantId() const
Definition QXmppMixIq.cpp:373
QXmppMixIq::QXmppMixIq
QXmppMixIq(QXmppMixIq &&)
Default move-constructor.
QXmppMixIq::setActionType
void setActionType(QXmppMixIq::Type)
Definition QXmppMixIq.cpp:578
QXmppMixIq::setChannelJid
void setChannelJid(const QString &)
Definition QXmppMixIq.cpp:466
QXmppMixIq::channelJid
QString channelJid() const
Definition QXmppMixIq.cpp:454
QXmppMixIq::setNodes
void setNodes(const QStringList &)
Definition QXmppMixIq.cpp:491
QXmppMixIq::operator=
QXmppMixIq & operator=(const QXmppMixIq &)
Default assignment operator.
QXmppMixIq::jid
QString jid() const
Definition QXmppMixIq.cpp:333
QXmppMixIq::setInvitation
void setInvitation(const std::optional< QXmppMixInvitation > &)
Definition QXmppMixIq.cpp:559
QXmppMixIq::channelName
QString channelName() const
Definition QXmppMixIq.cpp:399
QXmppMixIq::channelId
QString channelId() const
Definition QXmppMixIq.cpp:428
QXmppMixIq::nick
QString nick() const
Definition QXmppMixIq.cpp:525
QXmppMixIq::setChannelId
void setChannelId(const QString &)
Definition QXmppMixIq.cpp:442
QXmppMixIq::QXmppMixIq
QXmppMixIq(const QXmppMixIq &)
Default copy-constructor.
QXmppMixIq::setJid
void setJid(const QString &)
Definition QXmppMixIq.cpp:354
QXmppMixIq::subscriptions
QXmppMixConfigItem::Nodes subscriptions() const
Definition QXmppMixIq.cpp:503