aboutsummaryrefslogtreecommitdiff
path: root/libindicate/listener.c
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-01-15 10:39:51 -0600
committerTed Gould <ted@canonical.com>2009-01-15 10:39:51 -0600
commitccac9b84bae42b0ad622d282dc12a65c3f7c7b11 (patch)
tree5dcaeaabf4efae093f0c31cfb6ad8d57c00ef2b3 /libindicate/listener.c
parent48277fb0df0d455db8f1e953a591200fd650c202 (diff)
downloadlibayatana-indicator-ccac9b84bae42b0ad622d282dc12a65c3f7c7b11.tar.gz
libayatana-indicator-ccac9b84bae42b0ad622d282dc12a65c3f7c7b11.tar.bz2
libayatana-indicator-ccac9b84bae42b0ad622d282dc12a65c3f7c7b11.zip
Adding in the base object for the listener.
Diffstat (limited to 'libindicate/listener.c')
-rw-r--r--libindicate/listener.c78
1 files changed, 78 insertions, 0 deletions
diff --git a/libindicate/listener.c b/libindicate/listener.c
new file mode 100644
index 0000000..3b082d7
--- /dev/null
+++ b/libindicate/listener.c
@@ -0,0 +1,78 @@
+
+#include "listener.h"
+
+/* Errors */
+enum {
+ LAST_ERROR
+};
+
+/* Signals */
+enum {
+ INDICATOR_ADDED,
+ INDICATOR_REMOVED,
+ INDICATOR_MODIFIED,
+ SERVER_ADDED,
+ SERVER_REMOVED,
+ LAST_SIGNAL
+};
+
+static guint signals[LAST_SIGNAL] = { 0 };
+
+G_DEFINE_TYPE (IndicateListener, indicate_listener, G_TYPE_OBJECT);
+
+/* Prototypes */
+static void indicate_listener_finalize (GObject * obj);
+
+/* Code */
+static void
+indicate_listener_class_init (IndicateListenerClass * class)
+{
+ g_debug("Listener Class Initialized");
+ GObjectClass * gobj;
+ gobj = G_OBJECT_CLASS(class);
+
+ gobj->finalize = indicate_listener_finalize;
+
+/* TODO, I need new marshallers here, bah humbug
+ signals[INDICATOR_ADDED] = g_signal_new("indicator-added",
+ G_TYPE_FROM_CLASS (class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (IndicateListenerClass, indicator_added),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__POINTER_POINTER_POINTER,
+ G_TYPE_NONE, 2, G_TYPE_OBJECT, G_TYPE_OBJECT, G_TYPE_STRING);
+ signals[INDICATOR_REMOVED] = g_signal_new("indicator-removed",
+ G_TYPE_FROM_CLASS (class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (IndicateServerClass, indicator_removed),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__UINT_POINTER,
+ G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_STRING);
+ signals[INDICATOR_MODIFIED] = g_signal_new("indicator-modified",
+ G_TYPE_FROM_CLASS (class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (IndicateServerClass, indicator_modified),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__UINT_POINTER,
+ G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_STRING);
+*/
+
+ return;
+}
+
+static void
+indicate_listener_init (IndicateListener * server)
+{
+ g_debug("Listener Object Initialized");
+
+ return;
+}
+
+static void
+indicate_listener_finalize (GObject * obj)
+{
+ IndicateListener * listener = INDICATE_LISTENER(obj);
+
+ return;
+}
+