|
QXmpp Version: 1.13.0
|
The QXmppMucRoom class represents a multi-user chat room as defined by XEP-0045: Multi-User Chat. More...
#include <QXmppMucManager.h>
Public Types | |
| enum | Action { NoAction = 0 , SubjectAction = 1 , ConfigurationAction = 2 , PermissionsAction = 4 , KickAction = 8 } |
| This enum is used to describe chat room actions. More... | |
Public Member Functions | |
| Actions | allowedActions () const |
| Returns the actions you are allowed to perform on the room. | |
| bool | isJoined () const |
| Returns true if you are currently in the room. | |
| QString | jid () const |
| Returns the chat room's bare JID. | |
| QString | name () const |
| QString | nickName () const |
| Returns your own nickname. | |
| void | setNickName (const QString &nickName) |
| Q_INVOKABLE QString | participantFullJid (const QString &jid) const |
| QXmppPresence | participantPresence (const QString &jid) const |
| QStringList | participants () const |
| QString | password () const |
| Returns the chat room password. | |
| void | setPassword (const QString &password) |
| QString | subject () const |
| Returns the room's subject. | |
| void | setSubject (const QString &subject) |
| Q_SIGNAL void | allowedActionsChanged (QXmppMucRoom::Actions actions) |
| This signal is emitted when the allowed actions change. | |
| Q_SIGNAL void | configurationReceived (const QXmppDataForm &configuration) |
| This signal is emitted when the configuration form for the room is received. | |
| Q_SIGNAL void | error (const QXmppStanza::Error &error) |
| This signal is emitted when an error is encountered. | |
| Q_SIGNAL void | joined () |
| This signal is emitted once you have joined the room. | |
| Q_SIGNAL void | kicked (const QString &jid, const QString &reason) |
| This signal is emitted if you get kicked from the room. | |
| Q_SIGNAL void | left () |
| This signal is emitted once you have left the room. | |
| Q_SIGNAL void | messageReceived (const QXmppMessage &message) |
| This signal is emitted when a message is received. | |
| Q_SIGNAL void | nameChanged (const QString &name) |
| This signal is emitted when the room's human-readable name changes. | |
| Q_SIGNAL void | nickNameChanged (const QString &nickName) |
| This signal is emitted when your own nick name changes. | |
| Q_SIGNAL void | participantAdded (const QString &jid) |
| This signal is emitted when a participant joins the room. | |
| Q_SIGNAL void | participantChanged (const QString &jid) |
| This signal is emitted when a participant changes. | |
| Q_SIGNAL void | participantRemoved (const QString &jid) |
| This signal is emitted when a participant leaves the room. | |
| Q_SIGNAL void | permissionsReceived (const QList< QXmppMucItem > &permissions) |
| This signal is emitted when the room's permissions are received. | |
| Q_SIGNAL void | subjectChanged (const QString &subject) |
| This signal is emitted when the room's subject changes. | |
| Q_SLOT bool | ban (const QString &jid, const QString &reason) |
| Q_SLOT bool | join () |
| Q_SLOT bool | kick (const QString &jid, const QString &reason) |
| Q_SLOT bool | leave (const QString &message=QString()) |
| Q_SLOT bool | requestConfiguration () |
| Q_SLOT bool | requestPermissions () |
| Q_SLOT bool | setConfiguration (const QXmppDataForm &form) |
| Q_SLOT bool | setPermissions (const QList< QXmppMucItem > &permissions) |
| Q_SLOT bool | sendInvitation (const QString &jid, const QString &reason) |
| Q_SLOT bool | sendMessage (const QString &text) |
Friends | |
| class | QXmppMucManager |
The QXmppMucRoom class represents a multi-user chat room as defined by XEP-0045: Multi-User Chat.
| enum QXmppMucRoom::Action |
| bool QXmppMucRoom::ban | ( | const QString & | jid, |
| const QString & | reason ) |
Bans the specified user from the chat room.
The specified jid is the Bare JID of the form "user@host".
| bool QXmppMucRoom::join | ( | ) |
Joins the chat room.
| bool QXmppMucRoom::kick | ( | const QString & | jid, |
| const QString & | reason ) |
Kicks the specified user from the chat room.
The specified jid is the Occupant JID of the form "room@service/nick".
| bool QXmppMucRoom::leave | ( | const QString & | message = QString() | ) |
Leaves the chat room.
| message | An optional message. |
| QString QXmppMucRoom::name | ( | ) | const |
Returns the chat room's human-readable name.
This name will only be available after the room has been joined.
| QString QXmppMucRoom::participantFullJid | ( | const QString & | jid | ) | const |
Returns the "Full JID" of the given participant.
The specified jid is the Occupant JID of the form "room@service/nick".
| QXmppPresence QXmppMucRoom::participantPresence | ( | const QString & | jid | ) | const |
Returns the presence for the given participant.
The specified jid is the Occupant JID of the form "room@service/nick".
| QStringList QXmppMucRoom::participants | ( | ) | const |
Returns the list of participant JIDs.
These JIDs are Occupant JIDs of the form "room@service/nick".
| bool QXmppMucRoom::requestConfiguration | ( | ) |
Request the configuration form for the chat room.
| bool QXmppMucRoom::requestPermissions | ( | ) |
Request the room's permissions.
| bool QXmppMucRoom::sendInvitation | ( | const QString & | jid, |
| const QString & | reason ) |
Invites a user to the chat room.
| jid | |
| reason |
| bool QXmppMucRoom::sendMessage | ( | const QString & | text | ) |
Sends a message to the room.
This is just a helper function, you can as well also send a message to the channel manually by setting the message type to 'groupchat' and addressing the JID of the MUC room.
| bool QXmppMucRoom::setConfiguration | ( | const QXmppDataForm & | form | ) |
Send the configuration form for the chat room.
| form |
| void QXmppMucRoom::setNickName | ( | const QString & | nickName | ) |
| void QXmppMucRoom::setPassword | ( | const QString & | password | ) |
Sets the chat room password.
| password |
| bool QXmppMucRoom::setPermissions | ( | const QList< QXmppMucItem > & | permissions | ) |
Sets the room's permissions.
| permissions |
| void QXmppMucRoom::setSubject | ( | const QString & | subject | ) |
Sets the chat room's subject.
| subject |