Introduce an early reporting mechanism for verify and match

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.
This commit is contained in:
Benjamin Berg
2019-12-24 01:01:04 +01:00
parent 8292c449f7
commit 4d5c34e11a
13 changed files with 385 additions and 102 deletions

View File

@@ -152,6 +152,7 @@ on_list_completed (FpDevice *dev, GAsyncResult *res, gpointer user_data)
g_print ("Print loaded. Time to verify!\n");
fp_device_verify (dev, verify_print, NULL,
NULL, NULL, NULL,
(GAsyncReadyCallback) on_verify_completed,
verify_data);
}
@@ -205,6 +206,7 @@ start_verification (FpDevice *dev, VerifyData *verify_data)
g_print ("Print loaded. Time to verify!\n");
fp_device_verify (dev, verify_print, NULL,
NULL, NULL, NULL,
(GAsyncReadyCallback) on_verify_completed,
verify_data);
}