+DBusMessage *
+spi_dbus_return_hyperlink (DBusMessage *message, AtkHyperlink *link, AtkObject *container, gboolean unref)
+{
+ return spi_dbus_return_sub_object (message, G_OBJECT (link), G_OBJECT (container), unref);
+}
+
+DBusMessage *
+spi_dbus_return_sub_object (DBusMessage *message, GObject *sub, GObject *container, gboolean unref)
+{
+ DBusMessage *reply;
+ gchar *path;
+
+ path = atk_dbus_sub_object_to_path (sub, container);
+
+ if (sub && unref)
+ g_object_unref (sub);
+
+ if (!path)
+ path = g_strdup (SPI_DBUS_PATH_NULL);
+
+ reply = dbus_message_new_method_return (message);
+ if (reply)
+ {
+ dbus_message_append_args (reply, DBUS_TYPE_OBJECT_PATH, &path,
+ DBUS_TYPE_INVALID);
+ }
+
+ g_free (path);
+
+ return reply;
+}
+