aboutsummaryrefslogtreecommitdiff
path: root/ble/Bluetooth.cpp
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2015-06-21 16:58:18 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2015-06-21 16:58:18 +0200
commit9042b87f32bcabcc671e393376d3fb96ad858caa (patch)
treec68fe4f680fcc2a53ff3375141c9ad52cd1a028e /ble/Bluetooth.cpp
parent4529a75f15bffd5bb941818deef03fb50a6fc9c9 (diff)
downloadble-toys-9042b87f32bcabcc671e393376d3fb96ad858caa.tar.gz
ble-toys-9042b87f32bcabcc671e393376d3fb96ad858caa.tar.bz2
ble-toys-9042b87f32bcabcc671e393376d3fb96ad858caa.tar.xz
ble-toys-9042b87f32bcabcc671e393376d3fb96ad858caa.zip
ble-scan:
o New tool to scan for devices. Requires root on linux :( Linux is also touchy if the program dies. BluetoothAdapter: o Adding getMac().
Diffstat (limited to 'ble/Bluetooth.cpp')
-rw-r--r--ble/Bluetooth.cpp18
1 files changed, 1 insertions, 17 deletions
diff --git a/ble/Bluetooth.cpp b/ble/Bluetooth.cpp
index b672dba..14a8cda 100644
--- a/ble/Bluetooth.cpp
+++ b/ble/Bluetooth.cpp
@@ -208,23 +208,7 @@ BluetoothSystem::~BluetoothSystem() {
shutdown();
}
-/*
-map<int, LinuxBluetoothAdapter *> adapters;
-
-BluetoothAdapter &getAdapter(int hciDevice) {
- map<int, LinuxBluetoothAdapter *>::iterator it = adapters.find(hciDevice);
-
- if (it == adapters.end()) {
- LinuxBluetoothAdapter *adapter = new LinuxBluetoothAdapter(hciDevice);
- adapters[hciDevice] = adapter;
- return *adapter;
- }
-
- return *it->second;
-}
-*/
-
-BluetoothAdapter &getAdapter(int hciDevice) {
+shared_ptr<BluetoothAdapter> getAdapter(int hciDevice) {
return getAdapterImpl(hciDevice);
}