QXmpp Version: 1.10.0
Signals | Public Member Functions | Properties | List of all members
QXmppMucManager Class Reference

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:
Inheritance graph
[legend]
Collaboration diagram for QXmppMucManager:
Collaboration graph
[legend]

Signals

void invitationReceived (const QString &roomJid, const QString &inviter, const QString &reason)
 This signal is emitted when an invitation to a chat room is received.
 
void roomAdded (QXmppMucRoom *room)
 This signal is emitted when a new room is managed.
 
- 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.
 

Public Member Functions

 QXmppMucManager ()
 
QXmppMucRoomaddRoom (const QString &roomJid)
 
QList< QXmppMucRoom * > rooms () const
 Returns the list of managed rooms.
 
- 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)
 

Properties

QList< QXmppMucRoom * > rooms
 List of joined MUC rooms.
 

Additional Inherited Members

- Protected Member Functions inherited from QXmppClientExtension
QXmppClientclient () 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)
 
void info (const QString &message)
 
void warning (const QString &message)
 
void logReceived (const QString &message)
 
void logSent (const QString &message)
 

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:

client->addExtension(manager);
QXmppClient * client() const
Definition: QXmppClientExtension.cpp:57
bool addExtension(QXmppClientExtension *extension)
Registers a new extension with the client.
Definition: QXmppClient.cpp:376
The QXmppMucManager class makes it possible to interact with multi-user chat rooms as defined by XEP-...
Definition: QXmppMucManager.h:42
QXmppMucManager()
Definition: QXmppMucManager.cpp:43

You can then join a room as follows:

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

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: