diff options
Diffstat (limited to 'apps/ble-inspect-device.cpp')
-rw-r--r-- | apps/ble-inspect-device.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/ble-inspect-device.cpp b/apps/ble-inspect-device.cpp index 6330512..2140e03 100644 --- a/apps/ble-inspect-device.cpp +++ b/apps/ble-inspect-device.cpp @@ -22,10 +22,10 @@ public: options("device", po::value<string>()->required(), "The MAC of the device to inspect"); } - void scan_callback(BluetoothDevice &device) { - cout << "Inspecting device: " << device.getMac().str() << endl; + void scan_callback(const shared_ptr<BluetoothDevice> &device) { + cout << "Inspecting device: " << device->getMac().str() << endl; - auto gatt = device.connectGatt(); + auto gatt = device->connectGatt(); gatt->discoverServices(); @@ -53,9 +53,9 @@ public: try { Mac mac = Mac::parseMac(mac_str); - shared_ptr<BluetoothAdapter> adapter = getAdapter(0); + auto adapter = bluetoothSystem.getAdapter("0"); - BluetoothDevice &device = adapter->getDevice(mac); + auto device = adapter->getDevice(mac); scan_callback(device); |