BLE API as used in the blog entry.

Dependents:   BLE_iBeacon_Exercise

Fork of BLE_API_Native by Kevin Townsend

Revision:
15:a854d49b3d25
Parent:
0:4c3097c65247
--- a/hw/GattServer.h	Thu Feb 20 16:31:09 2014 +0000
+++ b/hw/GattServer.h	Thu Feb 20 17:23:17 2014 +0000
@@ -47,24 +47,24 @@
 
         /* Event callback handlers */
         void setEventHandler(GattServerEvents *pEventHandler) {m_pEventHandler = pEventHandler;}
-        void handleEvent(GattServerEvents::gattEvent_e type) { // void handleEvent(GattServerEvents::gattEvent_e type, event_data* data) {
+        void handleEvent(GattServerEvents::gattEvent_e type, uint16_t charHandle) {
             if (NULL == m_pEventHandler)
                   return;
             switch(type) {
                   case GattServerEvents::GATT_EVENT_DATA_SENT:
-                        m_pEventHandler->onDataSent();
+                        m_pEventHandler->onDataSent(charHandle);
                         break;
                   case GattServerEvents::GATT_EVENT_DATA_WRITTEN:
-                        m_pEventHandler->onDataWritten();
+                        m_pEventHandler->onDataWritten(charHandle);
                         break;
                   case GattServerEvents::GATT_EVENT_UPDATES_ENABLED:
-                        m_pEventHandler->onUpdatesEnabled();
+                        m_pEventHandler->onUpdatesEnabled(charHandle);
                         break;
                   case GattServerEvents::GATT_EVENT_UPDATES_DISABLED:
-                        m_pEventHandler->onUpdatesDisabled();
+                        m_pEventHandler->onUpdatesDisabled(charHandle);
                         break;
                   case GattServerEvents::GATT_EVENT_CONFIRMATION_RECEIVED:
-                        m_pEventHandler->onConfirmationReceived();
+                        m_pEventHandler->onConfirmationReceived(charHandle);
                         break;
             }
         }