QXmppMixConfigItem Class

The QXmppMixConfigItem class represents a PubSub item of a MIX channel containing its configuration as defined by XEP-0369: Mediated Information eXchange (MIX). More...

Header: #include <QXmppMixConfigItem>
Since: QXmpp 1.7
Inherits: QXmppPubSubBaseItem

Public Types

enum class Node { AllowedJids, AvatarData, AvatarMetadata, BannedJids, Configuration, …, Presence }
flags Nodes
enum class Role { Owner, Administrator, Participant, Allowed, Anyone, Nobody }

Public Functions

QXmppMixConfigItem(const QXmppMixConfigItem &)
QXmppMixConfigItem(QXmppMixConfigItem &&)
QStringList administratorJids() const
std::optional<QXmppMixConfigItem::Role> allowedJidsSubscribeRole() const
std::optional<QXmppMixConfigItem::Role> avatarUpdateRole() const
std::optional<QXmppMixConfigItem::Role> bannedJidsSubscribeRole() const
QDateTime channelDeletion() const
std::optional<QXmppMixConfigItem::Role> configurationReadRole() const
QXmppDataForm::Type formType() const
std::optional<QXmppMixConfigItem::Role> informationSubscribeRole() const
std::optional<QXmppMixConfigItem::Role> informationUpdateRole() const
std::optional<bool> invitationsPermitted() const
QString lastEditorJid() const
std::optional<QXmppMixConfigItem::Role> messagesRetractRole() const
std::optional<QXmppMixConfigItem::Role> messagesSubscribeRole() const
std::optional<bool> nicknameRequired() const
QXmppMixConfigItem::Nodes nodes() const
std::optional<bool> onlyParticipantsPermittedToSubmitPresence() const
std::optional<bool> ownMessageRetractionPermitted() const
QStringList ownerJids() const
std::optional<QXmppMixConfigItem::Role> participantsSubscribeRole() const
std::optional<bool> presenceRequired() const
std::optional<QXmppMixConfigItem::Role> presenceSubscribeRole() const
std::optional<bool> privateMessagesPermitted() const
void setAdministratorJids(const QStringList &administratorJids)
void setAllowedJidsSubscribeRole(std::optional<QXmppMixConfigItem::Role> allowedJidsSubscribeRole)
void setAvatarUpdateRole(std::optional<QXmppMixConfigItem::Role> avatarUpdateRole)
void setBannedJidsSubscribeRole(std::optional<QXmppMixConfigItem::Role> bannedJidsSubscribeRole)
void setChannelDeletion(const QDateTime &channelDeletion)
void setConfigurationReadRole(std::optional<QXmppMixConfigItem::Role> configurationReadRole)
void setFormType(QXmppDataForm::Type formType)
void setInformationSubscribeRole(std::optional<QXmppMixConfigItem::Role> informationSubscribeRole)
void setInformationUpdateRole(std::optional<QXmppMixConfigItem::Role> informationUpdateRole)
void setInvitationsPermitted(std::optional<bool> invitationsPermitted)
void setLastEditorJid(const QString &lastEditorJid)
void setMessagesRetractRole(std::optional<QXmppMixConfigItem::Role> messagesRetractRole)
void setMessagesSubscribeRole(std::optional<QXmppMixConfigItem::Role> messagesSubscribeRole)
void setNicknameRequired(std::optional<bool> nicknameRequired)
void setNodes(QXmppMixConfigItem::Nodes nodes)
void setOnlyParticipantsPermittedToSubmitPresence(std::optional<bool> onlyParticipantsPermittedToSubmitPresence)
void setOwnMessageRetractionPermitted(std::optional<bool> ownMessageRetractionPermitted)
void setOwnerJids(const QStringList &ownerJids)
void setParticipantsSubscribeRole(std::optional<QXmppMixConfigItem::Role> participantsSubscribeRole)
void setPresenceRequired(std::optional<bool> presenceRequired)
void setPresenceSubscribeRole(std::optional<QXmppMixConfigItem::Role> presenceSubscribeRole)
void setPrivateMessagesPermitted(std::optional<bool> privateMessagesPermitted)
QXmppMixConfigItem &operator=(QXmppMixConfigItem &&)
QXmppMixConfigItem &operator=(const QXmppMixConfigItem &)

Static Public Members

bool isItem(const QDomElement &element)

Detailed Description

Member Type Documentation

enum class QXmppMixConfigItem::Node
flags QXmppMixConfigItem::Nodes

PubSub node belonging to a MIX channel.

ConstantValueDescription
QXmppMixConfigItem::Node::AllowedJids1 << 0JIDs allowed to participate in the channel. If this node does not exist, all JIDs are allowed to participate.
QXmppMixConfigItem::Node::AvatarData1 << 1Channel's avatar data.
QXmppMixConfigItem::Node::AvatarMetadata1 << 2Channel's avatar metadata.
QXmppMixConfigItem::Node::BannedJids1 << 3JIDs banned from participating in the channel.
QXmppMixConfigItem::Node::Configuration1 << 4Channel's configuration.
QXmppMixConfigItem::Node::Information1 << 5Channel's information.
QXmppMixConfigItem::Node::JidMap1 << 6Mappings from the participants' IDs to their JIDs (needed for JID-hidden channels).
QXmppMixConfigItem::Node::Messages1 << 7Messages sent through the channel.
QXmppMixConfigItem::Node::Participants1 << 8Users participating in the channel.
QXmppMixConfigItem::Node::Presence1 << 9Presence of users participating in the channel.

The Nodes type is a typedef for QFlags<Node>. It stores an OR combination of Node values.

enum class QXmppMixConfigItem::Role

Roles for a MIX channel with various rights.

The rights are defined in a strictly hierarchical manner following the order of this enumeration, so that for example Owners will always have rights that Administrators have.

ConstantValueDescription
QXmppMixConfigItem::Role::Owner0Allowed to update the channel configuration. Specified by the channel configuration.
QXmppMixConfigItem::Role::Administrator1Allowed to update the JIDs that are allowed to participate or banned from participating in a channel. Specified in the channel configuration.
QXmppMixConfigItem::Role::Participant2Participant of the channel.
QXmppMixConfigItem::Role::Allowed3User that is allowed to participate in the channel. Users are allowed if their JIDs do not match a JID in the Node::BannedJids node and either there is no Node::AllowedJids node or their JIDs match a JID in it.
QXmppMixConfigItem::Role::Anyone4Any user, including users in the BannedJids.
QXmppMixConfigItem::Role::Nobody5No user, including owners and administrators.

Member Function Documentation

QXmppMixConfigItem::QXmppMixConfigItem(const QXmppMixConfigItem &)

Default copy-constructor

QXmppMixConfigItem::QXmppMixConfigItem(QXmppMixConfigItem &&)

Default move-constructor

QStringList QXmppMixConfigItem::administratorJids() const

Returns the bare JIDs of the channel administrators.

See also setAdministratorJids() and Role::Administrator.

std::optional<QXmppMixConfigItem::Role> QXmppMixConfigItem::allowedJidsSubscribeRole() const

Returns the role that is permitted to subscribe to the JIDs that are allowed to participate in the channel.

See also setAllowedJidsSubscribeRole().

std::optional<QXmppMixConfigItem::Role> QXmppMixConfigItem::avatarUpdateRole() const

Returns the role that is permitted to update the channel's avatar.

See also setAvatarUpdateRole().

std::optional<QXmppMixConfigItem::Role> QXmppMixConfigItem::bannedJidsSubscribeRole() const

Returns the role that is permitted to subscribe to the JIDs that are banned from participating in the channel.

See also setBannedJidsSubscribeRole().

QDateTime QXmppMixConfigItem::channelDeletion() const

Returns the date and time when the channel is automatically deleted.

If no date/time is set, the channel is permanent.

See also setChannelDeletion().

std::optional<QXmppMixConfigItem::Role> QXmppMixConfigItem::configurationReadRole() const

Returns the role that is permitted to subscribe to and read the channel's configuration.

See also setConfigurationReadRole().

QXmppDataForm::Type QXmppMixConfigItem::formType() const

Returns the type of the data form that contains the channel's configuration.

See also setFormType().

std::optional<QXmppMixConfigItem::Role> QXmppMixConfigItem::informationSubscribeRole() const

Returns the role that is permitted to subscribe to the channel's information.

See also setInformationSubscribeRole().

std::optional<QXmppMixConfigItem::Role> QXmppMixConfigItem::informationUpdateRole() const

Returns the role that is permitted to update the channel's information.

See also setInformationUpdateRole().

std::optional<bool> QXmppMixConfigItem::invitationsPermitted() const

Returns whether channel participants are permitted to invite users to the channel.

In order to use that feature, the participant must request the invitation from the channel and send it to the invitee. The invitee can use the invitation to join the channel.

See also setInvitationsPermitted() and QXmppMixInvitation.

[static] bool QXmppMixConfigItem::isItem(const QDomElement &element)

Returns true if the given DOM element is a MIX channel config item.

QString QXmppMixConfigItem::lastEditorJid() const

Returns the bare JID of the user that made the latest change to the channel's configuration.

The JID is set by the server on each configuration change.

See also setLastEditorJid().

std::optional<QXmppMixConfigItem::Role> QXmppMixConfigItem::messagesRetractRole() const

Returns the role that is permitted to retract any message sent through the channel.

See also setMessagesRetractRole().

std::optional<QXmppMixConfigItem::Role> QXmppMixConfigItem::messagesSubscribeRole() const

Returns the role that is permitted to subscribe to messages sent through the channel.

See also setMessagesSubscribeRole().

std::optional<bool> QXmppMixConfigItem::nicknameRequired() const

Returns whether participants need nicknames.

See also setNicknameRequired().

QXmppMixConfigItem::Nodes QXmppMixConfigItem::nodes() const

Returns which nodes are present for the channel.

See also setNodes().

std::optional<bool> QXmppMixConfigItem::onlyParticipantsPermittedToSubmitPresence() const

Returns whether only participants are permitted to share their presence.

See also setOnlyParticipantsPermittedToSubmitPresence().

std::optional<bool> QXmppMixConfigItem::ownMessageRetractionPermitted() const

Returns whether users are permitted to retract their own messages sent through the channel.

See also setOwnMessageRetractionPermitted().

QStringList QXmppMixConfigItem::ownerJids() const

Returns the bare JIDs of the channel owners.

When a channel is created, the JID of the user that created it is set as the first owner.

See also setOwnerJids() and Role::Owner.

std::optional<QXmppMixConfigItem::Role> QXmppMixConfigItem::participantsSubscribeRole() const

Returns the role that is permitted to subscribe to the channel's participants.

See also setParticipantsSubscribeRole().

std::optional<bool> QXmppMixConfigItem::presenceRequired() const

Returns whether participants need to share their presence.

See also setPresenceRequired().

std::optional<QXmppMixConfigItem::Role> QXmppMixConfigItem::presenceSubscribeRole() const

Returns the role that is permitted to subscribe to the channel's user' presence.

See also setPresenceSubscribeRole().

std::optional<bool> QXmppMixConfigItem::privateMessagesPermitted() const

Returns whether participants are permitted to exchange private messages through the channel.

See also setPrivateMessagesPermitted().

void QXmppMixConfigItem::setAdministratorJids(const QStringList &administratorJids)

Sets the bare administratorJids of the channel administrators.

See also administratorJids().

void QXmppMixConfigItem::setAllowedJidsSubscribeRole(std::optional<QXmppMixConfigItem::Role> allowedJidsSubscribeRole)

Sets the allowedJidsSubscribeRole that is permitted to subscribe to the JIDs that are allowed to participate in the channel.

Only the following roles are valid:

See also allowedJidsSubscribeRole().

void QXmppMixConfigItem::setAvatarUpdateRole(std::optional<QXmppMixConfigItem::Role> avatarUpdateRole)

Sets the avatarUpdateRole that is permitted to update the channel's avatar.

Only the following roles are valid:

See also avatarUpdateRole().

void QXmppMixConfigItem::setBannedJidsSubscribeRole(std::optional<QXmppMixConfigItem::Role> bannedJidsSubscribeRole)

Sets the bannedJidsSubscribeRole that is permitted to subscribe to the JIDs that are banned from participating in the channel.

Only the following roles are valid:

See also bannedJidsSubscribeRole().

void QXmppMixConfigItem::setChannelDeletion(const QDateTime &channelDeletion)

Sets channelDeletion, the date and time when the channel is automatically deleted.

See also channelDeletion().

void QXmppMixConfigItem::setConfigurationReadRole(std::optional<QXmppMixConfigItem::Role> configurationReadRole)

Sets the configurationReadRole that is permitted to subscribe to and read the channel's configuration.

Only the following roles are valid:

See also configurationReadRole().

void QXmppMixConfigItem::setFormType(QXmppDataForm::Type formType)

Sets the data form's formType that contains the channel's configuration.

See also formType().

void QXmppMixConfigItem::setInformationSubscribeRole(std::optional<QXmppMixConfigItem::Role> informationSubscribeRole)

Sets the informationSubscribeRole that is permitted to subscribe to the channel's information.

Only the following roles are valid:

See also informationSubscribeRole().

void QXmppMixConfigItem::setInformationUpdateRole(std::optional<QXmppMixConfigItem::Role> informationUpdateRole)

Sets the informationUpdateRole that is permitted to update the channel's information.

Only the following roles are valid:

See also informationUpdateRole().

void QXmppMixConfigItem::setInvitationsPermitted(std::optional<bool> invitationsPermitted)

Sets via invitationsPermitted whether participants are permitted to invite users to the channel.

See also invitationsPermitted().

void QXmppMixConfigItem::setLastEditorJid(const QString &lastEditorJid)

Sets the bare lastEditorJid of the user that made the latest change to the channel's configuration.

See also lastEditorJid().

void QXmppMixConfigItem::setMessagesRetractRole(std::optional<QXmppMixConfigItem::Role> messagesRetractRole)

Sets the messagesRetractRole that is permitted to retract any message sent through the channel.

Only the following roles are valid:

See also messagesRetractRole().

void QXmppMixConfigItem::setMessagesSubscribeRole(std::optional<QXmppMixConfigItem::Role> messagesSubscribeRole)

Sets the messagesSubscribeRole that is permitted to subscribe to messages sent through the channel.

Only the following roles are valid:

See also messagesSubscribeRole().

void QXmppMixConfigItem::setNicknameRequired(std::optional<bool> nicknameRequired)

Sets via nicknameRequired whether participants need nicknames.

See also nicknameRequired().

void QXmppMixConfigItem::setNodes(QXmppMixConfigItem::Nodes nodes)

Sets which nodes are present for the channel.

See also nodes().

void QXmppMixConfigItem::setOnlyParticipantsPermittedToSubmitPresence(std::optional<bool> onlyParticipantsPermittedToSubmitPresence)

Sets via onlyParticipantsPermittedToSubmitPresence whether only participants are permitted to share their presence.

See also onlyParticipantsPermittedToSubmitPresence().

void QXmppMixConfigItem::setOwnMessageRetractionPermitted(std::optional<bool> ownMessageRetractionPermitted)

Sets via ownMessageRetractionPermitted whether users are permitted to retract their own messages sent through the channel.

See also ownMessageRetractionPermitted().

void QXmppMixConfigItem::setOwnerJids(const QStringList &ownerJids)

Sets the bare ownerJids of the channel owners.

See also ownerJids().

void QXmppMixConfigItem::setParticipantsSubscribeRole(std::optional<QXmppMixConfigItem::Role> participantsSubscribeRole)

Sets the participantsSubscribeRole that is permitted to subscribe to the channel's participants.

See also participantsSubscribeRole().

void QXmppMixConfigItem::setPresenceRequired(std::optional<bool> presenceRequired)

Sets via presenceRequired whether participants need to share their presence.

See also presenceRequired().

void QXmppMixConfigItem::setPresenceSubscribeRole(std::optional<QXmppMixConfigItem::Role> presenceSubscribeRole)

Sets the presenceSubscribeRole that is permitted to subscribe to the channel's users' presence.

Only the following roles are valid:

See also presenceSubscribeRole().

void QXmppMixConfigItem::setPrivateMessagesPermitted(std::optional<bool> privateMessagesPermitted)

Sets via privateMessagesPermitted whether participants are permitted to exchange private messages through the channel.

See also privateMessagesPermitted().

QXmppMixConfigItem &QXmppMixConfigItem::operator=(QXmppMixConfigItem &&)

Default move-assignment operator

QXmppMixConfigItem &QXmppMixConfigItem::operator=(const QXmppMixConfigItem &)

Default assignment operator