+
+void
+spi_desktop_remove_application (SpiDesktop *desktop,
+ const char *bus_name)
+{
+ guint idx;
+ GList *l;
+ SpiDesktopApplication *app;
+
+ g_return_if_fail ( bus_name != NULL);
+ g_return_if_fail (SPI_IS_DESKTOP (desktop));
+
+ idx = 0;
+ for (l = desktop->applications; l; l = l->next)
+ {
+ app = (SpiDesktopApplication *) l->data;
+
+ if (!strcmp(app->bus_name, bus_name))
+ {
+ break;
+ }
+ idx++;
+ }
+
+ if (!l) return;
+
+ g_signal_emit (G_OBJECT (desktop), spi_desktop_signals[APPLICATION_REMOVED], 0, idx);
+
+ desktop->applications = g_list_delete_link (desktop->applications, l);
+
+ g_free (app->bus_name);
+ g_free (app);
+}
+
+static DRouteMethod methods_desktop[] =
+{
+ { impl_desktop_get_child_at_index, "getChildAtIndex" },
+ { impl_desktop_get_children, "getChildren" },
+ { NULL, NULL }
+};
+
+static DRouteProperty properties_desktop[] =
+{
+ { impl_desktop_get_child_count, NULL, "getChildCount" },
+ { NULL, NULL, NULL }
+};
+
+static DRouteProperty properties_accessible[] =
+{
+ { impl_get_name, "getName" },
+ { NULL, NULL }
+};
+
+void
+spi_registry_initialize_desktop_interface (DRouteData * data)
+{
+ droute_add_interface (data, SPI_DBUS_INTERFACE_DESKTOP, methods_desktop,
+ properties_desktop, NULL, NULL);
+ droute_add_interface (data, SPI_DBUS_INTERFACE_ACCESSIBLE, NULL,
+ properties_accessible, NULL, NULL);
+};