QXmpp::Muc::Item Class

class QXmpp::Muc::Item

A XEP-0045: Multi-User Chat room item carrying role and/or affiliation data. More...

Header: #include <QXmppMucData.h>
Since: QXmpp 1.16

Public Functions

QString actor() const
std::optional<QXmpp::Muc::Affiliation> affiliation() const
QString jid() const
QString nick() const
QString reason() const
std::optional<QXmpp::Muc::Role> role() const
void setActor(const QString &actor)
void setAffiliation(std::optional<QXmpp::Muc::Affiliation> affiliation)
void setJid(const QString &jid)
void setNick(const QString &nick)
void setReason(const QString &reason)
void setRole(std::optional<QXmpp::Muc::Role> role)

Detailed Description

Used as a typed, modern replacement for QXmppMucItem in the V2 API. Items are returned from QXmppMucRoomV2::requestAffiliationList() and can represent any combination of JID, nickname, role, affiliation, reason, and actor.

Member Function Documentation

QString Item::actor() const

Returns the JID of the actor who performed the action, or an empty string if not set.

See also setActor().

std::optional<QXmpp::Muc::Affiliation> Item::affiliation() const

Returns the affiliation, or std::nullopt if unspecified.

See also setAffiliation().

QString Item::jid() const

Returns the (bare) JID of the user, or an empty string if not set.

See also setJid().

QString Item::nick() const

Returns the nickname of the occupant, or an empty string if not set.

See also setNick().

QString Item::reason() const

Returns the human-readable reason, or an empty string if not set.

See also setReason().

std::optional<QXmpp::Muc::Role> Item::role() const

Returns the role, or std::nullopt if unspecified.

See also setRole().

void Item::setActor(const QString &actor)

Sets the JID of the actor.

See also actor().

void Item::setAffiliation(std::optional<QXmpp::Muc::Affiliation> affiliation)

Sets the affiliation.

See also affiliation().

void Item::setJid(const QString &jid)

Sets the (bare) jid of the user.

See also jid().

void Item::setNick(const QString &nick)

Sets the nick of the occupant.

See also nick().

void Item::setReason(const QString &reason)

Sets the human-readable reason.

See also reason().

void Item::setRole(std::optional<QXmpp::Muc::Role> role)

Sets the role.

See also role().