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.
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.
The only API user currently seems to be the examples. fprintd has its
own storage and that will be a good idea in general.
So deprecate the API, we'll need to find a different solution for the
examples eventually.
The call to sleep(1) inside of the enrollment loop caused a crash
on at least the etes603 driver.
Because in fp_enroll_finger_img the function enters an event
handling loop. This loop needs to start before the next libusb
event timeout. Which would not happen in the etes603 driver
because the timeout there was set to 1 second as well.
Added new API functions to obtain images, even when scans are bad, perhaps
a useful way to show the user just how good/bad the scan actually was.
Drivers and examples updated accordingly.
The basic model is that image drivers declare a fp_img_driver structure
rather than a fp_driver struct. fp_img_driver will contain primitive imaging
operations such as 'scan finger and return image'. The imgdev layer will
generically implement the primitive fp_driver operations, and the imgdev
layer will fix up the enroll/verify/etc pointers at driver registration
time.
Removed const from all fp_driver declarations, as these are now modified
dynamically in the case of imaging drivers.
Prints can now be saved to disk (but you currently must classify which
finger they are) and you can load them later.
Added 2 simple example programs to demonstrate this.