mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
1ca1fe7994
This simplifies the vendor/product fields into just a single "model" string for the dive computer, since we can't really validly ever use it any other way anyway. Also, add 'deviceid' and 'diveid' fields: they are just 32-bit hex values that are unique for that particular dive computer model. For libdivecomputer, they are basically the first word of the SHA1 of the data that libdivecomputer gives us. (Trying to expose it in some other way is insane - different dive computers use different models for the ID, so don't try to do some kind of serial number or something like that) For the Uemis Zurich, which doesn't use the libdivecomputer import, we currently only set the model name. The computer does have some kind of device ID string, and we could/should just do the same "SHA1 over the ID" to give it a unique ID, but the pseudo-xml parsing confuses me, so I'll let Dirk fix that up. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
27 lines
664 B
C
27 lines
664 B
C
#ifndef LIBDIVECOMPUTER_H
|
|
#define LIBDIVECOMPUTER_H
|
|
|
|
/* libdivecomputer */
|
|
#include <libdivecomputer/device.h>
|
|
#include <libdivecomputer/parser.h>
|
|
|
|
/* handling uemis Zurich SDA files */
|
|
#include "uemis.h"
|
|
|
|
/* don't forget to include the UI toolkit specific display-XXX.h first
|
|
to get the definition of progressbar_t */
|
|
typedef struct device_data_t {
|
|
dc_descriptor_t *descriptor;
|
|
const char *vendor, *product, *devname;
|
|
unsigned int deviceid, diveid;
|
|
dc_device_t *device;
|
|
dc_context_t *context;
|
|
progressbar_t progress;
|
|
int preexisting;
|
|
gboolean force_download;
|
|
GtkDialog *dialog;
|
|
} device_data_t;
|
|
|
|
extern GError *do_import(device_data_t *data);
|
|
|
|
#endif
|