Fixed the bugs and warnings in atspi relationship APIS 96/70996/2
authorPrasoon Singh <prasoon.16@samsung.com>
Mon, 23 May 2016 14:02:06 +0000 (19:32 +0530)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Tue, 24 May 2016 11:06:55 +0000 (04:06 -0700)
Change-Id: I1f4ebce0c107677a09388811a0bd0631ae6efa1e

src/lib/elm_atspi_bridge.c
src/lib/elm_interface_atspi_accessible.c
src/lib/elm_interface_atspi_accessible.h
src/lib/elm_widget.eo

index afe7300..c5781bd 100644 (file)
@@ -837,7 +837,7 @@ _accessible_get_relation_set(const Eldbus_Service_Interface *iface EINA_UNUSED,
         eldbus_message_iter_container_close(iter_struct, iter_array2);
         eldbus_message_iter_container_close(iter_array, iter_struct);
      }
-   elm_atspi_relation_set_free(rels);
+   elm_atspi_relation_set_free(&rels);
    eldbus_message_iter_container_close(iter, iter_array);
 
    return ret;
@@ -5031,11 +5031,6 @@ fail:
    eo_do(proxy, eo_event_callback_call(ELM_ATSPI_PROXY_EVENT_DISCONNECTED, NULL));
 }
 
-static void _free_stringshared(void *data)
-{
-   eina_stringshare_del(data);
-}
-
 static void
 _plug_address_discover(Eldbus_Connection *conn, Eo *proxy, const char *svc_bus, const char *svc_path)
 {
index d2bd6ae..afc7be7 100644 (file)
@@ -294,7 +294,10 @@ _elm_interface_atspi_accessible_state_set_get(Eo *obj EINA_UNUSED, Elm_Interface
 EOLIAN Elm_Atspi_Relation_Set
 _elm_interface_atspi_accessible_relation_set_get(Eo *obj EINA_UNUSED, Elm_Interface_Atspi_Accessible_Data *pd EINA_UNUSED)
 {
-   return elm_atspi_relation_set_clone(pd->relations);
+   Elm_Atspi_Relation_Set ret = 0;
+   WRN("The %s object does not implement the \"accessible_relation_set\" function.",
+       eo_class_name_get(eo_class_get(obj)));
+   return ret;
 }
 
 EAPI void elm_atspi_attributes_list_free(Eina_List *list)
@@ -489,13 +492,12 @@ elm_atspi_relation_set_relation_type_remove(Elm_Atspi_Relation_Set *set, Elm_Ats
 }
 
 EAPI void
-elm_atspi_relation_set_free(Elm_Atspi_Relation_Set set)
+elm_atspi_relation_set_free(Elm_Atspi_Relation_Set *set)
 {
    Elm_Atspi_Relation *rel;
    Eina_List *l;
    Eo *obj;
-
-   EINA_LIST_FREE(set, rel)
+   EINA_LIST_FREE(*set, rel)
      {
         EINA_LIST_FOREACH(rel->objects, l, obj)
            eo_do(obj, eo_event_callback_del(EO_BASE_EVENT_DEL, _on_rel_obj_del, set));
@@ -504,13 +506,13 @@ elm_atspi_relation_set_free(Elm_Atspi_Relation_Set set)
 }
 
 EAPI Elm_Atspi_Relation_Set
-elm_atspi_relation_set_clone(const Elm_Atspi_Relation_Set set)
+elm_atspi_relation_set_clone(const Elm_Atspi_Relation_Set *set)
 {
    Elm_Atspi_Relation_Set ret = NULL;
    Eina_List *l;
    Elm_Atspi_Relation *rel;
 
-   EINA_LIST_FOREACH(set, l, rel)
+   EINA_LIST_FOREACH(*set, l, rel)
      {
         Elm_Atspi_Relation *cpy = elm_atspi_relation_clone(rel);
         ret = eina_list_append(ret, cpy);
@@ -522,7 +524,7 @@ elm_atspi_relation_set_clone(const Elm_Atspi_Relation_Set set)
 EOLIAN static void
 _elm_interface_atspi_accessible_relationships_clear(Eo *obj EINA_UNUSED, Elm_Interface_Atspi_Accessible_Data *sd)
 {
-   elm_atspi_relation_set_free(sd->relations);
+   elm_atspi_relation_set_free(&sd->relations);
    sd->relations = NULL;
 }
 
index 1d9e0ae..ae44161 100644 (file)
@@ -296,12 +296,12 @@ EAPI void elm_atspi_relation_set_relation_type_remove(Elm_Atspi_Relation_Set *se
 /**
  * Frees Elm_Atspi_Relation_Set
  */
-EAPI void elm_atspi_relation_set_free(Elm_Atspi_Relation_Set set);
+EAPI void elm_atspi_relation_set_free(Elm_Atspi_Relation_Set *set);
 
 /**
  * Clones Elm_Atspi_Relation_Set
  */
-EAPI Elm_Atspi_Relation_Set elm_atspi_relation_set_clone(const Elm_Atspi_Relation_Set set);
+EAPI Elm_Atspi_Relation_Set elm_atspi_relation_set_clone(const Elm_Atspi_Relation_Set *set);
 
 #ifdef EFL_EO_API_SUPPORT
 
index a53c698..d9289ef 100644 (file)
@@ -787,6 +787,7 @@ abstract Elm.Widget (Evas.Object_Smart, Elm_Interface_Atspi_Accessible, Elm_Inte
       Elm_Interface_Atspi_Accessible.parent.get;
       Elm_Interface_Atspi_Accessible.attributes.get;
       //TIZEN_ONLY(20150709) : atspi relations api
+      Elm_Interface_Atspi_Accessible.relation_set.get;
       Elm_Interface_Atspi_Accessible.relationship_append;
       Elm_Interface_Atspi_Accessible.relationship_remove;
       //