aboutsummaryrefslogtreecommitdiff
path: root/include/ble
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2015-06-21 12:27:48 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2015-06-21 12:27:48 +0200
commitf4afc04ee7a085a89ad84ba89344bb50ca9e6e04 (patch)
tree404058c5ffd4773dfe13ddcd7a1cafc39864ae21 /include/ble
parent7e2fb834d8ba2eb3fd6453f135d3e8ef30c852c6 (diff)
downloadble-toys-f4afc04ee7a085a89ad84ba89344bb50ca9e6e04.tar.gz
ble-toys-f4afc04ee7a085a89ad84ba89344bb50ca9e6e04.tar.bz2
ble-toys-f4afc04ee7a085a89ad84ba89344bb50ca9e6e04.tar.xz
ble-toys-f4afc04ee7a085a89ad84ba89344bb50ca9e6e04.zip
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.
Diffstat (limited to 'include/ble')
-rw-r--r--include/ble/Bluetooth.h6
1 files changed, 2 insertions, 4 deletions
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<BluetoothGatt> connectGatt() = 0;
};
class BluetoothAdapter {