File indexing completed on 2024-05-12 16:25:58

0001 /*
0002    SPDX-FileCopyrightText: 2022-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 "videoconference/videoconference.h"
0011 #include <QJsonArray>
0012 #include <QObject>
0013 class RocketChatAccount;
0014 class LIBRUQOLACORE_EXPORT VideoConferenceManager : public QObject
0015 {
0016     Q_OBJECT
0017 public:
0018     explicit VideoConferenceManager(RocketChatAccount *account, QObject *parent = nullptr);
0019     ~VideoConferenceManager() override;
0020 
0021     void parseVideoConference(const QJsonArray &contents);
0022 
0023 Q_SIGNALS:
0024     void videoConferenceCallAccepted(const VideoConference &videoConference);
0025     void videoConferenceCallRejected(const VideoConference &videoConference);
0026     void videoConferenceCallConfirmed(const VideoConference &videoConference);
0027     void videoConferenceCallCanceled(const VideoConference &videoConference);
0028 
0029 private:
0030     LIBRUQOLACORE_NO_EXPORT void showNotification(const VideoConference &videoConference);
0031     QList<VideoConference> mVideoConferenceList;
0032     RocketChatAccount *const mRocketChatAccount;
0033 };