Import: Add Parsing for Divesoft Freedom+ Format Files.

Switch the Divesoft log file importer to use the parser in
libdivecomputer. This adds support for the newer Divesoft Freedom+ log
file format.
Also refactor the OSTCTools log file importer to share common
functionality.

Signed-off-by: Michael Keller <github@ike.ch>
This commit is contained in:
Michael Keller 2024-11-11 15:41:31 +13:00
parent 7dc92e170f
commit 7f42acfdfb
10 changed files with 153 additions and 588 deletions

View file

@ -8,11 +8,13 @@
#include <stdio.h>
#include <vector>
#include <utility>
#include <memory>
struct divelog;
struct zip;
extern void ostctools_import(const char *file, struct divelog *log);
extern int ostctools_import(const std::unique_ptr<std::vector<unsigned char>> &buffer, struct divelog *log);
extern int divesoft_import(const std::unique_ptr<std::vector<unsigned char>> &buffer, struct divelog *log);
extern int parse_file(const char *filename, struct divelog *log);
extern int try_to_open_zip(const char *filename, struct divelog *log);