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