Drivers now have an ID number. These will be assigned by me and documented
on the wiki. 0 cannot be used.
Drivers now define a devtype for each device they initialise. This is to
cope with the situation where a driver can support varying devices where
their print data is incompatible (i.e. image scaling is totally changed).
This doesn't apply to any existing supported devices.
Print data no longer includes driver name, and includes driver ID instead.
Paths to saved print data now include driver ID and devtype, and no longer
include driver name.
APIs exposed for converting a print_data into a blob which can then
be loaded back again later. Useful for systems who don't want to use
my simple storage system (which is only aimed at a single user).
File format is now defined and will be documented on the wiki. The header
is larger as we can no longer rely on directory paths in all scenarios.
Print data compat check now checks devtype and driver ID.
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.
Convert enrollment function to return a signed integer, which is negative
on error or corresponds into fp_enroll_result otherwise.
Now we can treat a 'FAIL' condition differently from an actual error: fail
means that enrollment didn't complete because the data was nonsense or
whatever (e.g. scanned a different finger for each stage?).
Updated upekts accordingly.
This completes an enrollment implementation for the upekts driver.
It's based on code from libthinkfinger, but as there seemed to be many
unknown details there, I spent some time analysing the bus messages in
more detail and have effectively rewritten almost all of the borrowed code.
Note that libthinkfinger is GPL licensed, so that reflects on this code too.
At release time I will ask them if they are OK for me to relicense it.
upekts will need to know when the first enrollment stage is attempted for
the first time, so add an __enroll_stage counter which actually indicates
the next stage to enroll. -1 is a special value and it means 0 is next *and*
it is the initial attemt.
Added more debug output to the enroll handler.
Added new fp_enroll_status codes for too short or uncentered scans.
Changed the print_data allocator to consider the device rather than the
driver, this feels more natural. Added missing return value.
Make fp_enroll_status codes start at 1. 0 can now be used as a
special/temporary value by the drivers. Also check that we aren't exceeding
the number of enroll stages.
Also add a missing exit() call to the verify example and update for the
above.