QXmppMucVoiceRequest Class

Represents a voice request data form (muc#request) for moderated rooms. More...

Header: #include <QXmppMucVoiceRequest>
Since: QXmpp 1.16
Inherits: QXmppExtensibleDataFormBase

Public Functions

QString jid() const
QString nick() const
std::optional<bool> requestAllow() const
void setJid(const QString &jid)
void setNick(const QString &nick)
void setRequestAllow(std::optional<bool> allow)

Static Public Members

std::optional<QXmppMucVoiceRequest> fromDataForm(const QXmppDataForm &form)

Detailed Description

Used for both requesting and approving/denying voice in a moderated MUC room, as defined in XEP-0045: Multi-User Chat, §7.13 and §8.6.

Member Function Documentation

[static] std::optional<QXmppMucVoiceRequest> QXmppMucVoiceRequest::fromDataForm(const QXmppDataForm &form)

Tries to parse form into a QXmppMucVoiceRequest.

QString QXmppMucVoiceRequest::jid() const

Returns the full JID of the user requesting voice.

This is set by the room when forwarding the request to moderators.

See also setJid().

QString QXmppMucVoiceRequest::nick() const

Returns the room nickname of the user requesting voice.

This is set by the room when forwarding the request to moderators.

See also setNick().

std::optional<bool> QXmppMucVoiceRequest::requestAllow() const

Returns whether voice is granted or denied.

This is nullopt in incoming requests (before the moderator has responded). When the moderator calls QXmppMucRoomV2::answerVoiceRequest(), this is set to true (approve) or false (deny).

See also setRequestAllow().

void QXmppMucVoiceRequest::setJid(const QString &jid)

Sets the full jid of the user requesting voice.

See also jid().

void QXmppMucVoiceRequest::setNick(const QString &nick)

Sets the room nick of the user requesting voice.

See also nick().

void QXmppMucVoiceRequest::setRequestAllow(std::optional<bool> allow)

Sets whether the voice request is approved or denied via allow.

Pass true to approve or false to deny. This is set internally by QXmppMucRoomV2::answerVoiceRequest() before sending the response form.

See also requestAllow().