storage: Add function to discover users that have prints

For sensors with internal storage we may want to garbage collect prints.
Adding this API means we can list all local prints, allowing us to find
out whether there are prints on the device's storage with no
corresponding print on the host.
This commit is contained in:
Benjamin Berg
2019-07-31 16:00:12 +02:00
parent d7821aa790
commit ca482036c7
4 changed files with 27 additions and 0 deletions

View File

@ -31,6 +31,7 @@ typedef int (*storage_print_data_delete)(FpDevice *dev,
FpFinger finger,
const char *username);
typedef GSList *(*storage_discover_prints)(FpDevice *dev, const char *username);
typedef GSList *(*storage_discover_users)();
typedef int (*storage_init)(void);
typedef int (*storage_deinit)(void);
@ -41,6 +42,7 @@ struct storage {
storage_print_data_load print_data_load;
storage_print_data_delete print_data_delete;
storage_discover_prints discover_prints;
storage_discover_users discover_users;
};
typedef struct storage fp_storage;