2009-07-06 Mark Doffman <mark.doffman@codethink.co.uk>
[platform/core/uifw/at-spi2-atk.git] / cspi / spi-accessible.c
index 7e324fa..7908dea 100644 (file)
@@ -22,7 +22,7 @@
  */
 
 #include <stdlib.h> /* for malloc */
-#include "spi-common/spi-stateset.h"
+#include "common/spi-stateset.h"
 #include <cspi/spi-private.h>
 
 static const char *role_names [] =
@@ -557,19 +557,7 @@ Accessible_getLocalizedRoleName (Accessible *obj)
 AccessibleStateSet *
 Accessible_getStateSet (Accessible *obj)
 {
-  GArray *state_bitflags;
-  AccessibleStateSet *retval;
-
-  cspi_return_val_if_fail (obj != NULL, NULL);
-
-  cspi_dbus_call (obj, spi_interface_accessible, "getStateSet", NULL, "=>au", &state_bitflags);
-  cspi_return_val_if_ev ("getState", NULL);
-
-  retval = spi_state_set_cache_new (state_bitflags);
-
-  g_array_free (state_bitflags, TRUE);
-
-  return retval;
+  return obj->states;
 }
 
 /**
@@ -906,6 +894,7 @@ Accessible_getCollection (Accessible *obj)
          obj, spi_interface_collection);
 #else
   g_warning ("Collections not implemented");
+  return NULL;
 #endif
 }
 
@@ -1009,6 +998,7 @@ Accessible_getMatchRule (Accessible *obj)
          obj, spi_interface_match_rule);
 #else
   g_warning ("Match rules not supported");
+  return NULL;
 #endif
 }
 
@@ -1047,6 +1037,7 @@ Accessible_getStreamableContent (Accessible *obj)
          obj, spi_interface_streamable_content);
 #else
   g_warning ("Streamable content not supported");
+  return NULL;
 #endif
 }