QXmpp Version: 1.10.0
|
The QXmppMixConfigItem class represents a PubSub item of a MIX channel containing its configuration as defined by XEP-0369: Mediated Information eXchange (MIX). More...
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) |
The QXmppMixConfigItem class represents a PubSub item of a MIX channel containing its configuration as defined by XEP-0369: Mediated Information eXchange (MIX).
|
strong |
PubSub node belonging to a MIX channel.
|
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. |
QStringList QXmppMixConfigItem::administratorJids | ( | ) | const |
Returns the bare JIDs of the channel administrators.
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.
std::optional< QXmppMixConfigItem::Role > QXmppMixConfigItem::avatarUpdateRole | ( | ) | const |
Returns the role that is permitted to update the channel's avatar.
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.
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.
std::optional< QXmppMixConfigItem::Role > QXmppMixConfigItem::configurationReadRole | ( | ) | const |
Returns the role that is permitted to subscribe to and read the channel's configuration.
QXmppDataForm::Type QXmppMixConfigItem::formType | ( | ) | const |
Returns the type of the data form that contains the channel's configuration.
std::optional< QXmppMixConfigItem::Role > QXmppMixConfigItem::informationSubscribeRole | ( | ) | const |
Returns the role that is permitted to subscribe to the channel's information.
std::optional< QXmppMixConfigItem::Role > QXmppMixConfigItem::informationUpdateRole | ( | ) | const |
Returns the role that is permitted to update the channel's information.
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.
|
static |
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.
std::optional< QXmppMixConfigItem::Role > QXmppMixConfigItem::messagesRetractRole | ( | ) | const |
Returns the role that is permitted to retract any message sent through the channel.
std::optional< QXmppMixConfigItem::Role > QXmppMixConfigItem::messagesSubscribeRole | ( | ) | const |
Returns the role that is permitted to subscribe to messages sent through the channel.
std::optional< bool > QXmppMixConfigItem::nicknameRequired | ( | ) | const |
Returns whether participants need nicknames.
QXmppMixConfigItem::Nodes QXmppMixConfigItem::nodes | ( | ) | const |
Returns which nodes are present for the channel.
std::optional< bool > QXmppMixConfigItem::onlyParticipantsPermittedToSubmitPresence | ( | ) | const |
Returns whether only participants are permitted to share their presence.
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.
std::optional< bool > QXmppMixConfigItem::ownMessageRetractionPermitted | ( | ) | const |
Returns whether users are permitted to retract their own messages sent through the channel.
std::optional< QXmppMixConfigItem::Role > QXmppMixConfigItem::participantsSubscribeRole | ( | ) | const |
Returns the role that is permitted to subscribe to the channel's participants.
std::optional< bool > QXmppMixConfigItem::presenceRequired | ( | ) | const |
Returns whether participants need to share their presence.
std::optional< QXmppMixConfigItem::Role > QXmppMixConfigItem::presenceSubscribeRole | ( | ) | const |
Returns the role that is permitted to subscribe to the channel's user' presence.
std::optional< bool > QXmppMixConfigItem::privateMessagesPermitted | ( | ) | const |
Returns whether participants are permitted to exchange private messages through the channel.
void QXmppMixConfigItem::setAdministratorJids | ( | const QStringList & | administratorJids | ) |
Sets the bare JIDs of the channel administrators.
administratorJids | JIDs of the administrators |
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:
allowedJidsSubscribeRole | role permitted to subscribe to the allowed JIDs |
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:
avatarUpdateRole | role permitted to update the avatar |
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:
bannedJidsSubscribeRole | role permitted to subscribe to the banned JIDs |
void QXmppMixConfigItem::setChannelDeletion | ( | const QDateTime & | channelDeletion | ) |
Sets the date and time when the channel is automatically deleted.
channelDeletion | channel deletion date/time |
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:
configurationReadRole | role permitted to subscribe to and read the configuration |
void QXmppMixConfigItem::setFormType | ( | QXmppDataForm::Type | formType | ) |
Sets the type of the data form that contains the channel's configuration.
formType | data form's type |
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:
informationSubscribeRole | role permitted to subscribe to the information |
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:
informationUpdateRole | role permitted to update the information |
void QXmppMixConfigItem::setInvitationsPermitted | ( | std::optional< bool > | invitationsPermitted | ) |
Sets whether participants are permitted to invite users to the channel.
invitationsPermitted | whether participants are permitted to invite users |
void QXmppMixConfigItem::setLastEditorJid | ( | const QString & | lastEditorJid | ) |
Sets the bare JID of the user that made the latest change to the channel's configuration.
lastEditorJid | last editor JID |
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:
messagesRetractRole | role permitted to retract any message |
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:
messagesSubscribeRole | role permitted to subscribe to the messages |
void QXmppMixConfigItem::setNicknameRequired | ( | std::optional< bool > | nicknameRequired | ) |
Sets whether participants need nicknames.
nicknameRequired | whether nicknames are required |
void QXmppMixConfigItem::setNodes | ( | Nodes | nodes | ) |
Sets which nodes are present for the channel.
nodes | present nodes |
void QXmppMixConfigItem::setOnlyParticipantsPermittedToSubmitPresence | ( | std::optional< bool > | onlyParticipantsPermittedToSubmitPresence | ) |
Sets whether only participants are permitted to share their presence.
onlyParticipantsPermittedToSubmitPresence | whether only participants are permitted to share their presence |
void QXmppMixConfigItem::setOwnerJids | ( | const QStringList & | ownerJids | ) |
Sets the bare JIDs of the channel owners.
ownerJids | JIDs of the owners |
void QXmppMixConfigItem::setOwnMessageRetractionPermitted | ( | std::optional< bool > | ownMessageRetractionPermitted | ) |
Sets whether users are permitted to retract their own messages sent through the channel.
ownMessageRetractionPermitted | whether users are permitted to retract their own messages |
void QXmppMixConfigItem::setParticipantsSubscribeRole | ( | std::optional< Role > | participantsSubscribeRole | ) |
Sets the role that is permitted to subscribe to the channel's participants.
participantsSubscribeRole | role permitted to subscribe to the participants |
void QXmppMixConfigItem::setPresenceRequired | ( | std::optional< bool > | presenceRequired | ) |
Sets whether participants need to share their presence.
presenceRequired | whether presence is required |
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:
presenceSubscribeRole | role permitted to subscribe to the presence |
void QXmppMixConfigItem::setPrivateMessagesPermitted | ( | std::optional< bool > | privateMessagesPermitted | ) |
Sets whether participants are permitted to exchange private messages through the channel.
privateMessagesPermitted | whether participants are permitted to exchange private messages |