Loading...
Searching...
No Matches
QXmppMucForms.h
// SPDX-FileCopyrightText: 2025 Linus Jahn <lnj@kaidan.im>
//
// SPDX-License-Identifier: LGPL-2.1-or-later
#ifndef QXMPPMUCFORMS_H
#define QXMPPMUCFORMS_H
#include "QXmppDataFormBase.h"
struct QXmppMucRoomInfoPrivate;
class QXMPP_EXPORT QXmppMucRoomInfo : public QXmppExtensibleDataFormBase
{
public:
static constexpr QStringView DataFormType = QXmpp::Private::ns_muc_roominfo;
static std::optional<QXmppMucRoomInfo> fromDataForm(const QXmppDataForm &);
QXmppMucRoomInfo();
QXMPP_PRIVATE_DECLARE_RULE_OF_SIX(QXmppMucRoomInfo)
std::optional<bool> subjectChangeable() const;
void setSubjectChangeable(std::optional<bool> newSubjectChangeable);
QString subject() const;
void setSubject(const QString &newSubject);
std::optional<quint32> occupants() const;
void setOccupants(std::optional<quint32> newOccupants);
QString language() const;
void setLanguage(const QString &newLanguage);
QString description() const;
void setDescription(const QString &newDescription);
QStringList contactJids() const;
void setContactJids(const QStringList &newContactJids);
std::optional<quint32> maxHistoryFetch() const;
void setMaxHistoryFetch(std::optional<quint32> newMaxHistoryFetch);
QStringList avatarHashes() const;
void setAvatarHashes(const QStringList &hashes);
protected:
QString formType() const override;
bool parseField(const QXmppDataForm::Field &) override;
void serializeForm(QXmppDataForm &) const override;
private:
QSharedDataPointer<QXmppMucRoomInfoPrivate> d;
};
#endif // QXMPPMUCFORMS_H
QXmppDataFormBase::fromDataForm
static bool fromDataForm(const QXmppDataForm &form, QXmppDataFormBase &parent)
Definition QXmppDataFormBase.cpp:55
QXmppDataFormBase::formType
virtual QString formType() const =0
QXmppDataForm::Field
Definition QXmppDataForm.h:93
QXmppDataForm
Definition QXmppDataForm.h:28
QXmppExtensibleDataFormBase::serializeForm
void serializeForm(QXmppDataForm &) const override
Definition QXmppDataFormBase.cpp:204
QXmppExtensibleDataFormBase::parseField
virtual bool parseField(const QXmppDataForm::Field &)
Definition QXmppDataFormBase.cpp:215
QXmppMucRoomInfo::DataFormType
static constexpr QStringView DataFormType
FORM_TYPE of this data form.
Definition QXmppMucForms.h:16
QXmppMucRoomInfo::subject
QString subject() const
Returns Current Discussion Topic.
Definition QXmppMucForms.cpp:162
QXmppMucRoomInfo::avatarHashes
QStringList avatarHashes() const
Returns hashes of the vCard-temp avatar of this room.
Definition QXmppMucForms.cpp:186
QXmppMucRoomInfo::setSubjectChangeable
void setSubjectChangeable(std::optional< bool > newSubjectChangeable)
Sets whether the room subject can be modified by participants.
Definition QXmppMucForms.cpp:180
QXmppMucRoomInfo::language
QString language() const
Returns Natural Language for Room Discussions.
Definition QXmppMucForms.cpp:138
QXmppMucRoomInfo::maxHistoryFetch
std::optional< quint32 > maxHistoryFetch() const
Returns Maximum Number of History Messages Returned by Room.
Definition QXmppMucForms.cpp:102
QXmppMucRoomInfo::setMaxHistoryFetch
void setMaxHistoryFetch(std::optional< quint32 > newMaxHistoryFetch)
Sets Maximum Number of History Messages Returned by Room.
Definition QXmppMucForms.cpp:108
QXmppMucRoomInfo::setSubject
void setSubject(const QString &newSubject)
Sets Current Discussion Topic.
Definition QXmppMucForms.cpp:168
QXmppMucRoomInfo::contactJids
QStringList contactJids() const
Returns Contact Addresses (normally, room owner or owners).
Definition QXmppMucForms.cpp:114
QXmppMucRoomInfo::subjectChangeable
std::optional< bool > subjectChangeable() const
Returns whether the room subject can be modified by participants.
Definition QXmppMucForms.cpp:174
QXmppMucRoomInfo::description
QString description() const
Returns Short Description of Room.
Definition QXmppMucForms.cpp:126
QXmppMucRoomInfo::setOccupants
void setOccupants(std::optional< quint32 > newOccupants)
Sets Current Number of Occupants in Room.
Definition QXmppMucForms.cpp:156
QXmppMucRoomInfo::setContactJids
void setContactJids(const QStringList &newContactJids)
Sets Contact Addresses (normally, room owner or owners).
Definition QXmppMucForms.cpp:120
QXmppMucRoomInfo::setLanguage
void setLanguage(const QString &newLanguage)
Sets Natural Language for Room Discussions.
Definition QXmppMucForms.cpp:144
QXmppMucRoomInfo::setDescription
void setDescription(const QString &newDescription)
Sets Short Description of Room.
Definition QXmppMucForms.cpp:132
QXmppMucRoomInfo::setAvatarHashes
void setAvatarHashes(const QStringList &hashes)
Sets hashes of the vCard-temp avatar of this room.
Definition QXmppMucForms.cpp:192
QXmppMucRoomInfo::occupants
std::optional< quint32 > occupants() const
Returns Current Number of Occupants in Room.
Definition QXmppMucForms.cpp:150