High level Bluetooth Low Energy API and radio abstraction layer
Fork of BLE_API by
Diff: public/ServiceDiscovery.h
- Revision:
- 487:07d4423e442b
- Parent:
- 482:a4c6ac278fd4
- Child:
- 497:926d444599e8
diff -r bcb77e15d152 -r 07d4423e442b public/ServiceDiscovery.h --- a/public/ServiceDiscovery.h Fri Jun 19 15:52:01 2015 +0100 +++ b/public/ServiceDiscovery.h Fri Jun 19 15:52:01 2015 +0100 @@ -28,8 +28,30 @@ /* * Exposed application callback types. */ + + /** + * Callback type for when a matching Service is found during service- + * discovery. The receiving function is passed in a pointer to a + * DiscoveredService object which will remain valid for the lifetime of the + * callback. Memory for this object is owned by the BLE_API eventing + * framework. The application can safely make a persistent shallow-copy of + * this object in order to work with the service beyond the callback. + */ typedef void (*ServiceCallback_t)(const DiscoveredService *); + + /** + * Callback type for when a matching Characteristic is found during service- + * discovery. The receiving function is passed in a pointer to a + * DiscoveredCharacteristic object which will remain valid for the lifetime + * of the callback. Memory for this object is owned by the BLE_API eventing + * framework. The application can safely make a persistent shallow-copy of + * this object in order to work with the characteristic beyond the callback. + */ typedef void (*CharacteristicCallback_t)(const DiscoveredCharacteristic *); + + /** + * Callback type for when serviceDiscovery terminates. + */ typedef void (*TerminationCallback_t)(Gap::Handle_t connectionHandle); public: