mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
core: load and save fingerprints to XML
We always use the global fingerprint table - maybe this should just not be a parameter of the accessor functions? The syntax is very simple - the raw data is encoded as a hex string, the rest of the components are hex numbers. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
33527cb9e5
commit
2b1db9da82
4 changed files with 67 additions and 0 deletions
10
core/parse.h
10
core/parse.h
|
@ -30,6 +30,13 @@ struct parser_settings {
|
|||
uint32_t deviceid;
|
||||
const char *nickname, *serial_nr, *firmware;
|
||||
} dc;
|
||||
struct {
|
||||
uint32_t model;
|
||||
uint32_t serial;
|
||||
uint32_t fdeviceid;
|
||||
uint32_t fdiveid;
|
||||
const char *data;
|
||||
} fingerprint;
|
||||
};
|
||||
|
||||
enum import_source {
|
||||
|
@ -83,6 +90,7 @@ struct parser_state {
|
|||
struct trip_table *trips; /* non-owning */
|
||||
struct dive_site_table *sites; /* non-owning */
|
||||
struct device_table *devices; /* non-owning */
|
||||
struct fingerprint_table *fingerprints; /* non-owning */
|
||||
struct filter_preset_table *filter_presets; /* non-owning */
|
||||
|
||||
sqlite3 *sql_handle; /* for SQL based parsers */
|
||||
|
@ -113,6 +121,8 @@ void reset_dc_info(struct divecomputer *dc, struct parser_state *state);
|
|||
void reset_dc_settings(struct parser_state *state);
|
||||
void settings_start(struct parser_state *state);
|
||||
void settings_end(struct parser_state *state);
|
||||
void fingerprint_settings_start(struct parser_state *state);
|
||||
void fingerprint_settings_end(struct parser_state *state);
|
||||
void dc_settings_start(struct parser_state *state);
|
||||
void dc_settings_end(struct parser_state *state);
|
||||
void dive_site_start(struct parser_state *state);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue