aboutsummaryrefslogtreecommitdiffstats
path: root/src/dblayer.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/dblayer.h')
-rw-r--r--src/dblayer.h19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/dblayer.h b/src/dblayer.h
index 24fdc2b..de73aac 100644
--- a/src/dblayer.h
+++ b/src/dblayer.h
@@ -33,14 +33,25 @@ struct DBstruct {
SqlError error;
};
-extern int db_exists(UserOpt *opt);
-extern DB open_DB();
+extern int db_exists(const UserOpt *opt);
+
+/* Open the db file. On fail return null pointer to db
+ * and the corresponding SQL error (NO_DB_FILE | NO_TABLES)*/
+extern DB open_DB(const UserOpt *opt);
+
extern void close_DB(DB *DB);
+/********/
/* init */
+/********/
+
+/* Create the tables required for the ckdb */
extern void init_make_tables(DB *db);
-extern DB init_make_DB();
+extern DB init_make_DB(const UserOpt *opt);
+/*******/
/* add */
-extern int add_insert_program_to_db(DB *db, char * name);
+/*******/
+
+extern int add_insert_program_to_db(DB *db, const char * name);
#endif /* DBLAEYR_H */