rough framework
[lemu] / db.h
diff --git a/db.h b/db.h
new file mode 100644 (file)
index 0000000..a1f929f
--- /dev/null
+++ b/db.h
@@ -0,0 +1,22 @@
+#ifndef DB_H
+#define DB_H
+
+#include <sqlite3.h>
+
+struct database {
+       sqlite3 *db;
+};
+
+struct database_options {
+       char *db_file;
+};
+
+int db_init(struct database *db, struct database_options *db_opts);
+void db_fini(struct database *db);
+
+const char *db_engine();
+const char *db_version();
+
+int db_uid_from_name(struct database *db, unsigned char *name, int *uid);
+
+#endif /* DB_H */
\ No newline at end of file