aboutsummaryrefslogtreecommitdiff
path: root/src/dbus-spy.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/dbus-spy.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/dbus-spy.h')
-rw-r--r--src/dbus-spy.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/src/dbus-spy.h b/src/dbus-spy.h
new file mode 100644
index 0000000..1f9f79e
--- /dev/null
+++ b/src/dbus-spy.h
@@ -0,0 +1,53 @@
+/*
+ * dbus-spy.h - A gobject subclass to watch dbus for org.freedesktop.Notification.Notify messages.
+ */
+
+#ifndef __DBUS_SPY_H__
+#define __DBUS_SPY_H__
+
+#include <glib.h>
+#include <glib-object.h>
+#include <gio/gio.h>
+
+#include "notification.h"
+
+G_BEGIN_DECLS
+
+#define DBUS_SPY_TYPE (dbus_spy_get_type ())
+#define DBUS_SPY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DBUS_SPY_TYPE, DBusSpy))
+#define DBUS_SPY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DBUS_SPY_TYPE, DBusSpyClass))
+#define IS_DBUS_SPY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DBUS_SPY_TYPE))
+#define IS_DBUS_SPY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DBUS_SPY_TYPE))
+
+typedef struct _DBusSpy DBusSpy;
+typedef struct _DBusSpyClass DBusSpyClass;
+typedef struct _DBusSpyPrivate DBusSpyPrivate;
+
+struct _DBusSpy
+{
+ GObject parent;
+ DBusSpyPrivate *priv;
+};
+
+struct _DBusSpyClass
+{
+ GObjectClass parent_class;
+
+ void (* message_received) (DBusSpy *spy,
+ Notification *note);
+};
+
+struct _DBusSpyPrivate {
+ GDBusConnection *connection;
+ GCancellable *connection_cancel;
+};
+
+#define DBUS_SPY_GET_PRIVATE(o) \
+ (G_TYPE_INSTANCE_GET_PRIVATE ((o), DBUS_SPY_TYPE, DBusSpyPrivate))
+
+GType dbus_spy_get_type(void);
+DBusSpy* dbus_spy_new(void);
+
+G_END_DECLS
+
+#endif /* __DBUS_SPY_H__ */