|
Packit |
f7449a |
/*
|
|
Packit |
f7449a |
* Simple file storage for fprintd
|
|
Packit |
f7449a |
* Copyright (C) 2008 Vasily Khoruzhick <anarsoul@gmail.com>
|
|
Packit |
f7449a |
*
|
|
Packit |
f7449a |
* This program is free software; you can redistribute it and/or modify
|
|
Packit |
f7449a |
* it under the terms of the GNU General Public License as published by
|
|
Packit |
f7449a |
* the Free Software Foundation; either version 2 of the License, or
|
|
Packit |
f7449a |
* (at your option) any later version.
|
|
Packit |
f7449a |
*
|
|
Packit |
f7449a |
* This program is distributed in the hope that it will be useful,
|
|
Packit |
f7449a |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
f7449a |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
Packit |
f7449a |
* GNU General Public License for more details.
|
|
Packit |
f7449a |
*
|
|
Packit |
f7449a |
* You should have received a copy of the GNU General Public License along
|
|
Packit |
f7449a |
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
Packit |
f7449a |
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
Packit |
f7449a |
*
|
|
Packit |
f7449a |
*/
|
|
Packit |
f7449a |
|
|
Packit |
f7449a |
#ifndef STORAGE_H
|
|
Packit |
f7449a |
|
|
Packit |
f7449a |
#define STORAGE_H
|
|
Packit |
f7449a |
|
|
Packit |
f7449a |
typedef int (*storage_print_data_save)(FpPrint *print);
|
|
Packit |
f7449a |
typedef int (*storage_print_data_load)(FpDevice *dev,
|
|
Packit |
f7449a |
FpFinger finger,
|
|
Packit |
f7449a |
const char *username,
|
|
Packit |
f7449a |
FpPrint **print);
|
|
Packit |
f7449a |
typedef int (*storage_print_data_delete)(FpDevice *dev,
|
|
Packit |
f7449a |
FpFinger finger,
|
|
Packit |
f7449a |
const char *username);
|
|
Packit |
f7449a |
typedef GSList *(*storage_discover_prints)(FpDevice *dev, const char *username);
|
|
Packit |
f7449a |
typedef GSList *(*storage_discover_users)();
|
|
Packit |
f7449a |
typedef int (*storage_init)(void);
|
|
Packit |
f7449a |
typedef int (*storage_deinit)(void);
|
|
Packit |
f7449a |
|
|
Packit |
f7449a |
struct storage {
|
|
Packit |
f7449a |
storage_init init;
|
|
Packit |
f7449a |
storage_deinit deinit;
|
|
Packit |
f7449a |
storage_print_data_save print_data_save;
|
|
Packit |
f7449a |
storage_print_data_load print_data_load;
|
|
Packit |
f7449a |
storage_print_data_delete print_data_delete;
|
|
Packit |
f7449a |
storage_discover_prints discover_prints;
|
|
Packit |
f7449a |
storage_discover_users discover_users;
|
|
Packit |
f7449a |
};
|
|
Packit |
f7449a |
|
|
Packit |
f7449a |
typedef struct storage fp_storage;
|
|
Packit |
f7449a |
|
|
Packit |
f7449a |
/* The currently setup store */
|
|
Packit |
f7449a |
fp_storage store;
|
|
Packit |
f7449a |
|
|
Packit |
f7449a |
#endif
|
|
Packit |
f7449a |
|