summaryrefslogtreecommitdiffstats
path: root/core/qt-ble.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/qt-ble.h')
-rw-r--r--core/qt-ble.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/qt-ble.h b/core/qt-ble.h
index eb028f9b9..f9600ad19 100644
--- a/core/qt-ble.h
+++ b/core/qt-ble.h
@@ -20,6 +20,7 @@ class BLEObject : public QObject
public:
BLEObject(QLowEnergyController *c, dc_user_device_t *);
~BLEObject();
+ inline void set_timeout(int value) { timeout = value; }
dc_status_t write(const void* data, size_t size, size_t *actual);
dc_status_t read(void* data, size_t size, size_t *actual);
@@ -45,6 +46,7 @@ private:
dc_user_device_t *device;
unsigned int hw_credit = 0;
unsigned int desc_written = 0;
+ int timeout;
QList<QUuid> hwAllCharacteristics = {
"{00000001-0000-1000-8000-008025000000}", // HW_OSTC_BLE_DATA_RX
@@ -57,6 +59,7 @@ private:
extern "C" {
dc_status_t qt_ble_open(void **io, dc_context_t *context, const char *devaddr, dc_user_device_t *user_device);
+dc_status_t qt_ble_set_timeout(void *io, int timeout);
dc_status_t qt_ble_read(void *io, void* data, size_t size, size_t *actual);
dc_status_t qt_ble_write(void *io, const void* data, size_t size, size_t *actual);
dc_status_t qt_ble_close(void *io);