Loading...
Searching...
No Matches
QXmppMixManager Class Reference
Managers
Inheritance diagram for QXmppMixManager:
[legend]
Collaboration diagram for QXmppMixManager:
[legend]

## Classes

struct | Service
struct | Subscription
struct | Participation

## Public Types

enum class | Support { Unknown , Unsupported , Supported }
using | Jid = QString
using | ChannelJid = QString
using | Nickname = QString
using | CreationResult = std::variant<ChannelJid, QXmppError>
using | ChannelJidResult = std::variant<QVector<ChannelJid>, QXmppError>
using | ChannelNodeResult = std::variant<QXmppMixConfigItem::Nodes, QXmppError>
using | ConfigurationResult = std::variant<QXmppMixConfigItem, QXmppError>
using | InformationResult = std::variant<QXmppMixInfoItem, QXmppError>
using | JoiningResult = std::variant<Participation, QXmppError>
using | NicknameResult = std::variant<Nickname, QXmppError>
using | InvitationResult = std::variant<QXmppMixInvitation, QXmppError>
using | SubscriptionResult = std::variant<Subscription, QXmppError>
using | JidResult = std::variant<QVector<Jid>, QXmppError>
using | ParticipantResult = std::variant<QVector<QXmppMixParticipantItem>, QXmppError>

## Public Member Functions

| QXmppMixManager ()
QStringList | discoveryFeatures () const override
Support | participantSupport () const
Q_SIGNAL void | participantSupportChanged ()
Support | messageArchivingSupport () const
Q_SIGNAL void | messageArchivingSupportChanged ()
QList< Service > | services () const
Q_SIGNAL void | servicesChanged ()
QXmppTask< CreationResult > | createChannel (const QString &serviceJid, const QString &channelId={})
QXmppTask< ChannelJidResult > | requestChannelJids (const QString &serviceJid)
QXmppTask< ChannelNodeResult > | requestChannelNodes (const QString &channelJid)
QXmppTask< ConfigurationResult > | requestChannelConfiguration (const QString &channelJid)
QXmppTask< QXmppClient::EmptyResult > | updateChannelConfiguration (const QString &channelJid, QXmppMixConfigItem configuration)
Q_SIGNAL void | channelConfigurationUpdated (const QString &channelJid, const QXmppMixConfigItem &configuration)
QXmppTask< InformationResult > | requestChannelInformation (const QString &channelJid)
QXmppTask< QXmppClient::EmptyResult > | updateChannelInformation (const QString &channelJid, QXmppMixInfoItem information)
Q_SIGNAL void | channelInformationUpdated (const QString &channelJid, const QXmppMixInfoItem &information)
QXmppTask< JoiningResult > | joinChannel (const QString &channelJid, const QString &nickname={}, QXmppMixConfigItem::Nodes nodes=~QXmppMixConfigItem::Nodes())
QXmppTask< JoiningResult > | joinChannel (const QXmppMixInvitation &invitation, const QString &nickname={}, QXmppMixConfigItem::Nodes nodes=~QXmppMixConfigItem::Nodes())
QXmppTask< NicknameResult > | updateNickname (const QString &channelJid, const QString &nickname)
QXmppTask< SubscriptionResult > | updateSubscriptions (const QString &channelJid, QXmppMixConfigItem::Nodes subscriptionAdditions=~QXmppMixConfigItem::Nodes(), QXmppMixConfigItem::Nodes subscriptionRemovals={})
QXmppTask< InvitationResult > | requestInvitation (const QString &channelJid, const QString &inviteeJid)
QXmppTask< JidResult > | requestAllowedJids (const QString &channelJid)
QXmppTask< QXmppClient::EmptyResult > | allowJid (const QString &channelJid, const QString &jid)
Q_SIGNAL void | jidAllowed (const QString &channelJid, const QString &jid)
Q_SIGNAL void | allJidsAllowed (const QString &channelJid)
QXmppTask< QXmppClient::EmptyResult > | disallowJid (const QString &channelJid, const QString &jid)
Q_SIGNAL void | jidDisallowed (const QString &channelJid, const QString &jid)
QXmppTask< QXmppClient::EmptyResult > | disallowAllJids (const QString &channelJid)
Q_SIGNAL void | allJidsDisallowed (const QString &channelJid)
QXmppTask< JidResult > | requestBannedJids (const QString &channelJid)
QXmppTask< QXmppClient::EmptyResult > | banJid (const QString &channelJid, const QString &jid)
Q_SIGNAL void | jidBanned (const QString &channelJid, const QString &jid)
QXmppTask< QXmppClient::EmptyResult > | unbanJid (const QString &channelJid, const QString &jid)
Q_SIGNAL void | jidUnbanned (const QString &channelJid, const QString &jid)
QXmppTask< QXmppClient::EmptyResult > | unbanAllJids (const QString &channelJid)
Q_SIGNAL void | allJidsUnbanned (const QString &channelJid)
QXmppTask< ParticipantResult > | requestParticipants (const QString &channelJid)
Q_SIGNAL void | participantReceived (const QString &channelJid, const QXmppMixParticipantItem &participant)
Q_SIGNAL void | participantLeft (const QString &channelJid, const QString &participantId)
QXmppTask< QXmppClient::EmptyResult > | leaveChannel (const QString &channelJid)
QXmppTask< QXmppClient::EmptyResult > | deleteChannel (const QString &channelJid)
Q_SIGNAL void | channelDeleted (const QString &channelJid)
Public Member Functions inherited from QXmppClientExtension
| QXmppClientExtension ()
virtual QList< QXmppDiscoIdentity > | discoveryIdentities () const
virtual bool | handleStanza (const QDomElement &stanza)
| You need to implement this method to process incoming XMPP stanzas.
virtual bool | handleStanza (const QDomElement &stanza, const std::optional< QXmppE2eeMetadata > &e2eeMetadata)
| You need to implement this method to process incoming XMPP stanzas.
Public Member Functions inherited from QXmppLoggable
| QXmppLoggable (QObject *parent=nullptr)
Q_SIGNAL void | setGauge (const QString &gauge, double value)
| Sets the given gauge to value.
Q_SIGNAL void | logMessage (QXmppLogger::MessageType type, const QString &msg)
| This signal is emitted to send logging messages.
Q_SIGNAL void | updateCounter (const QString &counter, qint64 amount=1)
| Updates the given counter by amount.
Public Member Functions inherited from QXmppPubSubEventHandler
virtual bool | handlePubSubEvent (const QDomElement &element, const QString &pubSubService, const QString &nodeName)=0

## Properties

Support | participantSupport
Support | messageArchivingSupport
QList< Service > | services

## Friends

class | tst_QXmppMixManager

## Additional Inherited Members

Protected Member Functions inherited from QXmppClientExtension
QXmppClient * | client () const
virtual void | setClient (QXmppClient *client)
virtual void | onRegistered (QXmppClient *client)
virtual void | onUnregistered (QXmppClient *client)
void | injectIq (const QDomElement &element, const std::optional< QXmppE2eeMetadata > &e2eeMetadata)
bool | injectMessage (QXmppMessage &&message)
Protected Member Functions inherited from QXmppLoggable
void | debug (const QString &message)
| Logs a debugging message.
void | info (const QString &message)
| Logs an informational message.
void | warning (const QString &message)
| Logs a warning message.
void | logReceived (const QString &message)
| Logs a received packet.
void | logSent (const QString &message)
| Logs a sent packet.

## Detailed Description

This class manages group chat communication as specified in the following XEPs:

- XEP-0369: Mediated Information eXchange (MIX)
- XEP-0405: Mediated Information eXchange (MIX): Participant Server Requirements
- XEP-0406: Mediated Information eXchange (MIX): MIX Administration
- XEP-0407: Mediated Information eXchange (MIX): Miscellaneous Capabilities

In order to use this manager, make sure to add all managers needed by this manager:

client->addNewExtension<QXmppDiscoveryManager>();
client->addNewExtension<QXmppPubSubManager>();
QXmppClientExtension::client
QXmppClient * client() const
Definition QXmppClientExtension.cpp:57
QXmppDiscoveryManager
The QXmppDiscoveryManager class makes it possible to discover information about other entities as def...
Definition QXmppDiscoveryManager.h:23
QXmppPubSubManager
The QXmppPubSubManager aims to provide publish-subscribe functionality as specified in XEP-0060: Publ...
Definition QXmppPubSubManager.h:21

Afterwards, you need to add this manager to the client:

auto *manager = client->addNewExtension<QXmppMixManager>();
QXmppMixManager::QXmppMixManager
QXmppMixManager()
Definition QXmppMixManager.cpp:412

If you want to be informed about updates of the channel (e.g., its configuration or allowed JIDs), make sure to subscribe to the corresponding nodes.

In order to send a message to a MIX channel, you have to set the type QXmppMessage::GroupChat.

Example for an unencrypted message:

message->setType(QXmppMessage::GroupChat);
message->setTo("group@mix.example.org")
client->send(std::move(message));

Example for an encrypted message decryptable by Alice and Bob:

message->setType(QXmppMessage::GroupChat);
message->setTo("group@mix.example.org")
QXmppSendStanzaParams params;
params.setEncryptionJids({ "alice@example.org", "bob@example.com" })
client->sendSensitive(std::move(message), params);
QXmppClient::sendSensitive
QXmppTask< QXmpp::SendResult > sendSensitive(QXmppStanza &&, const std::optional< QXmppSendStanzaParams > &={})
Definition QXmppClient.cpp:499
QXmppSendStanzaParams
Definition QXmppSendStanzaParams.h:18
QXmppSendStanzaParams::setEncryptionJids
void setEncryptionJids(QVector< QString >)
Definition QXmppSendStanzaParams.cpp:58

If you receive a message, you can check whether it contains an invitation to a MIX channel and use that invitation to join the channel:

if (auto invitation = message.mixInvitation()) {
manager->joinChannel(*invitation, nickname, nodes);
}

In order to invite someone to a MIX channel that allows the invitee to participate, you can create an invitation on your own.

That can be done in the following cases:

- Everybody is allowed to participate in the channel.
- The invitee is explicitly allowed to participate in the channel. That is particularly relevant if the channel does not support invitations received via requestInvitation() but the inviter is permitted to allow JIDs via allowJid(). In that case, the invitee's JID has to be allowed before the invitee tries to join the channel.

Invitations are sent as regular messages. They are not meant to be read by a human. Instead, the receiving client needs to support it. But you can add an appropriate text to the body of the invitation message to enable human users of clients that do not support that feature to join the channel manually. For example, you could add the JID of the channel or an XMPP URI to the body.

If the body (i.e., the invitation text) is empty, the message would neither be delivered to all clients via XEP-0280: Message Carbons nor delivered to clients which are currently offline via XEP-0313: Message Archive Management. To enforce that behavior, set a corresponding message type and message processing hint:

QXmppMixInvitation invitation;
invitation.setInviterJid(client->configuration().jidBare());
invitation.setInviteeJid(inviteeJid);
invitation.setChannelJid(channelJid);
QXmppMessage message;
message.setTo(inviteeJid);
message.setMixInvitation(invitation);
if (messageBody.isEmpty()) {
message.setType(QXmppMessage::Chat);
message.addHint(QXmppMessage::Store);
} else {
message.setBody(messageBody);
}
client()->sendSensitive(std::move(message));
QXmppMessage
The QXmppMessage class represents an XMPP message.
Definition QXmppMessage.h:64
QXmppMessage::addHint
void addHint(const Hint hint)
Definition QXmppMessage.cpp:875
QXmppMessage::setType
void setType(QXmppMessage::Type)
Sets the message's type.
Definition QXmppMessage.cpp:309
QXmppMessage::setBody
void setBody(const QString &)
Sets the message's body.
Definition QXmppMessage.cpp:267
QXmppMessage::setMixInvitation
void setMixInvitation(const std::optional< QXmppMixInvitation > &mixInvitation)
Definition QXmppMessage.cpp:1283
QXmppMessage::Store
@ Store
Do store the message.
Definition QXmppMessage.h:124
QXmppStanza::setTo
void setTo(const QString &)
Definition QXmppStanza.cpp:724

In order to invite someone to a MIX channel that does not yet allow the invitee to participate, you can request an invitation from the channel (if permitted to do so):

manager->requestInvitation().then(this, [](QXmppMixManager::InvitationResult &&result) mutable {
if (QXmpp::hasError(result)) {
// Handle the error.
} else {
auto invitation = QXmpp::getValue(std::move(result));
// Create and send the invitation.
}
});
QXmppMixManager::InvitationResult
std::variant< QXmppMixInvitation, QXmppError > InvitationResult
Definition QXmppMixManager.h:66
QXmpp::getValue
const T & getValue(const Result< T > &r)
Definition QXmppGlobal.h:232
QXmpp::hasError
bool hasError(const Result< T > &r)
Definition QXmppGlobal.h:224

Since
  QXmpp 1.7

## Member Typedef Documentation

## ChannelJid

using QXmppMixManager::ChannelJid = QString

JID of a MIX channel.

## ChannelJidResult

using QXmppMixManager::ChannelJidResult = std::variant<QVector<ChannelJid>, QXmppError>

Contains the JIDs of all discoverable MIX channels of a MIX service or a QXmppError if it failed.

## ChannelNodeResult

using QXmppMixManager::ChannelNodeResult = std::variant<QXmppMixConfigItem::Nodes, QXmppError>

Contains all nodes of the requested MIX channel that can be subscribed by the user or a QXmppError on failure.

## ConfigurationResult

using QXmppMixManager::ConfigurationResult = std::variant<QXmppMixConfigItem, QXmppError>

Contains the configuration of the MIX channel or a QXmppError on failure.

## CreationResult

using QXmppMixManager::CreationResult = std::variant<ChannelJid, QXmppError>

Contains the JID of the created MIX channel or a QXmppError on failure.

## InformationResult

using QXmppMixManager::InformationResult = std::variant<QXmppMixInfoItem, QXmppError>

Contains the information of the MIX channel or a QXmppError on failure.

## InvitationResult

using QXmppMixManager::InvitationResult = std::variant<QXmppMixInvitation, QXmppError>

Contains the requested invitation to a MIX channel or a QXmppError on failure.

## Jid

using QXmppMixManager::Jid = QString

JID of a user or domain.

## JidResult

using QXmppMixManager::JidResult = std::variant<QVector<Jid>, QXmppError>

Contains the JIDs of users or domains that are allowed to participate resp. banned from participating in a MIX channel or a QXmppError on failure.

## JoiningResult

using QXmppMixManager::JoiningResult = std::variant<Participation, QXmppError>

Contains the result of the joined MIX channel or a QXmppError on failure.

## Nickname

using QXmppMixManager::Nickname = QString

Nickname of the user within a MIX channel.

If the server modified the desired nickname, this is the modified one.

## NicknameResult

using QXmppMixManager::NicknameResult = std::variant<Nickname, QXmppError>

Contains the new nickname within a joined MIX channel or a QXmppError on failure.

## ParticipantResult

using QXmppMixManager::ParticipantResult = std::variant<QVector<QXmppMixParticipantItem>, QXmppError>

Contains the participants of a MIX channel or a QXmppError on failure.

## SubscriptionResult

using QXmppMixManager::SubscriptionResult = std::variant<Subscription, QXmppError>

Contains the result of the subscribed/unsubscribed nodes belonging to a MIX channel or a QXmppError on failure.

## Member Enumeration Documentation

## Support

enum class QXmppMixManager::Support

strong

Server support for a feature.

The information is cached until a new connection is established. That makes it possible to retrieve the latest state even while the client is disconnected.

Enumerator
Unknown | Whether the server supports the feature is not known. That means, there is no corresponding information from the server (yet).
Unsupported | The server does not support the feature.
Supported | The server supports the feature.

## Constructor & Destructor Documentation

## QXmppMixManager()

QXmppMixManager::QXmppMixManager | ( |  | ) |

Constructs a MIX manager.

## Member Function Documentation

## allJidsAllowed()

Q_SIGNAL void QXmppMixManager::allJidsAllowed | ( | const QString & | channelJid | ) |

Emitted when all JIDs are allowed to participate in a MIX channel.

That happens if QXmppMixConfigItem::Node::AllowedJids is removed from a channel.

Parameters

  channelJid | JID of the channel

## allJidsDisallowed()

Q_SIGNAL void QXmppMixManager::allJidsDisallowed | ( | const QString & | channelJid | ) |

Emitted when no JID is allowed to participate in a MIX channel anymore.

That happens if disallowAllJids() was successful or if another resource or user did that.

Parameters

  channelJid | JID of the channel

## allJidsUnbanned()

Q_SIGNAL void QXmppMixManager::allJidsUnbanned | ( | const QString & | channelJid | ) |

Emitted when all JIDs are unbanned from participating in a MIX channel.

That happens if unbanAllJids() was successful or if another resource or user did that. Furthermore, that happens if QXmppMixConfigItem::Node::BannedJids is removed from a channel.

Parameters

  channelJid | JID of the channel

## allowJid()

QXmppTask< QXmppClient::EmptyResult > QXmppMixManager::allowJid | ( | const QString & | channelJid,
|  | const QString & | jid )

Allows a JID to participate in a MIX channel.

The JID can specify a user (e.g., "alice@example.org") or a group of users (e.g., "example.org") for allowing all users to participate that have a JID containing the specified domain.

Allowing a JID is only needed if the channel does not allow anyone to participate. That is the case when QXmppMixConfigItem::Node::AllowedJids exists for the channel. Use requestChannelConfiguration() and QXmppMixConfigItem::nodes() to determine that. Call updateChannelConfiguration() and QXmppMixConfigItem::setNodes() to update it accordingly. In order to allow all JIDs to participate in a channel, you need to remove QXmppMixConfigItem::Node::AllowedJids from the channel's nodes.

Parameters

  channelJid | JID of the channel
  jid | bare JID to be allowed

Returns
  the result of the action

## banJid()

QXmppTask< QXmppClient::EmptyResult > QXmppMixManager::banJid | ( | const QString & | channelJid,
|  | const QString & | jid )

Bans a JID from participating in a MIX channel.

The JID can specify a user (e.g., "alice@example.org") or a group of users (e.g., "example.org") for banning all users that have a JID containing the specified domain.

Before calling this, make sure that QXmppMixConfigItem::Node::BannedJids exists for the channel. Use requestChannelConfiguration() and QXmppMixConfigItem::nodes() to determine that. Call updateChannelConfiguration() and QXmppMixConfigItem::setNodes() to update it accordingly.

Parameters

  channelJid | JID of the channel
  jid | bare JID to be banned

Returns
  the result of the action

## channelConfigurationUpdated()

Q_SIGNAL void QXmppMixManager::channelConfigurationUpdated | ( | const QString & | channelJid,
|  | const QXmppMixConfigItem & | configuration )

Emitted when the configuration of a MIX channel is updated.

Parameters

  channelJid | JID of the channel whose configuration is updated
  configuration | new channel configuration

## channelDeleted()

Q_SIGNAL void QXmppMixManager::channelDeleted | ( | const QString & | channelJid | ) |

Emitted when a MIX channel is deleted.

Parameters

  channelJid | JID of the deleted channel

## channelInformationUpdated()

Q_SIGNAL void QXmppMixManager::channelInformationUpdated | ( | const QString & | channelJid,
|  | const QXmppMixInfoItem & | information )

Emitted when the information of a MIX channel is updated.

Parameters

  channelJid | JID of the channel whose information is updated
  information | new channel information

## createChannel()

QXmppTask< QXmppMixManager::CreationResult > QXmppMixManager::createChannel | ( | const QString & | serviceJid,
|  | const QString & | channelId = {} )

Creates a MIX channel.

If no channel ID is passed, the channel is created with an ID provided by the MIX service. Furthermore, the channel cannot be discovered by anyone. A channel with the mentioned properties is called an "ad-hoc channel".

The channel ID is the local part of the channel JID. The MIX service JID is the domain part of the channel JID. Example: "channel" is the channel ID and "mix.example.org" the service JID of the channel JID "channel@mix.example.org".

Parameters

  serviceJid | JID of the service
  channelId | ID of the channel (default: provided by the server)

Returns
  the result of the action

## deleteChannel()

QXmppTask< QXmppClient::EmptyResult > QXmppMixManager::deleteChannel | ( | const QString & | channelJid | ) |

Deletes a MIX channel.

Parameters

  channelJid | JID of the channel to be deleted

Returns
  the result of the action

## disallowAllJids()

QXmppTask< QXmppClient::EmptyResult > QXmppMixManager::disallowAllJids | ( | const QString & | channelJid | ) |

Disallows all formerly allowed JIDs to participate in a MIX channel.

Only allowed JIDs can be disallowed via this method. In order to disallow other JIDs, use banJid().

Parameters

  channelJid | JID of the channel

Returns
  the result of the action

## disallowJid()

QXmppTask< QXmppClient::EmptyResult > QXmppMixManager::disallowJid | ( | const QString & | channelJid,
|  | const QString & | jid )

Disallows a formerly allowed JID to participate in a MIX channel.

Only allowed JIDs can be disallowed via this method. In order to disallow other JIDs, use banJid().

Parameters

  channelJid | JID of the channel
  jid | bare JID to be disallowed

Returns
  the result of the action

## discoveryFeatures()

QStringList QXmppMixManager::discoveryFeatures | ( |  | ) | const

override virtual

Returns the discovery features to add to the client.

Reimplemented from QXmppClientExtension.

## jidAllowed()

Q_SIGNAL void QXmppMixManager::jidAllowed | ( | const QString & | channelJid,
|  | const QString & | jid )

Emitted when a JID is allowed to participate in a MIX channel.

That happens if allowJid() was successful or if another resource or user did that.

Parameters

  channelJid | JID of the channel
  jid | allowed bare JID

## jidBanned()

Q_SIGNAL void QXmppMixManager::jidBanned | ( | const QString & | channelJid,
|  | const QString & | jid )

Emitted when a JID is banned from participating in a MIX channel.

That happens if banJid() was successful or if another resource or user did that.

Parameters

  channelJid | JID of the channel
  jid | banned bare JID

## jidDisallowed()

Q_SIGNAL void QXmppMixManager::jidDisallowed | ( | const QString & | channelJid,
|  | const QString & | jid )

Emitted when a fomerly allowed JID is disallowed to participate in a MIX channel anymore.

That happens if disallowJid() was successful or if another resource or user did that.

Parameters

  channelJid | JID of the channel
  jid | disallowed bare JID

## jidUnbanned()

Q_SIGNAL void QXmppMixManager::jidUnbanned | ( | const QString & | channelJid,
|  | const QString & | jid )

Emitted when a formerly banned JID is unbanned from participating in a MIX channel.

That happens if unbanJid() was successful or if another resource or user did that.

Parameters

  channelJid | JID of the channel
  jid | unbanned bare JID

## joinChannel() [1/2]

QXmppTask< QXmppMixManager::JoiningResult > QXmppMixManager::joinChannel | ( | const QString & | channelJid,
|  | const QString & | nickname = {},
|  | QXmppMixConfigItem::Nodes | nodes = ~QXmppMixConfigItem::Nodes() )

Joins a MIX channel to become a participant of it.

Parameters

  channelJid | JID of the channel being joined
  nickname | nickname of the user which is usually required by the server (default: no nickname is set)
  nodes | nodes of the channel that are subscribed to for receiving their updates (default: all nodes are subcribed to)

Returns
  the result of the action

## joinChannel() [2/2]

QXmppTask< QXmppMixManager::JoiningResult > QXmppMixManager::joinChannel | ( | const QXmppMixInvitation & | invitation,
|  | const QString & | nickname = {},
|  | QXmppMixConfigItem::Nodes | nodes = ~QXmppMixConfigItem::Nodes() )

Joins a MIX channel via an invitation to become a participant of it.

Parameters

  invitation | invitation to the channel
  nickname | nickname of the user which is usually required by the server (default: no nickname is set)
  nodes | nodes of the channel that are subscribed to for receiving their updates (default: all nodes are subcribed to)

Returns
  the result of the action

## leaveChannel()

QXmppTask< QXmppClient::EmptyResult > QXmppMixManager::leaveChannel | ( | const QString & | channelJid | ) |

Leaves a MIX channel.

Parameters

  channelJid | JID of the channel to be left

Returns
  the result of the action

## messageArchivingSupport()

QXmppMixManager::Support QXmppMixManager::messageArchivingSupport | ( |  | ) | const

Returns the server's support for archiving messages via XEP-0313: Message Archive Management of MIX channels the user participates in as specified in XEP-0405: Mediated Information eXchange (MIX): Participant Server Requirements.

Returns
  the server support for archiving MIX messages

## messageArchivingSupportChanged()

Q_SIGNAL void QXmppMixManager::messageArchivingSupportChanged | ( |  | ) |

Emitted when the server's support for archiving MIX messages changed.

## participantLeft()

Q_SIGNAL void QXmppMixManager::participantLeft | ( | const QString & | channelJid,
|  | const QString & | participantId )

Emitted when a participant left the MIX channel.

Parameters

  channelJid | JID of the channel that is left by the participant
  participantId | ID of the left participant

## participantReceived()

Q_SIGNAL void QXmppMixManager::participantReceived | ( | const QString & | channelJid,
|  | const QXmppMixParticipantItem & | participant )

Emitted when a user joined a MIX channel or a participant is updated.

Parameters

  channelJid | JID of the channel that the user joined or whose participant is updated
  participant | new or updated participant

## participantSupport()

QXmppMixManager::Support QXmppMixManager::participantSupport | ( |  | ) | const

Returns the server's support for MIX channel participants as specified in XEP-0405: Mediated Information eXchange (MIX): Participant Server Requirements.

If the server supports it, the server interacts between a client and a MIX channel that the user participates in. E.g., the server adds the MIX channel to the user's roster after joining it.

Returns
  the server support for MIX channel participants

## participantSupportChanged()

Q_SIGNAL void QXmppMixManager::participantSupportChanged | ( |  | ) |

Emitted when the server's support for MIX channel participants changed.

## requestAllowedJids()

QXmppTask< QXmppMixManager::JidResult > QXmppMixManager::requestAllowedJids | ( | const QString & | channelJid | ) |

Requests all JIDs which are allowed to participate in a MIX channel.

The JIDs can specify users (e.g., "alice@example.org") or groups of users (e.g., "example.org") for allowing all users to participate that have a JID containing the specified domain.

Parameters

  channelJid | JID of the channel

Returns
  the result of the action

## requestBannedJids()

QXmppTask< QXmppMixManager::JidResult > QXmppMixManager::requestBannedJids | ( | const QString & | channelJid | ) |

Requests all JIDs which are not allowed to participate in a MIX channel.

Parameters

  channelJid | JID of the corresponding channel

Returns
  the result of the action

## requestChannelConfiguration()

QXmppTask< QXmppMixManager::ConfigurationResult > QXmppMixManager::requestChannelConfiguration | ( | const QString & | channelJid | ) |

Requests the configuration of a MIX channel.

Parameters

  channelJid | JID of the channel whose configuration is requested

Returns
  the result of the action

## requestChannelInformation()

QXmppTask< QXmppMixManager::InformationResult > QXmppMixManager::requestChannelInformation | ( | const QString & | channelJid | ) |

Requests the information of a MIX channel.

Parameters

  channelJid | JID of the channel whose information is requested

Returns
  the result of the action

## requestChannelJids()

QXmppTask< QXmppMixManager::ChannelJidResult > QXmppMixManager::requestChannelJids | ( | const QString & | serviceJid | ) |

Requests the JIDs of all discoverable MIX channels of a MIX service.

Parameters

  serviceJid | JID of the service that provides the channels

Returns
  the result of the action

## requestChannelNodes()

QXmppTask< QXmppMixManager::ChannelNodeResult > QXmppMixManager::requestChannelNodes | ( | const QString & | channelJid | ) |

Requests all nodes of a MIX channel that can be subscribed by the user.

Parameters

  channelJid | JID of the channel

Returns
  the result of the action

## requestInvitation()

QXmppTask< QXmppMixManager::InvitationResult > QXmppMixManager::requestInvitation | ( | const QString & | channelJid,
|  | const QString & | inviteeJid )

Requests an invitation to a MIX channel that the invitee is not yet allowed to participate in.

The invitee can use the invitation to join the channel.

That invitation mechanism avoids storing allowed JIDs for an indefinite time if the corresponding user never joins the channel. By using this method, there is no need to allow the invitee to participate in the channel via allowJid().

This method can be used in the following cases:

- The inviter is an administrator of the channel.
- The inviter is a participant of the channel and the channel allows all participants to invite new users.

Parameters

  channelJid | JID of the channel that the invitee is invited to
  inviteeJid | JID of the invitee

Returns
  the result of the action

## requestParticipants()

QXmppTask< QXmppMixManager::ParticipantResult > QXmppMixManager::requestParticipants | ( | const QString & | channelJid | ) |

Requests all participants of a MIX channel.

In the case of a channel that not everybody is allowed to participate in, the participants are a subset of the allowed JIDs.

Parameters

  channelJid | JID of the channel

Returns
  the result of the action

## services()

QList< QXmppMixManager::Service > QXmppMixManager::services | ( |  | ) | const

Returns the services providing MIX on the own server.

Such services provide MIX channels and their nodes. It interacts directly with clients or with their servers.

Returns
  the provided MIX services

## servicesChanged()

Q_SIGNAL void QXmppMixManager::servicesChanged | ( |  | ) |

Emitted when the services providing MIX on the own server changed.

## unbanAllJids()

QXmppTask< QXmppClient::EmptyResult > QXmppMixManager::unbanAllJids | ( | const QString & | channelJid | ) |

Unbans all formerly banned JIDs from participating in a MIX channel.

Parameters

  channelJid | JID of the channel

Returns
  the result of the action

## unbanJid()

QXmppTask< QXmppClient::EmptyResult > QXmppMixManager::unbanJid | ( | const QString & | channelJid,
|  | const QString & | jid )

Unbans a formerly banned JID from participating in a MIX channel.

Parameters

  channelJid | JID of the channel
  jid | bare JID to be unbanned

Returns
  the result of the action

## updateChannelConfiguration()

QXmppTask< QXmppClient::EmptyResult > QXmppMixManager::updateChannelConfiguration | ( | const QString & | channelJid,
|  | QXmppMixConfigItem | configuration )

Updates the configuration of a MIX channel.

In order to use this method, retrieve the current configuration via requestChannelConfiguration() first, change the desired attributes and pass the configuration to this method.

Parameters

  channelJid | JID of the channel whose configuration is to be updated
  configuration | new configuration of the channel

Returns
  the result of the action

## updateChannelInformation()

QXmppTask< QXmppClient::EmptyResult > QXmppMixManager::updateChannelInformation | ( | const QString & | channelJid,
|  | QXmppMixInfoItem | information )

Updates the information of a MIX channel.

In order to use this method, retrieve the current information via requestChannelInformation() first, change the desired attributes and pass the information to this method.

Parameters

  channelJid | JID of the channel whose information is to be updated
  information | new information of the channel

Returns
  the result of the action

## updateNickname()

QXmppTask< QXmppMixManager::NicknameResult > QXmppMixManager::updateNickname | ( | const QString & | channelJid,
|  | const QString & | nickname )

Updates the nickname within a channel.

If the update succeeded, the new nickname is returned which may differ from the requested one.

Parameters

  channelJid | JID of the channel
  nickname | nickname to be set

Returns
  the result of the action

## updateSubscriptions()

QXmppTask< QXmppMixManager::SubscriptionResult > QXmppMixManager::updateSubscriptions | ( | const QString & | channelJid,
|  | QXmppMixConfigItem::Nodes | subscriptionAdditions = ~QXmppMixConfigItem::Nodes(),
|  | QXmppMixConfigItem::Nodes | subscriptionRemovals = {} )

Updates the subscriptions to nodes of a MIX channel.

Parameters

  channelJid | JID of the channel
  subscriptionAdditions | nodes to subscribe to
  subscriptionRemovals | nodes to unsubscribe from

Returns
  the result of the action

## Property Documentation

## messageArchivingSupport

Support QXmppMixManager::messageArchivingSupport

read

See also
  QXmppMixManager::messageArchivingSupport()

## participantSupport

Support QXmppMixManager::participantSupport

read

See also
  QXmppMixManager::participantSupport()

## services

QList<Service> QXmppMixManager::services

read

See also
  QXmppMixManager::services()

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

- QXmppMixManager.h
- QXmppMixManager.cpp