Loading...
Searching...
No Matches
QXmppMixConfigItem Class Reference
Stanzas

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

Inheritance diagram for QXmppMixConfigItem:
[legend]
Collaboration diagram for QXmppMixConfigItem:
[legend]

## Public Types

enum class | Role { Owner , Administrator , Participant , Allowed , Anyone , Nobody }
enum class | Node { AllowedJids = 1 << 0 , AvatarData = 1 << 1 , AvatarMetadata = 1 << 2 , BannedJids = 1 << 3 , Configuration = 1 << 4 , Information = 1 << 5 , JidMap = 1 << 6 , Messages = 1 << 7 , Participants = 1 << 8 , Presence = 1 << 9 }

## Public Member Functions

| QXmppMixConfigItem (const QXmppMixConfigItem &)
| Default copy-constructor.
| QXmppMixConfigItem (QXmppMixConfigItem &&)
| Default move-constructor.
QXmppMixConfigItem & | operator= (const QXmppMixConfigItem &)
| Default assignment operator.
QXmppMixConfigItem & | operator= (QXmppMixConfigItem &&)
| Default move-assignment operator.
QXmppDataForm::Type | formType () const
void | setFormType (QXmppDataForm::Type formType)
QString | lastEditorJid () const
void | setLastEditorJid (const QString &lastEditorJid)
QStringList | ownerJids () const
void | setOwnerJids (const QStringList &ownerJids)
QStringList | administratorJids () const
void | setAdministratorJids (const QStringList &administratorJids)
QDateTime | channelDeletion () const
void | setChannelDeletion (const QDateTime &channelDeletion)
Nodes | nodes () const
void | setNodes (Nodes nodes)
std::optional< Role > | messagesSubscribeRole () const
void | setMessagesSubscribeRole (std::optional< Role > messagesSubscribeRole)
std::optional< Role > | messagesRetractRole () const
void | setMessagesRetractRole (std::optional< Role > messagesRetractRole)
std::optional< Role > | presenceSubscribeRole () const
void | setPresenceSubscribeRole (std::optional< Role > presenceSubscribeRole)
std::optional< Role > | participantsSubscribeRole () const
void | setParticipantsSubscribeRole (std::optional< Role > participantsSubscribeRole)
std::optional< Role > | informationSubscribeRole () const
void | setInformationSubscribeRole (std::optional< Role > informationSubscribeRole)
std::optional< Role > | informationUpdateRole () const
void | setInformationUpdateRole (std::optional< Role > informationUpdateRole)
std::optional< Role > | allowedJidsSubscribeRole () const
void | setAllowedJidsSubscribeRole (std::optional< Role > allowedJidsSubscribeRole)
std::optional< Role > | bannedJidsSubscribeRole () const
void | setBannedJidsSubscribeRole (std::optional< Role > bannedJidsSubscribeRole)
std::optional< Role > | configurationReadRole () const
void | setConfigurationReadRole (std::optional< Role > configurationReadRole)
std::optional< Role > | avatarUpdateRole () const
void | setAvatarUpdateRole (std::optional< Role > avatarUpdateRole)
std::optional< bool > | nicknameRequired () const
void | setNicknameRequired (std::optional< bool > nicknameRequired)
std::optional< bool > | presenceRequired () const
void | setPresenceRequired (std::optional< bool > presenceRequired)
std::optional< bool > | onlyParticipantsPermittedToSubmitPresence () const
void | setOnlyParticipantsPermittedToSubmitPresence (std::optional< bool > onlyParticipantsPermittedToSubmitPresence)
std::optional< bool > | ownMessageRetractionPermitted () const
void | setOwnMessageRetractionPermitted (std::optional< bool > ownMessageRetractionPermitted)
std::optional< bool > | invitationsPermitted () const
void | setInvitationsPermitted (std::optional< bool > invitationsPermitted)
std::optional< bool > | privateMessagesPermitted () const
void | setPrivateMessagesPermitted (std::optional< bool > privateMessagesPermitted)
Public Member Functions inherited from QXmppPubSubBaseItem
| QXmppPubSubBaseItem (const QString &id={}, const QString &publisher={})
| QXmppPubSubBaseItem (const QXmppPubSubBaseItem &) noexcept
| Default copy-constructor.
| QXmppPubSubBaseItem (QXmppPubSubBaseItem &&) noexcept
| Default move-constructor.
QXmppPubSubBaseItem & | operator= (const QXmppPubSubBaseItem &) noexcept
| Default assignment operator.
QXmppPubSubBaseItem & | operator= (QXmppPubSubBaseItem &&) noexcept
| Default move-assignment operator.
QString | id () const
void | setId (const QString &id)
QString | publisher () const
void | setPublisher (const QString &publisher)

## Static Public Member Functions

static bool | isItem (const QDomElement &itemElement)
Static Public Member Functions inherited from QXmppPubSubBaseItem
static bool | isItem (const QDomElement &element)

## Additional Inherited Members

Protected Member Functions inherited from QXmppPubSubBaseItem
virtual void | parsePayload (const QDomElement &payloadElement)
virtual void | serializePayload (QXmlStreamWriter *writer) const
Static Protected Member Functions inherited from QXmppPubSubBaseItem
template<typename PayloadChecker >
static bool | isItem (const QDomElement &element, PayloadChecker isPayloadValid)

## Detailed Description

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

Since
  QXmpp 1.7

## Member Enumeration Documentation

## Node

enum class QXmppMixConfigItem::Node

strong

PubSub node belonging to a MIX channel.

Enumerator
AllowedJids | JIDs allowed to participate in the channel. If this node does not exist, all JIDs are allowed to participate in the channel.
AvatarData | Channel's avatar data.
AvatarMetadata | Channel's avatar metadata.
BannedJids | JIDs banned from participating in the channel.
Configuration | Channel's onfiguration.
Information | Channel's information.
JidMap | Mappings from the partipants' IDs to their JIDs. This is needed for JID hidden channels.
Messages | Messages sent through the channel.
Participants | Users participating in the channel.
Presence | Presence of users participating in the channel.

## Role

enum class QXmppMixConfigItem::Role

strong

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.

Enumerator
Owner | Allowed to update the channel configuration. Specified by the channel configuration.
Administrator | Allowed to update the JIDs that are allowed to participate or banned from participating in a channel. Specified in the channel configuration.
Participant | Participant of the channel.
Allowed | User that is allowed to participate in the channel. Users are allowed if their JIDs do not match a JID in the node Node::BannedJids and either there is no node Node::AllowedJids or their JIDs match a JID in it.
Anyone | Any user, including users in the node BannedJids.
Nobody | No user, including owners and administrators.

## Member Function Documentation

## administratorJids()

QStringList QXmppMixConfigItem::administratorJids | ( |  | ) | const

Returns the bare JIDs of the channel administrators.

See also
  Role::Administrator

Returns
  the JIDs of the administrators

## allowedJidsSubscribeRole()

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.

Returns
  the role permitted to subscribe to the allowed JIDs

## avatarUpdateRole()

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

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

Returns
  the role permitted to update the avatar

## bannedJidsSubscribeRole()

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.

Returns
  the role permitted to subscribe to the banned JIDs

## channelDeletion()

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.

Returns
  the channel deletion date/time

## configurationReadRole()

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

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

Returns
  the role permitted to subscribe to and read the configuration

## formType()

QXmppDataForm::Type QXmppMixConfigItem::formType | ( |  | ) | const

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

Returns
  the data form's type

## informationSubscribeRole()

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

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

Returns
  the role permitted to subscribe to the information

## informationUpdateRole()

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

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

Returns
  the role permitted to update the information

## invitationsPermitted()

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

Returns whether 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
  QXmppMixInvitation

Returns
  whether channel participants are permitted to invite users

## isItem()

bool QXmppMixConfigItem::isItem | ( | const QDomElement & | element | ) |

static

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

## lastEditorJid()

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.

Returns
  the JID of the last editor

## messagesRetractRole()

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

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

Returns
  the role permitted to retract any message

## messagesSubscribeRole()

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

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

Returns
  the role permitted to subscribe to the messages

## nicknameRequired()

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

Returns whether participants need nicknames.

Returns
  whether nicknames are required

## nodes()

QXmppMixConfigItem::Nodes QXmppMixConfigItem::nodes | ( |  | ) | const

Returns which nodes are present for the channel.

Returns
  the present nodes

## onlyParticipantsPermittedToSubmitPresence()

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

Returns whether only participants are permitted to share their presence.

Returns
  whether only participants are permitted to share their presence

## ownerJids()

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
  Role::Owner

Returns
  the JIDs of the owners

## ownMessageRetractionPermitted()

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

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

Returns
  whether users are permitted to retract their own messages

## participantsSubscribeRole()

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

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

Returns
  the role permitted to subscribe to the participants

## presenceRequired()

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

Returns whether participants need to share their presence.

Returns
  whether presence is required

## presenceSubscribeRole()

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

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

Returns
  the role permitted to subscribe to the presence

## privateMessagesPermitted()

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

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

Returns
  whether participants are permitted to exchange private messages

## setAdministratorJids()

void QXmppMixConfigItem::setAdministratorJids | ( | const QStringList & | administratorJids | ) |

Sets the bare JIDs of the channel administrators.

See also
  administratorJids()

Parameters

  administratorJids | JIDs of the administrators

## setAllowedJidsSubscribeRole()

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

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

Only the following roles are valid:

- Role::Owner
- Role::Administrator
- Role::Participant
- Role::Allowed
- Role::Nobody

Parameters

  allowedJidsSubscribeRole | role permitted to subscribe to the allowed JIDs

## setAvatarUpdateRole()

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

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

Only the following roles are valid:

- Role::Owner
- Role::Administrator
- Role::Participant

Parameters

  avatarUpdateRole | role permitted to update the avatar

## setBannedJidsSubscribeRole()

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

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

Only the following roles are valid:

- Role::Owner
- Role::Administrator
- Role::Participant
- Role::Allowed
- Role::Nobody

Parameters

  bannedJidsSubscribeRole | role permitted to subscribe to the banned JIDs

## setChannelDeletion()

void QXmppMixConfigItem::setChannelDeletion | ( | const QDateTime & | channelDeletion | ) |

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

See also
  channelDeletion()

Parameters

  channelDeletion | channel deletion date/time

## setConfigurationReadRole()

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

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

Only the following roles are valid:

- Role::Owner
- Role::Administrator
- Role::Participant
- Role::Allowed
- Role::Nobody

Parameters

  configurationReadRole | role permitted to subscribe to and read the configuration

## setFormType()

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

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

Parameters

  formType | data form's type

## setInformationSubscribeRole()

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

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

Only the following roles are valid:

- Role::Participant
- Role::Allowed
- Role::Anyone

Parameters

  informationSubscribeRole | role permitted to subscribe to the information

## setInformationUpdateRole()

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

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

Only the following roles are valid:

- Role::Owner
- Role::Administrator
- Role::Participant

Parameters

  informationUpdateRole | role permitted to update the information

## setInvitationsPermitted()

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

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

See also
  invitationsPermitted()

Parameters

  invitationsPermitted | whether participants are permitted to invite users

## setLastEditorJid()

void QXmppMixConfigItem::setLastEditorJid | ( | const QString & | lastEditorJid | ) |

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

See also
  lastEditorJid()

Parameters

  lastEditorJid | last editor JID

## setMessagesRetractRole()

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

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

Only the following roles are valid:

- Role::Owner
- Role::Administrator
- Role::Nobody

Parameters

  messagesRetractRole | role permitted to retract any message

## setMessagesSubscribeRole()

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

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

Only the following roles are valid:

- Role::Participant
- Role::Allowed
- Role::Anyone

Parameters

  messagesSubscribeRole | role permitted to subscribe to the messages

## setNicknameRequired()

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

Sets whether participants need nicknames.

Parameters

  nicknameRequired | whether nicknames are required

## setNodes()

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

Sets which nodes are present for the channel.

Parameters

  nodes | present nodes

## setOnlyParticipantsPermittedToSubmitPresence()

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

Sets whether only participants are permitted to share their presence.

Parameters

  onlyParticipantsPermittedToSubmitPresence | whether only participants are permitted to share their presence

## setOwnerJids()

void QXmppMixConfigItem::setOwnerJids | ( | const QStringList & | ownerJids | ) |

Sets the bare JIDs of the channel owners.

See also
  ownerJids()

Parameters

  ownerJids | JIDs of the owners

## setOwnMessageRetractionPermitted()

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

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

Parameters

  ownMessageRetractionPermitted | whether users are permitted to retract their own messages

## setParticipantsSubscribeRole()

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

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

Parameters

  participantsSubscribeRole | role permitted to subscribe to the participants

## setPresenceRequired()

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

Sets whether participants need to share their presence.

Parameters

  presenceRequired | whether presence is required

## setPresenceSubscribeRole()

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

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

Only the following roles are valid:

- Role::Participant
- Role::Allowed
- Role::Anyone

Parameters

  presenceSubscribeRole | role permitted to subscribe to the presence

## setPrivateMessagesPermitted()

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

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

Parameters

  privateMessagesPermitted | whether participants are permitted to exchange private messages

The documentation for this class was generated from the following files:

- QXmppMixConfigItem.h
- QXmppMixItems.cpp