diff --git a/doc/libfprint-2-sections.txt b/doc/libfprint-2-sections.txt index adb4818..f245799 100644 --- a/doc/libfprint-2-sections.txt +++ b/doc/libfprint-2-sections.txt @@ -227,6 +227,7 @@ fpi_ssm_mark_completed fpi_ssm_mark_failed fpi_ssm_set_data fpi_ssm_get_data +fpi_ssm_get_device fpi_ssm_get_error fpi_ssm_dup_error fpi_ssm_get_cur_state diff --git a/libfprint/fpi-ssm.c b/libfprint/fpi-ssm.c index 6264d40..71c4e94 100644 --- a/libfprint/fpi-ssm.c +++ b/libfprint/fpi-ssm.c @@ -181,6 +181,22 @@ fpi_ssm_get_data (FpiSsm *machine) 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 fpi_ssm_clear_delayed_action (FpiSsm *machine) { diff --git a/libfprint/fpi-ssm.h b/libfprint/fpi-ssm.h index 0e18ab6..2c808ee 100644 --- a/libfprint/fpi-ssm.h +++ b/libfprint/fpi-ssm.h @@ -93,6 +93,7 @@ void fpi_ssm_set_data (FpiSsm *machine, gpointer ssm_data, GDestroyNotify ssm_data_destroy); gpointer fpi_ssm_get_data (FpiSsm *machine); +FpDevice * fpi_ssm_get_device (FpiSsm *machine); GError * fpi_ssm_get_error (FpiSsm *machine); GError * fpi_ssm_dup_error (FpiSsm *machine); int fpi_ssm_get_cur_state (FpiSsm *machine);