2007-10-08 15:46:42 +00:00
|
|
|
/*
|
|
|
|
* Main definitions for libfprint
|
|
|
|
* Copyright (C) 2007 Daniel Drake <dsd@gentoo.org>
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __FPRINT_H__
|
|
|
|
#define __FPRINT_H__
|
|
|
|
|
2007-10-08 15:55:50 +00:00
|
|
|
/* structs that applications are not allowed to peek into */
|
|
|
|
struct fp_dscv_dev;
|
2007-10-08 16:01:08 +00:00
|
|
|
struct fp_dev;
|
2007-10-08 16:05:58 +00:00
|
|
|
struct fp_driver;
|
2007-10-08 17:24:29 +00:00
|
|
|
struct fp_print_data;
|
2007-10-08 15:55:50 +00:00
|
|
|
|
|
|
|
/* Device discovery */
|
|
|
|
struct fp_dscv_dev **fp_discover_devs(void);
|
|
|
|
void fp_dscv_devs_free(struct fp_dscv_dev **devs);
|
2007-10-08 16:05:58 +00:00
|
|
|
const struct fp_driver *fp_dscv_dev_get_driver(struct fp_dscv_dev *dev);
|
2007-10-08 15:55:50 +00:00
|
|
|
|
2007-10-08 16:01:08 +00:00
|
|
|
/* Device handling */
|
|
|
|
struct fp_dev *fp_dev_open(struct fp_dscv_dev *ddev);
|
|
|
|
void fp_dev_close(struct fp_dev *dev);
|
2007-10-08 16:05:58 +00:00
|
|
|
const struct fp_driver *fp_dev_get_driver(struct fp_dev *dev);
|
2007-10-08 18:53:50 +00:00
|
|
|
int fp_dev_get_nr_enroll_stages(struct fp_dev *dev);
|
2007-10-08 16:05:58 +00:00
|
|
|
|
|
|
|
/* Drivers */
|
|
|
|
const char *fp_driver_get_name(const struct fp_driver *drv);
|
|
|
|
const char *fp_driver_get_full_name(const struct fp_driver *drv);
|
2007-10-08 16:01:08 +00:00
|
|
|
|
2007-10-08 18:53:50 +00:00
|
|
|
/* Enrolment */
|
|
|
|
enum fp_enroll_status {
|
2007-10-12 14:27:23 +00:00
|
|
|
FP_ENROLL_COMPLETE = 1,
|
2007-10-08 18:53:50 +00:00
|
|
|
FP_ENROLL_FAIL,
|
|
|
|
FP_ENROLL_PASS,
|
|
|
|
FP_ENROLL_RETRY,
|
2007-10-12 14:27:23 +00:00
|
|
|
FP_ENROLL_RETRY_TOO_SHORT,
|
|
|
|
FP_ENROLL_RETRY_CENTER_FINGER,
|
2007-10-08 18:53:50 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
enum fp_enroll_status fp_enroll_finger(struct fp_dev *dev,
|
|
|
|
struct fp_print_data **print_data);
|
|
|
|
|
2007-10-08 17:24:29 +00:00
|
|
|
/* Data handling */
|
|
|
|
void fp_print_data_free(struct fp_print_data *data);
|
|
|
|
|
|
|
|
/* Library */
|
2007-10-08 15:46:42 +00:00
|
|
|
int fp_init(void);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|