Exemplo n.º 1
0
/** Handle alarm_ui_state_pipe notifications
 *
 * @param data (not used)
 */
static void mia_datapipe_alarm_ui_state_cb(gconstpointer data)
{
    alarm_ui_state_t prev = alarm_ui_state;
    alarm_ui_state = GPOINTER_TO_INT(data);

    if( alarm_ui_state == prev )
        goto EXIT;

    mce_log(LL_DEBUG, "alarm_ui_state: %s -> %s",
            alarm_state_repr(prev),
            alarm_state_repr(alarm_ui_state));

EXIT:
    return;
}
Exemplo n.º 2
0
Arquivo: alarm.c Projeto: kimmoli/mce
static void alarm_sync_state_to_datapipe(alarm_ui_state_t state)
{
	if( datapipe_get_gint(alarm_ui_state_pipe) == state )
		goto EXIT;

	mce_log(LL_DEVEL, "alarm sate = %s", alarm_state_repr(state));
	execute_datapipe(&alarm_ui_state_pipe,
			 GINT_TO_POINTER(state),
			 USE_INDATA, CACHE_INDATA);

EXIT:
	return;
}