Print discovery (deprecated)

Print discovery (deprecated) — Print discovery functions

Functions

Types and Values

struct fp_dscv_print

Includes

#include <fprint.h>

Description

The stored print documentation detailed a simple API for storing per-device prints for a single user, namely fp_print_data_save(). It also detailed a load function, fp_print_data_load(), but usage of this function is limited to scenarios where you know which device you would like to use, and you know which finger you are looking to verify.

In other cases, it would be more useful to be able to enumerate all previously saved prints, potentially even before device discovery. These functions are designed to offer this functionality to you.

Discovered prints are stored in a fp_dscv_print structure, and you can use functions documented below to access some information about these prints. You can determine if a discovered print appears to be compatible with a device using functions such as fp_dscv_dev_supports_dscv_print() and fp_dev_supports_dscv_print().

When you are ready to use the print, you can load it into memory in the form of a stored print by using the fp_print_data_from_dscv_print() function.

You may have noticed the use of the word "appears" in the above paragraphs. libfprint performs print discovery simply by examining the file and directory structure of libfprint's private data store. It does not examine the actual prints themselves. Just because a print has been discovered and appears to be compatible with a certain device does not necessarily mean that it is usable; when you come to load or use it, under unusual circumstances it may turn out that the print is corrupt or not for the device that it appeared to be. Also, it is possible that the print may have been deleted by the time you come to load it.

Note that this portion of the library is deprecated. All that it offers is already implementable using publicly available functions, and its usage is unnecessarily restrictive in terms of how it stores data.

Functions

fp_discover_prints ()

struct fp_dscv_print **
fp_discover_prints (void);

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

Do not use.

Scans the users home directory and returns a list of prints that were previously saved using fp_print_data_save().

Returns

a NULL-terminated list of discovered prints, must be freed with fp_dscv_prints_free() after use.


fp_dscv_prints_free ()

void
fp_dscv_prints_free (struct fp_dscv_print **prints);

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

Do not use.

Frees a list of discovered prints. This function also frees the discovered prints themselves, so make sure you do not use any discovered prints after calling this function.

Parameters

prints

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

 

fp_dscv_print_get_driver_id ()

uint16_t
fp_dscv_print_get_driver_id (struct fp_dscv_print *print);

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

Do not use.

Gets the driver ID for a discovered print. The driver ID indicates which driver the print originally came from. The print is only usable with a device controlled by that driver.

Parameters

print

the discovered print

 

Returns

the driver ID of the driver compatible with the print


fp_dscv_print_get_devtype ()

uint32_t
fp_dscv_print_get_devtype (struct fp_dscv_print *print);

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

Do not use.

Gets the devtype for a discovered print. The devtype represents which type of device under the parent driver is compatible with the print.

Parameters

print

the discovered print

 

Returns

the devtype of the device range compatible with the print


fp_dscv_print_get_finger ()

enum fp_finger
fp_dscv_print_get_finger (struct fp_dscv_print *print);

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

Do not use.

Gets the finger code for a discovered print.

Parameters

print

discovered print

 

Returns

a finger code from fp_finger


fp_dscv_print_delete ()

int
fp_dscv_print_delete (struct fp_dscv_print *print);

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

Do not use.

Removes a discovered print from disk. After successful return of this function, functions such as fp_dscv_print_get_finger() will continue to operate as before, however calling fp_print_data_from_dscv_print() will fail for obvious reasons.

Parameters

print

the discovered print to remove from disk

 

Returns

0 on success, negative on error

Types and Values

struct fp_dscv_print

struct fp_dscv_print;

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