File indexing completed on 2024-12-08 04:33:20

0001 /*
0002    SPDX-FileCopyrightText: 2023-2024 Laurent Montel <montel.org>
0003 
0004    SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include "libruqolacore_export.h"
0010 #include <QDebug>
0011 #include <QString>
0012 
0013 class LIBRUQOLACORE_EXPORT ModerationMessage
0014 {
0015 public:
0016     ModerationMessage();
0017     ~ModerationMessage();
0018 
0019     [[nodiscard]] QString moderationId() const;
0020     void setModerationId(const QString &newModerationId);
0021 
0022     void parse(const QJsonObject &obj);
0023 
0024     [[nodiscard]] QString roomId() const;
0025     void setRoomId(const QString &newRoomId);
0026 
0027     [[nodiscard]] QString roomName() const;
0028     void setRoomName(const QString &newRoomName);
0029 
0030     [[nodiscard]] QString roomFName() const;
0031     void setRoomFName(const QString &newRoomFName);
0032 
0033     [[nodiscard]] bool isEmpty() const;
0034 
0035 private:
0036     LIBRUQOLACORE_NO_EXPORT void parseRoom(const QJsonObject &roomObj);
0037     QString mModerationId;
0038     QString mRoomId;
0039     QString mRoomName;
0040     QString mRoomFName;
0041 };
0042 LIBRUQOLACORE_EXPORT QDebug operator<<(QDebug d, const ModerationMessage &t);