efl_unref(sd->socket_proxy);
}
sd->socket_proxy = _elm_atspi_bridge_utils_proxy_create(obj, svcname, atoi(svcnum), ELM_ATSPI_PROXY_TYPE_SOCKET);
+ evas_object_data_set(obj, "___atspi_socket_proxy", sd->socket_proxy);
elm_atspi_bridge_utils_proxy_listen(sd->socket_proxy);
free(svcname);
free(svcnum);
{
efl_unref(sd->socket_proxy);
sd->socket_proxy = NULL;
+ evas_object_data_set(obj, "___atspi_socket_proxy", NULL);
}
}
//
static Eldbus_Message *
_socket_embedded(const Eldbus_Service_Interface *iface EINA_UNUSED, const Eldbus_Message *msg)
{
- Eo *proxy;
// TIZEN_ONLY(20160705) - enable atspi_proxy to work
const char *obj_path = eldbus_message_path_get(msg);
//
- const char *bus, *path;
+ const char *path;
+
+ if (!eldbus_message_arguments_get(msg, "s", &path))
+ return eldbus_message_error_new(msg, "org.freedesktop.DBus.Error.InvalidArgs", "Plug id expected.");
+
Eo *bridge = _elm_atspi_bridge_get();
Eo *obj = _bridge_object_from_path(bridge, obj_path);
- proxy = efl_provider_find(efl_parent_get(obj), EFL_ACCESS_OBJECT_MIXIN);
+ Eo *proxy = evas_object_data_get(obj, "___atspi_socket_proxy");
if (!efl_isa(proxy, ELM_ATSPI_PROXY_CLASS))
return eldbus_message_error_new(msg, "org.freedesktop.DBus.Error.Failed", "Unable to embed object.");
- if (!eldbus_message_arguments_get(msg, "s", &path))
- return eldbus_message_error_new(msg, "org.freedesktop.DBus.Error.InvalidArgs", "Plug id expected.");
-
- bus = eldbus_message_sender_get(msg);
-
+ const char *bus = eldbus_message_sender_get(msg);
elm_obj_atspi_proxy_address_set(proxy, bus, path);
_bridge_cache_build(bridge, proxy);
}
ret = efl_add(ELM_ATSPI_PROXY_CLASS, parent, elm_obj_atspi_proxy_ctor(efl_added, type));
+
if (!ret) return NULL;
char *bus_sanitized = _sanitize_bus_name(bus);
char *path_sanitized = _sanitize_path_name(path);
+
+ efl_access_object_access_parent_set(ret, parent);
+
+ if (_instance) {
+ _bridge_object_register(_instance, ret);
+ _bridge_object_register(_instance, parent);
+ }
//
efl_key_data_set(ret, "__svc_bus", eina_stringshare_add(bus_sanitized));
pd->interfaces.socket =
eldbus_service_interface_fallback_register(pd->a11y_bus, ELM_ACCESS_OBJECT_PATH_PREFIX2, &socket_iface_desc);
//
+ Eo *parent = efl_parent_get(proxy);
+ _bridge_object_register(bridge, parent);
_add_plug_or_socket_to_connected_list_in_bridge(proxy);
}