Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
DISCONTINUED:openSUSE:11.2
libfprint
libfprint-hal-fdi.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File libfprint-hal-fdi.patch of Package libfprint
--- libfprint/core.c 2008-10-27 14:24:09.000000000 +0100 +++ libfprint/core.c 2008-10-27 14:26:05.000000000 +0100 @@ -351,6 +351,24 @@ } } +API_EXPORTED struct fp_driver **fprint_get_drivers (void) +{ + GPtrArray *array; + unsigned int i; + + array = g_ptr_array_new (); + for (i = 0; i < G_N_ELEMENTS(primitive_drivers); i++) + g_ptr_array_add (array, primitive_drivers[i]); + + for (i = 0; i < G_N_ELEMENTS(img_drivers); i++) + g_ptr_array_add (array, &(img_drivers[i]->driver)); + + /* Add a null item terminating the array */ + g_ptr_array_add (array, NULL); + + return (struct fp_driver **) g_ptr_array_free (array, FALSE); +} + static struct fp_driver *find_supporting_driver(struct usb_device *udev, const struct usb_id **usb_id) { --- libfprint/fp_internal.h 2008-03-20 14:37:33.000000000 +0100 +++ libfprint/fp_internal.h 2008-10-27 14:26:05.000000000 +0100 @@ -62,6 +62,8 @@ #define fp_warn(fmt...) _fpi_log(LOG_LEVEL_WARNING, fmt) #define fp_err(fmt...) _fpi_log(LOG_LEVEL_ERROR, fmt) +struct fp_driver **fprint_get_drivers (void); + struct fp_dev { struct fp_driver *drv; usb_dev_handle *udev; --- libfprint/fprint-list-hal-info.c 1970-01-01 01:00:00.000000000 +0100 +++ libfprint/fprint-list-hal-info.c 2008-10-27 14:34:13.000000000 +0100 @@ -0,0 +1,84 @@ +/* + * Helper binary for creating a HAL FDI file for supported devices + * Copyright (C) 2008 Bastien Nocera <hadess@hadess.net> + * Copyright (C) 2008 Timo Hoenig <thoenig@suse.de>, <thoenig@nouse.net> + * + * 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 + */ + +#include <config.h> +#include <stdio.h> + +#include "fp_internal.h" + +/* FDI entry example: + * + * <!-- AuthenTec AES2501 --> + * <match key="usb.vendor_id" int="0x08ff"> + * <match key="usb.product_id" int="0x2580"> + * <merge key="info.category" type="string">biometric.fingerprint_reader</merge> + * <append key="biometric.fingerprint_reader.access_method" type="strlist">libfprint</append> + * <append key="info.capabilities" type="strlist">biometric</append> + * <append key="info.capabilities" type="strlist">biometric.fingerprint_reader</append> + * <merge key="biometric.fingerprint_reader.libfprint.driver" type="string">aes2501</merge> + * <merge key="biometric.fingerprint_reader.libfprint.support" type="bool">true</merge> + * </match> + * </match> + * + */ + +static void print_driver (struct fp_driver *driver) +{ + int i; + + for (i = 0; driver->id_table[i].vendor != 0; i++) { + printf (" <!-- %s -->\n", fp_driver_get_full_name (driver)); + printf (" <match key=\"usb.vendor_id\" int=\"0x%04x\">\n", driver->id_table[i].vendor); + printf (" <match key=\"usb.product_id\" int=\"0x%04x\">\n", driver->id_table[i].product); + printf (" <merge key=\"info.category\" type=\"string\">biometric.fingerprint_reader</merge>\n"); + printf (" <append key=\"biometric.fingerprint_reader.access_method\" type=\"strlist\">libfprint</append>\n"); + printf (" <append key=\"info.capabilities\" type=\"strlist\">biometric</append>\n"); + printf (" <append key=\"info.capabilities\" type=\"strlist\">biometric.fingerprint_reader</append>\n"); + printf (" <merge key=\"biometric.fingerprint_reader.libfprint.driver\" type=\"string\">%s</merge>\n", driver->name); + printf (" <merge key=\"biometric.fingerprint_reader.libfprint.support\" type=\"bool\">true</merge>\n"); + printf (" </match>\n"); + printf (" </match>\n"); + } +} + +static void print_imaging_driver (struct fp_img_driver *driver) +{ + print_driver (&(driver->driver)); +} + +int main (int argc, char **argv) +{ + struct fp_driver **list; + guint i; + + list = fprint_get_drivers (); + + printf ("<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n"); + printf ("<!-- Created from libfprint %s -->\n", VERSION); + printf ("<deviceinfo version=\"0.2\">\n"); + + for (i = 0; list[i] != NULL; i++) { + print_driver (list[i]); + } + + printf ("</deviceinfo>\n"); + + return 0; +} --- libfprint/Makefile.am 2008-10-27 14:24:09.000000000 +0100 +++ libfprint/Makefile.am 2008-10-27 14:26:05.000000000 +0100 @@ -1,3 +1,4 @@ +noinst_PROGRAMS = fprint-list-hal-info lib_LTLIBRARIES = libfprint.la UPEKTS_SRC = drivers/upekts.c @@ -47,10 +48,18 @@ nbis/mindtct/sort.c \ nbis/mindtct/util.c -libfprint_la_CFLAGS = -fvisibility=hidden -I$(srcdir)/nbis/include $(LIBUSB_CFLAGS) $(GLIB_CFLAGS) $(IMAGEMAGICK_CFLAGS) $(CRYPTO_CFLAGS) $(AM_CFLAGS) +libfprint_la_CFLAGS = -I$(srcdir)/nbis/include $(LIBUSB_CFLAGS) $(GLIB_CFLAGS) $(IMAGEMAGICK_CFLAGS) $(CRYPTO_CFLAGS) $(AM_CFLAGS) libfprint_la_LDFLAGS = -version-info @lt_major@:@lt_revision@:@lt_age@ libfprint_la_LIBADD = -lm $(LIBUSB_LIBS) $(GLIB_LIBS) $(IMAGEMAGICK_LIBS) $(CRYPTO_LIBS) +fprint_list_hal_info_SOURCES = fprint-list-hal-info.c +fprint_list_hal_info_CFLAGS = -fvisibility=hidden -I$(srcdir)/nbis/include $(LIBUSB_CFLAGS) $(GLIB_CFLAGS) $(IMAGEMAGICK_CFLAGS) $(CRYPTO_CFLAGS) $(AM_CFLAGS) +fprint_list_hal_info_LDADD = $(builddir)/libfprint.la +hal_fdi_DATA = 10-fingerprint-reader-fprint.fdi +hal_fdidir = $(datadir)/hal/fdi/information/20thirdparty/ +$(hal_fdi_DATA): fprint-list-hal-info + $(builddir)/fprint-list-hal-info > $@ + libfprint_la_SOURCES = \ fp_internal.h \ core.c \
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor