/* SPDX-FileCopyrightText: 2018-2019 Kai Uwe Broulik SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL */ #pragma once #include "notification.h" #include "server.h" #include #include namespace NotificationManager { class Q_DECL_HIDDEN AbstractNotificationsModel::Private { public: explicit Private(AbstractNotificationsModel *q); ~Private(); void onNotificationAdded(const Notification ¬ification); void onNotificationReplaced(uint replacedId, const Notification ¬ification); void onNotificationRemoved(uint notificationId, Server::CloseReason reason); void setupNotificationTimeout(const Notification ¬ification); void removeRows(const QList &rows); AbstractNotificationsModel *q; QList notifications; // Fallback timeout to ensure all notifications expire eventually // otherwise when it isn't shown to the user and doesn't expire // an app might wait indefinitely for the notification to do so QHash notificationTimeouts; QList pendingRemovals; QTimer pendingRemovalTimer; QDateTime lastRead; QWindow *window = nullptr; }; }