aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-11-06 16:40:36 -0600
committerTed Gould <ted@canonical.com>2009-11-06 16:40:36 -0600
commit3ea189ef44422c02eacfb25089968acaaff61ab1 (patch)
tree1d17e77e235b572eff0b310f1785478bd1a89fd8 /src
parent46443702113ebba13864a1452333a3bd25a9088e (diff)
downloadlibayatana-appindicator-3ea189ef44422c02eacfb25089968acaaff61ab1.tar.gz
libayatana-appindicator-3ea189ef44422c02eacfb25089968acaaff61ab1.tar.bz2
libayatana-appindicator-3ea189ef44422c02eacfb25089968acaaff61ab1.zip
Putting some signals on here.
Diffstat (limited to 'src')
-rw-r--r--src/custom-service-appstore.c28
-rw-r--r--src/custom-service-appstore.h3
2 files changed, 30 insertions, 1 deletions
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);