Commit 317d7bc9 authored by Bastien Nocera's avatar Bastien Nocera

lib: Simplify fp_*_stop_cb callback definitions

They're all the same, so merge them into a single fp_operation_stop_cb.

https://bugs.freedesktop.org/show_bug.cgi?id=106551
parent b44e417b
......@@ -102,7 +102,7 @@ void fpi_drvcb_close_complete(struct fp_dev *dev)
* @user_data
*/
API_EXPORTED void fp_async_dev_close(struct fp_dev *dev,
fp_dev_close_cb callback, void *user_data)
fp_operation_stop_cb callback, void *user_data)
{
struct fp_driver *drv = dev->drv;
......@@ -212,7 +212,7 @@ void fpi_drvcb_enroll_stopped(struct fp_dev *dev)
* Returns:
*/
API_EXPORTED int fp_async_enroll_stop(struct fp_dev *dev,
fp_enroll_stop_cb callback, void *user_data)
fp_operation_stop_cb callback, void *user_data)
{
struct fp_driver *drv = dev->drv;
int r;
......@@ -326,7 +326,7 @@ void fpi_drvcb_verify_stopped(struct fp_dev *dev)
* Returns:
*/
API_EXPORTED int fp_async_verify_stop(struct fp_dev *dev,
fp_verify_stop_cb callback, void *user_data)
fp_operation_stop_cb callback, void *user_data)
{
struct fp_driver *drv = dev->drv;
gboolean iterating = (dev->state == DEV_STATE_VERIFYING);
......@@ -434,7 +434,7 @@ void fpi_drvcb_report_identify_result(struct fp_dev *dev, int result,
* Returns:
*/
API_EXPORTED int fp_async_identify_stop(struct fp_dev *dev,
fp_identify_stop_cb callback, void *user_data)
fp_operation_stop_cb callback, void *user_data)
{
struct fp_driver *drv = dev->drv;
gboolean iterating = (dev->state == DEV_STATE_IDENTIFYING);
......@@ -561,7 +561,7 @@ void fpi_drvcb_capture_stopped(struct fp_dev *dev)
* Returns:
*/
API_EXPORTED int fp_async_capture_stop(struct fp_dev *dev,
fp_capture_stop_cb callback, void *user_data)
fp_operation_stop_cb callback, void *user_data)
{
struct fp_driver *drv = dev->drv;
int r;
......
......@@ -119,23 +119,23 @@ struct fp_dev {
/* FIXME: convert this to generic state operational data mechanism? */
fp_dev_open_cb open_cb;
void *open_cb_data;
fp_dev_close_cb close_cb;
fp_operation_stop_cb close_cb;
void *close_cb_data;
fp_enroll_stage_cb enroll_stage_cb;
void *enroll_stage_cb_data;
fp_enroll_stop_cb enroll_stop_cb;
fp_operation_stop_cb enroll_stop_cb;
void *enroll_stop_cb_data;
fp_verify_cb verify_cb;
void *verify_cb_data;
fp_verify_stop_cb verify_stop_cb;
fp_operation_stop_cb verify_stop_cb;
void *verify_stop_cb_data;
fp_identify_cb identify_cb;
void *identify_cb_data;
fp_identify_stop_cb identify_stop_cb;
fp_operation_stop_cb identify_stop_cb;
void *identify_stop_cb_data;
fp_capture_cb capture_cb;
void *capture_cb_data;
fp_capture_stop_cb capture_stop_cb;
fp_operation_stop_cb capture_stop_cb;
void *capture_stop_cb_data;
/* FIXME: better place to put this? */
......
......@@ -323,12 +323,13 @@ void fp_set_debug(int level);
/* Asynchronous I/O */
typedef void (*fp_operation_stop_cb)(struct fp_dev *dev, void *user_data);
typedef void (*fp_dev_open_cb)(struct fp_dev *dev, int status, void *user_data);
int fp_async_dev_open(struct fp_dscv_dev *ddev, fp_dev_open_cb callback,
void *user_data);
typedef void (*fp_dev_close_cb)(struct fp_dev *dev, void *user_data);
void fp_async_dev_close(struct fp_dev *dev, fp_dev_close_cb callback,
void fp_async_dev_close(struct fp_dev *dev, fp_operation_stop_cb callback,
void *user_data);
typedef void (*fp_enroll_stage_cb)(struct fp_dev *dev, int result,
......@@ -336,8 +337,7 @@ typedef void (*fp_enroll_stage_cb)(struct fp_dev *dev, int result,
int fp_async_enroll_start(struct fp_dev *dev, fp_enroll_stage_cb callback,
void *user_data);
typedef void (*fp_enroll_stop_cb)(struct fp_dev *dev, void *user_data);
int fp_async_enroll_stop(struct fp_dev *dev, fp_enroll_stop_cb callback,
int fp_async_enroll_stop(struct fp_dev *dev, fp_operation_stop_cb callback,
void *user_data);
typedef void (*fp_verify_cb)(struct fp_dev *dev, int result,
......@@ -345,8 +345,7 @@ typedef void (*fp_verify_cb)(struct fp_dev *dev, int result,
int fp_async_verify_start(struct fp_dev *dev, struct fp_print_data *data,
fp_verify_cb callback, void *user_data);
typedef void (*fp_verify_stop_cb)(struct fp_dev *dev, void *user_data);
int fp_async_verify_stop(struct fp_dev *dev, fp_verify_stop_cb callback,
int fp_async_verify_stop(struct fp_dev *dev, fp_operation_stop_cb callback,
void *user_data);
typedef void (*fp_identify_cb)(struct fp_dev *dev, int result,
......@@ -354,16 +353,14 @@ typedef void (*fp_identify_cb)(struct fp_dev *dev, int result,
int fp_async_identify_start(struct fp_dev *dev, struct fp_print_data **gallery,
fp_identify_cb callback, void *user_data);
typedef void (*fp_identify_stop_cb)(struct fp_dev *dev, void *user_data);
int fp_async_identify_stop(struct fp_dev *dev, fp_identify_stop_cb callback,
int fp_async_identify_stop(struct fp_dev *dev, fp_operation_stop_cb callback,
void *user_data);
typedef void (*fp_capture_cb)(struct fp_dev *dev, int result,
struct fp_img *img, void *user_data);
int fp_async_capture_start(struct fp_dev *dev, int unconditional, fp_capture_cb callback, void *user_data);
typedef void (*fp_capture_stop_cb)(struct fp_dev *dev, void *user_data);
int fp_async_capture_stop(struct fp_dev *dev, fp_capture_stop_cb callback, void *user_data);
int fp_async_capture_stop(struct fp_dev *dev, fp_operation_stop_cb callback, void *user_data);
#ifdef __cplusplus
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment