fpi-ssm: Add possibility to jump to a state (or next one) with delay

This allows to have an automatic cleanup of the timeout source when the
the callback is reached and to avoid to do further state changes in the
middle.
This commit is contained in:
Marco Trevisan (Treviño)
2019-11-22 17:19:27 +01:00
parent 3ed73aa17c
commit 7ec2df2405
3 changed files with 127 additions and 0 deletions

View File

@@ -73,6 +73,12 @@ void fpi_ssm_start_subsm (FpiSsm *parent,
void fpi_ssm_next_state (FpiSsm *machine);
void fpi_ssm_jump_to_state (FpiSsm *machine,
int state);
void fpi_ssm_next_state_delayed (FpiSsm *machine,
int delay);
void fpi_ssm_jump_to_state_delayed (FpiSsm *machine,
int state,
int delay);
void fpi_ssm_cancel_delayed_state_change (FpiSsm *machine);
void fpi_ssm_mark_completed (FpiSsm *machine);
void fpi_ssm_mark_failed (FpiSsm *machine,
GError *error);