e17: bluez: update gadcon when daemon is exiting/entering

SVN revision: 57938
This commit is contained in:
Lucas De Marchi 2011-03-21 20:11:41 +00:00
parent 3062d73881
commit 8cf21c272f
1 changed files with 10 additions and 0 deletions

View File

@ -1183,6 +1183,8 @@ _bluez_event_manager_in(void *data, int type __UNUSED__, void *event __UNUSED__)
{
E_Bluez_Module_Context *ctxt = data;
E_Bluez_Element *element;
Eina_List *l;
E_Bluez_Instance *inst;
ctxt->has_manager = EINA_TRUE;
@ -1192,6 +1194,9 @@ _bluez_event_manager_in(void *data, int type __UNUSED__, void *event __UNUSED__)
e_bluez_element_listener_add(element, _bluez_manager_changed, ctxt, NULL);
EINA_LIST_FOREACH(ctxt->instances, l, inst)
_bluez_gadget_update(inst);
return ECORE_CALLBACK_PASS_ON;
}
@ -1199,10 +1204,15 @@ static Eina_Bool
_bluez_event_manager_out(void *data, int type __UNUSED__, void *event __UNUSED__)
{
E_Bluez_Module_Context *ctxt = data;
E_Bluez_Instance *inst;
Eina_List *l;
ctxt->has_manager = EINA_FALSE;
eina_stringshare_replace(&ctxt->default_adapter, NULL);
EINA_LIST_FOREACH(ctxt->instances, l, inst)
_bluez_gadget_update(inst);
return ECORE_CALLBACK_PASS_ON;
}