QXmppMucRoom Class Reference

The QXmppMucRoom class represents a multi-user chat room as defined by XEP-0045: Multi-User Chat. More...

`#include <QXmppMucManager.h>`

List of all members.

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

bool | join ()
bool | kick (const QString &jid, const QString &reason)
bool | leave (const QString &message=QString())
bool | requestConfiguration ()
bool | requestPermissions ()
bool | setConfiguration (const QXmppDataForm &form)
bool | setPermissions (const QList< QXmppMucItem > &permissions)
bool | sendInvitation (const QString &jid, const QString &reason)
bool | sendMessage (const QString &text)

## Signals

void | allowedActionsChanged (QXmppMucRoom::Actions actions) const
| This signal is emitted when the allowed actions change.
void | configurationReceived (const QXmppDataForm &configuration)
| This signal is emitted when the configuration form for the room is received.
void | error (const QXmppStanza::Error &error)
| This signal is emitted when an error is encountered.
void | joined ()
| This signal is emitted once you have joined the room.
void | kicked (const QString &jid, const QString &reason)
| This signal is emitted if you get kicked from the room.
void | left ()
void | messageReceived (const QXmppMessage &message)
| This signal is emitted when a message is received.
void | nickNameChanged (const QString &nickName)
| This signal is emitted when your own nick name changes.
void | participantAdded (const QString &jid)
| This signal is emitted when a participant joins the room.
void | participantChanged (const QString &jid)
| This signal is emitted when a participant changes.
void | participantRemoved (const QString &jid)
| This signal is emitted when a participant leaves the room.
void | permissionsReceived (const QList< QXmppMucItem > &permissions)
void | subjectChanged (const QString &subject)
| This signal is emitted when the room's subject changes.

## Public Member Functions

| ~QXmppMucRoom ()
| Destroys a QXmppMucRoom.
Actions | allowedActions () const
bool | isJoined () const
QString | jid () const
QString | nickName () const
void | setNickName (const QString &nickName)
QXmppPresence | participantPresence (const QString &jid) const
QStringList | participants () const
QString | password () const
void | setPassword (const QString &password)
QString | subject () const
void | setSubject (const QString &subject)

## Properties

QXmppMucRoom::Actions | allowedActions
| Returns the actions you are allowed to perform on the room.
bool | isJoined
| Returns true if you are currently in the room.
QString | jid
| Returns the chat room's bare JID.
QString | nickName
| Returns your own nickname.
QStringList | participants
| Returns the list of participant JIDs.
QString | password
| Returns the chat room password.
QString | subject
| Returns the room's subject.

## Friends

class | QXmppMucManager

## Detailed Description

The QXmppMucRoom class represents a multi-user chat room as defined by XEP-0045: Multi-User Chat.

See also:
  QXmppMucManager

## Member Enumeration Documentation

enum QXmppMucRoom::Action

This enum is used to describe chat room actions.

Enumerator:

  NoAction | no action
  SubjectAction | change the room's subject
  ConfigurationAction | change the room's configuration
  PermissionsAction | change the room's permissions
  KickAction | kick users from the room

## Member Function Documentation

bool QXmppMucRoom::join | ( |  | ) | `[slot]`

Joins the chat room.

Returns:
  true if the request was sent, false otherwise

bool QXmppMucRoom::kick | ( | const QString & | jid,
|  | const QString & | reason
| ) |  | `[slot]`

Kicks the specified user from the chat room.

Parameters:

  jid |
  reason |

Returns:
  true if the request was sent, false otherwise

bool QXmppMucRoom::leave | ( | const QString & | message = `QString()` | ) | `[slot]`

Leaves the chat room.

Parameters:

  message | An optional message.

Returns:
  true if the request was sent, false otherwise

void QXmppMucRoom::left | ( |  | ) | `[signal]`

This signal is emitted once you have left the room.

QXmppPresence QXmppMucRoom::participantPresence | ( | const QString & | jid | ) | const

Returns the presence for the given participant.

Parameters:

  jid |

void QXmppMucRoom::permissionsReceived | ( | const QList< QXmppMucItem > & | permissions | ) | `[signal]`

This signal is emitted when the room's permissions are received.

bool QXmppMucRoom::requestConfiguration | ( |  | ) | `[slot]`

Request the configuration form for the chat room.

Returns:
  true if the request was sent, false otherwise

See also:
  configurationReceived()

bool QXmppMucRoom::requestPermissions | ( |  | ) | `[slot]`

Request the room's permissions.

Returns:
  true if the request was sent, false otherwise

See also:
  permissionsReceived()

bool QXmppMucRoom::sendInvitation | ( | const QString & | jid,
|  | const QString & | reason
| ) |  | `[slot]`

Invites a user to the chat room.

Parameters:

  jid |
  reason |

Returns:
  true if the request was sent, false otherwise

bool QXmppMucRoom::sendMessage | ( | const QString & | text | ) | `[slot]`

Sends a message to the room.

Returns:
  true if the request was sent, false otherwise

bool QXmppMucRoom::setConfiguration | ( | const QXmppDataForm & | form | ) | `[slot]`

Send the configuration form for the chat room.

Parameters:

  form |

Returns:
  true if the request was sent, false otherwise

void QXmppMucRoom::setNickName | ( | const QString & | nickName | ) |

Sets your own nickname.

You need to set your nickname before calling join().

Parameters:

  nickName |

void QXmppMucRoom::setPassword | ( | const QString & | password | ) |

Sets the chat room password.

Parameters:

  password |

bool QXmppMucRoom::setPermissions | ( | const QList< QXmppMucItem > & | permissions | ) | `[slot]`

Sets the room's permissions.

Parameters:

  permissions |

Returns:
  true if the request was sent, false otherwise

void QXmppMucRoom::setSubject | ( | const QString & | subject | ) |

Sets the chat room's subject.

Parameters:

  subject |

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

- QXmppMucManager.h
- QXmppMucManager.cpp

All Classes Functions Enumerations Enumerator Properties