diff --git a/libfprint/fpi-core.c b/libfprint/fpi-core.c index 004235e..c9f35ad 100644 --- a/libfprint/fpi-core.c +++ b/libfprint/fpi-core.c @@ -757,6 +757,23 @@ API_EXPORTED int fp_dev_supports_identification(struct fp_dev *dev) return dev->drv->identify_start != NULL; } +/** + * fp_dev_supports_data_in_sensor: + * @dev: the struct #fp_dev device + * + * Determines if a device is capable of storing print data in sensor. + * Not all devices support this functionality. + * + * Returns: 1 if the device is capable of storing data in sensor, 0 otherwise. + */ +API_EXPORTED int fp_dev_supports_data_in_sensor(struct fp_dev *dev) +{ + g_return_val_if_fail(dev, 0); + g_return_val_if_fail(dev->drv, 0); + + return dev->drv->delete_finger != NULL; +} + /** * fp_dev_get_img_width: * @dev: the struct #fp_dev device diff --git a/libfprint/fprint.h b/libfprint/fprint.h index 1f7a06e..ef4fa39 100644 --- a/libfprint/fprint.h +++ b/libfprint/fprint.h @@ -267,6 +267,8 @@ int fp_verify_finger(struct fp_dev *dev, struct fp_print_data *enrolled_print); int fp_dev_supports_identification(struct fp_dev *dev); +int fp_dev_supports_data_in_sensor(struct fp_dev *dev); + int fp_identify_finger_img(struct fp_dev *dev, struct fp_print_data **print_gallery, size_t *match_offset, struct fp_img **img);