Bastien Nocera
f68e7fcb9f
lib: Add fp_dev argument to timeout callback
...
To cut down on the fpi_ssm_get_user_data() usage again.
2018-09-18 20:00:59 +02:00
Bastien Nocera
0c3a22758b
drivers: Simplify FP_INSTANCE_DATA(FP_DEV()) calls
...
When fp_dev is already available, don't use the fp_img_dev struct to get
to fp_dev with FP_DEV(), use the fp_dev directly.
2018-09-18 18:30:42 +02:00
Bastien Nocera
9cc859a318
drivers: Diminish fpi_ssm_get_user_data() usage
...
Can't remove it yet, as libusb transfers and timeouts don't pass the
fp_dev or fp_img_dev separately.
2018-09-18 18:30:42 +02:00
Bastien Nocera
e397571f83
lib: Add more args to fpi_ssm callbacks
...
Pass the struct fp_dev and user_data to fpi_ssm callbacks, so that we
might be able to get rid of the fpi_ssm_get_user_data(), and
fpi_ssm_get_dev() as most drivers just get those from the ssm anyway
in their callbacks.
2018-09-18 13:46:39 +02:00
Bastien Nocera
d34d7c26de
lib: Remove fpi_ssm_set_user_data()
...
And pass the user_data in fpi_ssm_new() instead.
2018-09-18 13:45:33 +02:00
Bastien Nocera
3f64b2ea5a
lib: Remove fpi_imgdev_get_usb_dev()
...
We now use fpi_get_usb_dev(FP_DEV()) instead.
2018-09-15 01:12:18 +02:00
Bastien Nocera
57b38a2876
lib: Remove fpi_imgdev_get_dev()
...
This is now handled by FP_DEV()
2018-09-15 01:12:18 +02:00
Bastien Nocera
058f91909d
lib: Remove fp_img_dev->priv
...
And use the new instance data helper.
2018-09-15 01:12:18 +02:00
Bastien Nocera
2946dabd24
lib: Typedef fpi_timeout
2018-09-05 17:49:02 +02:00
Bastien Nocera
603aab0a81
lib: Rename fpi_ssm_mark_aborted to fpi_ssm_mark_failed
2018-09-05 16:29:26 +02:00
Bastien Nocera
48b9e6c517
lib: Typedef fpi_ssm
2018-09-05 15:40:34 +02:00
Bastien Nocera
528f3556ea
vfs301: Use vfs301_proto_deinit()
...
Even though it does nothing, make sure to use it so it's useful once it
does something.
2018-08-27 20:01:00 +02:00
Bastien Nocera
f40f231a63
lib: Make fp_img_dev structure opaque
2018-05-29 13:34:18 +02:00
Bastien Nocera
2e035a7f45
lib: Make fpi_ssm opaque for drivers
...
We shouldn't access fpi_ssm struct fields directly in drivers, so add
accessor and setter functions for the common uses.
2018-05-29 13:34:18 +02:00
Bastien Nocera
19dfb138a6
drivers: Use new drivers_api.h in drivers
2018-05-29 13:34:18 +02:00
Bastien Nocera
994061af44
drivers: Simplify headers
...
Remove all the headers already included through "fp_internal.h" such as
<libusb.h> and <errno.h>, include "assembling.h" and "driver_ids.h" there
as well to avoid doing it in (almost) every driver.
2018-05-24 17:02:15 +02:00
Bastien Nocera
32fcfde86b
lib: Use GLib and libusb directly for debug output
...
Use GLib internally to output debug information, and tell about
libusb's LIBUSB_DEBUG envvar for libusb debug.
fp_set_debug() is now a no-op.
https://bugs.freedesktop.org/show_bug.cgi?id=106552
2018-05-23 19:13:08 +02:00
Bastien Nocera
a0bbbd7d32
drivers: Print USB error when libusb_claim_interface() fails
...
https://bugs.freedesktop.org/show_bug.cgi?id=98594
2016-11-05 00:10:17 +01:00
Vasily Khoruzhick
e278e8321c
vfs301: drop nr_enroll_stages override
...
Imaging drivers aren't allowed to change number of enroll stages anymore,
all that imaging driver does is providing image to the upper layer.
Upper layer decides if it needs more scans.
2013-08-19 11:13:49 +03:00
Vasily Khoruzhick
ea6d5ba6d6
lib: Fix mess with driver IDs
...
ID is just a some magic number to make fingerprint from one scanner model
incompatible with another scanner model. Get rid of "magic", declare enum
and use it.
https://bugs.freedesktop.org/show_bug.cgi?id=56956
2012-11-16 17:57:47 +01:00
Andrej Krutak
c3689665db
lib: Add VFS300/VFS301 driver
...
https://bugs.freedesktop.org/show_bug.cgi?id=37574
2012-08-28 19:51:59 +01:00