mirror of
https://gitlab.com/mishakmak/pam-fprint-grosshack.git
synced 2026-04-08 20:03:34 +02:00
Update storage code to allow plugins
Add naive plugin support to the storage code, it will load plugins from $(libdir)/fprintd/modules, given the configuration from /etc/fprintd.conf.
This commit is contained in:
committed by
Daniel Drake
parent
96b444ed3e
commit
bd2debc01e
@ -22,8 +22,6 @@
|
||||
|
||||
#define STORAGE_H
|
||||
|
||||
#include "file_storage.h"
|
||||
|
||||
typedef int (*storage_print_data_save)(struct fp_print_data *data,
|
||||
enum fp_finger finger, const char *username);
|
||||
typedef int (*storage_print_data_load)(struct fp_dev *dev,
|
||||
@ -45,26 +43,8 @@ struct storage {
|
||||
|
||||
typedef struct storage fp_storage;
|
||||
|
||||
enum storage_type {
|
||||
FP_FILE_STORAGE = 0,
|
||||
|
||||
FP_STORAGES_COUNT,
|
||||
};
|
||||
|
||||
typedef enum storage_type fp_storage_type;
|
||||
|
||||
fp_storage storages[FP_STORAGES_COUNT] = {
|
||||
{
|
||||
.init = &file_storage_init,
|
||||
.deinit = &file_storage_deinit,
|
||||
.print_data_save = &file_storage_print_data_save,
|
||||
.print_data_load = &file_storage_print_data_load,
|
||||
.print_data_delete = &file_storage_print_data_delete,
|
||||
.discover_prints = &file_storage_discover_prints,
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
/* The currently setup store */
|
||||
fp_storage store;
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user