File indexing completed on 2024-11-10 12:55:18

0001 /*
0002    SPDX-FileCopyrightText: 2020-2024 Laurent Montel <montel@kde.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 
0012 class LIBRUQOLACORE_EXPORT MessageAttachmentField
0013 {
0014 public:
0015     MessageAttachmentField();
0016     ~MessageAttachmentField();
0017     [[nodiscard]] bool operator==(const MessageAttachmentField &other) const;
0018     [[nodiscard]] QString title() const;
0019     void setTitle(const QString &title);
0020 
0021     [[nodiscard]] QString value() const;
0022     void setValue(const QString &value);
0023 
0024     static QJsonObject serialize(const MessageAttachmentField &message);
0025     static MessageAttachmentField deserialize(const QJsonObject &o);
0026 
0027 private:
0028     QString mTitle;
0029     QString mValue;
0030 };
0031 Q_DECLARE_TYPEINFO(MessageAttachmentField, Q_MOVABLE_TYPE);
0032 LIBRUQOLACORE_EXPORT QDebug operator<<(QDebug d, const MessageAttachmentField &t);