aboutsummaryrefslogtreecommitdiff
path: root/libindicator/indicator-service.c
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-10-29 13:13:07 -0500
committerTed Gould <ted@canonical.com>2009-10-29 13:13:07 -0500
commit621a7ba6b53826e95011940b90d9bf8a684534b8 (patch)
treecf78110203be0a244f20de4207e7f0c655669b3e /libindicator/indicator-service.c
parent22a5b08a9ddb76888f580141617d67a319fbfad9 (diff)
downloadlibayatana-indicator-621a7ba6b53826e95011940b90d9bf8a684534b8.tar.gz
libayatana-indicator-621a7ba6b53826e95011940b90d9bf8a684534b8.tar.bz2
libayatana-indicator-621a7ba6b53826e95011940b90d9bf8a684534b8.zip
Adding the shutdown signal
Diffstat (limited to 'libindicator/indicator-service.c')
-rw-r--r--libindicator/indicator-service.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/libindicator/indicator-service.c b/libindicator/indicator-service.c
index 7a1fa8a..5a252f8 100644
--- a/libindicator/indicator-service.c
+++ b/libindicator/indicator-service.c
@@ -4,12 +4,21 @@
#include "indicator-service.h"
+/* Private Stuff */
typedef struct _IndicatorServicePrivate IndicatorServicePrivate;
struct _IndicatorServicePrivate {
int dummy;
};
+/* Signals Stuff */
+enum {
+ SHUTDOWN,
+ LAST_SIGNAL
+};
+
+static guint signals[LAST_SIGNAL] = { 0 };
+
#define INDICATOR_SERVICE_GET_PRIVATE(o) \
(G_TYPE_INSTANCE_GET_PRIVATE ((o), INDICATOR_SERVICE_TYPE, IndicatorServicePrivate))
@@ -30,6 +39,22 @@ indicator_service_class_init (IndicatorServiceClass *klass)
object_class->dispose = indicator_service_dispose;
object_class->finalize = indicator_service_finalize;
+ /* Signals */
+
+ /**
+ IndicatorService::shutdown:
+ @arg0: The #IndicatorService object
+
+ Signaled when the service should shutdown as no one
+ is listening anymore.
+ */
+ signals[SHUTDOWN] = g_signal_new (INDICATOR_SERVICE_SIGNAL_SHUTDOWN,
+ G_TYPE_FROM_CLASS(klass),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (IndicatorServiceClass, shutdown),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0, G_TYPE_NONE);
return;
}