Eldbus_Name_Owner_Changed_Cb cb;
const void *cb_data;
Eina_Bool deleted : 1;
- Ecore_Idle_Enterer *idle_enterer;
+ Ecore_Idler *idler;
Eina_Bool allow_initial : 1;
} Eldbus_Connection_Context_NOC_Cb;
}
static Eina_Bool
-eldbus_idle_enterer(void *data)
+eldbus_idler(void *data)
{
Eldbus_Connection *conn = data;
if (dbus_connection_get_dispatch_status(conn->dbus_conn) ==
DBUS_DISPATCH_COMPLETE)
{
- DBG("Connection@%p: Dispatch complete, idle_enterer@%p finishing",
- conn, conn->idle_enterer);
- conn->idle_enterer = NULL;
+ DBG("Connection@%p: Dispatch complete, idler@%p finishing",
+ conn, conn->idler);
+ conn->idler = NULL;
return ECORE_CALLBACK_CANCEL;
}
DBG("Connection@%p: Dispatching", conn);
eldbus_init();
eldbus_connection_ref(conn);
-
- DBusDispatchStatus status;
- do
- {
- status = dbus_connection_dispatch(conn->dbus_conn);
- }
- while(status == DBUS_DISPATCH_DATA_REMAINS);
-
+ dbus_connection_dispatch(conn->dbus_conn);
eldbus_connection_unref(conn);
eldbus_shutdown();
return ECORE_CALLBACK_RENEW;
DBG("Connection@%p: Dispatch status: %d", conn, new_status);
- if ((new_status == DBUS_DISPATCH_DATA_REMAINS) && (!conn->idle_enterer))
+ if ((new_status == DBUS_DISPATCH_DATA_REMAINS) && (!conn->idler))
{
- conn->idle_enterer = ecore_idle_enterer_add(eldbus_idle_enterer, conn);
- DBG("Connection@%p: Adding idle_enterer@%p to handle remaining dispatch data",
- conn, conn->idle_enterer);
+ conn->idler = ecore_idler_add(eldbus_idler, conn);
+ DBG("Connection@%p: Adding idler@%p to handle remaining dispatch data",
+ conn, conn->idler);
}
- else if ((new_status != DBUS_DISPATCH_DATA_REMAINS) && (conn->idle_enterer))
+ else if ((new_status != DBUS_DISPATCH_DATA_REMAINS) && (conn->idler))
{
- DBG("Connection@%p: No remaining dispatch data, clearing idle_enterer@%p",
- conn, conn->idle_enterer);
+ DBG("Connection@%p: No remaining dispatch data, clearing idler@%p",
+ conn, conn->idler);
- ecore_idle_enterer_del(conn->idle_enterer);
- conn->idle_enterer = NULL;
+ ecore_idler_del(conn->idler);
+ conn->idler = NULL;
}
}
eldbus_data_del_all(&conn->data);
- if (conn->idle_enterer) ecore_idle_enterer_del(conn->idle_enterer);
+ if (conn->idler) ecore_idler_del(conn->idler);
if (conn->type && conn->shared)
{
if (conn->type == ELDBUS_CONNECTION_TYPE_ADDRESS)
dispatch_name_owner_data *data = context;
data->ctx->cb((void *)data->ctx->cb_data, data->cn->name, "",
data->cn->unique_id);
- data->ctx->idle_enterer = NULL;
+ data->ctx->idler = NULL;
free(data);
return ECORE_CALLBACK_CANCEL;
}
EINA_SAFETY_ON_NULL_RETURN(dispatch_data);
dispatch_data->cn = cn;
dispatch_data->ctx = ctx;
- ctx->idle_enterer = ecore_idle_enterer_add(dispach_name_owner_cb, dispatch_data);
+ ctx->idler = ecore_idler_add(dispach_name_owner_cb, dispatch_data);
}
return;
cn->event_handlers.list = eina_inlist_remove(cn->event_handlers.list,
EINA_INLIST_GET(found));
- if (found->idle_enterer)
+ if (found->idler)
{
dispatch_name_owner_data *data;
- data = ecore_idle_enterer_del(found->idle_enterer);
+ data = ecore_idler_del(found->idler);
free(data);
}
free(found);
Eina_Inlist *pendings;
Eina_Inlist *fd_handlers;
Eina_Inlist *timeouts;
- Ecore_Idle_Enterer *idle_enterer;
+ Ecore_Idler *idler;
Eldbus_Connection_Context_Event event_handlers[ELDBUS_CONNECTION_EVENT_LAST];
Eina_Inlist *root_objs;//service_object
Eldbus_Proxy *fdo_proxy;
Eldbus_Service_Interface *objmanager;
Eina_List *iface_added;
Eina_List *iface_removed;
- Ecore_Idle_Enterer *idle_enterer_iface_changed;
+ Ecore_Idler *idler_iface_changed;
};
struct _Eldbus_Service_Interface
Eina_Hash *properties;
Eldbus_Property_Set_Cb set_func;
Eldbus_Property_Get_Cb get_func;
- Ecore_Idle_Enterer *idle_enterer_propschanged;
+ Ecore_Idler *idler_propschanged;
Eina_Array *props_changed;
Eina_Array *prop_invalidated;
};
Eldbus_Service_Object *obj = data;
Eldbus_Service_Object *parent = _object_manager_parent_find(obj);
- obj->idle_enterer_iface_changed = NULL;
+ obj->idler_iface_changed = NULL;
if (!parent)
{
iface->obj = obj;
eina_hash_add(obj->interfaces, iface->name, iface);
- if (!obj->idle_enterer_iface_changed)
- obj->idle_enterer_iface_changed = ecore_idle_enterer_add(_object_manager_changes_process,
+ if (!obj->idler_iface_changed)
+ obj->idler_iface_changed = ecore_idler_add(_object_manager_changes_process,
obj);
obj->iface_added = eina_list_append(obj->iface_added, iface);
}
static Eina_Bool
-_idle_enterer_propschanged(void *data)
+_idler_propschanged(void *data)
{
Eldbus_Service_Interface *iface = data;
Eldbus_Message *msg;
Eina_Hash *added = NULL;
Property *prop;
- iface->idle_enterer_propschanged = NULL;
+ iface->idler_propschanged = NULL;
added = eina_hash_string_small_new(NULL);
msg = eldbus_message_signal_new(iface->obj->path, properties_iface->name,
/**
* flush props changes before remove interface
*/
- if (interface->idle_enterer_propschanged)
+ if (interface->idler_propschanged)
{
- ecore_idle_enterer_del(interface->idle_enterer_propschanged);
- _idle_enterer_propschanged(interface);
+ ecore_idler_del(interface->idler_propschanged);
+ _idler_propschanged(interface);
}
eina_hash_free(interface->methods);
/* Adding and removing the interface in the same main loop iteration.
* Let's not send any signal */
obj->iface_added = eina_list_remove_list(obj->iface_added, l);
- if (!obj->iface_added && !obj->iface_removed && obj->idle_enterer_iface_changed)
+ if (!obj->iface_added && !obj->iface_removed && obj->idler_iface_changed)
{
- ecore_idle_enterer_del(obj->idle_enterer_iface_changed);
- obj->idle_enterer_iface_changed = NULL;
+ ecore_idler_del(obj->idler_iface_changed);
+ obj->idler_iface_changed = NULL;
}
}
else
{
- if (!obj->idle_enterer_iface_changed)
+ if (!obj->idler_iface_changed)
{
- obj->idle_enterer_iface_changed = ecore_idle_enterer_add(
+ obj->idler_iface_changed = ecore_idler_add(
_object_manager_changes_process, obj);
}
_children_ifaces_add_removed_flush(children);
}
- if (obj->idle_enterer_iface_changed)
+ if (obj->idler_iface_changed)
{
- ecore_idle_enterer_del(obj->idle_enterer_iface_changed);
+ ecore_idler_del(obj->idler_iface_changed);
_object_manager_changes_process(obj);
}
}
* Flush our iface_add/removed if this object are
* children of some other path with ObjectManager
*/
- if (obj->idle_enterer_iface_changed)
+ if (obj->idler_iface_changed)
{
- ecore_idle_enterer_del(obj->idle_enterer_iface_changed);
+ ecore_idler_del(obj->idler_iface_changed);
_object_manager_changes_process(obj);
}
prop = eina_hash_find(iface->properties, name);
EINA_SAFETY_ON_NULL_RETURN_VAL(prop, EINA_FALSE);
- if (!iface->idle_enterer_propschanged)
- iface->idle_enterer_propschanged = ecore_idle_enterer_add(_idle_enterer_propschanged, iface);
+ if (!iface->idler_propschanged)
+ iface->idler_propschanged = ecore_idler_add(_idler_propschanged, iface);
if (!iface->props_changed)
iface->props_changed = eina_array_new(1);
prop->is_invalidate = is_invalidate;
- if (!iface->idle_enterer_propschanged)
- iface->idle_enterer_propschanged = ecore_idle_enterer_add(_idle_enterer_propschanged, iface);
+ if (!iface->idler_propschanged)
+ iface->idler_propschanged = ecore_idler_add(_idler_propschanged, iface);
if (is_invalidate)
{
* with path equal to our path rather than from the previous
* ObjectManager
*/
- if (obj->idle_enterer_iface_changed)
- ecore_idle_enterer_del(obj->idle_enterer_iface_changed);
+ if (obj->idler_iface_changed)
+ ecore_idler_del(obj->idler_iface_changed);
_object_manager_changes_process(obj);
obj->objmanager = objmanager;