just a fork

Fork of BLE_API by Bluetooth Low Energy

Revision:
739:699b2a104ce3
Parent:
737:79d95f9b93be
Child:
740:8d52f0f8efd9
--- a/ble/GattClient.h	Mon Jul 06 10:10:35 2015 +0100
+++ b/ble/GattClient.h	Tue Jul 21 13:25:37 2015 +0100
@@ -138,12 +138,11 @@
     virtual ble_error_t discoverServices(Gap::Handle_t                        connectionHandle,
                                          ServiceDiscovery::ServiceCallback_t  callback,
                                          const UUID                          &matchingServiceUUID = UUID::ShortUUIDBytes_t(BLE_UUID_UNKNOWN)) {
-        /* avoid compiler warnings about unused variables */
-        (void)connectionHandle;
-        (void)callback;
-        (void)matchingServiceUUID;
-
-        return BLE_ERROR_NOT_IMPLEMENTED; /* Requesting action from porter(s): override this API if this capability is supported. */
+        return launchServiceDiscovery(connectionHandle, callback, NULL, matchingServiceUUID); /* We take advantage of the property
+                                                                * that providing NULL for the characteristic callback will result in
+                                                                * characteristic discovery being skipped for each matching
+                                                                * service. This allows for an inexpensive method to discover only
+                                                                * services. Porter(s) are free to override this. */
     }
 
     /**