Commit graph

14 commits

Author SHA1 Message Date
Marco Trevisan (Treviño) 41f8737b48 device: Deprecate fp_device_{supports,has}_* functions for has_feature
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.
2021-04-12 22:14:06 +02:00
Marco Trevisan (Treviño) ef805f2341 device: Expose supported features publicly as FpDeviceFeature
It can be convenient for device users to check what it supports, without
having multiple functions to check each single feature.

So expose this and add tests.
2021-04-12 22:14:06 +02:00
Matthew Mirvish b0d9d00762 Add support for udev based device discovery
This is primarily useful for SPI devices. These devices sometimes needs
a combination of an SPI and HID device, so discovery is a bit more
complicated.
2021-04-08 17:08:53 +02:00
Benjamin Berg b6dd522459 Rework device removal to have a nice API
This enhances the device removal to create a well defined behaviour.

Primarily, it means that:
 * "device-removed" will only be called for closed devices
 * "removed" will be called only when no operation is active

Note that all actions will fail with FP_DEVICE_ERROR_REMOVED, *except*
for open which will only return this error if it failed.

Resolves: #330
2020-11-23 17:47:03 +01:00
Marco Trevisan (Treviño) 42e4506b1b fp-device: Add finger-status property
It can be used by drivers to report the state of the finger on sensor
2020-11-07 13:23:30 +00:00
boger.wang e3c009c5b3 fp-device: add new type FpDeviceError FP_DEVICE_ERROR_DATA_DUPLICATE 2020-09-01 16:39:06 +08:00
Bastien Nocera cc887c1a37 libfprint: Fix typos 2020-04-14 13:51:02 +02:00
Marco Trevisan (Treviño) 0889ec20a8 fp-device: Remove confusing success parameter on FpMatchCb
This was added as alias to the error check, but given we're passing to the
callback both the error and the match itself, we can just avoid adding an
extra parameter that could be confusing (as may imply that the matching
happened).

Also clarify the documentation and ensure that the match value is properly
set in tests.
2020-01-16 20:24:42 +01:00
Benjamin Berg 829fb9f873 device: Add early match reporting to sync API
This makes the sync/async APIs more similar again. It also simplifies
testing as otherwise we would need the async methods for some tests.
2020-01-13 14:37:39 +01:00
Benjamin Berg 4d5c34e11a 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.
2020-01-13 14:37:39 +01:00
Marco Trevisan (Treviño) 92a5278a74 fp-device: Add a "open" property and method to check its state 2019-12-10 20:19:55 +01:00
Marco Trevisan (Treviño) 712853d1e3 fp-device: Mark user data in FpEnrollProgress as transfer none
The data has its own DestroyNotify set, so while no generic DestroyNotify
exists for generic data, let's make it clear.
2019-11-27 21:40:44 +01:00
Marco Trevisan (Treviño) c6298ede72 fp-device: Unref the print once we've notified the progress
When we notify the enroll progress with a print, this needs to be unreffed
once we're done, but this only was happening in case of error.

Since it's not up to the callback function to free it, let's do it at the
end of the function.

As per this, clarify the docs for FpEnrollProgress marking it as transfer
none.
2019-11-27 21:40:44 +01:00
Benjamin Berg 689aff0232 lib: Major rewrite of the libfprint core and API
This is a rewrite of the core based on GObject and Gio. This commit
breaks the build in a lot of ways, but basic functionality will start
working again with the next commits.
2019-11-20 11:03:09 +01:00