diff options
author | Miika Turkia <miika.turkia@gmail.com> | 2014-02-15 08:36:49 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-02-14 22:45:07 -0800 |
commit | 4b949936c26d5689c331d7c7e25b8c130e97c0e5 (patch) | |
tree | 2ea19c1e71239ef7b7f3e433cae7d76d49a307ce /dive.h | |
parent | e49bd86f5e6d96161eb2518f23ce64f7969a4375 (diff) | |
download | subsurface-4b949936c26d5689c331d7c7e25b8c130e97c0e5.tar.gz |
Refactoring sqlite import support
Move the opening of DB connection to occur before DC dependent code.
This way we can try to detect log software before calling the DC
dependent import function. This prepares for adding support for
Shearwater sqlite database.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'dive.h')
-rw-r--r-- | dive.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -6,6 +6,7 @@ #include <time.h> #include <math.h> #include <zip.h> +#include <sqlite3.h> /* Windows has no MIN/MAX macros - so let's just roll our own */ #define MIN(x, y) ({ \ @@ -643,7 +644,7 @@ extern void parse_xml_buffer(const char *url, const char *buf, int size, struct extern void parse_xml_exit(void); extern void set_filename(const char *filename, bool force); -extern int parse_dm4_buffer(const char *url, const char *buf, int size, struct dive_table *table, char **error); +extern int parse_dm4_buffer(const sqlite3 *handle, const char *url, const char *buf, int size, struct dive_table *table, char **error); extern void parse_file(const char *filename, char **error); extern void parse_csv_file(const char *filename, int time, int depth, int temp, int po2f, int cnsf, int stopdepthf, int sepidx, const char *csvtemplate, char **error); |