QXmppMucRoomConfig Class

Represents the muc#roomconfig data form for configuring a MUC room. More...

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

Public Functions

QStringList admins() const
std::optional<QXmppMucRoomConfig::AllowPrivateMessages> allowPrivateMessages() const
std::optional<bool> canMembersInvite() const
std::optional<bool> canOccupantsChangeSubject() const
QString description() const
std::optional<bool> enableLogging() const
std::optional<bool> isMembersOnly() const
std::optional<bool> isModerated() const
std::optional<bool> isPasswordProtected() const
std::optional<bool> isPersistent() const
std::optional<bool> isPublic() const
QString language() const
std::optional<int> maxUsers() const
QString name() const
QStringList owners() const
QString password() const
void setAdmins(const QStringList &admins)
void setAllowPrivateMessages(std::optional<QXmppMucRoomConfig::AllowPrivateMessages> value)
void setCanMembersInvite(std::optional<bool> value)
void setCanOccupantsChangeSubject(std::optional<bool> value)
void setDescription(const QString &description)
void setEnableLogging(std::optional<bool> value)
void setLanguage(const QString &language)
void setMaxUsers(std::optional<int> value)
void setMembersOnly(std::optional<bool> value)
void setModerated(std::optional<bool> value)
void setName(const QString &name)
void setOwners(const QStringList &owners)
void setPassword(const QString &password)
void setPasswordProtected(std::optional<bool> value)
void setPersistent(std::optional<bool> value)
void setPublic(std::optional<bool> value)
void setWhoCanDiscoverJids(std::optional<QXmppMucRoomConfig::WhoCanDiscoverJids> value)
std::optional<QXmppMucRoomConfig::WhoCanDiscoverJids> whoCanDiscoverJids() const

Static Public Members

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

Detailed Description

Used by room owners to set room properties during creation (reserved-room flow, see QXmppMucManagerV2::createRoom()) and during subsequent reconfiguration (see QXmppMucRoomV2::requestRoomConfig() / QXmppMucRoomV2::submitRoomConfig()).

Member Function Documentation

QStringList QXmppMucRoomConfig::admins() const

Returns the list of room admin JIDs.

Corresponds to muc#roomconfig_roomadmins.

See also setAdmins().

std::optional<QXmppMucRoomConfig::AllowPrivateMessages> QXmppMucRoomConfig::allowPrivateMessages() const

Returns who is allowed to send private messages inside the room.

Corresponds to muc#roomconfig_allowpm.

See also setAllowPrivateMessages().

std::optional<bool> QXmppMucRoomConfig::canMembersInvite() const

Returns whether members are allowed to invite others to the room.

Corresponds to muc#roomconfig_allowinvites.

See also setCanMembersInvite().

std::optional<bool> QXmppMucRoomConfig::canOccupantsChangeSubject() const

Returns whether regular occupants are allowed to change the room subject.

Corresponds to muc#roomconfig_changesubject.

See also setCanOccupantsChangeSubject().

QString QXmppMucRoomConfig::description() const

Returns the short description of the room.

Corresponds to muc#roomconfig_roomdesc.

See also setDescription().

std::optional<bool> QXmppMucRoomConfig::enableLogging() const

Returns whether public logging of the room is enabled.

Corresponds to muc#roomconfig_enablelogging.

See also setEnableLogging().

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

Tries to parse form into a QXmppMucRoomConfig.

std::optional<bool> QXmppMucRoomConfig::isMembersOnly() const

Returns whether only members are allowed to enter the room.

Corresponds to muc#roomconfig_membersonly.

std::optional<bool> QXmppMucRoomConfig::isModerated() const

Returns whether only participants with voice may send messages to all occupants.

Corresponds to muc#roomconfig_moderatedroom.

std::optional<bool> QXmppMucRoomConfig::isPasswordProtected() const

Returns whether a password is required to enter the room.

Corresponds to muc#roomconfig_passwordprotectedroom.

std::optional<bool> QXmppMucRoomConfig::isPersistent() const

Returns whether the room persists after the last occupant exits.

Corresponds to muc#roomconfig_persistentroom. Returns nullopt if not included in the form.

std::optional<bool> QXmppMucRoomConfig::isPublic() const

Returns whether the room is publicly searchable via service discovery.

Corresponds to muc#roomconfig_publicroom. Returns nullopt if the server did not include this field in the configuration form.

QString QXmppMucRoomConfig::language() const

Returns the natural language for room discussions (BCP 47 language tag).

Corresponds to muc#roomconfig_lang.

See also setLanguage().

std::optional<int> QXmppMucRoomConfig::maxUsers() const

Returns the maximum number of occupants allowed in the room.

A value of 0 means unlimited. Corresponds to muc#roomconfig_maxusers. Returns nullopt if not included in the form.

See also setMaxUsers().

QString QXmppMucRoomConfig::name() const

Returns the natural-language name of the room.

Corresponds to muc#roomconfig_roomname.

See also setName().

QStringList QXmppMucRoomConfig::owners() const

Returns the list of room owner JIDs.

Corresponds to muc#roomconfig_roomowners.

See also setOwners().

QString QXmppMucRoomConfig::password() const

Returns the room password.

Only relevant when isPasswordProtected() is true. Corresponds to muc#roomconfig_roomsecret.

See also setPassword().

void QXmppMucRoomConfig::setAdmins(const QStringList &admins)

Sets the list of room admin JIDs to admins.

See also admins().

void QXmppMucRoomConfig::setAllowPrivateMessages(std::optional<QXmppMucRoomConfig::AllowPrivateMessages> value)

Sets who is allowed to send private messages inside the room to value.

See also allowPrivateMessages().

void QXmppMucRoomConfig::setCanMembersInvite(std::optional<bool> value)

Sets whether members are allowed to invite others to the room to value.

See also canMembersInvite().

void QXmppMucRoomConfig::setCanOccupantsChangeSubject(std::optional<bool> value)

Sets whether regular occupants are allowed to change the room subject to value.

See also canOccupantsChangeSubject().

void QXmppMucRoomConfig::setDescription(const QString &description)

Sets the short description of the room.

See also description().

void QXmppMucRoomConfig::setEnableLogging(std::optional<bool> value)

Sets whether public logging of the room is enabled to value.

See also enableLogging().

void QXmppMucRoomConfig::setLanguage(const QString &language)

Sets the natural language for room discussions (BCP 47 language tag).

See also language().

void QXmppMucRoomConfig::setMaxUsers(std::optional<int> value)

Sets the maximum number of occupants allowed in the room to value.

Use 0 for unlimited. Corresponds to muc#roomconfig_maxusers.

See also maxUsers().

void QXmppMucRoomConfig::setMembersOnly(std::optional<bool> value)

Sets whether only members are allowed to enter the room to value.

See also isMembersOnly().

void QXmppMucRoomConfig::setModerated(std::optional<bool> value)

Sets whether the room is moderated (only voice holders may send messages) to value.

See also isModerated().

void QXmppMucRoomConfig::setName(const QString &name)

Sets the natural-language name of the room.

See also name().

void QXmppMucRoomConfig::setOwners(const QStringList &owners)

Sets the list of room owner JIDs to owners.

See also owners().

void QXmppMucRoomConfig::setPassword(const QString &password)

Sets the room entry password.

See also password().

void QXmppMucRoomConfig::setPasswordProtected(std::optional<bool> value)

Sets whether a password is required to enter the room to value.

If set to true, also set password() to a non-empty string.

See also isPasswordProtected().

void QXmppMucRoomConfig::setPersistent(std::optional<bool> value)

Sets whether the room persists after the last occupant exits to value.

See also isPersistent().

void QXmppMucRoomConfig::setPublic(std::optional<bool> value)

Sets whether the room is publicly searchable via service discovery to value.

See also isPublic().

void QXmppMucRoomConfig::setWhoCanDiscoverJids(std::optional<QXmppMucRoomConfig::WhoCanDiscoverJids> value)

Sets which occupants may discover the real JIDs of other occupants to value.

See also whoCanDiscoverJids().

std::optional<QXmppMucRoomConfig::WhoCanDiscoverJids> QXmppMucRoomConfig::whoCanDiscoverJids() const

Returns which occupants may discover the real JIDs of other occupants.

Corresponds to muc#roomconfig_whois. WhoCanDiscoverJids::Moderators means the room is semi-anonymous; WhoCanDiscoverJids::Anyone means non-anonymous.

See also setWhoCanDiscoverJids().