/** * Exit function for the alarm interface module * * @todo D-Bus unregistration * * @param module Unused */ G_MODULE_EXPORT void g_module_unload(GModule *module) { (void)module; /* Remove name ownership monitors */ mce_dbus_owner_monitor_remove_all(&alarm_owner_monitor_list); mce_dbus_owner_monitor_remove_all(&queue_owner_monitor_list); /* Remove dbus handlers */ mce_alarm_quit_dbus(); return; }
/** * Call all activity callbacks, then unregister them */ static void call_activity_callbacks(void) { GSList *tmp = activity_callbacks; while (tmp != NULL) { activity_cb_t *cb; cb = tmp->data; /* Call the calback */ (void)dbus_send(cb->service, cb->path, cb->interface, cb->method_name, NULL, DBUS_TYPE_INVALID); g_free(cb->owner); g_free(cb->service); g_free(cb->path); g_free(cb->interface); g_free(cb->method_name); g_free(cb); tmp = g_slist_next(tmp); } g_slist_free(activity_callbacks); activity_callbacks = NULL; mce_dbus_owner_monitor_remove_all(&activity_cb_monitor_list); }
/** Unregister all activity callbacks */ static void mia_activity_action_remove_all(void) { for( GSList *now = activity_action_list; now; now = now->next ) { mia_action_t *act = now->data; now->data = 0; mia_action_delete(act); } /* Flush action list */ g_slist_free(activity_action_list), activity_action_list = 0; /* Remove associated name owner monitors */ mce_dbus_owner_monitor_remove_all(&activity_action_owners); }