Hi!
It's been a while... :-)
On Wed, 2008-05-28 at 12:44 +0100, Bastien Nocera wrote:
> On Wed, 2008-05-28 at 12:41 +0100, Daniel Drake wrote:
> > One small error: (sorry for bad wrapping)
> >
> > printf (" <merge key=\"info.capabilities\"
> > type=\"strlist\">fingerprint-reader</append>\n");
> >
> > closing tag should be </merge>
>
> Well spotted, will fix.
I think the type for fingerprint-reader.fprint.driver should be string,
not bool.
I'm attaching a patch (against libfprint 0.0.6). This patch also does
some cosmetics (less white spaces, one descriptive comment for each
entry).
Also, we should probably extract the driver names automatically to push
maintenance costs towards zero.
Danny, what needs to be added to the HAL spec? You've mentioned
something about that in this thread some time ago. If you have some
pointers I'm happy to provide a patch.
Thanks,
Timo
--- libfprint/Makefile.am 2008-03-20 14:37:33.000000000 +0100
+++ libfprint/Makefile.am 2008-10-23 12:54:22.000000000 +0200
@@ -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 \
--- /dev/null 2008-10-14 12:53:05.000000000 +0200
+++ libfprint/fprint-list-hal-info.c 2008-10-23 12:59:16.000000000 +0200
@@ -0,0 +1,49 @@
+
+#include "config.h"
+
+#include <stdio.h>
+#include "fp_internal.h"
+
+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=\"info.capabilities\" type=\"strlist\">biometric</append>\n");
+ printf (" <append key=\"info.capabilities\" type=\"strlist\">fingerprint-reader</append>\n");
+ printf (" <merge key=\"fingerprint-reader.fprint.driver\" type=\"string\">%s</merge>\n", driver->name);
+ printf (" <merge key=\"fingerprint-reader.fprint.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)
+{
+ printf ("<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n");
+ printf ("<!-- Created from libfprint %s -->\n", VERSION);
+ printf ("<deviceinfo version=\"0.2\">\n");
+
+ print_driver ((struct fp_driver *)&upekts_driver);
+ print_driver ((struct fp_driver *)&upektc_driver);
+ print_driver ((struct fp_driver *)&uru4000_driver);
+ print_driver ((struct fp_driver *)&aes1610_driver);
+ print_driver ((struct fp_driver *)&aes2501_driver);
+ print_driver ((struct fp_driver *)&aes4000_driver);
+ print_driver ((struct fp_driver *)&fdu2000_driver);
+
+ printf ("</deviceinfo>\n");
+
+ return 0;
+}
_______________________________________________
fprint mailing list
[email protected]
http://lists.reactivated.net/mailman/listinfo/fprint