diff --git a/libfprint/fp-device.h b/libfprint/fp-device.h index 5b41c89..c920b00 100644 --- a/libfprint/fp-device.h +++ b/libfprint/fp-device.h @@ -58,6 +58,7 @@ typedef enum { * @FP_DEVICE_FEATURE_STORAGE_DELETE: Supports deleting stored templates * @FP_DEVICE_FEATURE_STORAGE_CLEAR: Supports clearing the whole storage * @FP_DEVICE_FEATURE_DUPLICATES_CHECK: Natively supports duplicates detection + * @FP_DEVICE_FEATURE_ALWAYS_ON: Whether the device can run continuously */ typedef enum /*< flags >*/ { FP_DEVICE_FEATURE_NONE = 0, @@ -69,6 +70,7 @@ typedef enum /*< flags >*/ { FP_DEVICE_FEATURE_STORAGE_DELETE = 1 << 5, FP_DEVICE_FEATURE_STORAGE_CLEAR = 1 << 6, FP_DEVICE_FEATURE_DUPLICATES_CHECK = 1 << 7, + FP_DEVICE_FEATURE_ALWAYS_ON = 1 << 8, } FpDeviceFeature; /** diff --git a/libfprint/fpi-device.c b/libfprint/fpi-device.c index fbce24c..5704622 100644 --- a/libfprint/fpi-device.c +++ b/libfprint/fpi-device.c @@ -80,6 +80,9 @@ fpi_device_class_auto_initialize_features (FpDeviceClass *device_class) if (device_class->delete && (device_class->list || device_class->clear_storage)) device_class->features |= FP_DEVICE_FEATURE_STORAGE; + + if (device_class->temp_hot_seconds < 0) + device_class->features |= FP_DEVICE_FEATURE_ALWAYS_ON; } /**