mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2025-11-15 07:38:12 +00:00
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.
This commit is contained in:
@@ -17,6 +17,14 @@ c.enumerate()
|
||||
devices = c.get_devices()
|
||||
|
||||
d = devices[0]
|
||||
assert d.has_feature(FPrint.DeviceFeature.CAPTURE)
|
||||
assert d.has_feature(FPrint.DeviceFeature.IDENTIFY)
|
||||
assert d.has_feature(FPrint.DeviceFeature.VERIFY)
|
||||
assert not d.has_feature(FPrint.DeviceFeature.DUPLICATES_CHECK)
|
||||
assert not d.has_feature(FPrint.DeviceFeature.STORAGE)
|
||||
assert not d.has_feature(FPrint.DeviceFeature.STORAGE_LIST)
|
||||
assert not d.has_feature(FPrint.DeviceFeature.STORAGE_DELETE)
|
||||
assert not d.has_feature(FPrint.DeviceFeature.STORAGE_CLEAR)
|
||||
del devices
|
||||
|
||||
d.open_sync()
|
||||
|
||||
Reference in New Issue
Block a user