blob: f44dd6204bcb7d1f8ae923896d89791f01d47d8b [file] [log] [blame]
Sébastien Blin1f915762020-08-03 13:27:42 -04001/*
2 * Copyright (C) 2017-2020 by Savoir-faire Linux
3 * Author: Alexandre Viau <alexandre.viau@savoirfairelinux.com>
4 * Author: Sébastien Blin <sebastien.blin@savoirfairelinux.com>
5 * Author: Hugo Lefeuvre <hugo.lefeuvre@savoirfairelinux.com>
6 * Author: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 3 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <https://www.gnu.org/licenses/>.
20 */
21
22#pragma once
23
24#include <QFile>
25#include <QJsonArray>
26#include <QJsonDocument>
27#include <QJsonObject>
28
29#include "api/conversationmodel.h"
30
31QJsonObject buildInteractionJson(lrc::api::ConversationModel &conversationModel,
32 const uint64_t msgId,
33 const lrc::api::interaction::Info &interaction);
34QString interactionToJsonInteractionObject(lrc::api::ConversationModel &conversationModel,
35 const uint64_t msgId,
36 const lrc::api::interaction::Info &interaction);
37QString interactionsToJsonArrayObject(
38 lrc::api::ConversationModel &conversationModel,
39 const std::map<uint64_t, lrc::api::interaction::Info> interactions);