5#ifndef QXMPPMUCMANAGER_H
6#define QXMPPMUCMANAGER_H
8#include "QXmppClientExtension.h"
10#include "QXmppPresence.h"
15class QXmppMucManagerPrivate;
17class QXmppMucRoomPrivate;
44 Q_PROPERTY(QList<QXmppMucRoom *> rooms READ rooms NOTIFY roomAdded)
54 QList<QXmppMucRoom *> rooms()
const;
75 void _q_roomDestroyed(QObject *
object);
78 const std::unique_ptr<QXmppMucManagerPrivate> d;
92 Q_PROPERTY(
QXmppMucRoom::Actions allowedActions READ allowedActions NOTIFY allowedActionsChanged)
94 Q_PROPERTY(
bool isJoined READ isJoined NOTIFY isJoinedChanged)
96 Q_PROPERTY(QString jid READ jid CONSTANT)
98 Q_PROPERTY(QString name READ name NOTIFY nameChanged)
100 Q_PROPERTY(QString nickName READ nickName WRITE setNickName NOTIFY nickNameChanged)
102 Q_PROPERTY(QStringList participants READ participants NOTIFY participantsChanged)
104 Q_PROPERTY(QString password READ password WRITE setPassword)
106 Q_PROPERTY(QString subject READ subject WRITE setSubject NOTIFY subjectChanged)
113 ConfigurationAction = 2,
114 PermissionsAction = 4,
117 Q_DECLARE_FLAGS(Actions, Action)
123 Actions allowedActions()
const;
127 bool isJoined()
const;
139 QString name()
const;
143 QString nickName()
const;
144 void setNickName(
const QString &nickName);
146 Q_INVOKABLE QString participantFullJid(
const QString &jid)
const;
155 QStringList participants()
const;
159 QString password()
const;
160 void setPassword(
const QString &password);
164 QString subject()
const;
165 void setSubject(
const QString &subject);
181 void kicked(
const QString &jid,
const QString &reason);
184 void isJoinedChanged();
209 void participantsChanged();
219 bool ban(
const QString &jid,
const QString &reason);
221 bool kick(
const QString &jid,
const QString &reason);
222 bool leave(
const QString &message = QString());
223 bool requestConfiguration();
224 bool requestPermissions();
226 bool setPermissions(
const QList<QXmppMucItem> &permissions);
227 bool sendInvitation(
const QString &jid,
const QString &reason);
228 bool sendMessage(
const QString &text);
231 void _q_disconnected();
238 const std::unique_ptr<QXmppMucRoomPrivate> d;
242Q_DECLARE_OPERATORS_FOR_FLAGS(QXmppMucRoom::Actions)
The QXmppClientExtension class is the base class for QXmppClient extensions.
Definition QXmppClientExtension.h:33
virtual void setClient(QXmppClient *client)
Definition QXmppClientExtension.cpp:88
virtual QStringList discoveryFeatures() const
Definition QXmppClientExtension.cpp:22
virtual bool handleStanza(const QDomElement &stanza)
You need to implement this method to process incoming XMPP stanzas.
Definition QXmppClientExtension.cpp:51
The QXmppClient class is the main class for using QXmpp.
Definition QXmppClient.h:84
Definition QXmppDiscoveryIq.h:18
The QXmppMessage class represents an XMPP message.
Definition QXmppMessage.h:35
The QXmppMucManager class makes it possible to interact with multi-user chat rooms as defined by XEP-...
Definition QXmppMucManager.h:41
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.
The QXmppMucRoom class represents a multi-user chat room as defined by XEP-0045: Multi-User Chat.
Definition QXmppMucManager.h:87
void error(const QXmppStanza::Error &error)
This signal is emitted when an error is encountered.
void participantChanged(const QString &jid)
This signal is emitted when a participant changes.
void messageReceived(const QXmppMessage &message)
This signal is emitted when a message is received.
void participantRemoved(const QString &jid)
This signal is emitted when a participant leaves the room.
void configurationReceived(const QXmppDataForm &configuration)
This signal is emitted when the configuration form for the room is received.
void nickNameChanged(const QString &nickName)
This signal is emitted when your own nick name changes.
void subjectChanged(const QString &subject)
This signal is emitted when the room's subject changes.
void nameChanged(const QString &name)
This signal is emitted when the room's human-readable name changes.
void participantAdded(const QString &jid)
This signal is emitted when a participant joins the room.
void left()
This signal is emitted once you have left the room.
void joined()
This signal is emitted once you have joined the room.
void permissionsReceived(const QList< QXmppMucItem > &permissions)
This signal is emitted when the room's permissions are received.
void allowedActionsChanged(QXmppMucRoom::Actions actions)
This signal is emitted when the allowed actions change.
Action
This enum is used to describe chat room actions.
Definition QXmppMucManager.h:110
void kicked(const QString &jid, const QString &reason)
This signal is emitted if you get kicked from the room.
The QXmppPresence class represents an XMPP presence stanza.
Definition QXmppPresence.h:21
The Error class represents a stanza error.
Definition QXmppStanza.h:94