Bastien Nocera
2954583373
lib: Fix memory leak in fpi_poll_exit()
...
The active_timers list was freed, but not the elements themselves.
2018-09-27 14:36:06 +02:00
Bastien Nocera
ccdecdea11
lib: Document fpi_ssm_jump_to_state()
2018-09-26 15:57:25 +02:00
Bastien Nocera
946388d1e9
lib: Fix incorrect guard in FP_IMG_DEV()
...
The check for the DRIVER_IMAGING type was reversed.
2018-09-26 15:53:52 +02:00
Bastien Nocera
10ae8ffb55
drivers: Simplify libusb_alloc_transfer(0) calls
...
By using our new, never-failing, USB allocation wrapper. As it can never
fail, we can also remove all the error paths for the allocations
failing.
2018-09-19 17:06:17 +02:00
Bastien Nocera
bdba9990fb
lib: Add libusb allocation helper
2018-09-19 17:04:55 +02:00
Bastien Nocera
50166e88c0
lib: Add fpi_ssm_next_state_timeout_cb() helper
...
To be used in 5 drivers.
2018-09-19 15:46:29 +02:00
Bastien Nocera
f2bc826a20
lib: Move aeslib.[ch] to the drivers directory
...
As it's used by drivers, and isn't a set of generic helpers.
2018-09-19 15:16:40 +02:00
Bastien Nocera
ac48d66203
lib: Mention that fpi_timeout gets freed
2018-09-18 20:02:14 +02:00
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
7dfc8f3364
lib: Remove fpi_ssm_get_dev()
...
Usually by passing the dev it from an fpi_ssm callback, or simply
using that callback argument.
2018-09-18 14:02:23 +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
77defa1d8b
lib: Remove fpi_dev_get_nr_enroll_stages()
...
It's the same as fp_dev_get_nr_enroll_stages()
2018-09-15 01:23:02 +02:00
Bastien Nocera
5d01497b8b
lib: Remove dev_to_img_dev() helper
...
We can access the img_dev struct member directly, and we don't have
to double check that the img_dev member is actually an img_dev type,
as it always is.
2018-09-15 01:20:59 +02:00
Bastien Nocera
cb8732b255
lib: Remove priv struct member in fp_driver
...
It's unused.
2018-09-15 01:18:14 +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
4f75e63e25
lib: Remove fp_dev->priv
...
Not precise enough, and it was only used in upekts to get/set the
instance private struct and keep it around, so add a new, more precisely
defined field to fp_dev for that.
2018-09-15 01:12:18 +02:00
Bastien Nocera
2e50ff5e7c
lib: Add some TODO items to fp_dev struct
2018-09-15 01:09:50 +02:00
Bastien Nocera
0b7477e72c
lib: Use fp_dev to access USB device
...
Instead of having own own pointer in fp_img_dev
2018-09-15 01:09:50 +02:00
Bastien Nocera
4dc8aa6dfa
docs: Add fpi-dev helpers to API docs
2018-09-15 01:09:50 +02:00
Bastien Nocera
161c3ccf1c
lib: Link fp_dev to fp_img_dev and back
...
So it's easy to switch between the 2 structs, and remove fp_img_dev->dev
direct access, as well as fp_dev->priv "user data" usage.
2018-09-15 01:09:39 +02:00
Bastien Nocera
170da7fec1
lib: Move fp_dev definition and helpers to separate header
2018-09-15 01:09:39 +02:00
Bastien Nocera
d7af9a4498
Merge branch 'wip/hadess/fpi-log-docs' into 'master'
...
Logging API docs
See merge request libfprint/libfprint!16
2018-09-07 10:59:56 +00:00
Bastien Nocera
3cb3b1d63a
lib: Add Logging API documentation
2018-09-06 14:44:45 +02:00
Bastien Nocera
fc66919e1f
lib: Make BUG_ON() use fp_err()
...
So that when we change fp_err() to an assertion, BUG_ON() is changed as
well.
2018-09-06 14:42:33 +02:00
Bastien Nocera
de5b4e7dcb
lib: Split off logging helpers
2018-09-06 13:24:41 +02:00
Bastien Nocera
561576961c
Merge branch 'wip/hadess/fpi-timeout-docs' into 'master'
...
fpi_timeout API docs
See merge request libfprint/libfprint!15
2018-09-05 15:53:15 +00:00
Bastien Nocera
2946dabd24
lib: Typedef fpi_timeout
2018-09-05 17:49:02 +02:00
Bastien Nocera
969eefc81f
lib: Add fpi_timeout API documentation
2018-09-05 17:48:43 +02:00
Bastien Nocera
efee7262b6
lib: Split off timeout helpers
...
And rename poll.c to fpi-poll.c
2018-09-05 17:15:20 +02:00
Bastien Nocera
1102d6e478
Merge branch 'wip/hadess/fpi-ssm-docs' into 'master'
...
Add fpi_ssm API docs
See merge request libfprint/libfprint!14
2018-09-05 14:37:09 +00: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
10e934e234
lib: Add fpi_ssm API documentation
2018-09-05 16:25:34 +02:00
Bastien Nocera
48b9e6c517
lib: Typedef fpi_ssm
2018-09-05 15:40:34 +02:00
Bastien Nocera
5ae2ef5407
lib: Split off fpi_ssm functions
...
Rename drv.c to something more fitting to its contents, and move state
machine code to its own header.
2018-09-05 15:40:01 +02:00
Bastien Nocera
cafa05dab5
doc: Add include to each section rather than globally
...
So that we can document internal driver APIs and mention the correct
include.
2018-09-05 15:39:05 +02:00
Bastien Nocera
6345835b02
doc: %NULL changes
2018-09-04 15:58:23 +02:00
Bastien Nocera
1d453b5732
doc: Fix warning about fp_capture_result
...
The enum values need to be documented before the enum itself, otherwise
this warning is thrown:
warning: Value descriptions for fp_capture_result are missing in source code comment block.
2018-09-04 15:57:46 +02:00
Bastien Nocera
d3a1b86ea4
doc: Fix warnings about user_data
...
Such as:
warning: Parameter description for *::user_data is missing in source code comment block.
2018-09-04 15:56:32 +02:00
Bastien Nocera
bb27ca5720
lib: Work-around gtk-doc's handling of the short type
...
gtk-doc thinks "short" is only a modifier, not a type of its own (short
== short int). This work-around does not change the ABI.
See https://gitlab.gnome.org/GNOME/gtk-doc/issues/44
2018-09-04 15:45:18 +02:00
Bastien Nocera
065c0b6202
fdu2000: This comment is not API docs
...
So format it in a way that gtk-doc doesn't think it's API docs.
2018-09-04 15:44:26 +02:00
Bastien Nocera
b4819701b4
doc: Fix warning about fp_print_data
...
It was listed twice in the sections declaration.
2018-09-04 15:42:57 +02:00
Bastien Nocera
daed05755a
lib: Remove unused fp_imgdev_verify_state from drivers API
2018-09-04 14:46:25 +02:00
Bastien Nocera
fb192f706c
lib: Remove unused fp_dev_state from drivers API
2018-09-04 14:45:49 +02:00
Bastien Nocera
350b0a38e2
drivers: De-duplicate udf_crc() helper
...
Was in both the upektc_img and upekts drivers
2018-09-04 14:05:37 +02:00
Bastien Nocera
9ccbda4a40
Merge branch 'wip/hadess/update-nbis-5-0-0' into 'master'
...
Update to NBIS 5.0.0
See merge request libfprint/libfprint!12
2018-08-28 09:35:46 +00:00