From c64309f5a4bcbc62d4ab5810735be97e7abcf335 Mon Sep 17 00:00:00 2001 From: Jason Conti Date: Fri, 13 May 2011 14:10:30 -0400 Subject: Importing dbus-spy and notification dbus objects to watch dbus for org.freedesktop.Notification.Notify messages (from test project). --- src/notification.h | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 src/notification.h (limited to 'src/notification.h') diff --git a/src/notification.h b/src/notification.h new file mode 100644 index 0000000..d31a76d --- /dev/null +++ b/src/notification.h @@ -0,0 +1,62 @@ +/* + * notification.h - A gobject subclass to represent a org.freedesktop.Notification.Notify message. + */ + +#ifndef __NOTIFICATION_H__ +#define __NOTIFICATION_H__ + +#include +#include +#include + +G_BEGIN_DECLS + +#define NOTIFICATION_TYPE (notification_get_type ()) +#define NOTIFICATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NOTIFICATION_TYPE, Notification)) +#define NOTIFICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NOTIFICATION_TYPE, NotificationClass)) +#define IS_NOTIFICATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NOTIFICATION_TYPE)) +#define IS_NOTIFICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NOTIFICATION_TYPE)) + +typedef struct _Notification Notification; +typedef struct _NotificationClass NotificationClass; +typedef struct _NotificationPrivate NotificationPrivate; + +struct _Notification +{ + GObject parent; + NotificationPrivate *priv; +}; + +struct _NotificationClass +{ + GObjectClass parent_class; +}; + +struct _NotificationPrivate { + gchar *app_name; + gsize app_name_length; + guint32 replaces_id; + gchar *app_icon; + gsize app_icon_length; + gchar *summary; + gsize summary_length; + gchar *body; + gsize body_length; + gint expire_timeout; +}; + +#define NOTIFICATION_GET_PRIVATE(o) \ + (G_TYPE_INSTANCE_GET_PRIVATE ((o), NOTIFICATION_TYPE, NotificationPrivate)) + +GType notification_get_type(void); +Notification *notification_new(void); +Notification *notification_new_from_dbus_message(GDBusMessage *); +gchar *notification_get_app_name(Notification *); +gchar *notification_get_app_icon(Notification *); +gchar *notification_get_summary(Notification *); +gchar *notification_get_body(Notification *); +void notification_print(Notification *); + +G_END_DECLS + +#endif /* __NOTIFICATION_H__ */ -- cgit v1.2.3