Top | ![]() |
![]() |
![]() |
![]() |
#define | FP_TYPE_DEVICE |
#define | FP_DEVICE_RETRY |
#define | FP_DEVICE_ERROR |
enum | FpDeviceType |
enum | FpScanType |
enum | FpDeviceRetry |
enum | FpDeviceError |
FpDevice |
void (*FpEnrollProgress) (FpDevice *device
,gint completed_stages
,FpPrint *print
,gpointer user_data
,GError *error
);
The passed error is guaranteed to be of type FP_DEVICE_RETRY
if set.
device |
a FpDevice |
|
completed_stages |
Number of completed stages |
|
The last scaned print. |
[nullable][transfer none] | |
user_data |
User provided data. |
[nullable][transfer none] |
error |
GError or |
[nullable][transfer none] |
FpScanType
fp_device_get_scan_type (FpDevice *device
);
Retrieves the scan type of the device.
gint
fp_device_get_nr_enroll_stages (FpDevice *device
);
Retrieves the number of enroll stages for this device.
gboolean
fp_device_has_storage (FpDevice *device
);
Whether the device has on-chip storage. If it has, you can list the
prints stored on the with fp_device_list_prints()
and you should
always delete prints from the device again using
fp_device_delete_print()
.
gboolean
fp_device_supports_identify (FpDevice *device
);
Check whether the device supports identification.
gboolean
fp_device_supports_capture (FpDevice *device
);
Check whether the device supports capturing images.
void fp_device_open (FpDevice *device
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Start an asynchronous operation to open the device. The callback will
be called once the operation has finished. Retrieve the result with
fp_device_open_finish()
.
void fp_device_close (FpDevice *device
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Start an asynchronous operation to close the device. The callback will
be called once the operation has finished. Retrieve the result with
fp_device_close_finish()
.
void fp_device_enroll (FpDevice *device
,FpPrint *template_print
,GCancellable *cancellable
,FpEnrollProgress progress_cb
,gpointer progress_data
,GDestroyNotify progress_destroy
,GAsyncReadyCallback callback
,gpointer user_data
);
Start an asynchronous operation to enroll a print. The callback will
be called once the operation has finished. Retrieve the result with
fp_device_enroll_finish()
.
The template_print
parameter is a FpPrint with available metadata filled
in. The driver may make use of this metadata, when e.g. storing the print on
device memory. It is undefined whether this print is filled in by the driver
and returned, or whether the driver will return a newly created print after
enrollment successed.
device |
a FpDevice |
|
template_print |
a FpPrint. |
[transfer floating] |
cancellable |
a GCancellable, or |
[nullable] |
progress_cb |
progress reporting callback. |
[nullable][scope notified] |
progress_data |
user data for |
[closure progress_cb] |
progress_destroy |
Destroy notify for |
[destroy progress_data] |
callback |
the function to call on completion. |
[scope async] |
user_data |
the data to pass to |
void fp_device_verify (FpDevice *device
,FpPrint *enrolled_print
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Start an asynchronous operation to close the device. The callback will
be called once the operation has finished. Retrieve the result with
fp_device_verify_finish()
.
void fp_device_identify (FpDevice *device
,GPtrArray *prints
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Start an asynchronous operation to identify prints. The callback will
be called once the operation has finished. Retrieve the result with
fp_device_identify_finish()
.
device |
a FpDevice |
|
prints |
GPtrArray of FpPrint. |
[element-type FpPrint][transfer none] |
cancellable |
a GCancellable, or |
[nullable] |
callback |
the function to call on completion |
|
user_data |
the data to pass to |
void fp_device_capture (FpDevice *device
,gboolean wait_for_finger
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Start an asynchronous operation to capture an image. The callback will
be called once the operation has finished. Retrieve the result with
fp_device_capture_finish()
.
void fp_device_delete_print (FpDevice *device
,FpPrint *enrolled_print
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Start an asynchronous operation to delete a print from the device.
The callback will be called once the operation has finished. Retrieve
the result with fp_device_delete_print_finish()
.
This only makes sense on devices that store prints on-chip, but is safe to always call.
void fp_device_list_prints (FpDevice *device
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Start an asynchronous operation to list all prints stored on the device. This only makes sense on devices that store prints on-chip.
Retrieve the result with fp_device_list_prints_finish()
.
gboolean fp_device_open_finish (FpDevice *device
,GAsyncResult *result
,GError **error
);
Finish an asynchronous operation to open the device.
See fp_device_open()
.
device |
A FpDevice |
|
result |
A GAsyncResult |
|
error |
Return location for errors, or |
gboolean fp_device_close_finish (FpDevice *device
,GAsyncResult *result
,GError **error
);
Finish an asynchronous operation to close the device.
See fp_device_close()
.
device |
A FpDevice |
|
result |
A GAsyncResult |
|
error |
Return location for errors, or |
FpPrint * fp_device_enroll_finish (FpDevice *device
,GAsyncResult *result
,GError **error
);
Finish an asynchronous operation to enroll a print. You should check
for an error of type FP_DEVICE_RETRY
to prompt the user again if there
was an interaction issue.
See fp_device_enroll()
.
device |
A FpDevice |
|
result |
A GAsyncResult |
|
error |
Return location for errors, or |
gboolean fp_device_verify_finish (FpDevice *device
,GAsyncResult *result
,gboolean *match
,FpPrint **print
,GError **error
);
Finish an asynchronous operation to verify an enrolled print. You should check
for an error of type FP_DEVICE_RETRY
to prompt the user again if there
was an interaction issue.
With print
you can fetch the newly created print and retrieve the image data if available.
See fp_device_verify()
.
device |
A FpDevice |
|
result |
A GAsyncResult |
|
match |
Whether the user presented the correct finger. |
[out] |
Location to store the scanned print, or |
[out][transfer full][nullable] | |
error |
Return location for errors, or |
gboolean fp_device_identify_finish (FpDevice *device
,GAsyncResult *result
,FpPrint **match
,FpPrint **print
,GError **error
);
Finish an asynchronous operation to identify a print. You should check
for an error of type FP_DEVICE_RETRY
to prompt the user again if there
was an interaction issue.
Use match
to find the print that matched. With print
you can fetch the
newly created print and retrieve the image data if available.
See fp_device_identify()
.
device |
A FpDevice |
|
result |
A GAsyncResult |
|
match |
Location for the matched FpPrint, or |
[out][transfer full][nullable] |
Location for the new FpPrint, or |
[out][transfer full][nullable] | |
error |
Return location for errors, or |
FpImage * fp_device_capture_finish (FpDevice *device
,GAsyncResult *result
,GError **error
);
Finish an asynchronous operation to capture an image. You should check
for an error of type FP_DEVICE_RETRY
to prompt the user again if there
was an interaction issue.
See fp_device_capture()
.
device |
A FpDevice |
|
result |
A GAsyncResult |
|
error |
Return location for errors, or |
gboolean fp_device_delete_print_finish (FpDevice *device
,GAsyncResult *result
,GError **error
);
Finish an asynchronous operation to delete an enrolled print.
device |
A FpDevice |
|
result |
A GAsyncResult |
|
error |
Return location for errors, or |
GPtrArray * fp_device_list_prints_finish (FpDevice *device
,GAsyncResult *result
,GError **error
);
Finish an asynchronous operation to list all device stored prints.
device |
A FpDevice |
|
result |
A GAsyncResult |
|
error |
Return location for errors, or |
gboolean fp_device_open_sync (FpDevice *device
,GCancellable *cancellable
,GError **error
);
Open the device synchronously.
gboolean fp_device_close_sync (FpDevice *device
,GCancellable *cancellable
,GError **error
);
Close the device synchronously.
FpPrint * fp_device_enroll_sync (FpDevice *device
,FpPrint *template_print
,GCancellable *cancellable
,FpEnrollProgress progress_cb
,gpointer progress_data
,GError **error
);
Enroll a new print. See fp_device_enroll()
. It is undefined whether
template_print
is updated or a newly created FpPrint is returned.
device |
a FpDevice |
|
template_print |
A FpPrint to fill in or use as a template. |
[transfer floating] |
cancellable |
a GCancellable, or |
[nullable] |
progress_cb |
progress reporting callback. |
[nullable][scope call] |
progress_data |
user data for |
|
error |
Return location for errors, or |
gboolean fp_device_verify_sync (FpDevice *device
,FpPrint *enrolled_print
,GCancellable *cancellable
,gboolean *match
,FpPrint **print
,GError **error
);
Verify a given print synchronously.
device |
a FpDevice |
|
enrolled_print |
a FpPrint to verify |
|
cancellable |
a GCancellable, or |
[nullable] |
match |
Whether the user presented the correct finger. |
[out] |
Location to store the scanned print, or |
[out][transfer full][nullable] | |
error |
Return location for errors, or |
gboolean fp_device_identify_sync (FpDevice *device
,GPtrArray *prints
,GCancellable *cancellable
,FpPrint **match
,FpPrint **print
,GError **error
);
Identify a print synchronously.
device |
a FpDevice |
|
prints |
GPtrArray of FpPrint. |
[element-type FpPrint][transfer none] |
cancellable |
a GCancellable, or |
[nullable] |
match |
Location for the matched FpPrint, or |
[out][transfer full][nullable] |
Location for the new FpPrint, or |
[out][transfer full][nullable] | |
error |
Return location for errors, or |
FpImage * fp_device_capture_sync (FpDevice *device
,gboolean wait_for_finger
,GCancellable *cancellable
,GError **error
);
Start an synchronous operation to capture an image.
gboolean fp_device_delete_print_sync (FpDevice *device
,FpPrint *enrolled_print
,GCancellable *cancellable
,GError **error
);
Delete a given print from the device.
GPtrArray * fp_device_list_prints_sync (FpDevice *device
,GCancellable *cancellable
,GError **error
);
List device stored prints synchronously.
Error codes representing scan failures resulting in the user needing to retry.
The scan did not succeed due to poor scan quality or other general user scanning problem. |
||
The scan did not succeed because the finger swipe was too short. |
||
The scan did not succeed because the finger was not centered on the scanner. |
||
The scan did not succeed due to quality or pressure problems; the user should remove their finger from the scanner before retrying. |
Error codes for device operations. More specific errors from other domains such as G_IO_ERROR or G_USB_DEVICE_ERROR may also be reported.
A general error occured. |
||
The device does not support the requested operation. |
||
The device needs to be opened to start this operation. |
||
The device has already been opened. |
||
The device is busy with another request. |
||
Protocol error |
||
The passed data is invalid |
||
Requested print was not found on device |
||
No space on device available for operation |