From 3ea189ef44422c02eacfb25089968acaaff61ab1 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 6 Nov 2009 16:40:36 -0600 Subject: Putting some signals on here. --- src/custom-service-appstore.c | 28 +++++++++++++++++++++++++++- src/custom-service-appstore.h | 3 +++ 2 files changed, 30 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/custom-service-appstore.c b/src/custom-service-appstore.c index f8d34d0..a012fae 100644 --- a/src/custom-service-appstore.c +++ b/src/custom-service-appstore.c @@ -18,8 +18,8 @@ static gboolean _notification_watcher_server_is_notification_host_registered (Cu #include "custom-service-server.h" #include "notification-watcher-server.h" +/* Private Stuff */ typedef struct _CustomServiceAppstorePrivate CustomServiceAppstorePrivate; - struct _CustomServiceAppstorePrivate { int demo; }; @@ -27,6 +27,16 @@ struct _CustomServiceAppstorePrivate { #define CUSTOM_SERVICE_APPSTORE_GET_PRIVATE(o) \ (G_TYPE_INSTANCE_GET_PRIVATE ((o), CUSTOM_SERVICE_APPSTORE_TYPE, CustomServiceAppstorePrivate)) +/* Signals Stuff */ +enum { + APPLICATION_ADDED, + APPLICATION_REMOVED, + LAST_SIGNAL +}; + +static guint signals[LAST_SIGNAL] = { 0 }; + +/* GObject stuff */ static void custom_service_appstore_class_init (CustomServiceAppstoreClass *klass); static void custom_service_appstore_init (CustomServiceAppstore *self); static void custom_service_appstore_dispose (GObject *object); @@ -44,6 +54,22 @@ custom_service_appstore_class_init (CustomServiceAppstoreClass *klass) object_class->dispose = custom_service_appstore_dispose; object_class->finalize = custom_service_appstore_finalize; + signals[APPLICATION_ADDED] = g_signal_new ("application-added", + G_TYPE_FROM_CLASS(klass), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (CustomServiceAppstore, application_added), + NULL, NULL, + g_cclosure_marshal_VOID__POINTER, + G_TYPE_NONE, 4, G_TYPE_STRING, G_TYPE_INT, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_NONE); + signals[APPLICATION_REMOVED] = g_signal_new ("application-removed", + G_TYPE_FROM_CLASS(klass), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (CustomServiceAppstore, application_removed), + NULL, NULL, + g_cclosure_marshal_VOID__INT, + G_TYPE_NONE, 1, G_TYPE_INT, G_TYPE_NONE); + + dbus_g_object_type_install_info(CUSTOM_SERVICE_APPSTORE_TYPE, &dbus_glib__notification_watcher_server_object_info); dbus_g_object_type_install_info(CUSTOM_SERVICE_APPSTORE_TYPE, diff --git a/src/custom-service-appstore.h b/src/custom-service-appstore.h index 48c9da9..311158f 100644 --- a/src/custom-service-appstore.h +++ b/src/custom-service-appstore.h @@ -22,6 +22,9 @@ struct _CustomServiceAppstoreClass { struct _CustomServiceAppstore { GObject parent; + + void (*application_added) (CustomServiceAppstore * appstore, gchar *, gint, gchar *, gchar *, gpointer); + void (*application_removed) (CustomServiceAppstore * appstore, gint, gpointer); }; GType custom_service_appstore_get_type (void); -- cgit v1.2.3