2 * Main definitions for libfprint
3 * Copyright (C) 2007 Daniel Drake <dsd@gentoo.org>
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23 /* structs that applications are not allowed to peek into */
30 /* misc/general stuff */
44 /* Device discovery */
45 struct fp_dscv_dev
**fp_discover_devs(void);
46 void fp_dscv_devs_free(struct fp_dscv_dev
**devs
);
47 struct fp_driver
*fp_dscv_dev_get_driver(struct fp_dscv_dev
*dev
);
50 struct fp_dev
*fp_dev_open(struct fp_dscv_dev
*ddev
);
51 void fp_dev_close(struct fp_dev
*dev
);
52 struct fp_driver
*fp_dev_get_driver(struct fp_dev
*dev
);
53 int fp_dev_get_nr_enroll_stages(struct fp_dev
*dev
);
54 struct fp_img_dev
*fp_dev_to_img_dev(struct fp_dev
*dev
);
57 const char *fp_driver_get_name(struct fp_driver
*drv
);
58 const char *fp_driver_get_full_name(struct fp_driver
*drv
);
61 enum fp_enroll_result
{
62 FP_ENROLL_COMPLETE
= 1,
65 FP_ENROLL_RETRY
= 100,
66 FP_ENROLL_RETRY_TOO_SHORT
,
67 FP_ENROLL_RETRY_CENTER_FINGER
,
68 FP_ENROLL_RETRY_REMOVE_FINGER
,
71 int fp_enroll_finger(struct fp_dev
*dev
, struct fp_print_data
**print_data
);
74 enum fp_verify_result
{
75 FP_VERIFY_NO_MATCH
= 0,
77 FP_VERIFY_RETRY
= FP_ENROLL_RETRY
,
78 FP_VERIFY_RETRY_TOO_SHORT
= FP_ENROLL_RETRY_TOO_SHORT
,
79 FP_VERIFY_RETRY_CENTER_FINGER
= FP_ENROLL_RETRY_CENTER_FINGER
,
80 FP_VERIFY_RETRY_REMOVE_FINGER
= FP_ENROLL_RETRY_REMOVE_FINGER
,
83 int fp_verify_finger(struct fp_dev
*dev
, struct fp_print_data
*enrolled_print
);
86 int fp_print_data_load(struct fp_dev
*dev
, enum fp_finger finger
,
87 struct fp_print_data
**data
);
88 int fp_print_data_save(struct fp_print_data
*data
, enum fp_finger finger
);
89 void fp_print_data_free(struct fp_print_data
*data
);
92 int fp_imgdev_capture(struct fp_img_dev
*imgdev
, int unconditional
,
93 struct fp_img
**image
);
94 int fp_imgdev_get_img_width(struct fp_img_dev
*imgdev
);
95 int fp_imgdev_get_img_height(struct fp_img_dev
*imgdev
);
98 int fp_img_get_height(struct fp_img
*img
);
99 int fp_img_get_width(struct fp_img
*img
);
100 unsigned char *fp_img_get_data(struct fp_img
*img
);
101 int fp_img_save_to_file(struct fp_img
*img
, char *path
);
102 void fp_img_standardize(struct fp_img
*img
);
103 void fp_img_free(struct fp_img
*img
);