From 9e3a22c5220f72fb9b9358dc127808186d3398dd Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Sat, 6 Oct 2018 11:23:08 -0700 Subject: qt-ble: add 'get_name()' function to expose the BLE name to libdivecomputer Some divecomputer backends (ok, right now really only the Aqualung i770R and i300C) want to know the bluetooth name of the dive computer they connect to, because the name contains identifying information like the serial number. This just adds the support for that to our Qt BLE code. Signed-off-by: Linus Torvalds --- core/qt-ble.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'core/qt-ble.cpp') diff --git a/core/qt-ble.cpp b/core/qt-ble.cpp index ba75c8472..b2f2edf47 100644 --- a/core/qt-ble.cpp +++ b/core/qt-ble.cpp @@ -542,4 +542,10 @@ dc_status_t qt_ble_write(void *io, const void* data, size_t size, size_t *actual return ble->write(data, size, actual); } +const char *qt_ble_get_name(void *io) +{ + BLEObject *ble = (BLEObject *) io; + return ble->get_name(); +} + } /* extern "C" */ -- cgit v1.2.3-70-g09d2