Debian Codegraph @

src/storage.h

raw
1 /*
2 * Simple file storage for fprintd
3 * Copyright (C) 2008 Vasily Khoruzhick <[email protected]>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 */
20
21 #pragma once
22
23 typedef int (*storage_print_data_save)(FpPrint *print);
24 typedef int (*storage_print_data_load)(FpDevice *dev,
25 FpFinger finger,
26 const char *username,
27 FpPrint **print);
28 typedef int (*storage_print_data_delete)(FpDevice *dev,
29 FpFinger finger,
30 const char *username);
31 typedef GSList *(*storage_discover_prints)(FpDevice *dev,
32 const char *username);
33 typedef GSList *(*storage_discover_users)(void);
34 typedef int (*storage_init)(void);
35 typedef int (*storage_deinit)(void);
36
37 struct storage
38 {
39 storage_init init;
40 storage_deinit deinit;
41 storage_print_data_save print_data_save;
42 storage_print_data_load print_data_load;
43 storage_print_data_delete print_data_delete;
44 storage_discover_prints discover_prints;
45 storage_discover_users discover_users;
46 };
47
48 typedef struct storage fp_storage;
49
50 /* The currently setup store */
51 extern fp_storage store;