aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-10-28 15:52:48 -0500
committerTed Gould <ted@canonical.com>2009-10-28 15:52:48 -0500
commit714f372137fb2a9a992a6d0c23dc12a58b34c43d (patch)
treee38ff3562536ad66c44f15678b0c998685be8944
parent8903841582ea26b4987fbe04b5a5545d8d65f729 (diff)
downloadlibayatana-appindicator-714f372137fb2a9a992a6d0c23dc12a58b34c43d.tar.gz
libayatana-appindicator-714f372137fb2a9a992a6d0c23dc12a58b34c43d.tar.bz2
libayatana-appindicator-714f372137fb2a9a992a6d0c23dc12a58b34c43d.zip
Registering ourselves on dbus
-rw-r--r--src/custom-service-appstore.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/custom-service-appstore.c b/src/custom-service-appstore.c
index 7f88d46..1e61852 100644
--- a/src/custom-service-appstore.c
+++ b/src/custom-service-appstore.c
@@ -42,12 +42,29 @@ custom_service_appstore_class_init (CustomServiceAppstoreClass *klass)
object_class->dispose = custom_service_appstore_dispose;
object_class->finalize = custom_service_appstore_finalize;
+ 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,
+ &dbus_glib__custom_service_server_object_info);
+
return;
}
static void
custom_service_appstore_init (CustomServiceAppstore *self)
{
+
+ GError * error = NULL;
+ DBusGConnection * session_bus = dbus_g_bus_get(DBUS_BUS_SESSION, &error);
+ if (error != NULL) {
+ g_error("Unable to get session bus: %s", error->message);
+ g_error_free(error);
+ return;
+ }
+
+ dbus_g_connection_register_g_object(session_bus,
+ "/my/path",
+ G_OBJECT(self));
return;
}