aboutsummaryrefslogtreecommitdiff
path: root/src/notification.h
diff options
context:
space:
mode:
authorJason Conti <jason.conti@gmail.com>2011-05-13 14:10:30 -0400
committerJason Conti <jason.conti@gmail.com>2011-05-13 14:10:30 -0400
commitc64309f5a4bcbc62d4ab5810735be97e7abcf335 (patch)
treed5657401dcb384f7f3463d85f70b028810c9880e /src/notification.h
parent2d97be126749cc2b9d5571dc9724587333a66867 (diff)
downloadayatana-indicator-notifications-c64309f5a4bcbc62d4ab5810735be97e7abcf335.tar.gz
ayatana-indicator-notifications-c64309f5a4bcbc62d4ab5810735be97e7abcf335.tar.bz2
ayatana-indicator-notifications-c64309f5a4bcbc62d4ab5810735be97e7abcf335.zip
Importing dbus-spy and notification dbus objects to watch dbus for org.freedesktop.Notification.Notify messages (from test project).
Diffstat (limited to 'src/notification.h')
-rw-r--r--src/notification.h62
1 files changed, 62 insertions, 0 deletions
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 <glib.h>
+#include <glib-object.h>
+#include <gio/gio.h>
+
+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__ */