Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of BLE_API by
public/GattServer.h@548:623e4c0f0b6e, 2015-06-19 (annotated)
- Committer:
- rgrover1
- Date:
- Fri Jun 19 15:52:09 2015 +0100
- Revision:
- 548:623e4c0f0b6e
- Parent:
- 547:f84c514eee35
- Child:
- 550:35b3962903af
Synchronized with git rev 962533e3
Author: Rohit Grover
fix GattServer::onDataWritten()
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
rgrover1 | 258:85de85adfac7 | 1 | /* mbed Microcontroller Library |
rgrover1 | 258:85de85adfac7 | 2 | * Copyright (c) 2006-2013 ARM Limited |
rgrover1 | 258:85de85adfac7 | 3 | * |
rgrover1 | 258:85de85adfac7 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
rgrover1 | 258:85de85adfac7 | 5 | * you may not use this file except in compliance with the License. |
rgrover1 | 258:85de85adfac7 | 6 | * You may obtain a copy of the License at |
rgrover1 | 258:85de85adfac7 | 7 | * |
rgrover1 | 258:85de85adfac7 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
rgrover1 | 258:85de85adfac7 | 9 | * |
rgrover1 | 258:85de85adfac7 | 10 | * Unless required by applicable law or agreed to in writing, software |
rgrover1 | 258:85de85adfac7 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
rgrover1 | 258:85de85adfac7 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
rgrover1 | 258:85de85adfac7 | 13 | * See the License for the specific language governing permissions and |
rgrover1 | 258:85de85adfac7 | 14 | * limitations under the License. |
rgrover1 | 258:85de85adfac7 | 15 | */ |
rgrover1 | 258:85de85adfac7 | 16 | |
rgrover1 | 258:85de85adfac7 | 17 | #ifndef __GATT_SERVER_H__ |
rgrover1 | 258:85de85adfac7 | 18 | #define __GATT_SERVER_H__ |
rgrover1 | 258:85de85adfac7 | 19 | |
rgrover1 | 340:c7684a5bc2e1 | 20 | #include "Gap.h" |
rgrover1 | 258:85de85adfac7 | 21 | #include "GattService.h" |
rgrover1 | 340:c7684a5bc2e1 | 22 | #include "GattAttribute.h" |
rgrover1 | 258:85de85adfac7 | 23 | #include "GattServerEvents.h" |
rgrover1 | 527:493185cebc03 | 24 | #include "GattCallbackParamTypes.h" |
rgrover1 | 258:85de85adfac7 | 25 | #include "CallChainOfFunctionPointersWithContext.h" |
rgrover1 | 258:85de85adfac7 | 26 | |
rgrover1 | 258:85de85adfac7 | 27 | class GattServer { |
rgrover1 | 258:85de85adfac7 | 28 | public: |
rgrover1 | 258:85de85adfac7 | 29 | /* Event callback handlers. */ |
rgrover1 | 376:47ff130c1d74 | 30 | typedef void (*EventCallback_t)(GattAttribute::Handle_t attributeHandle); |
rgrover1 | 258:85de85adfac7 | 31 | typedef void (*ServerEventCallback_t)(void); /**< independent of any particular attribute */ |
rgrover1 | 258:85de85adfac7 | 32 | |
rgrover1 | 258:85de85adfac7 | 33 | protected: |
rgrover1 | 263:73847e8b6025 | 34 | GattServer() : |
rgrover1 | 263:73847e8b6025 | 35 | serviceCount(0), |
rgrover1 | 263:73847e8b6025 | 36 | characteristicCount(0), |
rgrover1 | 547:f84c514eee35 | 37 | dataSentCallChain(), |
rgrover1 | 548:623e4c0f0b6e | 38 | dataWrittenCallChain(), |
rgrover1 | 300:d9a39f759a6a | 39 | onDataRead(), |
rgrover1 | 263:73847e8b6025 | 40 | onUpdatesEnabled(NULL), |
rgrover1 | 263:73847e8b6025 | 41 | onUpdatesDisabled(NULL), |
rgrover1 | 263:73847e8b6025 | 42 | onConfirmationReceived(NULL) { |
rgrover1 | 258:85de85adfac7 | 43 | /* empty */ |
rgrover1 | 258:85de85adfac7 | 44 | } |
rgrover1 | 258:85de85adfac7 | 45 | |
rgrover1 | 526:caa67c3187a0 | 46 | public: |
rgrover1 | 258:85de85adfac7 | 47 | /* These functions must be defined in the sub-class */ |
rgrover1 | 539:0b6e82025358 | 48 | |
rgrover1 | 539:0b6e82025358 | 49 | /** |
rgrover1 | 539:0b6e82025358 | 50 | * Add a service declaration to the local server ATT table. Also add the |
rgrover1 | 539:0b6e82025358 | 51 | * characteristics contained within. |
rgrover1 | 539:0b6e82025358 | 52 | */ |
rgrover1 | 539:0b6e82025358 | 53 | virtual ble_error_t addService(GattService &) = 0; |
rgrover1 | 539:0b6e82025358 | 54 | |
rgrover1 | 539:0b6e82025358 | 55 | /** |
rgrover1 | 539:0b6e82025358 | 56 | * Read the value of a characteristic from the local GattServer |
rgrover1 | 539:0b6e82025358 | 57 | * @param[in] attributeHandle |
rgrover1 | 539:0b6e82025358 | 58 | * Attribute handle for the value attribute of the characteristic. |
rgrover1 | 539:0b6e82025358 | 59 | * @param[out] buffer |
rgrover1 | 539:0b6e82025358 | 60 | * A buffer to hold the value being read. |
rgrover1 | 539:0b6e82025358 | 61 | * @param[in/out] lengthP |
rgrover1 | 539:0b6e82025358 | 62 | * Length of the buffer being supplied. If the attribute |
rgrover1 | 539:0b6e82025358 | 63 | * value is longer than the size of the supplied buffer, |
rgrover1 | 539:0b6e82025358 | 64 | * this variable will hold upon return the total attribute value length |
rgrover1 | 539:0b6e82025358 | 65 | * (excluding offset). The application may use this |
rgrover1 | 539:0b6e82025358 | 66 | * information to allocate a suitable buffer size. |
rgrover1 | 539:0b6e82025358 | 67 | * |
rgrover1 | 539:0b6e82025358 | 68 | * @return BLE_ERROR_NONE if a value was read successfully into the buffer. |
rgrover1 | 539:0b6e82025358 | 69 | */ |
rgrover1 | 539:0b6e82025358 | 70 | virtual ble_error_t read(GattAttribute::Handle_t attributeHandle, uint8_t buffer[], uint16_t *lengthP) = 0; |
rgrover1 | 539:0b6e82025358 | 71 | |
rgrover1 | 539:0b6e82025358 | 72 | /** |
rgrover1 | 539:0b6e82025358 | 73 | * Read the value of a characteristic from the local GattServer |
rgrover1 | 539:0b6e82025358 | 74 | * @param[in] connectionHandle |
rgrover1 | 539:0b6e82025358 | 75 | * Connection Handle. |
rgrover1 | 539:0b6e82025358 | 76 | * @param[in] attributeHandle |
rgrover1 | 539:0b6e82025358 | 77 | * Attribute handle for the value attribute of the characteristic. |
rgrover1 | 539:0b6e82025358 | 78 | * @param[out] buffer |
rgrover1 | 539:0b6e82025358 | 79 | * A buffer to hold the value being read. |
rgrover1 | 539:0b6e82025358 | 80 | * @param[in/out] lengthP |
rgrover1 | 539:0b6e82025358 | 81 | * Length of the buffer being supplied. If the attribute |
rgrover1 | 539:0b6e82025358 | 82 | * value is longer than the size of the supplied buffer, |
rgrover1 | 539:0b6e82025358 | 83 | * this variable will hold upon return the total attribute value length |
rgrover1 | 539:0b6e82025358 | 84 | * (excluding offset). The application may use this |
rgrover1 | 539:0b6e82025358 | 85 | * information to allocate a suitable buffer size. |
rgrover1 | 539:0b6e82025358 | 86 | * |
rgrover1 | 539:0b6e82025358 | 87 | * @return BLE_ERROR_NONE if a value was read successfully into the buffer. |
rgrover1 | 539:0b6e82025358 | 88 | * |
rgrover1 | 539:0b6e82025358 | 89 | * @note This API is a version of above with an additional connection handle |
rgrover1 | 539:0b6e82025358 | 90 | * parameter to allow fetches for connection-specific multivalued |
rgrover1 | 539:0b6e82025358 | 91 | * attribtues (such as the CCCDs). |
rgrover1 | 539:0b6e82025358 | 92 | */ |
rgrover1 | 539:0b6e82025358 | 93 | virtual ble_error_t read(Gap::Handle_t connectionHandle, GattAttribute::Handle_t attributeHandle, uint8_t *buffer, uint16_t *lengthP) = 0; |
rgrover1 | 539:0b6e82025358 | 94 | |
rgrover1 | 539:0b6e82025358 | 95 | /** |
rgrover1 | 539:0b6e82025358 | 96 | * Update the value of a characteristic on the local GattServer. |
rgrover1 | 539:0b6e82025358 | 97 | * |
rgrover1 | 539:0b6e82025358 | 98 | * @param[in] attributeHandle |
rgrover1 | 539:0b6e82025358 | 99 | * Handle for the value attribute of the Characteristic. |
rgrover1 | 539:0b6e82025358 | 100 | * @param[in] value |
rgrover1 | 539:0b6e82025358 | 101 | * A pointer to a buffer holding the new value |
rgrover1 | 539:0b6e82025358 | 102 | * @param[in] size |
rgrover1 | 539:0b6e82025358 | 103 | * Size of the new value (in bytes). |
rgrover1 | 539:0b6e82025358 | 104 | * @param[in] localOnly |
rgrover1 | 539:0b6e82025358 | 105 | * Should this update be kept on the local |
rgrover1 | 539:0b6e82025358 | 106 | * GattServer regardless of the state of the |
rgrover1 | 539:0b6e82025358 | 107 | * notify/indicate flag in the CCCD for this |
rgrover1 | 539:0b6e82025358 | 108 | * Characteristic? If set to true, no notification |
rgrover1 | 539:0b6e82025358 | 109 | * or indication is generated. |
rgrover1 | 539:0b6e82025358 | 110 | * |
rgrover1 | 539:0b6e82025358 | 111 | * @return BLE_ERROR_NONE if we have successfully set the value of the attribute. |
rgrover1 | 539:0b6e82025358 | 112 | */ |
rgrover1 | 539:0b6e82025358 | 113 | virtual ble_error_t write(GattAttribute::Handle_t, const uint8_t *, uint16_t, bool localOnly = false) = 0; |
rgrover1 | 539:0b6e82025358 | 114 | |
rgrover1 | 539:0b6e82025358 | 115 | /** |
rgrover1 | 539:0b6e82025358 | 116 | * Update the value of a characteristic on the local GattServer. A version |
rgrover1 | 539:0b6e82025358 | 117 | * of the same as above with connection handle parameter to allow updates |
rgrover1 | 539:0b6e82025358 | 118 | * for connection-specific multivalued attribtues (such as the CCCDs). |
rgrover1 | 539:0b6e82025358 | 119 | * |
rgrover1 | 539:0b6e82025358 | 120 | * @param[in] connectionHandle |
rgrover1 | 539:0b6e82025358 | 121 | * Connection Handle. |
rgrover1 | 539:0b6e82025358 | 122 | * @param[in] attributeHandle |
rgrover1 | 539:0b6e82025358 | 123 | * Handle for the value attribute of the Characteristic. |
rgrover1 | 539:0b6e82025358 | 124 | * @param[in] value |
rgrover1 | 539:0b6e82025358 | 125 | * A pointer to a buffer holding the new value |
rgrover1 | 539:0b6e82025358 | 126 | * @param[in] size |
rgrover1 | 539:0b6e82025358 | 127 | * Size of the new value (in bytes). |
rgrover1 | 539:0b6e82025358 | 128 | * @param[in] localOnly |
rgrover1 | 539:0b6e82025358 | 129 | * Should this update be kept on the local |
rgrover1 | 539:0b6e82025358 | 130 | * GattServer regardless of the state of the |
rgrover1 | 539:0b6e82025358 | 131 | * notify/indicate flag in the CCCD for this |
rgrover1 | 539:0b6e82025358 | 132 | * Characteristic? If set to true, no notification |
rgrover1 | 539:0b6e82025358 | 133 | * or indication is generated. |
rgrover1 | 539:0b6e82025358 | 134 | * |
rgrover1 | 539:0b6e82025358 | 135 | * @return BLE_ERROR_NONE if we have successfully set the value of the attribute. |
rgrover1 | 539:0b6e82025358 | 136 | */ |
rgrover1 | 539:0b6e82025358 | 137 | virtual ble_error_t write(Gap::Handle_t connectionHandle, GattAttribute::Handle_t, const uint8_t *, uint16_t, bool localOnly = false) = 0; |
rgrover1 | 539:0b6e82025358 | 138 | |
rgrover1 | 539:0b6e82025358 | 139 | virtual ble_error_t initializeGATTDatabase(void) = 0; |
rgrover1 | 258:85de85adfac7 | 140 | |
rgrover1 | 258:85de85adfac7 | 141 | // ToDo: For updateValue, check the CCCD to see if the value we are |
rgrover1 | 258:85de85adfac7 | 142 | // updating has the notify or indicate bits sent, and if BOTH are set |
rgrover1 | 258:85de85adfac7 | 143 | // be sure to call sd_ble_gatts_hvx() twice with notify then indicate! |
rgrover1 | 258:85de85adfac7 | 144 | // Strange use case, but valid and must be covered! |
rgrover1 | 258:85de85adfac7 | 145 | |
rgrover1 | 547:f84c514eee35 | 146 | /** |
rgrover1 | 547:f84c514eee35 | 147 | * Add a callback for the GATT event DATA_SENT (which is triggered when |
rgrover1 | 547:f84c514eee35 | 148 | * updates are sent out by GATT in the form of notifications). |
rgrover1 | 547:f84c514eee35 | 149 | * |
rgrover1 | 547:f84c514eee35 | 150 | * @Note: it is possible to chain together multiple onDataSent callbacks |
rgrover1 | 547:f84c514eee35 | 151 | * (potentially from different modules of an application) to receive updates |
rgrover1 | 547:f84c514eee35 | 152 | * to characteristics. |
rgrover1 | 547:f84c514eee35 | 153 | * |
rgrover1 | 547:f84c514eee35 | 154 | * @Note: it is also possible to setup a callback into a member function of |
rgrover1 | 547:f84c514eee35 | 155 | * some object. |
rgrover1 | 547:f84c514eee35 | 156 | */ |
rgrover1 | 547:f84c514eee35 | 157 | void onDataSent(void (*callback)(unsigned count)) {dataSentCallChain.add(callback);} |
rgrover1 | 259:a95264ad705c | 158 | template <typename T> |
rgrover1 | 547:f84c514eee35 | 159 | void onDataSent(T *objPtr, void (T::*memberPtr)(unsigned count)) { |
rgrover1 | 547:f84c514eee35 | 160 | dataSentCallChain.add(objPtr, memberPtr); |
rgrover1 | 259:a95264ad705c | 161 | } |
rgrover1 | 547:f84c514eee35 | 162 | |
rgrover1 | 548:623e4c0f0b6e | 163 | /** |
rgrover1 | 548:623e4c0f0b6e | 164 | * Setup a callback for when an attribute has its value updated by or at the |
rgrover1 | 548:623e4c0f0b6e | 165 | * connected peer. For a peripheral, this callback triggered when the local |
rgrover1 | 548:623e4c0f0b6e | 166 | * GATT server has an attribute updated by a write command from the peer. |
rgrover1 | 548:623e4c0f0b6e | 167 | * For a Central, this callback is triggered when a response is received for |
rgrover1 | 548:623e4c0f0b6e | 168 | * a write request. |
rgrover1 | 548:623e4c0f0b6e | 169 | * |
rgrover1 | 548:623e4c0f0b6e | 170 | * @Note: it is possible to chain together multiple onDataWritten callbacks |
rgrover1 | 548:623e4c0f0b6e | 171 | * (potentially from different modules of an application) to receive updates |
rgrover1 | 548:623e4c0f0b6e | 172 | * to characteristics. Many services, such as DFU and UART add their own |
rgrover1 | 548:623e4c0f0b6e | 173 | * onDataWritten callbacks behind the scenes to trap interesting events. |
rgrover1 | 548:623e4c0f0b6e | 174 | * |
rgrover1 | 548:623e4c0f0b6e | 175 | * @Note: it is also possible to setup a callback into a member function of |
rgrover1 | 548:623e4c0f0b6e | 176 | * some object. |
rgrover1 | 548:623e4c0f0b6e | 177 | */ |
rgrover1 | 548:623e4c0f0b6e | 178 | void onDataWritten(void (*callback)(const GattWriteCallbackParams *eventDataP)) {dataWrittenCallChain.add(callback);} |
rgrover1 | 258:85de85adfac7 | 179 | template <typename T> |
rgrover1 | 548:623e4c0f0b6e | 180 | void onDataWritten(T *objPtr, void (T::*memberPtr)(const GattWriteCallbackParams *context)) { |
rgrover1 | 548:623e4c0f0b6e | 181 | dataWrittenCallChain.add(objPtr, memberPtr); |
rgrover1 | 258:85de85adfac7 | 182 | } |
rgrover1 | 300:d9a39f759a6a | 183 | |
rgrover1 | 300:d9a39f759a6a | 184 | /** |
rgrover1 | 300:d9a39f759a6a | 185 | * A virtual function to allow underlying stacks to indicate if they support |
rgrover1 | 300:d9a39f759a6a | 186 | * onDataRead(). It should be overridden to return true as applicable. |
rgrover1 | 300:d9a39f759a6a | 187 | */ |
rgrover1 | 301:54c87189e423 | 188 | virtual bool isOnDataReadAvailable() const { |
rgrover1 | 300:d9a39f759a6a | 189 | return false; |
rgrover1 | 300:d9a39f759a6a | 190 | } |
rgrover1 | 527:493185cebc03 | 191 | ble_error_t setOnDataRead(void (*callback)(const GattReadCallbackParams *eventDataP)) { |
rgrover1 | 301:54c87189e423 | 192 | if (!isOnDataReadAvailable()) { |
rgrover1 | 300:d9a39f759a6a | 193 | return BLE_ERROR_NOT_IMPLEMENTED; |
rgrover1 | 300:d9a39f759a6a | 194 | } |
rgrover1 | 300:d9a39f759a6a | 195 | |
rgrover1 | 300:d9a39f759a6a | 196 | onDataRead.add(callback); |
rgrover1 | 300:d9a39f759a6a | 197 | return BLE_ERROR_NONE; |
rgrover1 | 300:d9a39f759a6a | 198 | } |
rgrover1 | 300:d9a39f759a6a | 199 | template <typename T> |
rgrover1 | 527:493185cebc03 | 200 | ble_error_t setOnDataRead(T *objPtr, void (T::*memberPtr)(const GattReadCallbackParams *context)) { |
rgrover1 | 301:54c87189e423 | 201 | if (!isOnDataReadAvailable()) { |
rgrover1 | 300:d9a39f759a6a | 202 | return BLE_ERROR_NOT_IMPLEMENTED; |
rgrover1 | 300:d9a39f759a6a | 203 | } |
rgrover1 | 300:d9a39f759a6a | 204 | |
rgrover1 | 300:d9a39f759a6a | 205 | onDataRead.add(objPtr, memberPtr); |
rgrover1 | 300:d9a39f759a6a | 206 | return BLE_ERROR_NONE; |
rgrover1 | 300:d9a39f759a6a | 207 | } |
rgrover1 | 377:5044c245e996 | 208 | void setOnUpdatesEnabled(EventCallback_t callback) {onUpdatesEnabled = callback;} |
rgrover1 | 377:5044c245e996 | 209 | void setOnUpdatesDisabled(EventCallback_t callback) {onUpdatesDisabled = callback;} |
rgrover1 | 258:85de85adfac7 | 210 | void setOnConfirmationReceived(EventCallback_t callback) {onConfirmationReceived = callback;} |
rgrover1 | 258:85de85adfac7 | 211 | |
rgrover1 | 258:85de85adfac7 | 212 | protected: |
rgrover1 | 527:493185cebc03 | 213 | void handleDataWrittenEvent(const GattWriteCallbackParams *params) { |
rgrover1 | 548:623e4c0f0b6e | 214 | if (dataWrittenCallChain.hasCallbacksAttached()) { |
rgrover1 | 548:623e4c0f0b6e | 215 | dataWrittenCallChain.call(params); |
rgrover1 | 258:85de85adfac7 | 216 | } |
rgrover1 | 258:85de85adfac7 | 217 | } |
rgrover1 | 258:85de85adfac7 | 218 | |
rgrover1 | 527:493185cebc03 | 219 | void handleDataReadEvent(const GattReadCallbackParams *params) { |
rgrover1 | 300:d9a39f759a6a | 220 | if (onDataRead.hasCallbacksAttached()) { |
rgrover1 | 300:d9a39f759a6a | 221 | onDataRead.call(params); |
rgrover1 | 300:d9a39f759a6a | 222 | } |
rgrover1 | 300:d9a39f759a6a | 223 | } |
rgrover1 | 300:d9a39f759a6a | 224 | |
rgrover1 | 376:47ff130c1d74 | 225 | void handleEvent(GattServerEvents::gattEvent_e type, GattAttribute::Handle_t charHandle) { |
rgrover1 | 258:85de85adfac7 | 226 | switch (type) { |
rgrover1 | 258:85de85adfac7 | 227 | case GattServerEvents::GATT_EVENT_UPDATES_ENABLED: |
rgrover1 | 258:85de85adfac7 | 228 | if (onUpdatesEnabled) { |
rgrover1 | 258:85de85adfac7 | 229 | onUpdatesEnabled(charHandle); |
rgrover1 | 258:85de85adfac7 | 230 | } |
rgrover1 | 258:85de85adfac7 | 231 | break; |
rgrover1 | 258:85de85adfac7 | 232 | case GattServerEvents::GATT_EVENT_UPDATES_DISABLED: |
rgrover1 | 258:85de85adfac7 | 233 | if (onUpdatesDisabled) { |
rgrover1 | 258:85de85adfac7 | 234 | onUpdatesDisabled(charHandle); |
rgrover1 | 258:85de85adfac7 | 235 | } |
rgrover1 | 258:85de85adfac7 | 236 | break; |
rgrover1 | 258:85de85adfac7 | 237 | case GattServerEvents::GATT_EVENT_CONFIRMATION_RECEIVED: |
rgrover1 | 258:85de85adfac7 | 238 | if (onConfirmationReceived) { |
rgrover1 | 258:85de85adfac7 | 239 | onConfirmationReceived(charHandle); |
rgrover1 | 258:85de85adfac7 | 240 | } |
rgrover1 | 258:85de85adfac7 | 241 | break; |
rgrover1 | 267:ad6f6f40eb24 | 242 | default: |
rgrover1 | 267:ad6f6f40eb24 | 243 | break; |
rgrover1 | 258:85de85adfac7 | 244 | } |
rgrover1 | 258:85de85adfac7 | 245 | } |
rgrover1 | 258:85de85adfac7 | 246 | |
rgrover1 | 258:85de85adfac7 | 247 | void handleDataSentEvent(unsigned count) { |
rgrover1 | 547:f84c514eee35 | 248 | if (dataSentCallChain.hasCallbacksAttached()) { |
rgrover1 | 547:f84c514eee35 | 249 | dataSentCallChain.call(count); |
rgrover1 | 258:85de85adfac7 | 250 | } |
rgrover1 | 258:85de85adfac7 | 251 | } |
rgrover1 | 258:85de85adfac7 | 252 | |
rgrover1 | 258:85de85adfac7 | 253 | protected: |
rgrover1 | 258:85de85adfac7 | 254 | uint8_t serviceCount; |
rgrover1 | 258:85de85adfac7 | 255 | uint8_t characteristicCount; |
rgrover1 | 258:85de85adfac7 | 256 | |
rgrover1 | 258:85de85adfac7 | 257 | private: |
rgrover1 | 548:623e4c0f0b6e | 258 | CallChainOfFunctionPointersWithContext<unsigned> dataSentCallChain; |
rgrover1 | 548:623e4c0f0b6e | 259 | CallChainOfFunctionPointersWithContext<const GattWriteCallbackParams *> dataWrittenCallChain; |
rgrover1 | 527:493185cebc03 | 260 | CallChainOfFunctionPointersWithContext<const GattReadCallbackParams *> onDataRead; |
rgrover1 | 548:623e4c0f0b6e | 261 | EventCallback_t onUpdatesEnabled; |
rgrover1 | 548:623e4c0f0b6e | 262 | EventCallback_t onUpdatesDisabled; |
rgrover1 | 548:623e4c0f0b6e | 263 | EventCallback_t onConfirmationReceived; |
rgrover1 | 258:85de85adfac7 | 264 | |
rgrover1 | 258:85de85adfac7 | 265 | private: |
rgrover1 | 258:85de85adfac7 | 266 | /* disallow copy and assignment */ |
rgrover1 | 258:85de85adfac7 | 267 | GattServer(const GattServer &); |
rgrover1 | 258:85de85adfac7 | 268 | GattServer& operator=(const GattServer &); |
rgrover1 | 258:85de85adfac7 | 269 | }; |
rgrover1 | 258:85de85adfac7 | 270 | |
rgrover1 | 258:85de85adfac7 | 271 | #endif // ifndef __GATT_SERVER_H__ |