Shuta Nakamae / nRF51822

Fork of nRF51822 by Nordic Semiconductor

Revision:
243:a966506d1e5b
Parent:
242:73fc02cc20b1
Child:
244:57c98fe71376
diff -r 73fc02cc20b1 -r a966506d1e5b btle/btle_gattc.cpp
--- a/btle/btle_gattc.cpp	Fri Jun 19 15:55:21 2015 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-/* mbed Microcontroller Library
- * Copyright (c) 2006-2013 ARM Limited
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "btle_gattc.h"
-#include "UUID.h"
-#include "btle_discovery.h"
-
-static NordicServiceDiscovery discoverySingleton;
-ServiceDiscovery *ServiceDiscovery::getSingleton(void) {
-    return &discoverySingleton;
-}
-
-void bleGattcEventHandler(const ble_evt_t *p_ble_evt)
-{
-    switch (p_ble_evt->header.evt_id) {
-        case BLE_GATTC_EVT_PRIM_SRVC_DISC_RSP:
-            switch (p_ble_evt->evt.gattc_evt.gatt_status) {
-                case BLE_GATT_STATUS_SUCCESS:
-                    discoverySingleton.setupDiscoveredServices(&p_ble_evt->evt.gattc_evt.params.prim_srvc_disc_rsp);
-                    break;
-
-                case BLE_GATT_STATUS_ATTERR_ATTRIBUTE_NOT_FOUND:
-                default:
-                    discoverySingleton.terminate();
-                    break;
-            }
-            break;
-
-        case BLE_GATTC_EVT_CHAR_DISC_RSP:
-            switch (p_ble_evt->evt.gattc_evt.gatt_status) {
-                case BLE_GATT_STATUS_SUCCESS:
-                    discoverySingleton.setupDiscoveredCharacteristics(&p_ble_evt->evt.gattc_evt.params.char_disc_rsp);
-                    break;
-
-                case BLE_GATT_STATUS_ATTERR_ATTRIBUTE_NOT_FOUND:
-                default:
-                    discoverySingleton.terminateCharacteristicDiscovery();
-                    break;
-            }
-            break;
-    }
-
-    discoverySingleton.progressCharacteristicDiscovery();
-    discoverySingleton.progressServiceDiscovery();
-}
\ No newline at end of file