Fix get_toolkit_version, and add get_atspi_version for accessibles
authorMike Gorse <mgorse@novell.com>
Mon, 23 May 2011 23:04:01 +0000 (18:04 -0500)
committerMike Gorse <mgorse@novell.com>
Mon, 23 May 2011 23:32:12 +0000 (18:32 -0500)
atspi/atspi-accessible.c
atspi/atspi-accessible.h
idl/application.didl
xml/Application.xml

index d9bdeef..90acb55 100644 (file)
@@ -782,7 +782,30 @@ atspi_accessible_get_toolkit_version (AtspiAccessible *obj, GError **error)
 
   g_return_val_if_fail (obj != NULL, NULL);
 
-  if (!_atspi_dbus_get_property (obj, atspi_interface_application, "ToolkitVersion", error, "s", &ret))
+  if (!_atspi_dbus_get_property (obj, atspi_interface_application, "Version", error, "s", &ret))
+      return NULL;
+  return ret;
+}
+
+/**
+ * atspi_accessible_get_atspi_version:
+ * @obj: a pointer to the #AtspiAccessible object on which to operate.
+ *
+ * Get the AT-SPI IPC specification version supported by the application
+ * pointed to by the #AtspiAccessible object.
+ * Only works on application root objects.
+ *
+ * Returns: a UTF-8 string indicating the AT-SPI ersion for the #AtspiAccessible object.
+ * or NULL on exception
+ **/
+gchar *
+atspi_accessible_get_atspi_version (AtspiAccessible *obj, GError **error)
+{
+  gchar *ret = NULL;
+
+  g_return_val_if_fail (obj != NULL, NULL);
+
+  if (!_atspi_dbus_get_property (obj, atspi_interface_application, "AtspiVersion", error, "s", &ret))
       return NULL;
   return ret;
 }
index 72c2bbe..60972aa 100644 (file)
@@ -97,6 +97,8 @@ gchar * atspi_accessible_get_toolkit_name (AtspiAccessible *obj, GError **error)
 
 gchar * atspi_accessible_get_toolkit_version (AtspiAccessible *obj, GError **error);
 
+gchar * atspi_accessible_get_atspi_version (AtspiAccessible *obj, GError **error);
+
 gint atspi_accessible_get_id (AtspiAccessible *obj, GError **error);
 
 AtspiAccessible * atspi_accessible_get_application (AtspiAccessible *obj, GError **error);
index 19383f6..546fcfd 100644 (file)
@@ -11,6 +11,10 @@ interface org.freestandards.atspi.Application {
        /* A string indicating the version of the applications accessibility bridge. */
        read property string Version;
 
+       /* A string indicating the version of the AT-SPI specification
+           supported by the application */
+       read property string AtspiVersion;
+
        /* Gets the locale in which the application is currently running. */
        method GetLocale {
                LocaleType locale_type;
index 0fbb92b..04a2e70 100644 (file)
@@ -6,6 +6,7 @@
 
   <property name="Version" type="s" access="read"/>
 
+  <property name="AtspiVersion" type="s" access="read"/>
   <property name="Id" type="i" access="read"/>
 
   <method name="GetLocale">