diff options
author | Ted Gould <ted@canonical.com> | 2009-10-28 15:52:48 -0500 |
---|---|---|
committer | Ted Gould <ted@canonical.com> | 2009-10-28 15:52:48 -0500 |
commit | 714f372137fb2a9a992a6d0c23dc12a58b34c43d (patch) | |
tree | e38ff3562536ad66c44f15678b0c998685be8944 | |
parent | 8903841582ea26b4987fbe04b5a5545d8d65f729 (diff) | |
download | libayatana-appindicator-714f372137fb2a9a992a6d0c23dc12a58b34c43d.tar.gz libayatana-appindicator-714f372137fb2a9a992a6d0c23dc12a58b34c43d.tar.bz2 libayatana-appindicator-714f372137fb2a9a992a6d0c23dc12a58b34c43d.zip |
Registering ourselves on dbus
-rw-r--r-- | src/custom-service-appstore.c | 17 |
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; } |