Skip to content

Commit e3c009c

Browse files
author
boger.wang
committed
fp-device: add new type FpDeviceError FP_DEVICE_ERROR_DATA_DUPLICATE
1 parent a4f7293 commit e3c009c

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

libfprint/fp-device.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ typedef enum {
9090
* @FP_DEVICE_ERROR_DATA_INVALID: The passed data is invalid
9191
* @FP_DEVICE_ERROR_DATA_NOT_FOUND: Requested print was not found on device
9292
* @FP_DEVICE_ERROR_DATA_FULL: No space on device available for operation
93+
* @FP_DEVICE_ERROR_DATA_DUPLICATE: Enrolling template duplicates storaged templates
9394
*
9495
* Error codes for device operations. More specific errors from other domains
9596
* such as #G_IO_ERROR or #G_USB_DEVICE_ERROR may also be reported.
@@ -104,6 +105,7 @@ typedef enum {
104105
FP_DEVICE_ERROR_DATA_INVALID,
105106
FP_DEVICE_ERROR_DATA_NOT_FOUND,
106107
FP_DEVICE_ERROR_DATA_FULL,
108+
FP_DEVICE_ERROR_DATA_DUPLICATE,
107109
} FpDeviceError;
108110

109111
GQuark fp_device_retry_quark (void);

libfprint/fpi-device.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,10 @@ fpi_device_error_new (FpDeviceError error)
135135
msg = "Print was not found on the devices storage.";
136136
break;
137137

138+
case FP_DEVICE_ERROR_DATA_DUPLICATE:
139+
msg = "This finger has already enrolled, please try a different finger";
140+
break;
141+
138142
default:
139143
g_warning ("Unsupported error, returning general error instead!");
140144
error = FP_DEVICE_ERROR_GENERAL;

0 commit comments

Comments
 (0)