aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-11-06 16:55:48 -0600
committerTed Gould <ted@canonical.com>2009-11-06 16:55:48 -0600
commitab660ab46dabfdd99fb4e5ee8641a305299852c8 (patch)
treef030bbe275f1d7e73ece9360d05a818d6484d13b /src
parentc894aa50b044926d9f8fa30591fdb4f8aada36b5 (diff)
downloadayatana-indicator-application-ab660ab46dabfdd99fb4e5ee8641a305299852c8.tar.gz
ayatana-indicator-application-ab660ab46dabfdd99fb4e5ee8641a305299852c8.tar.bz2
ayatana-indicator-application-ab660ab46dabfdd99fb4e5ee8641a305299852c8.zip
Creating a new object to be our watcher. Apparently we can't have two DBus interfaces on the same object :(
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am2
-rw-r--r--src/custom-service-watcher.c56
-rw-r--r--src/custom-service-watcher.h31
3 files changed, 89 insertions, 0 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 2fb861c..fa0137f 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -37,6 +37,8 @@ indicator_custom_service_SOURCES = \
custom-service-marshal.h \
custom-service-marshal.c \
custom-service-server.h \
+ custom-service-watcher.h \
+ custom-service-watcher.c \
dbus-shared.h \
notification-item-client.h \
notification-watcher-server.h
diff --git a/src/custom-service-watcher.c b/src/custom-service-watcher.c
new file mode 100644
index 0000000..5899b83
--- /dev/null
+++ b/src/custom-service-watcher.c
@@ -0,0 +1,56 @@
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "custom-service-watcher.h"
+
+typedef struct _CustomServiceWatcherPrivate CustomServiceWatcherPrivate;
+struct _CustomServiceWatcherPrivate {
+ int dummy;
+};
+
+#define CUSTOM_SERVICE_WATCHER_GET_PRIVATE(o) \
+(G_TYPE_INSTANCE_GET_PRIVATE ((o), CUSTOM_SERVICE_WATCHER_TYPE, CustomServiceWatcherPrivate))
+
+static void custom_service_watcher_class_init (CustomServiceWatcherClass *klass);
+static void custom_service_watcher_init (CustomServiceWatcher *self);
+static void custom_service_watcher_dispose (GObject *object);
+static void custom_service_watcher_finalize (GObject *object);
+
+G_DEFINE_TYPE (CustomServiceWatcher, custom_service_watcher, G_TYPE_OBJECT);
+
+static void
+custom_service_watcher_class_init (CustomServiceWatcherClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (CustomServiceWatcherPrivate));
+
+ object_class->dispose = custom_service_watcher_dispose;
+ object_class->finalize = custom_service_watcher_finalize;
+
+ return;
+}
+
+static void
+custom_service_watcher_init (CustomServiceWatcher *self)
+{
+
+ return;
+}
+
+static void
+custom_service_watcher_dispose (GObject *object)
+{
+
+ G_OBJECT_CLASS (custom_service_watcher_parent_class)->dispose (object);
+ return;
+}
+
+static void
+custom_service_watcher_finalize (GObject *object)
+{
+
+ G_OBJECT_CLASS (custom_service_watcher_parent_class)->finalize (object);
+ return;
+}
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 <glib.h>
+#include <glib-object.h>
+
+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