diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-06-22 13:37:39 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-06-22 13:37:39 -0700 |
commit | d4b0ce1c86d420a308770a598a07c3815778dc57 (patch) | |
tree | 0412251c815ce05f198cd0d7d791ad59088d6693 /libdivecomputer.h | |
parent | e96a1864be076fcdf870188b95b1d43f16308590 (diff) | |
download | subsurface-d4b0ce1c86d420a308770a598a07c3815778dc57.tar.gz |
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 <torvalds@linux-foundation.org>
Diffstat (limited to 'libdivecomputer.h')
-rw-r--r-- | libdivecomputer.h | 13 |
1 files changed, 3 insertions, 10 deletions
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 |