rough framework
[lemu] / db.h
1 #ifndef DB_H
2 #define DB_H
3
4 #include <sqlite3.h>
5
6 struct database {
7 sqlite3 *db;
8 };
9
10 struct database_options {
11 char *db_file;
12 };
13
14 int db_init(struct database *db, struct database_options *db_opts);
15 void db_fini(struct database *db);
16
17 const char *db_engine();
18 const char *db_version();
19
20 int db_uid_from_name(struct database *db, unsigned char *name, int *uid);
21
22 #endif /* DB_H */