From f4afc04ee7a085a89ad84ba89344bb50ca9e6e04 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Sun, 21 Jun 2015 12:27:48 +0200 Subject: o Trying to make the Bluetooth API more C++ idiomatic, a GATT connection has the same lifecycle as a BluetoothGatt. sm-get-value: o Better error handling. --- include/ble/Bluetooth.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/ble/Bluetooth.h b/include/ble/Bluetooth.h index 1a1394e..80729af 100644 --- a/include/ble/Bluetooth.h +++ b/include/ble/Bluetooth.h @@ -124,9 +124,7 @@ public: virtual BluetoothDevice &getDevice() const = 0; - virtual void connect() = 0; - - virtual void disconnect() = 0; + virtual bool isConnected() const = 0; virtual void writeValue(const BluetoothGattCharacteristic &c, const ByteBuffer &bytes) = 0; @@ -149,7 +147,7 @@ public: virtual BluetoothAdapter &getAdapter() = 0; - virtual BluetoothGatt &connectGatt() = 0; + virtual shared_ptr connectGatt() = 0; }; class BluetoothAdapter { -- cgit v1.2.3