From ab660ab46dabfdd99fb4e5ee8641a305299852c8 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 6 Nov 2009 16:55:48 -0600 Subject: Creating a new object to be our watcher. Apparently we can't have two DBus interfaces on the same object :( --- src/custom-service-watcher.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 src/custom-service-watcher.h (limited to 'src/custom-service-watcher.h') diff --git a/src/custom-service-watcher.h b/src/custom-service-watcher.h new file mode 100644 index 0000000..3006175 --- /dev/null +++ b/src/custom-service-watcher.h @@ -0,0 +1,31 @@ +#ifndef __CUSTOM_SERVICE_WATCHER_H__ +#define __CUSTOM_SERVICE_WATCHER_H__ + +#include +#include + +G_BEGIN_DECLS + +#define CUSTOM_SERVICE_WATCHER_TYPE (custom_service_watcher_get_type ()) +#define CUSTOM_SERVICE_WATCHER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CUSTOM_SERVICE_WATCHER_TYPE, CustomServiceWatcher)) +#define CUSTOM_SERVICE_WATCHER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CUSTOM_SERVICE_WATCHER_TYPE, CustomServiceWatcherClass)) +#define IS_CUSTOM_SERVICE_WATCHER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CUSTOM_SERVICE_WATCHER_TYPE)) +#define IS_CUSTOM_SERVICE_WATCHER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CUSTOM_SERVICE_WATCHER_TYPE)) +#define CUSTOM_SERVICE_WATCHER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CUSTOM_SERVICE_WATCHER_TYPE, CustomServiceWatcherClass)) + +typedef struct _CustomServiceWatcher CustomServiceWatcher; +typedef struct _CustomServiceWatcherClass CustomServiceWatcherClass; + +struct _CustomServiceWatcherClass { + GObjectClass parent_class; +}; + +struct _CustomServiceWatcher { + GObject parent; +}; + +GType custom_service_watcher_get_type (void); + +G_END_DECLS + +#endif -- cgit v1.2.3 From ced0ec2c7e9e9138fb42422e662bf03deb957343 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 6 Nov 2009 17:13:47 -0600 Subject: Connecting the watcher and the appstore. And actually building one. We're on DBus now. --- src/custom-service-watcher.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/custom-service-watcher.h') diff --git a/src/custom-service-watcher.h b/src/custom-service-watcher.h index 3006175..c705fb5 100644 --- a/src/custom-service-watcher.h +++ b/src/custom-service-watcher.h @@ -4,6 +4,8 @@ #include #include +#include "custom-service-appstore.h" + G_BEGIN_DECLS #define CUSTOM_SERVICE_WATCHER_TYPE (custom_service_watcher_get_type ()) @@ -25,6 +27,7 @@ struct _CustomServiceWatcher { }; GType custom_service_watcher_get_type (void); +CustomServiceWatcher * custom_service_watcher_new (CustomServiceAppstore * appstore); G_END_DECLS -- cgit v1.2.3 From 591311a82b0ce6e0bc74439186bb22d5224d85c5 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 6 Nov 2009 20:41:18 -0600 Subject: Woot! Now we have signals in our watcher. Let's rock on! --- src/custom-service-watcher.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/custom-service-watcher.h') diff --git a/src/custom-service-watcher.h b/src/custom-service-watcher.h index c705fb5..1a037be 100644 --- a/src/custom-service-watcher.h +++ b/src/custom-service-watcher.h @@ -20,6 +20,12 @@ typedef struct _CustomServiceWatcherClass CustomServiceWatcherClass; struct _CustomServiceWatcherClass { GObjectClass parent_class; + + /* Signals */ + void (*service_registered) (CustomServiceWatcher * watcher, gchar * object, gpointer data); + void (*service_unregistered) (CustomServiceWatcher * watcher, gchar * object, gpointer data); + void (*notification_host_registered) (CustomServiceWatcher * watcher, gpointer data); + void (*notification_host_unregistered) (CustomServiceWatcher * watcher, gpointer data); }; struct _CustomServiceWatcher { -- cgit v1.2.3