gio: Clean up trashinfo file if trashing fails
[glib.git] / gio / gnotificationbackend.h
blob178331dff54d85828c1b37189e530e187d437301
1 /*
2 * Copyright © 2013 Lars Uebernickel
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published
6 * by the Free Software Foundation; either version 2 of the licence or (at
7 * your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General
15 * Public License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
17 * Boston, MA 02111-1307, USA.
19 * Authors: Lars Uebernickel <lars@uebernic.de>
22 #ifndef __G_NOTIFICATION_BACKEND_H__
23 #define __G_NOTIFICATION_BACKEND_H__
25 #include <gio/giotypes.h>
27 G_BEGIN_DECLS
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,
55 const gchar *id,
56 GNotification *notification);
58 void (*withdraw_notification) (GNotificationBackend *backend,
59 const gchar *id);
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,
67 const gchar *id,
68 GNotification *notification);
70 void g_notification_backend_withdraw_notification (GNotificationBackend *backend,
71 const gchar *id);
73 G_END_DECLS
75 #endif