5#ifndef QXMPPMUCMANAGER_H
6#define QXMPPMUCMANAGER_H
8#include "QXmppClientExtension.h"
10#include "QXmppPresence.h"
15class QXmppMucManagerPrivate;
17class QXmppMucRoomPrivate;
45 Q_PROPERTY(QList<QXmppMucRoom *> rooms READ rooms NOTIFY roomAdded)
55 QList<QXmppMucRoom *> rooms()
const;
77 void _q_roomDestroyed(QObject *
object);
80 const std::unique_ptr<QXmppMucManagerPrivate> d;
94 Q_PROPERTY(QXmppMucRoom::Actions allowedActions READ allowedActions NOTIFY allowedActionsChanged)
96 Q_PROPERTY(
bool isJoined READ isJoined NOTIFY isJoinedChanged)
98 Q_PROPERTY(QString jid READ jid CONSTANT)
100 Q_PROPERTY(QString name READ name NOTIFY nameChanged)
102 Q_PROPERTY(QString nickName READ nickName WRITE setNickName NOTIFY nickNameChanged)
104 Q_PROPERTY(QStringList participants READ participants NOTIFY participantsChanged)
106 Q_PROPERTY(QString password READ password WRITE setPassword)
108 Q_PROPERTY(QString subject READ subject WRITE setSubject NOTIFY subjectChanged)
115 ConfigurationAction = 2,
116 PermissionsAction = 4,
119 Q_DECLARE_FLAGS(Actions,
Action)
125 Actions allowedActions()
const;
129 bool isJoined()
const;
141 QString name()
const;
145 QString nickName()
const;
146 void setNickName(
const QString &nickName);
148 Q_INVOKABLE QString participantFullJid(
const QString &jid)
const;
157 QStringList participants()
const;
161 QString password()
const;
162 void setPassword(
const QString &password);
166 QString subject()
const;
167 void setSubject(
const QString &subject);
183 void kicked(
const QString &jid,
const QString &reason);
186 void isJoinedChanged();
211 void participantsChanged();
221 bool ban(
const QString &jid,
const QString &reason);
223 bool kick(
const QString &jid,
const QString &reason);
224 bool leave(
const QString &message = QString());
225 bool requestConfiguration();
226 bool requestPermissions();
228 bool setPermissions(
const QList<QXmppMucItem> &permissions);
229 bool sendInvitation(
const QString &jid,
const QString &reason);
230 bool sendMessage(
const QString &text);
233 void _q_disconnected();
240 const std::unique_ptr<QXmppMucRoomPrivate> d;
244Q_DECLARE_OPERATORS_FOR_FLAGS(QXmppMucRoom::Actions)
The QXmppClientExtension class is the base class for QXmppClient extensions.
Definition: QXmppClientExtension.h:32
virtual QStringList discoveryFeatures() const
Definition: QXmppClientExtension.cpp:22
virtual void onUnregistered(QXmppClient *client)
Definition: QXmppClientExtension.cpp:95
virtual void onRegistered(QXmppClient *client)
Definition: QXmppClientExtension.cpp:85
virtual bool handleStanza(const QDomElement &stanza)
You need to implement this method to process incoming XMPP stanzas.
Definition: client/compat/removed_api.cpp:26
Main class for starting and managing connections to XMPP servers.
Definition: QXmppClient.h:62
Definition: QXmppDiscoveryIq.h:18
Action
Definition: QXmppExternalService.h:27
The QXmppMessage class represents an XMPP message.
Definition: QXmppMessage.h:64
The QXmppMucManager class makes it possible to interact with multi-user chat rooms as defined by XEP-...
Definition: QXmppMucManager.h:42
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:89
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:112
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:22
The Error class represents a stanza error.
Definition: QXmppStanza.h:94