nordic

Fork of nRF51822 by Nordic Semiconductor

Revision:
550:3f782c64d014
Parent:
549:920e941cbe1e
Child:
564:9c4b96f7be8d
--- a/source/btle/btle_discovery.cpp	Mon Jan 11 10:19:06 2016 +0000
+++ b/source/btle/btle_discovery.cpp	Mon Jan 11 10:19:06 2016 +0000
@@ -15,15 +15,12 @@
  */
 
 #include "nRF5xServiceDiscovery.h"
-#include "nRF5xCharacteristicDescriptorDiscoverer.h"
 #include "nRF5xGattClient.h"
 
 #if !defined(TARGET_MCU_NRF51_16K_S110) && !defined(TARGET_MCU_NRF51_32K_S110)
 void bleGattcEventHandler(const ble_evt_t *p_ble_evt)
 {
-    nRF5xServiceDiscovery &sdSingleton = nRF5xGattClient::getInstance().discovery();
-    nRF5xCharacteristicDescriptorDiscoverer &characteristicDescriptorDiscoverer = 
-        nRF5xGattClient::getInstance().characteristicDescriptorDiscoverer();
+    nRF5xServiceDiscovery &sdSingleton = nRF5xGattClient::getInstance().discovery;
 
     switch (p_ble_evt->header.evt_id) {
         case BLE_GATTC_EVT_PRIM_SRVC_DISC_RSP:
@@ -47,7 +44,7 @@
 
                 case BLE_GATT_STATUS_ATTERR_ATTRIBUTE_NOT_FOUND:
                 default:
-                    sdSingleton.terminateCharacteristicDiscovery(BLE_ERROR_NONE);
+                    sdSingleton.terminateCharacteristicDiscovery();
                     break;
             }
             break;
@@ -94,28 +91,6 @@
                 nRF5xGattClient::getInstance().processHVXEvent(&params);
             }
             break;
-
-        case BLE_GATTC_EVT_DESC_DISC_RSP: {
-            uint16_t conn_handle = p_ble_evt->evt.gattc_evt.conn_handle;
-            uint16_t status = p_ble_evt->evt.gattc_evt.gatt_status;
-            const ble_gattc_evt_desc_disc_rsp_t& discovered_descriptors = p_ble_evt->evt.gattc_evt.params.desc_disc_rsp;
-
-            switch(status) { 
-                case BLE_GATT_STATUS_SUCCESS:
-                    characteristicDescriptorDiscoverer.process(
-                        conn_handle, 
-                        discovered_descriptors
-                    );                
-                    break;
-                case BLE_GATT_STATUS_ATTERR_ATTRIBUTE_NOT_FOUND:
-                    // end of discovery 
-                    characteristicDescriptorDiscoverer.terminate(conn_handle, BLE_ERROR_NONE);
-                    break;
-                default:
-                    characteristicDescriptorDiscoverer.terminate(conn_handle, BLE_ERROR_UNSPECIFIED);
-                    break;
-            }
-        }   break;
     }
 
     sdSingleton.progressCharacteristicDiscovery();