device: Do not allow enrolling a finger that is already enrolled

This makes little sense. Users should delete the finger before trying to
enroll the same one again. So throw an error at them from EnrollStart
right away.

Fixes: #95
This commit is contained in:
Benjamin Berg
2020-12-16 15:41:31 +01:00
committed by Marco Trevisan (Treviño)
parent 41086ac4c6
commit bc55deab2a
3 changed files with 19 additions and 0 deletions

View File

@ -45,6 +45,8 @@ typedef enum {
FPRINT_ERROR_PERMISSION_DENIED, /*< nick=net.reactivated.Fprint.Error.PermissionDenied >*/
/* No prints are enrolled */
FPRINT_ERROR_NO_ENROLLED_PRINTS, /*< nick=net.reactivated.Fprint.Error.NoEnrolledPrints >*/
/* Prints has already been enrolled */
FPRINT_ERROR_FINGER_ALREADY_ENROLLED, /*< nick=net.reactivated.Fprint.Error.FingerAlreadyEnrolled >*/
/* No actions currently in progress */
FPRINT_ERROR_NO_ACTION_IN_PROGRESS, /*< nick=net.reactivated.Fprint.Error.NoActionInProgress >*/
/* the finger name passed was invalid */