diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-04-16 18:14:59 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-04-24 17:54:08 -0700 |
commit | 13f5c75ac49d88bd1d1f45e798a5e75b6426aa81 (patch) | |
tree | 8f8e4021f34dca2551aca707f41b8ef3c509d444 /core/libdivecomputer.h | |
parent | c07faa90f33fac895e8a0b3326adb298a1845063 (diff) | |
download | subsurface-13f5c75ac49d88bd1d1f45e798a5e75b6426aa81.tar.gz |
Convert our custom IO model to new libdivecomputer IO model
This converts our old custom IO model to the new model that
libdivecomputer introduced. This is partly based on Jef's rough patch
to make things build, with further work by me.
The FTDI code is temporarily disabled here, because it will need to be
integrated with the new way of opening devices.
The ble_serial code goes away entirely, since now libdivecomputer knows
about BLE transport natively, and doesn't need to have any serial
wrapper around it.
Signed-off-by: Jef Driesen <jef@libdivecomputer.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'core/libdivecomputer.h')
-rw-r--r-- | core/libdivecomputer.h | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/core/libdivecomputer.h b/core/libdivecomputer.h index 3986b629e..3da7fdc7b 100644 --- a/core/libdivecomputer.h +++ b/core/libdivecomputer.h @@ -11,9 +11,6 @@ #include <libdivecomputer/version.h> #include <libdivecomputer/device.h> #include <libdivecomputer/parser.h> -#ifdef SSRF_CUSTOM_IO -#include <libdivecomputer/custom_io.h> -#endif #include "dive.h" @@ -32,6 +29,7 @@ typedef struct dc_user_device_t uint32_t deviceid, diveid; dc_device_t *device; dc_context_t *context; + dc_iostream_t *iostream; struct dive_trip *trip; int preexisting; bool force_download; @@ -57,13 +55,9 @@ extern double progress_bar_fraction; extern char *logfile_name; extern char *dumpfile_name; -#if SSRF_CUSTOM_IO -// WTF. this symbol never shows up at link time -//extern dc_custom_io_t qt_serial_ops; -// Thats why I've worked around it with a stupid helper returning it. -dc_custom_io_t* get_qt_serial_ops(); -extern dc_custom_io_t serial_ftdi_ops; -#endif +dc_status_t ble_packet_open(dc_iostream_t **iostream, dc_context_t *context, const char* devaddr, void *userdata); +dc_status_t rfcomm_stream_open(dc_iostream_t **iostream, dc_context_t *context, const char* devaddr); +dc_status_t ftdi_open(dc_iostream_t **iostream, dc_context_t *context); #ifdef __cplusplus } |