KNotifications

knotificationpermission.h
1/*
2 SPDX-FileCopyrightText: 2023 Volker Krause <vkrause@kde.org>
3 SPDX-License-Identifier: LGPL-2.0-or-later
4*/
5
6#ifndef KNOTIFICATIONPERMISSION_H
7#define KNOTIFICATIONPERMISSION_H
8
9#include <knotifications_export.h>
10
11#include <qnamespace.h>
12
13#include <functional>
14
15/** Check or request permissions to show notifications on platforms where
16 * that is necessary.
17 *
18 * @since 6.0
19 */
21{
22
23/** Check if the current application has permissions to show notifications. */
24KNOTIFICATIONS_EXPORT Qt::PermissionStatus checkPermission();
25
26/** Request notification permissions. */
27KNOTIFICATIONS_EXPORT void requestPermission(QObject *context, const std::function<void(Qt::PermissionStatus)> &callback);
28
29}
30
31#endif
Check or request permissions to show notifications on platforms where that is necessary.
KNOTIFICATIONS_EXPORT void requestPermission(QObject *context, const std::function< void(Qt::PermissionStatus)> &callback)
Request notification permissions.
KNOTIFICATIONS_EXPORT Qt::PermissionStatus checkPermission()
Check if the current application has permissions to show notifications.
PermissionStatus
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 29 2024 11:53:13 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.