From d4b0ce1c86d420a308770a598a07c3815778dc57 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Fri, 22 Jun 2012 13:37:39 -0700 Subject: Update to new sane libdivecomputer interfaces This does mean that you have to build subsurface against a new version of libdivecomputer, and that version is likely going to have various slightly incompatible changes. But the new interfaces allow for easily adding new supported dive computers without subsurface having to be updated for each new vendor and model, so some slight pain is definitely worth it this time. I'm not even going to try to have some backwards-compatible version here, the libdivecomputer interface changes are so extensive. Native enumeration of devices is just the smallest part of it: the constants and types that libdivecomputer uses now have much nicer names that all start with DC_ or dc_, so you don't get the kinds of name clashes we had with "gasmix_t" etc. Signed-off-by: Linus Torvalds --- libdivecomputer.h | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'libdivecomputer.h') diff --git a/libdivecomputer.h b/libdivecomputer.h index c6e99fa73..633b3b1b1 100644 --- a/libdivecomputer.h +++ b/libdivecomputer.h @@ -20,20 +20,13 @@ /* 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 { - device_type_t type; - const char *name, *devname; + dc_descriptor_t *descriptor; + const char *vendor, *product, *devname; + dc_device_t *device; progressbar_t progress; - device_devinfo_t devinfo; - device_clock_t clock; int preexisting; } device_data_t; -struct device_list { - const char *name; - device_type_t type; -}; - -extern struct device_list device_list[]; extern GError *do_import(device_data_t *data); #endif -- cgit v1.2.3-70-g09d2