예제 #1
0
EOLIAN static void
_efl_net_control_technology_efl_object_destructor(Eo *o, Efl_Net_Control_Technology_Data *pd)
{
   Eldbus_Pending *p;
   Eldbus_Signal_Handler *sh;

   EINA_LIST_FREE(pd->pending, p)
     eldbus_pending_cancel(p);

   EINA_LIST_FREE(pd->signal_handlers, sh)
     eldbus_signal_handler_del(sh);

   if (pd->proxy)
     {
        Eldbus_Object *obj = eldbus_proxy_object_get(pd->proxy);
        eldbus_proxy_unref(pd->proxy);
        pd->proxy = NULL;
        eldbus_object_unref(obj);
     }

   efl_destructor(efl_super(o, MY_CLASS));
   eina_stringshare_replace(&pd->path, NULL);
   eina_stringshare_replace(&pd->name, NULL);
   eina_stringshare_replace(&pd->tethering.identifier, NULL);
   eina_stringshare_replace(&pd->tethering.passphrase, NULL);
}
예제 #2
0
void
wkb_ibus_disconnect(void)
{
   if (!wkb_ibus->conn)
     {
        ERR("Not connected");
        return;
     }

   DBG("Disconnect");

   eldbus_signal_handler_del(wkb_ibus->name_acquired);
   eldbus_signal_handler_del(wkb_ibus->name_lost);

   /* IBus InputContext proxy */
   wkb_ibus_input_context_destroy();

   /* IBus proxy */
   if (wkb_ibus->ibus)
     {
        eldbus_proxy_unref(wkb_ibus->ibus);
        wkb_ibus->ibus = NULL;
     }

   if (wkb_ibus->panel)
     {
        eldbus_service_interface_unregister(wkb_ibus->panel);
        wkb_ibus->panel = NULL;
     }

   if (wkb_ibus->config)
     {
        wkb_ibus_config_unregister();
        eldbus_service_interface_unregister(wkb_ibus->config);
        wkb_ibus->config = NULL;
     }

   free(wkb_ibus->address);
   wkb_ibus->address = NULL;

   ecore_event_add(WKB_IBUS_DISCONNECTED, NULL, _wkb_ibus_disconnect_free, NULL);
}