2 * Copyright © 2013 Lars Uebernickel
4 * SPDX-License-Identifier: LGPL-2.1-or-later
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General
17 * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
19 * Authors: Lars Uebernickel <lars@uebernic.de>
22 #ifndef __G_NOTIFICATION_BACKEND_H__
23 #define __G_NOTIFICATION_BACKEND_H__
25 #include <gio/giotypes.h>
29 #define G_TYPE_NOTIFICATION_BACKEND (g_notification_backend_get_type ())
30 #define G_NOTIFICATION_BACKEND(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_NOTIFICATION_BACKEND, GNotificationBackend))
31 #define G_IS_NOTIFICATION_BACKEND(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_NOTIFICATION_BACKEND))
32 #define G_NOTIFICATION_BACKEND_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), G_TYPE_NOTIFICATION_BACKEND, GNotificationBackendClass))
33 #define G_NOTIFICATION_BACKEND_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_NOTIFICATION_BACKEND, GNotificationBackendClass))
35 #define G_NOTIFICATION_BACKEND_EXTENSION_POINT_NAME "gnotification-backend"
37 typedef struct _GNotificationBackend GNotificationBackend;
38 typedef struct _GNotificationBackendClass GNotificationBackendClass;
40 struct _GNotificationBackend
42 GObject parent_instance;
44 GApplication *application;
45 GDBusConnection *dbus_connection;
48 struct _GNotificationBackendClass
50 GObjectClass parent_class;
52 gboolean (*is_supported) (void);
54 void (*send_notification) (GNotificationBackend *backend,
56 GNotification *notification);
58 void (*withdraw_notification) (GNotificationBackend *backend,
62 GType g_notification_backend_get_type (void);
64 GNotificationBackend * g_notification_backend_new_default (GApplication *application);
66 void g_notification_backend_send_notification (GNotificationBackend *backend,
68 GNotification *notification);
70 void g_notification_backend_withdraw_notification (GNotificationBackend *backend,