QXmpp Version: 1.7.0
Classes | Public Types | Public Member Functions | Properties | Friends | List of all members
QXmppMixManager Class Reference
Inheritance diagram for QXmppMixManager:
Inheritance graph
[legend]
Collaboration diagram for QXmppMixManager:
Collaboration graph
[legend]

Classes

struct  Participation
 
struct  Service
 
struct  Subscription
 

Public Types

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
 
bool supportedByServer () const
 
Q_SIGNAL void supportedByServerChanged ()
 
bool archivingSupportedByServer () const
 
Q_SIGNAL void archivingSupportedByServerChanged ()
 
QList< Serviceservices () const
 
Q_SIGNAL void servicesChanged ()
 
QXmppTask< CreationResultcreateChannel (const QString &serviceJid, const QString &channelId={})
 
QXmppTask< ChannelJidResultrequestChannelJids (const QString &serviceJid)
 
QXmppTask< ChannelNodeResultrequestChannelNodes (const QString &channelJid)
 
QXmppTask< ConfigurationResultrequestChannelConfiguration (const QString &channelJid)
 
QXmppTask< QXmppClient::EmptyResultupdateChannelConfiguration (const QString &channelJid, QXmppMixConfigItem configuration)
 
Q_SIGNAL void channelConfigurationUpdated (const QString &channelJid, const QXmppMixConfigItem &configuration)
 
QXmppTask< InformationResultrequestChannelInformation (const QString &channelJid)
 
QXmppTask< QXmppClient::EmptyResultupdateChannelInformation (const QString &channelJid, QXmppMixInfoItem information)
 
Q_SIGNAL void channelInformationUpdated (const QString &channelJid, const QXmppMixInfoItem &information)
 
QXmppTask< JoiningResultjoinChannel (const QString &channelJid, const QString &nickname={}, QXmppMixConfigItem::Nodes nodes=~QXmppMixConfigItem::Nodes())
 
QXmppTask< JoiningResultjoinChannel (const QXmppMixInvitation &invitation, const QString &nickname={}, QXmppMixConfigItem::Nodes nodes=~QXmppMixConfigItem::Nodes())
 
QXmppTask< NicknameResultupdateNickname (const QString &channelJid, const QString &nickname)
 
QXmppTask< SubscriptionResultupdateSubscriptions (const QString &channelJid, QXmppMixConfigItem::Nodes subscriptionAdditions=~QXmppMixConfigItem::Nodes(), QXmppMixConfigItem::Nodes subscriptionRemovals=~QXmppMixConfigItem::Nodes())
 
QXmppTask< InvitationResultrequestInvitation (const QString &channelJid, const QString &inviteeJid)
 
QXmppTask< JidResultrequestAllowedJids (const QString &channelJid)
 
QXmppTask< QXmppClient::EmptyResultallowJid (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::EmptyResultdisallowJid (const QString &channelJid, const QString &jid)
 
Q_SIGNAL void jidDisallowed (const QString &channelJid, const QString &jid)
 
QXmppTask< QXmppClient::EmptyResultdisallowAllJids (const QString &channelJid)
 
Q_SIGNAL void allJidsDisallowed (const QString &channelJid)
 
QXmppTask< JidResultrequestBannedJids (const QString &channelJid)
 
QXmppTask< QXmppClient::EmptyResultbanJid (const QString &channelJid, const QString &jid)
 
Q_SIGNAL void jidBanned (const QString &channelJid, const QString &jid)
 
QXmppTask< QXmppClient::EmptyResultunbanJid (const QString &channelJid, const QString &jid)
 
Q_SIGNAL void jidUnbanned (const QString &channelJid, const QString &jid)
 
QXmppTask< QXmppClient::EmptyResultunbanAllJids (const QString &channelJid)
 
Q_SIGNAL void allJidsUnbanned (const QString &channelJid)
 
QXmppTask< ParticipantResultrequestParticipants (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::EmptyResultleaveChannel (const QString &channelJid)
 
QXmppTask< QXmppClient::EmptyResultdeleteChannel (const QString &channelJid)
 
Q_SIGNAL void channelDeleted (const QString &channelJid)
 
- Public Member Functions inherited from QXmppClientExtension
 QXmppClientExtension ()
 
virtual QStringList discoveryFeatures () const
 
virtual QList< QXmppDiscoveryIq::IdentitydiscoveryIdentities () const
 
virtual bool handleStanza (const QDomElement &stanza)
 You need to implement this method to process incoming XMPP stanzas. More...
 
virtual bool handleStanza (const QDomElement &stanza, const std::optional< QXmppE2eeMetadata > &e2eeMetadata)
 You need to implement this method to process incoming XMPP stanzas. More...
 
- Public Member Functions inherited from QXmppLoggable
 QXmppLoggable (QObject *parent=nullptr)
 
- Public Member Functions inherited from QXmppPubSubEventHandler
virtual bool handlePubSubEvent (const QDomElement &element, const QString &pubSubService, const QString &nodeName)=0
 

Properties

bool supportedByServer
 
bool archivingSupportedByServer
 
QList< Serviceservices
 

Friends

class tst_QXmppMixManager
 

Additional Inherited Members

- Signals inherited from QXmppLoggable
void setGauge (const QString &gauge, double value)
 Sets the given gauge to value.
 
void logMessage (QXmppLogger::MessageType type, const QString &msg)
 This signal is emitted to send logging messages.
 
void updateCounter (const QString &counter, qint64 amount=1)
 Updates the given counter by amount.
 
- Protected Member Functions inherited from QXmppClientExtension
QXmppClientclient ()
 
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)
 
void info (const QString &message)
 
void warning (const QString &message)
 
void logReceived (const QString &message)
 
void logSent (const QString &message)
 

Detailed Description

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

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

QXmppClient * client()
Definition: QXmppClientExtension.cpp:57
T * addNewExtension(Args... args)
Definition: QXmppClient.h:140
The QXmppDiscoveryManager class makes it possible to discover information about other entities as def...
Definition: QXmppDiscoveryManager.h:26
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:

Definition: QXmppMixManager.h:20

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));
QXmppTask< QXmpp::SendResult > send(QXmppStanza &&, const std::optional< QXmppSendStanzaParams > &={})
Definition: QXmppClient.cpp:510

Example for an encrypted message decryptable by Alice and Bob:

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

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);
} else {
message.setBody(messageBody);
}
client()->sendSensitive(std::move(message));
QXmppConfiguration & configuration()
Returns a modifiable reference to the current configuration of QXmppClient.
Definition: QXmppClient.cpp:375
QString jidBare() const
Definition: QXmppConfiguration.cpp:223
The QXmppMessage class represents an XMPP message.
Definition: QXmppMessage.h:39
void addHint(const Hint hint)
Definition: QXmppMessage.cpp:830
void setType(QXmppMessage::Type)
Sets the message's type.
Definition: QXmppMessage.cpp:264
void setBody(const QString &)
Definition: QXmppMessage.cpp:222
void setMixInvitation(const std::optional< QXmppMixInvitation > &mixInvitation)
Definition: QXmppMessage.cpp:1202
@ Store
Do store the message.
Definition: QXmppMessage.h:99
void setTo(const QString &)
Definition: QXmppStanza.cpp:839

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 (auto *error = std::get_if<QXmppError>(&result)) {
// Handle the error.
} else {
auto invitation = std::get<QXmppMixInvitation>(std::move(result));
// Create and send the invitation.
}
});
std::variant< QXmppMixInvitation, QXmppError > InvitationResult
Definition: QXmppMixManager.h:59
Since
QXmpp 1.7

Member Typedef Documentation

◆ ChannelJid

JID of a MIX channel.

◆ ChannelJidResult

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

◆ ChannelNodeResult

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

◆ ConfigurationResult

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

◆ CreationResult

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

◆ InformationResult

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

◆ InvitationResult

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

◆ Jid

JID of a user or domain.

◆ JidResult

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

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

◆ Nickname

Nickname of the user within a MIX channel.

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

◆ NicknameResult

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

◆ ParticipantResult

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

◆ SubscriptionResult

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

Constructor & Destructor Documentation

◆ QXmppMixManager()

QXmppMixManager::QXmppMixManager ( )

Constructs a MIX manager.

Member Function Documentation

◆ allJidsAllowed()

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
channelJidJID of the channel

◆ allJidsDisallowed()

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
channelJidJID of the channel

◆ allJidsUnbanned()

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
channelJidJID 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 groups of users (e.g., "example.org") to let all users join which 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
channelJidJID of the channel
jidbare JID to be allowed
Returns
the result of the action

◆ archivingSupportedByServer()

bool QXmppMixManager::archivingSupportedByServer ( ) const

Returns whether the own server supports archiving messages via XEP-0313: Message Archive Management of MIX channels the user participates in.

Returns
whether MIX messages are archived

◆ archivingSupportedByServerChanged()

QXmppMixManager::archivingSupportedByServerChanged ( )

Emitted when the server enabled or disabled supporting archiving for MIX.

◆ 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 groups of users (e.g., "example.org") to ban all users which 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
channelJidJID of the channel
jidbare JID to be banned
Returns
the result of the action

◆ channelConfigurationUpdated()

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

Emitted when the configuration of a MIX channel is updated.

Parameters
channelJidJID of the channel whose configuration is updated
configurationnew channel configuration

◆ channelDeleted()

QXmppMixManager::channelDeleted ( const QString &  channelJid)

Emitted when a MIX channel is deleted.

Parameters
channelJidJID of the deleted channel

◆ channelInformationUpdated()

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

Emitted when the information of a MIX channel is updated.

Parameters
channelJidJID of the channel whose information is updated
informationnew 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
serviceJidJID of the service
channelIdID 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
channelJidJID 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
channelJidJID 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
channelJidJID of the channel
jidbare JID to be disallowed
Returns
the result of the action

◆ discoveryFeatures()

QStringList QXmppMixManager::discoveryFeatures ( ) const
overridevirtual

Returns the discovery features to add to the client.

Reimplemented from QXmppClientExtension.

◆ jidAllowed()

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
channelJidJID of the channel
jidallowed bare JID

◆ jidBanned()

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
channelJidJID of the channel
jidbanned bare JID

◆ jidDisallowed()

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
channelJidJID of the channel
jiddisallowed bare JID

◆ jidUnbanned()

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
channelJidJID of the channel
jidunbanned 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
channelJidJID of the channel being joined
nicknamenickname of the user which is usually required by the server (default: no nickname is set)
nodesnodes 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
invitationinvitation to the channel
nicknamenickname of the user which is usually required by the server (default: no nickname is set)
nodesnodes 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
channelJidJID of the channel to be left
Returns
the result of the action

◆ participantLeft()

QXmppMixManager::participantLeft ( const QString &  channelJid,
const QString &  participantId 
)

Emitted when a participant left the MIX channel.

Parameters
channelJidJID of the channel that is left by the participant
participantIdID of the left participant

◆ participantReceived()

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

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

Parameters
channelJidJID of the channel that the user joined or whose participant is updated
participantnew or updated participant

◆ 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") to let all users join which have a JID containing the specified domain. This is only relevant/used for private channels having a user-specified JID.

Parameters
channelJidJID 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
channelJidJID 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
channelJidJID 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
channelJidJID 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
serviceJidJID 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
channelJidJID 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
channelJidJID of the channel that the invitee is invited to
inviteeJidJID 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
channelJidJID 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()

QXmppMixManager::servicesChanged ( )

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

◆ supportedByServer()

bool QXmppMixManager::supportedByServer ( ) const

Returns whether the own server supports MIX clients.

In that case, the server interacts between a client and a MIX service. E.g., the server adds a MIX service to the client's roster after joining it and archives the messages sent through the channel while the client is offline.

Returns
whether MIX clients are supported

◆ supportedByServerChanged()

QXmppMixManager::supportedByServerChanged ( )

Emitted when the server enabled or disabled supporting MIX clients.

◆ unbanAllJids()

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

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

Parameters
channelJidJID 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
channelJidJID of the channel
jidbare 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
channelJidJID of the channel whose configuration is to be updated
configurationnew 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
channelJidJID of the channel whose information is to be updated
informationnew 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
channelJidJID of the channel
nicknamenickname 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 = ~QXmppMixConfigItem::Nodes() 
)

Updates the subscriptions to nodes of a MIX channel.

Parameters
channelJidJID of the channel
subscriptionAdditionsnodes to subscribe to
subscriptionRemovalsnodes to unsubscribe from
Returns
the result of the action

Property Documentation

◆ archivingSupportedByServer

QXmppMixManager::archivingSupportedByServer
read

◆ services

QXmppMixManager::services
read

◆ supportedByServer

QXmppMixManager::supportedByServer
read

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