File indexing completed on 2024-07-14 04:52:59

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 #include "libruqola_private_export.h"
0009 #include "messages/message.h"
0010 #include <QJsonObject>
0011 #include <QVector>
0012 class RocketChatAccount;
0013 
0014 class LIBRUQOLACORE_TESTS_EXPORT ManageLoadHistoryParseSyncMessagesUtils
0015 {
0016 public:
0017     explicit ManageLoadHistoryParseSyncMessagesUtils(RocketChatAccount *account);
0018     ~ManageLoadHistoryParseSyncMessagesUtils();
0019 
0020     [[nodiscard]] QStringList deletedMessages() const;
0021     void setDeletedMessages(const QStringList &newDeletedMessages);
0022 
0023     [[nodiscard]] QVector<Message> updatesMessages() const;
0024     void setUpdatesMessages(const QVector<Message> &newUpdatesMessages);
0025 
0026     void parse(const QJsonObject &obj);
0027 
0028 private:
0029     QStringList mDeletedMessages;
0030     QVector<Message> mUpdatesMessages;
0031     RocketChatAccount *const mRocketChatAccount;
0032 };