diff options
author | Sven Gothel <[email protected]> | 2020-09-18 02:34:35 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2020-09-18 02:34:35 +0200 |
commit | 806bf635886ecd9e34077791000c2cded4e1121b (patch) | |
tree | 269b39f414c4720e4051981093d59ce0d9115054 /examples | |
parent | 55282d659427f3167d141062eb5b03ae3e2ba2b7 (diff) |
HCIComm, L2CAPComm, GATTHandler: Better var- and accessor-naming, init fd in init-list of ctor
Diffstat (limited to 'examples')
-rw-r--r-- | examples/direct_bt_scanner00/dbt_scanner00.cpp | 2 | ||||
-rw-r--r-- | examples/direct_bt_scanner01/dbt_scanner01.cpp | 6 | ||||
-rw-r--r-- | examples/direct_bt_scanner10/dbt_scanner10.cpp | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/examples/direct_bt_scanner00/dbt_scanner00.cpp b/examples/direct_bt_scanner00/dbt_scanner00.cpp index 5cf9f996..20a033d0 100644 --- a/examples/direct_bt_scanner00/dbt_scanner00.cpp +++ b/examples/direct_bt_scanner00/dbt_scanner00.cpp @@ -267,7 +267,7 @@ int main(int argc, char *argv[]) } { std::shared_ptr<GATTHandler> gatt = device->getGATTHandler(); - if( nullptr != gatt && gatt->getIsConnected() ) { + if( nullptr != gatt && gatt->isConnected() ) { std::shared_ptr<DeviceInformation> di = gatt->getDeviceInformation(primServices); if( nullptr != di ) { fprintf(stderr, " DeviceInformation: %s\n\n", di->toString().c_str()); diff --git a/examples/direct_bt_scanner01/dbt_scanner01.cpp b/examples/direct_bt_scanner01/dbt_scanner01.cpp index 4d791050..3ea5541c 100644 --- a/examples/direct_bt_scanner01/dbt_scanner01.cpp +++ b/examples/direct_bt_scanner01/dbt_scanner01.cpp @@ -277,19 +277,19 @@ int main(int argc, char *argv[]) if( nullptr != ga ) { fprintf(stderr, " GenericAccess: %s\n\n", ga->toString().c_str()); } - if( nullptr != gatt && gatt->getIsConnected() ) { + if( nullptr != gatt && gatt->isConnected() ) { std::shared_ptr<DeviceInformation> di = gatt->getDeviceInformation(primServices); if( nullptr != di ) { fprintf(stderr, " DeviceInformation: %s\n\n", di->toString().c_str()); } } - for(size_t i=0; i<primServices.size() && gatt->getIsConnected(); i++) { + for(size_t i=0; i<primServices.size() && gatt->isConnected(); i++) { GATTService & primService = *primServices.at(i); fprintf(stderr, " [%2.2d] Service %s\n", (int)i, primService.toString().c_str()); fprintf(stderr, " [%2.2d] Service Characteristics\n", (int)i); std::vector<GATTCharacteristicRef> & serviceCharacteristics = primService.characteristicList; - for(size_t j=0; j<serviceCharacteristics.size() && gatt->getIsConnected(); j++) { + for(size_t j=0; j<serviceCharacteristics.size() && gatt->isConnected(); j++) { GATTCharacteristic & serviceChar = *serviceCharacteristics.at(j); fprintf(stderr, " [%2.2d.%2.2d] Decla: %s\n", (int)i, (int)j, serviceChar.toString().c_str()); if( serviceChar.hasProperties(GATTCharacteristic::PropertyBitVal::Read) ) { diff --git a/examples/direct_bt_scanner10/dbt_scanner10.cpp b/examples/direct_bt_scanner10/dbt_scanner10.cpp index 20a0c7ee..63901e68 100644 --- a/examples/direct_bt_scanner10/dbt_scanner10.cpp +++ b/examples/direct_bt_scanner10/dbt_scanner10.cpp @@ -307,7 +307,7 @@ static void processConnectedDevice(std::shared_ptr<DBTDevice> device) { } { std::shared_ptr<GATTHandler> gatt = device->getGATTHandler(); - if( nullptr != gatt && gatt->getIsConnected() ) { + if( nullptr != gatt && gatt->isConnected() ) { std::shared_ptr<DeviceInformation> di = gatt->getDeviceInformation(primServices); if( nullptr != di && !SILENT_GATT ) { fprintf(stderr, " DeviceInformation: %s\n\n", di->toString().c_str()); |