We can avoid having multiple device feature-check functions now and
just rely on a few.
Add uncrustify config to properly handle begin/end deprecation macros.
Some devices have storage but that's is limited enough not to be able
to store all the metadata, but just a fingerprint id.
In such case we also need to use the local storage to be able to verify.
Fprintd does this already, but we don't do it in the libfprint examples.
So, in in case we enroll, always save the print information to the disk,
while in case we verify we try to load the print from disk and we use
that in case its private data matches the one provided by the device.
Adding a trailing \n to g_message, g_debug, g_warning and g_error is not
neccessary, as a newline will be added automatically by the logging
infrastructure.
Promptly show the match/no-match result in the match callback instead of
waiting the verification process to be finished.
Also exit in case of an hard error, while permit to try again in case of a
retry error.
It is a good idea to report match results early, to e.g. log in a user
immediately even if more device interaction is needed. Add new _full
variants for the verify/identify functions, with a corresponding
callback. Also move driver result reporting into new
fpi_device_{identify,verify}_report functions and remove the reporting
from the fpi_device_{identify,verify}_complete calls.
Basic updates to code is done in places. Only the upekts driver is
actually modified from a behaviour point of view. The image driver code
should be restructured quite a bit to split the reporting and only
report completion after device deactivation. This should simplifiy the
code quite a bit again.
The manage-prints command would close the device twice when the user
hits an invalid number or 'n' and no prints need to be deleted.
Simply remove the erroneous call to fix the issue.
We were passing around the common cflags and setting them for each library
or executable, but this is just a repetition given we can just use
add_project_arguments for this.
Meson files are normally using 4-spaces to indent and functions use first
parameter on the same line while others at next indentation level, not
following the parenthesis indentation.
So adapt libfprint to follow the meson standard.
While there are various functions which similar usage in all the examples,
I'd prefer to keep each example to be self-containing most of the things.
However some clearly repeated action can be moved to a single codebase.
These examples have not been ported. In addition, they are also not very
useful these days, as the demo application offers a much nicer view to
view images from a sensor.
With this script it is possible to test libfprint/fprintd without any
hardware device. The image needs to be provides as a PNG with the alpha
channel storing the print data.
See the comment in the file on how the script can be used.
These PNGs were generated using gimp simply by using the greyscale image
itself as an alpha mask. The reason to do this is solely for easier
consumption together with cairo A8 surfaces.