Commit 9bcacd97 authored by Bastien Nocera's avatar Bastien Nocera

lib: Require a callback for a number of async calls

Otherwise the caller won't be able to call the appropriate _finish()
calls when done.

See libfprint/libfprint#119 for
the long-term plan
parent d91eae26
......@@ -62,6 +62,7 @@ API_EXPORTED int fp_async_dev_open(struct fp_dscv_dev *ddev, fp_dev_open_cb call
int r;
g_return_val_if_fail(ddev != NULL, -ENODEV);
g_return_val_if_fail (callback != NULL, -EINVAL);
drv = ddev->drv;
......@@ -178,6 +179,7 @@ API_EXPORTED int fp_async_enroll_start(struct fp_dev *dev,
g_return_val_if_fail(dev != NULL, -ENODEV);
g_return_val_if_fail (fpi_poll_is_setup(), -EIO);
g_return_val_if_fail (callback != NULL, -EINVAL);
drv = dev->drv;
......@@ -294,6 +296,7 @@ API_EXPORTED int fp_async_verify_start(struct fp_dev *dev,
g_return_val_if_fail(dev != NULL, -ENODEV);
g_return_val_if_fail (fpi_poll_is_setup(), -EIO);
g_return_val_if_fail (callback != NULL, -EINVAL);
drv = dev->drv;
......@@ -428,6 +431,7 @@ API_EXPORTED int fp_async_identify_start(struct fp_dev *dev,
g_return_val_if_fail(dev != NULL, -ENODEV);
g_return_val_if_fail (fpi_poll_is_setup(), -EIO);
g_return_val_if_fail (callback != NULL, -EINVAL);
drv = dev->drv;
......@@ -562,6 +566,7 @@ API_EXPORTED int fp_async_capture_start(struct fp_dev *dev, int unconditional,
g_return_val_if_fail(dev != NULL, -ENODEV);
g_return_val_if_fail (fpi_poll_is_setup(), -EIO);
g_return_val_if_fail (callback != NULL, -EINVAL);
drv = dev->drv;
......
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