Andreas Traczyk | 43c0823 | 2018-10-31 13:42:09 -0400 | [diff] [blame] | 1 | /*************************************************************************** |
Sébastien Blin | 68abac9 | 2019-01-02 17:41:31 -0500 | [diff] [blame] | 2 | * Copyright (C) 2017-2019 by Savoir-faire Linux * |
Andreas Traczyk | 43c0823 | 2018-10-31 13:42:09 -0400 | [diff] [blame] | 3 | * Author: Alexandre Viau <alexandre.viau@savoirfairelinux.com> * |
Sébastien Blin | 68abac9 | 2019-01-02 17:41:31 -0500 | [diff] [blame] | 4 | * Author: Sébastien Blin <sebastien.blin@savoirfairelinux.com> * |
Andreas Traczyk | 43c0823 | 2018-10-31 13:42:09 -0400 | [diff] [blame] | 5 | * 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 | |
| 32 | QJsonObject buildInteractionJson(lrc::api::ConversationModel& conversationModel, |
| 33 | const uint64_t msgId, |
| 34 | const lrc::api::interaction::Info& interaction); |
| 35 | QString interactionToJsonInteractionObject(lrc::api::ConversationModel& conversationModel, |
| 36 | const uint64_t msgId, |
| 37 | const lrc::api::interaction::Info& interaction); |
| 38 | QString interactionsToJsonArrayObject(lrc::api::ConversationModel& conversationModel, |
| 39 | const std::map<uint64_t, |
Sébastien Blin | 68abac9 | 2019-01-02 17:41:31 -0500 | [diff] [blame] | 40 | lrc::api::interaction::Info> interactions); |