QXmpp: QXmppMucForms.h Source File

QXmpp Version: 1.14.2

Loading...
Searching...
No Matches
QXmppMucForms.h
1// SPDX-FileCopyrightText: 2025 Linus Jahn <lnj@kaidan.im>
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4
5#ifndef QXMPPMUCFORMS_H
6#define QXMPPMUCFORMS_H
7
8#include "QXmppDataFormBase.h"
9
10struct QXmppMucRoomInfoPrivate;
11
12 class QXMPP_EXPORT QXmppMucRoomInfo : public QXmppExtensibleDataFormBase
13{
14public:
16 static constexpr QStringView DataFormType = QXmpp::Private::ns_muc_roominfo;
17 static std::optional<QXmppMucRoomInfo> fromDataForm(const QXmppDataForm &);
18
19 QXmppMucRoomInfo();
20 QXMPP_PRIVATE_DECLARE_RULE_OF_SIX(QXmppMucRoomInfo)
21
22 std::optional<bool> subjectChangeable() const;
23 void setSubjectChangeable(std::optional<bool> newSubjectChangeable);
24
25 QString subject() const;
26 void setSubject(const QString &newSubject);
27
28 std::optional<quint32> occupants() const;
29 void setOccupants(std::optional<quint32> newOccupants);
30
31 QString language() const;
32 void setLanguage(const QString &newLanguage);
33
34 QString description() const;
35 void setDescription(const QString &newDescription);
36
37 QStringList contactJids() const;
38 void setContactJids(const QStringList &newContactJids);
39
40 std::optional<quint32> maxHistoryFetch() const;
41 void setMaxHistoryFetch(std::optional<quint32> newMaxHistoryFetch);
42
43 QStringList avatarHashes() const;
44 void setAvatarHashes(const QStringList &hashes);
45
46protected:
47 QString formType() const override;
48 bool parseField(const QXmppDataForm::Field &) override;
49 void serializeForm(QXmppDataForm &) const override;
50
51private:
52 QSharedDataPointer<QXmppMucRoomInfoPrivate> d;
53};
54
55#endif // QXMPPMUCFORMS_H
QXmppDataForm::Field
Definition QXmppDataForm.h:93
QXmppDataFormBase::fromDataForm
static bool fromDataForm(const QXmppDataForm &form, QXmppDataFormBase &parent)
Definition QXmppDataFormBase.cpp:55
QXmppDataFormBase::formType
virtual QString formType() const =0
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