From 714f372137fb2a9a992a6d0c23dc12a58b34c43d Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 28 Oct 2009 15:52:48 -0500 Subject: Registering ourselves on dbus --- src/custom-service-appstore.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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; } -- cgit v1.2.3