mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-04-17 20:08:28 +00:00
39 lines
939 B
C++
39 lines
939 B
C++
#ifndef WINDOWSNOTIFICATIONBACKEND_HPP
|
|
#define WINDOWSNOTIFICATIONBACKEND_HPP
|
|
|
|
#include "AbstractNotificationBackend.hpp"
|
|
#include <QDebug>
|
|
#include <QLocalServer>
|
|
#include <QLocalSocket>
|
|
#include <QObject>
|
|
#include <QString>
|
|
|
|
class NotificationBackend : public AbstractNotificationBackend {
|
|
|
|
Q_OBJECT
|
|
public:
|
|
struct PendingNotification {
|
|
NotificationType type;
|
|
QVariantMap data;
|
|
};
|
|
|
|
NotificationBackend(QObject *parent = nullptr);
|
|
~NotificationBackend() = default;
|
|
|
|
void sendCallNotification(QVariantMap data);
|
|
void sendMessageNotification(QVariantMap data);
|
|
// void sendMessageNotification(QVariantMap data);
|
|
|
|
void sendNotification(NotificationType type, QVariantMap data) override;
|
|
|
|
void flushPendingNotifications();
|
|
|
|
signals:
|
|
void toastButtonTriggered(const QString &arg);
|
|
void sessionLockedChanged(bool locked);
|
|
|
|
private:
|
|
QList<PendingNotification> mPendingNotifications;
|
|
};
|
|
|
|
#endif // WINDOWSNOTIFICATIONBACKEND_HPP
|