ssm: Add getter for the device
In some cases it can be useful to be able to retrieve the device. Add the corresponding getter to do so.
This commit is contained in:
parent
e8a7ff1033
commit
4a700758a6
3 changed files with 18 additions and 0 deletions
|
@ -227,6 +227,7 @@ fpi_ssm_mark_completed
|
||||||
fpi_ssm_mark_failed
|
fpi_ssm_mark_failed
|
||||||
fpi_ssm_set_data
|
fpi_ssm_set_data
|
||||||
fpi_ssm_get_data
|
fpi_ssm_get_data
|
||||||
|
fpi_ssm_get_device
|
||||||
fpi_ssm_get_error
|
fpi_ssm_get_error
|
||||||
fpi_ssm_dup_error
|
fpi_ssm_dup_error
|
||||||
fpi_ssm_get_cur_state
|
fpi_ssm_get_cur_state
|
||||||
|
|
|
@ -181,6 +181,22 @@ fpi_ssm_get_data (FpiSsm *machine)
|
||||||
return machine->ssm_data;
|
return machine->ssm_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* fpi_ssm_get_device:
|
||||||
|
* @machine: an #FpiSsm state machine
|
||||||
|
*
|
||||||
|
* Retrieve the device that the SSM is for.
|
||||||
|
*
|
||||||
|
* Returns: #FpDevice
|
||||||
|
*/
|
||||||
|
FpDevice *
|
||||||
|
fpi_ssm_get_device (FpiSsm *machine)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (machine, NULL);
|
||||||
|
|
||||||
|
return machine->dev;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
fpi_ssm_clear_delayed_action (FpiSsm *machine)
|
fpi_ssm_clear_delayed_action (FpiSsm *machine)
|
||||||
{
|
{
|
||||||
|
|
|
@ -93,6 +93,7 @@ void fpi_ssm_set_data (FpiSsm *machine,
|
||||||
gpointer ssm_data,
|
gpointer ssm_data,
|
||||||
GDestroyNotify ssm_data_destroy);
|
GDestroyNotify ssm_data_destroy);
|
||||||
gpointer fpi_ssm_get_data (FpiSsm *machine);
|
gpointer fpi_ssm_get_data (FpiSsm *machine);
|
||||||
|
FpDevice * fpi_ssm_get_device (FpiSsm *machine);
|
||||||
GError * fpi_ssm_get_error (FpiSsm *machine);
|
GError * fpi_ssm_get_error (FpiSsm *machine);
|
||||||
GError * fpi_ssm_dup_error (FpiSsm *machine);
|
GError * fpi_ssm_dup_error (FpiSsm *machine);
|
||||||
int fpi_ssm_get_cur_state (FpiSsm *machine);
|
int fpi_ssm_get_cur_state (FpiSsm *machine);
|
||||||
|
|
Loading…
Reference in a new issue