Device discovery

Device discovery — Device discovery functions

Functions

Types and Values

struct fp_dscv_dev

Includes

#include <fprint.h>

Description

These functions allow you to scan the system for supported fingerprint scanning hardware. This is your starting point when integrating libfprint into your software.

When you've identified a discovered device that you would like to control, you can open it with fp_dev_open(). Note that discovered devices may no longer be available at the time when you want to open them, for example the user may have unplugged the device.

Functions

fp_discover_devs ()

struct fp_dscv_dev **
fp_discover_devs (void);

Scans the system and returns a list of discovered devices. This is your entry point into finding a fingerprint reader to operate.

Returns

a nul-terminated list of discovered devices. Must be freed with fp_dscv_devs_free() after use.


fp_dscv_devs_free ()

void
fp_dscv_devs_free (struct fp_dscv_dev **devs);

Free a list of discovered devices. This function destroys the list and all discovered devices that it included, so make sure you have opened your discovered device before freeing the list.

Parameters

devs

the list of discovered devices. If NULL, function simply returns.

 

fp_dscv_dev_get_driver ()

struct fp_driver *
fp_dscv_dev_get_driver (struct fp_dscv_dev *dev);

Gets the fp_driver for a discovered device.

Parameters

dev

the discovered device

 

Returns

the driver backing the device


fp_dscv_dev_get_devtype ()

uint32_t
fp_dscv_dev_get_devtype (struct fp_dscv_dev *dev);

Gets the devtype for a discovered device.

Parameters

dev

the discovered device

 

Returns

the devtype of the device


fp_dscv_dev_get_driver_id ()

uint16_t
fp_dscv_dev_get_driver_id (struct fp_dscv_dev *dev);

Returns a unique driver identifier for the underlying driver for that device.

Parameters

dev

a discovered fingerprint device

 

Returns

the ID for dev


fp_dscv_dev_supports_print_data ()

int
fp_dscv_dev_supports_print_data (struct fp_dscv_dev *dev,
                                 struct fp_print_data *print);

Determines if a specific fp_print_data stored print appears to be compatible with a discovered device.

Parameters

dev

the discovered device

 

print

the print for compatibility checking

 

Returns

1 if the print is compatible with the device, 0 otherwise


fp_dscv_dev_supports_dscv_print ()

int
fp_dscv_dev_supports_dscv_print (struct fp_dscv_dev *dev,
                                 struct fp_dscv_print *print);

fp_dscv_dev_supports_dscv_print is deprecated and should not be used in newly-written code.

Do not use.

Determines if a specific fp_dscv_print discovered print appears to be compatible with a discovered device.

Parameters

dev

the discovered device

 

print

the discovered print for compatibility checking

 

Returns

1 if the print is compatible with the device, 0 otherwise


fp_dscv_dev_for_print_data ()

struct fp_dscv_dev *
fp_dscv_dev_for_print_data (struct fp_dscv_dev **devs,
                            struct fp_print_data *print);

fp_dscv_dev_for_print_data is deprecated and should not be used in newly-written code.

Do not use.

Searches a list of discovered devices for a device that appears to be compatible with a fp_print_data stored print.

Parameters

devs

a list of discovered devices

 

print

the print under inspection

 

Returns

the first discovered device that appears to support the print, or NULL if no apparently compatible devices could be found


fp_dscv_dev_for_dscv_print ()

struct fp_dscv_dev *
fp_dscv_dev_for_dscv_print (struct fp_dscv_dev **devs,
                            struct fp_dscv_print *print);

fp_dscv_dev_for_dscv_print is deprecated and should not be used in newly-written code.

Do not use.

Searches a list of discovered devices for a device that appears to be compatible with a fp_dscv_print discovered print.

Parameters

devs

a list of discovered devices

 

print

the print under inspection

 

Returns

the first discovered device that appears to support the print, or NULL if no apparently compatible devices could be found

Types and Values

struct fp_dscv_dev

struct fp_dscv_dev;

fp_dscv_dev is an opaque structure type. You must access it using the functions in this section.