return app;
}
-static AtspiAccessible *
+AtspiAccessible *
ref_accessible (const char *app_name, const char *path)
{
AtspiApplication *app;
process_deferred_messages ();
if (dbus_error_is_set (&err))
{
- /* TODO: Set gerror */
+ g_set_error_literal(error, ATSPI_ERROR, ATSPI_ERROR_IPC, err.message);
dbus_error_free (&err);
+ if (reply)
+ dbus_message_unref(reply);
}
-
- if (reply && dbus_message_get_type (reply) == DBUS_MESSAGE_TYPE_ERROR)
+ else if (reply && dbus_message_get_type(reply) == DBUS_MESSAGE_TYPE_ERROR)
{
const char *err_str = NULL;
dbus_message_get_args (reply, NULL, DBUS_TYPE_STRING, &err_str, DBUS_TYPE_INVALID);
dbus_message_unref (reply);
return NULL;
}
-
return reply;
}
atspi_set_main_context (GMainContext *cnx);
gchar * atspi_role_get_name (AtspiRole role);
+
+AtspiAccessible *ref_accessible(const char *app_name, const char *path);
+
G_END_DECLS
#endif /* _ATSPI_MISC_H_ */