5#ifndef QXMPPMIXCONFIGITEM_H
6#define QXMPPMIXCONFIGITEM_H
8#include "QXmppDataForm.h"
9#include "QXmppPubSubBaseItem.h"
11class QXmppMixConfigItemPrivate;
28 AvatarMetadata = 1 << 2,
30 Configuration = 1 << 4,
34 Participants = 1 << 8,
37 Q_DECLARE_FLAGS(Nodes, Node)
50 QString lastEditorJid()
const;
51 void setLastEditorJid(
const QString &lastEditorJid);
53 QStringList ownerJids()
const;
54 void setOwnerJids(
const QStringList &ownerJids);
56 QStringList administratorJids()
const;
57 void setAdministratorJids(
const QStringList &administratorJids);
59 QDateTime channelDeletion()
const;
60 void setChannelDeletion(
const QDateTime &channelDeletion);
63 void setNodes(Nodes nodes);
65 std::optional<Role> messagesSubscribeRole()
const;
66 void setMessagesSubscribeRole(std::optional<Role> messagesSubscribeRole);
68 std::optional<Role> messagesRetractRole()
const;
69 void setMessagesRetractRole(std::optional<Role> messagesRetractRole);
71 std::optional<Role> presenceSubscribeRole()
const;
72 void setPresenceSubscribeRole(std::optional<Role> presenceSubscribeRole);
74 std::optional<Role> participantsSubscribeRole()
const;
75 void setParticipantsSubscribeRole(std::optional<Role> participantsSubscribeRole);
77 std::optional<Role> informationSubscribeRole()
const;
78 void setInformationSubscribeRole(std::optional<Role> informationSubscribeRole);
80 std::optional<Role> informationUpdateRole()
const;
81 void setInformationUpdateRole(std::optional<Role> informationUpdateRole);
83 std::optional<Role> allowedJidsSubscribeRole()
const;
84 void setAllowedJidsSubscribeRole(std::optional<Role> allowedJidsSubscribeRole);
86 std::optional<Role> bannedJidsSubscribeRole()
const;
87 void setBannedJidsSubscribeRole(std::optional<Role> bannedJidsSubscribeRole);
89 std::optional<Role> configurationReadRole()
const;
90 void setConfigurationReadRole(std::optional<Role> configurationReadRole);
92 std::optional<Role> avatarUpdateRole()
const;
93 void setAvatarUpdateRole(std::optional<Role> avatarUpdateRole);
95 std::optional<bool> nicknameRequired()
const;
96 void setNicknameRequired(std::optional<bool> nicknameRequired);
98 std::optional<bool> presenceRequired()
const;
99 void setPresenceRequired(std::optional<bool> presenceRequired);
101 std::optional<bool> onlyParticipantsPermittedToSubmitPresence()
const;
102 void setOnlyParticipantsPermittedToSubmitPresence(std::optional<bool> onlyParticipantsPermittedToSubmitPresence);
104 std::optional<bool> ownMessageRetractionPermitted()
const;
105 void setOwnMessageRetractionPermitted(std::optional<bool> ownMessageRetractionPermitted);
107 std::optional<bool> invitationsPermitted()
const;
108 void setInvitationsPermitted(std::optional<bool> invitationsPermitted);
110 std::optional<bool> privateMessagesPermitted()
const;
111 void setPrivateMessagesPermitted(std::optional<bool> privateMessagesPermitted);
113 static bool isItem(
const QDomElement &itemElement);
117 void parsePayload(
const QDomElement &payloadElement)
override;
122 QSharedDataPointer<QXmppMixConfigItemPrivate> d;
125Q_DECLARE_OPERATORS_FOR_FLAGS(QXmppMixConfigItem::Nodes)
128inline auto qHash(
QXmppMixConfigItem::Node key, uint seed)
noexcept {
return qHash(std::underlying_type_t<QXmppMixConfigItem::Node>(key), seed); }
132Q_DECLARE_METATYPE(QXmppMixConfigItem::Nodes)
The QXmppMixConfigItem class represents a PubSub item of a MIX channel containing its configuration a...
Definition: QXmppMixConfigItem.h:14
QXmppMixConfigItem & operator=(QXmppMixConfigItem &&)
Default move-assignment operator.
Role
Definition: QXmppMixConfigItem.h:16
QXmppMixConfigItem & operator=(const QXmppMixConfigItem &)
Default assignment operator.
Node
Definition: QXmppMixConfigItem.h:25
QXmppMixConfigItem(QXmppMixConfigItem &&)
Default move-constructor.
QXmppMixConfigItem(const QXmppMixConfigItem &)
Default copy-constructor.
Definition: QXmppPubSubBaseItem.h:19
virtual void serializePayload(QXmlStreamWriter *writer) const
Definition: QXmppPubSubBaseItem.cpp:154
virtual void parsePayload(const QDomElement &payloadElement)
Definition: QXmppPubSubBaseItem.cpp:144
static bool isItem(const QDomElement &element)
Definition: QXmppPubSubBaseItem.cpp:134