ssm: Add API to get device
This can be useful in some cases and it was simply missing.
This commit is contained in:
parent
84112abc71
commit
0e732dbafa
2 changed files with 16 additions and 0 deletions
|
@ -617,6 +617,20 @@ fpi_ssm_jump_to_state_delayed (FpiSsm *machine,
|
|||
g_source_set_name (machine->timeout, source_name);
|
||||
}
|
||||
|
||||
/**
|
||||
* fpi_ssm_get_device:
|
||||
* @machine: an #FpiSsm state machine
|
||||
*
|
||||
* Returns the device that the SSM has been associated with.
|
||||
*
|
||||
* Returns: (transfer none): the #FpDevice.
|
||||
*/
|
||||
FpDevice*
|
||||
fpi_ssm_get_device (FpiSsm *machine)
|
||||
{
|
||||
return machine->dev;
|
||||
}
|
||||
|
||||
/**
|
||||
* fpi_ssm_get_cur_state:
|
||||
* @machine: an #FpiSsm state machine
|
||||
|
|
|
@ -92,6 +92,8 @@ void fpi_ssm_mark_failed (FpiSsm *machine,
|
|||
void fpi_ssm_set_data (FpiSsm *machine,
|
||||
gpointer ssm_data,
|
||||
GDestroyNotify ssm_data_destroy);
|
||||
|
||||
FpDevice * fpi_ssm_get_device (FpiSsm *machine);
|
||||
gpointer fpi_ssm_get_data (FpiSsm *machine);
|
||||
GError * fpi_ssm_get_error (FpiSsm *machine);
|
||||
GError * fpi_ssm_dup_error (FpiSsm *machine);
|
||||
|
|
Loading…
Reference in a new issue