Commit Graph

11 Commits (d4a1b5a803c11a2196a865728488cdcf908da90b)

Author SHA1 Message Date
Vincent Coubard 2eb77d607a Update GattAuthCallbackReply_t enumeration.
Add missing values that are present in pal::AttErrorResponse.
This allows applications to use correct ATT error codes.
2020-12-08 10:47:55 +00:00
George Beckstein 9a6d207585 Update GattServer Callback API
Update parameters passed to onDataSent, onUpdatesEnabled/Disabled, and onConfirmationReceived callbacks.

Deprecate single-callback-registering functions for event handling in lieu of the new EventHandler-based API.

Introduce new GattServer::EventHandler callback functions to replace the deprecated versions.
2020-10-14 12:44:12 -04:00
George Beckstein cda2c8bb8d Introduce ChainableGapEventHandler subclass of ChainableEventHandler
The ChainableGapEventHandler enables chaining together Gap::EventHandlers so separate parts of an application can be notified of Gap events as needed. The application can register multiple Gap::EventHandler objects to one ChainableGapEventHandler and then set the global Gap::EventHandler to the ChainableGapEventHandler. All registered EventHandlers will then be called when a Gap Event occurs.
2020-10-14 12:44:09 -04:00
George Beckstein 751674b962 Introduce ChainableEventHandler and ChainableGattServerEventHandler classes.
Common functionality has been split off into a generic ChainableEventHandler for use by other EventHandler implementations. The ChainableEventHandler is essentially singly-linked list that propagates callbacks to all objects in the list.

The ChainableGattServerEventHandler enables chaining together GattServer::EventHandlers. An application can register separate event handlers (eg: for different services that need to handle GattServer events) and then set the global GattServer::setEventHandler to the instance of ChainableGattServerEventHandler with all registered GattServer::EventHandlers.
2020-10-14 12:42:25 -04:00
George Beckstein fa2c3633dd Add doxygen guard to private function 2020-10-07 13:32:17 -04:00
George Beckstein eccb3e9bda Make setImplicitCCCD private and add impl::GattServer as a friend class 2020-10-07 13:31:09 -04:00
George Beckstein ca9b70582c Remove nullptr check when deleting _implicit_cccd 2020-10-07 13:12:08 -04:00
George Beckstein 5c82533d06 Enabled getting an implicitly-created CCCD through GattCharacteristic::getDescriptor 2020-10-06 19:26:32 -04:00
Vincent Coubard 241c69f50d BLE: Cleanup public headers 2020-08-25 11:26:28 +01:00
Vincent Coubard 7cbc0e38a4 BLE: Clang tidy on public headers. 2020-08-25 11:26:28 +01:00
Vincent Coubard 13c358717f BLE: Move GATT public header into ble/gatt
Move private headers GattServerEvents.h, GapEvents,h and GapType.h in relevant part of the source tree.
2020-08-25 11:26:26 +01:00