QXmpp: QXmppMucManager Class Reference

QXmpp Version: 1.14.4

Loading...
Searching...
No Matches
QXmppMucManager Class Reference
Managers

The QXmppMucManager class makes it possible to interact with multi-user chat rooms as defined by XEP-0045: Multi-User Chat. More...

`#include <QXmppMucManager.h>`

Inheritance diagram for QXmppMucManager:

## Public Member Functions
| QXmppMucManager ()
QXmppMucRoom * | addRoom (const QString &roomJid)
QList< QXmppMucRoom * > | rooms () const
| Returns the list of managed rooms.
Q_SIGNAL void | invitationReceived (const QString &roomJid, const QString &inviter, const QString &reason)
| This signal is emitted when an invitation to a chat room is received.
Q_SIGNAL void | roomAdded (QXmppMucRoom *room)
| This signal is emitted when a new room is managed.
Public Member Functions inherited from QXmppClientExtension
| QXmppClientExtension ()
virtual QStringList | discoveryFeatures () const
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.

## Properties
QList< QXmppMucRoom * > | rooms
| List of joined MUC rooms.

## 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

The QXmppMucManager class makes it possible to interact with multi-user chat rooms as defined by XEP-0045: Multi-User Chat.

To make use of this manager, you need to instantiate it and load it into the QXmppClient instance as follows:

QXmppMucManager *manager = new QXmppMucManager;
client->addExtension(manager);
QXmppClientExtension::client
QXmppClient * client() const
Definition QXmppClientExtension.cpp:57
QXmppMucManager::QXmppMucManager
QXmppMucManager()
Definition QXmppMucManager.cpp:47

You can then join a room as follows:

QXmppMucRoom *room = manager->addRoom("room@conference.example.com");
room->setNickName("mynick");
room->join();
QXmppMucManager::addRoom
QXmppMucRoom * addRoom(const QString &roomJid)
Definition QXmppMucManager.cpp:58
QXmppMucRoom
The QXmppMucRoom class represents a multi-user chat room as defined by XEP-0045: Multi-User Chat.
Definition QXmppMucManager.h:90
QXmppMucRoom::setNickName
void setNickName(const QString &nickName)
Definition QXmppMucManager.cpp:340
QXmppMucRoom::join
Q_SLOT bool join()
Definition QXmppMucManager.cpp:234

Note
  This manager is going to be replaced with the QXmppMucManagerV2 in the future.

## Constructor & Destructor Documentation

## ◆ QXmppMucManager()

QXmppMucManager::QXmppMucManager | ( |  | ) |

Constructs a new QXmppMucManager.

## Member Function Documentation

## ◆ addRoom()

QXmppMucRoom * QXmppMucManager::addRoom | ( | const QString & | roomJid | ) |

Adds the given chat room to the set of managed rooms.

Parameters

  roomJid |

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

- QXmppMucManager.h
- QXmppMucManager.cpp