diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2015-07-19 20:02:00 +0200 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2015-07-19 20:02:00 +0200 |
commit | 0374af511d7efdb856af372f126e66e5a78841d7 (patch) | |
tree | b63444108dbccf7ce1ddd3c0bb8ab9ac4f1aebaa /apps/ble-inspect-device.h | |
parent | bfcc6e18af33d21ae3ae23def873fa6415045bec (diff) | |
download | ble-toys-0374af511d7efdb856af372f126e66e5a78841d7.tar.gz ble-toys-0374af511d7efdb856af372f126e66e5a78841d7.tar.bz2 ble-toys-0374af511d7efdb856af372f126e66e5a78841d7.tar.xz ble-toys-0374af511d7efdb856af372f126e66e5a78841d7.zip |
o Applying clang-format to all apps.
Diffstat (limited to 'apps/ble-inspect-device.h')
-rw-r--r-- | apps/ble-inspect-device.h | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/apps/ble-inspect-device.h b/apps/ble-inspect-device.h index 346f9be..ff19ba1 100644 --- a/apps/ble-inspect-device.h +++ b/apps/ble-inspect-device.h @@ -13,7 +13,6 @@ using namespace trygvis::bluetooth; using namespace trygvis::apps; class ble_inspect_device : public app { - public: ble_inspect_device() : app("ble-inspect-device") { } @@ -21,8 +20,7 @@ public: ~ble_inspect_device() = default; void add_options(po::options_description_easy_init &options) override { - options - ("device", po::value<string>()->required(), "The MAC of the device to inspect"); + options("device", po::value<string>()->required(), "The MAC of the device to inspect"); } void scan_callback(BluetoothDevice &device) { @@ -32,18 +30,18 @@ public: gatt->discoverServices(); - vector < BluetoothGattService * > services = gatt->getServices(); + vector<BluetoothGattService *> services = gatt->getServices(); cout << "Device has " << services.size() << " services" << endl; - for (auto &s: services) { + for (auto &s : services) { const vector<BluetoothGattCharacteristic *> characteristics = s->getCharacteristics(); - cout << "Service: UUID: " << s->getUuid() << - ", has " << characteristics.size() << " characteristics" << endl; + cout << "Service: UUID: " << s->getUuid() << ", has " << characteristics.size() << " characteristics" + << endl; - for (auto &c: characteristics) { - cout << "Characteristic: UUID: " << c->getUuid() << - ", properties: " << (int) c->getProperties() << endl; + for (auto &c : characteristics) { + cout << "Characteristic: UUID: " << c->getUuid() << ", properties: " << (int) c->getProperties() + << endl; } } } @@ -72,6 +70,5 @@ public: } } }; - } } |