From b817cf3e57cecece4ce92a03d1bd1375a6d2dc64 Mon Sep 17 00:00:00 2001 From: Andres Amaya Garcia Date: Fri, 11 Dec 2015 18:00:17 +0000 Subject: [PATCH 1/2] Improve API to facilitate full shutdown procedure The BLE API exposes a shutdown() function in BLE.h. This function is meant to be overwridden by platform-specific sub-classes to clear all GAP and GATT state. However, from the platform-specific implementation it is dificult to achieve this because the Gap, GattClient, GattServer and SecurityManager components of the API do not expose any functionality to shutdown. This commit introduces the following changes: * Add a static member pointer to Gap, GattClient, GattServer and SecurityManager that is used to keep track of the initialized objects. * Add a function member cleanup() to Gap, GattClient, GattServer and SecurityManager to allow easy reset of the instance's state. This function is meant to be overriden and called from the derived classes to fully clear the state of the BLE API and the platform-specific implementation. * Add a static member function shutdown() to Gap, GattClient, GattServer and SecurityManager. This function shall be called from the shutdown() overriding BLE::shutdown() for Gap, GattClient, GattServer and SecurityManager that will in-turn clear the state of each of the components. **NOTE:** Platform-specific implementations of this API must be modified to this changes into account. --- ble/Gap.h | 52 ++++++++++++++++++++++++++++++++++++++ ble/GattClient.h | 44 ++++++++++++++++++++++++++++++++ ble/GattServer.h | 50 ++++++++++++++++++++++++++++++++++++ ble/SecurityManager.h | 47 ++++++++++++++++++++++++++++++++++ ble/ServiceDiscovery.h | 21 +++++++++++++++ source/Gap.cpp | 19 ++++++++++++++ source/GattClient.cpp | 19 ++++++++++++++ source/GattServer.cpp | 19 ++++++++++++++ source/SecurityManager.cpp | 19 ++++++++++++++ 9 files changed, 290 insertions(+) create mode 100644 source/Gap.cpp create mode 100644 source/GattClient.cpp create mode 100644 source/GattServer.cpp create mode 100644 source/SecurityManager.cpp diff --git a/ble/Gap.h b/ble/Gap.h index dfa07c1..05bf290 100644 --- a/ble/Gap.h +++ b/ble/Gap.h @@ -983,6 +983,54 @@ class Gap { radioNotificationCallback.attach(tptr, mptr); } +protected: + /** + * Clear all Gap state of the associated object. + * + * This function is meant to be overridden in the platform-specific + * sub-class. Nevertheless, the sub-class is only expected to clean up its + * state and not the data held in Gap members. This shall be achieved by a + * call to Gap::cleanup() from the sub-class' cleanup() implementation. + * + * @return BLE_ERROR_NONE on success. + * + * @note: Currently a call to cleanup() does not reset the advertising and + * scan parameters to default values. + */ + virtual ble_error_t cleanup(void) { + /* Clear Gap state */ + state.advertising = 0; + state.connected = 0; + + /* Clear scanning state */ + scanningActive = false; + + /* Clear advertising and scanning data */ + _advPayload.clear(); + _scanResponse.clear(); + + return BLE_ERROR_NONE; + } + +public: + /** + * Clear all Gap state of the object pointed to by gapInstance. + * + * This function is meant to be called by the overridden BLE::shutdown() + * in the platform-specific sub-class. + * + * @return BLE_ERROR_NONE on success. + * + * @note: If gapInstance is NULL then it is assumed that Gap has not been + * instantiated and a call to Gap::shutdown() will succeed. + */ + static ble_error_t shutdown(void) { + if (gapInstance) { + return gapInstance->cleanup(); + } + return BLE_ERROR_NONE; + } + protected: Gap() : _advParams(), @@ -1051,6 +1099,10 @@ class Gap { GapState_t state; bool scanningActive; +protected: + static Gap *gapInstance; /**< Pointer to the Gap object instance. + * If NULL, then Gap has not been initialized. */ + protected: TimeoutEventCallbackChain_t timeoutCallbackChain; RadioNotificationEventCallback_t radioNotificationCallback; diff --git a/ble/GattClient.h b/ble/GattClient.h index a4109d3..e05698c 100644 --- a/ble/GattClient.h +++ b/ble/GattClient.h @@ -325,6 +325,46 @@ class GattClient { return onHVXCallbackChain; } +protected: + /** + * Clear all GattClient state of the associated object. + * + * This function is meant to be overridden in the platform-specific + * sub-class. Nevertheless, the sub-class is only expected to clean up its + * state and not the data held in GattClient members. This shall be achieved + * by a call to GattClient::cleanup() from the sub-class' cleanup() + * implementation. + * + * @return BLE_ERROR_NONE on success. + */ + virtual ble_error_t cleanup(void) { + onDataReadCallbackChain.clear(); + onDataWriteCallbackChain.clear(); + onHVXCallbackChain.clear(); + + return BLE_ERROR_NONE; + } + +public: + /** + * Clear all GattClient state of the object pointed to by + * gattClientInstance. + * + * This function is meant to be called by the overridden BLE::shutdown() + * in the platform-specific sub-class. + * + * @return BLE_ERROR_NONE on success. + * + * @note: If gattClientInstance is NULL then it is assumed that Gap has not + * been instantiated and a call to GattClient::shutdown() will succeed. + */ + static ble_error_t shutdown(void) { + if (gattClientInstance) { + return gattClientInstance->cleanup(); + } + return BLE_ERROR_NONE; + } + protected: GattClient() { /* Empty */ @@ -351,6 +391,10 @@ class GattClient { WriteCallbackChain_t onDataWriteCallbackChain; HVXCallbackChain_t onHVXCallbackChain; +protected: + static GattClient *gattClientInstance; /**< Pointer to the GattClient object instance. + * If NULL, then GattClient has not been initialized. */ + private: /* Disallow copy and assignment. */ GattClient(const GattClient &); diff --git a/ble/GattServer.h b/ble/GattServer.h index 6a6324b..3485158 100644 --- a/ble/GattServer.h +++ b/ble/GattServer.h @@ -396,10 +396,60 @@ class GattServer { dataSentCallChain.call(count); } +protected: + /** + * Clear all GattServer state of the associated object. + * + * This function is meant to be overridden in the platform-specific + * sub-class. Nevertheless, the sub-class is only expected to clean up its + * state and not the data held in GattServer members. This shall be achieved + * by a call to GattServer::cleanup() from the sub-class' cleanup() + * implementation. + * + * @return BLE_ERROR_NONE on success. + */ + virtual ble_error_t cleanup(void) { + serviceCount = 0; + characteristicCount = 0; + + dataSentCallChain.clear(); + dataWrittenCallChain.clear(); + dataReadCallChain.clear(); + updatesEnabledCallback = NULL; + updatesDisabledCallback = NULL; + confirmationReceivedCallback = NULL; + + return BLE_ERROR_NONE; + } + +public: + /** + * Clear all GattServer state of the object pointed to by + * gattServerInstance. + * + * This function is meant to be called by the overridden BLE::shutdown() + * in the platform-specific sub-class. + * + * @return BLE_ERROR_NONE on success. + * + * @note: If gattServerInstance is NULL then it is assumed that Gap has not + * been instantiated and a call to GattServer::shutdown() will succeed. + */ + static ble_error_t shutdown(void) { + if (gattServerInstance) { + return gattServerInstance->cleanup(); + } + return BLE_ERROR_NONE; + } + protected: uint8_t serviceCount; uint8_t characteristicCount; +protected: + static GattServer *gattServerInstance; /**< Pointer to the GattServer object instance. + * If NULL, then GattServer has not been initialized. */ + private: DataSentCallbackChain_t dataSentCallChain; DataWrittenCallbackChain_t dataWrittenCallChain; diff --git a/ble/SecurityManager.h b/ble/SecurityManager.h index 444e3aa..b80a410 100644 --- a/ble/SecurityManager.h +++ b/ble/SecurityManager.h @@ -231,6 +231,53 @@ class SecurityManager { /* empty */ } +protected: + /** + * Clear all SecurityManager state of the associated object. + * + * This function is meant to be overridden in the platform-specific + * sub-class. Nevertheless, the sub-class is only expected to clean up its + * state and not the data held in SecurityManager members. This shall be + * achieved by a call to SecurityManager::cleanup() from the sub-class' + * cleanup() implementation. + * + * @return BLE_ERROR_NONE on success. + */ + virtual ble_error_t cleanup(void) { + securitySetupInitiatedCallback = NULL; + securitySetupCompletedCallback = NULL; + linkSecuredCallback = NULL; + securityContextStoredCallback = NULL; + passkeyDisplayCallback = NULL; + + return BLE_ERROR_NONE; + } + +public: + /** + * Clear all SecurityManager state of the object pointed to by + * securityManagerInstance. + * + * This function is meant to be called by the overridden BLE::shutdown() + * in the platform-specific sub-class. + * + * @return BLE_ERROR_NONE on success. + * + * @note: If securityManagerInstance is NULL then it is assumed that Gap has + * not been instantiated and a call to SecurityManager::shutdown() will + * succeed. + */ + static ble_error_t shutdown(void) { + if (securityManagerInstance) { + return securityManagerInstance->cleanup(); + } + return BLE_ERROR_NONE; + } + +protected: + static SecurityManager *securityManagerInstance; /**< Pointer to the SecurityManager object instance. + * If NULL, then SecurityManager has not been initialized. */ + protected: SecuritySetupInitiatedCallback_t securitySetupInitiatedCallback; SecuritySetupCompletedCallback_t securitySetupCompletedCallback; diff --git a/ble/ServiceDiscovery.h b/ble/ServiceDiscovery.h index 595bc20..89ad140 100644 --- a/ble/ServiceDiscovery.h +++ b/ble/ServiceDiscovery.h @@ -132,6 +132,27 @@ class ServiceDiscovery { */ virtual void onTermination(TerminationCallback_t callback) = 0; + /** + * Clear all ServiceDiscovery state of the associated object. + * + * This function is meant to be overridden in the platform-specific + * sub-class. Nevertheless, the sub-class is only expected to clean up its + * state and not the data held in ServiceDiscovery members. This shall be + * achieved by a call to ServiceDiscovery::cleanup() from the sub-class' + * cleanup() implementation. + * + * @return BLE_ERROR_NONE on success. + */ + virtual ble_error_t cleanup(void) { + connHandle = 0; + matchingServiceUUID = UUID::ShortUUIDBytes_t(BLE_UUID_UNKNOWN); + serviceCallback = NULL; + matchingCharacteristicUUID = UUID::ShortUUIDBytes_t(BLE_UUID_UNKNOWN); + characteristicCallback = NULL; + + return BLE_ERROR_NONE; + } + protected: Gap::Handle_t connHandle; /**< Connection handle as provided by the SoftDevice. */ UUID matchingServiceUUID; diff --git a/source/Gap.cpp b/source/Gap.cpp new file mode 100644 index 0000000..17a50c5 --- /dev/null +++ b/source/Gap.cpp @@ -0,0 +1,19 @@ +/* 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 "ble/Gap.h" + +Gap *Gap::gapInstance = NULL; diff --git a/source/GattClient.cpp b/source/GattClient.cpp new file mode 100644 index 0000000..5186e7c --- /dev/null +++ b/source/GattClient.cpp @@ -0,0 +1,19 @@ +/* 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 "ble/GattClient.h" + +GattClient *GattClient::gattClientInstance = NULL; diff --git a/source/GattServer.cpp b/source/GattServer.cpp new file mode 100644 index 0000000..35c475d --- /dev/null +++ b/source/GattServer.cpp @@ -0,0 +1,19 @@ +/* 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 "ble/GattServer.h" + +GattServer *GattServer::gattServerInstance = NULL; diff --git a/source/SecurityManager.cpp b/source/SecurityManager.cpp new file mode 100644 index 0000000..f36026a --- /dev/null +++ b/source/SecurityManager.cpp @@ -0,0 +1,19 @@ +/* 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 "ble/SecurityManager.h" + +SecurityManager *SecurityManager::securityManagerInstance = NULL; From cd809e2a2c9d9a1aaba758d477b44196a0561e4e Mon Sep 17 00:00:00 2001 From: Andres Amaya Garcia Date: Mon, 14 Dec 2015 15:34:38 +0000 Subject: [PATCH 2/2] Modify shutdown API and functionality Modify the shutdown API to remove the static shutdown function in Gap, SecurityManager, GattClient and GattServer. Futhermore, remove the static references to Gap, SecurityManager, GattClient and GattServer objects inside their own classes. The cleanup method is renamed to `reset()` and made public. Finally, additional functionality is added to the reset implementation in Gap. --- ble/Gap.h | 38 +++++++++++--------------------------- ble/GattClient.h | 32 ++++---------------------------- ble/GattServer.h | 32 ++++---------------------------- ble/SecurityManager.h | 35 +++++------------------------------ ble/ServiceDiscovery.h | 8 ++++---- source/BLE.cpp | 1 - source/Gap.cpp | 19 ------------------- source/GattClient.cpp | 19 ------------------- source/GattServer.cpp | 19 ------------------- source/SecurityManager.cpp | 19 ------------------- 10 files changed, 28 insertions(+), 194 deletions(-) delete mode 100644 source/Gap.cpp delete mode 100644 source/GattClient.cpp delete mode 100644 source/GattServer.cpp delete mode 100644 source/SecurityManager.cpp diff --git a/ble/Gap.h b/ble/Gap.h index 05bf290..8accfaa 100644 --- a/ble/Gap.h +++ b/ble/Gap.h @@ -983,21 +983,21 @@ class Gap { radioNotificationCallback.attach(tptr, mptr); } -protected: +public: /** * Clear all Gap state of the associated object. * * This function is meant to be overridden in the platform-specific - * sub-class. Nevertheless, the sub-class is only expected to clean up its + * sub-class. Nevertheless, the sub-class is only expected to reset its * state and not the data held in Gap members. This shall be achieved by a - * call to Gap::cleanup() from the sub-class' cleanup() implementation. + * call to Gap::reset() from the sub-class' reset() implementation. * * @return BLE_ERROR_NONE on success. * - * @note: Currently a call to cleanup() does not reset the advertising and + * @note: Currently a call to reset() does not reset the advertising and * scan parameters to default values. */ - virtual ble_error_t cleanup(void) { + virtual ble_error_t reset(void) { /* Clear Gap state */ state.advertising = 0; state.connected = 0; @@ -1009,25 +1009,13 @@ class Gap { _advPayload.clear(); _scanResponse.clear(); - return BLE_ERROR_NONE; - } + /* Clear callbacks */ + timeoutCallbackChain.clear(); + connectionCallChain.clear(); + disconnectionCallChain.clear(); + radioNotificationCallback = NULL; + onAdvertisementReport = NULL; -public: - /** - * Clear all Gap state of the object pointed to by gapInstance. - * - * This function is meant to be called by the overridden BLE::shutdown() - * in the platform-specific sub-class. - * - * @return BLE_ERROR_NONE on success. - * - * @note: If gapInstance is NULL then it is assumed that Gap has not been - * instantiated and a call to Gap::shutdown() will succeed. - */ - static ble_error_t shutdown(void) { - if (gapInstance) { - return gapInstance->cleanup(); - } return BLE_ERROR_NONE; } @@ -1099,10 +1087,6 @@ class Gap { GapState_t state; bool scanningActive; -protected: - static Gap *gapInstance; /**< Pointer to the Gap object instance. - * If NULL, then Gap has not been initialized. */ - protected: TimeoutEventCallbackChain_t timeoutCallbackChain; RadioNotificationEventCallback_t radioNotificationCallback; diff --git a/ble/GattClient.h b/ble/GattClient.h index e05698c..1df6066 100644 --- a/ble/GattClient.h +++ b/ble/GattClient.h @@ -325,19 +325,19 @@ class GattClient { return onHVXCallbackChain; } -protected: +public: /** * Clear all GattClient state of the associated object. * * This function is meant to be overridden in the platform-specific - * sub-class. Nevertheless, the sub-class is only expected to clean up its + * sub-class. Nevertheless, the sub-class is only expected to reset its * state and not the data held in GattClient members. This shall be achieved - * by a call to GattClient::cleanup() from the sub-class' cleanup() + * by a call to GattClient::reset() from the sub-class' reset() * implementation. * * @return BLE_ERROR_NONE on success. */ - virtual ble_error_t cleanup(void) { + virtual ble_error_t reset(void) { onDataReadCallbackChain.clear(); onDataWriteCallbackChain.clear(); onHVXCallbackChain.clear(); @@ -345,26 +345,6 @@ class GattClient { return BLE_ERROR_NONE; } -public: - /** - * Clear all GattClient state of the object pointed to by - * gattClientInstance. - * - * This function is meant to be called by the overridden BLE::shutdown() - * in the platform-specific sub-class. - * - * @return BLE_ERROR_NONE on success. - * - * @note: If gattClientInstance is NULL then it is assumed that Gap has not - * been instantiated and a call to GattClient::shutdown() will succeed. - */ - static ble_error_t shutdown(void) { - if (gattClientInstance) { - return gattClientInstance->cleanup(); - } - return BLE_ERROR_NONE; - } - protected: GattClient() { /* Empty */ @@ -391,10 +371,6 @@ class GattClient { WriteCallbackChain_t onDataWriteCallbackChain; HVXCallbackChain_t onHVXCallbackChain; -protected: - static GattClient *gattClientInstance; /**< Pointer to the GattClient object instance. - * If NULL, then GattClient has not been initialized. */ - private: /* Disallow copy and assignment. */ GattClient(const GattClient &); diff --git a/ble/GattServer.h b/ble/GattServer.h index 3485158..73a75c1 100644 --- a/ble/GattServer.h +++ b/ble/GattServer.h @@ -396,19 +396,19 @@ class GattServer { dataSentCallChain.call(count); } -protected: +public: /** * Clear all GattServer state of the associated object. * * This function is meant to be overridden in the platform-specific - * sub-class. Nevertheless, the sub-class is only expected to clean up its + * sub-class. Nevertheless, the sub-class is only expected to reset its * state and not the data held in GattServer members. This shall be achieved - * by a call to GattServer::cleanup() from the sub-class' cleanup() + * by a call to GattServer::reset() from the sub-class' reset() * implementation. * * @return BLE_ERROR_NONE on success. */ - virtual ble_error_t cleanup(void) { + virtual ble_error_t reset(void) { serviceCount = 0; characteristicCount = 0; @@ -422,34 +422,10 @@ class GattServer { return BLE_ERROR_NONE; } -public: - /** - * Clear all GattServer state of the object pointed to by - * gattServerInstance. - * - * This function is meant to be called by the overridden BLE::shutdown() - * in the platform-specific sub-class. - * - * @return BLE_ERROR_NONE on success. - * - * @note: If gattServerInstance is NULL then it is assumed that Gap has not - * been instantiated and a call to GattServer::shutdown() will succeed. - */ - static ble_error_t shutdown(void) { - if (gattServerInstance) { - return gattServerInstance->cleanup(); - } - return BLE_ERROR_NONE; - } - protected: uint8_t serviceCount; uint8_t characteristicCount; -protected: - static GattServer *gattServerInstance; /**< Pointer to the GattServer object instance. - * If NULL, then GattServer has not been initialized. */ - private: DataSentCallbackChain_t dataSentCallChain; DataWrittenCallbackChain_t dataWrittenCallChain; diff --git a/ble/SecurityManager.h b/ble/SecurityManager.h index b80a410..75ed860 100644 --- a/ble/SecurityManager.h +++ b/ble/SecurityManager.h @@ -231,19 +231,19 @@ class SecurityManager { /* empty */ } -protected: +public: /** * Clear all SecurityManager state of the associated object. * * This function is meant to be overridden in the platform-specific - * sub-class. Nevertheless, the sub-class is only expected to clean up its + * sub-class. Nevertheless, the sub-class is only expected to reset its * state and not the data held in SecurityManager members. This shall be - * achieved by a call to SecurityManager::cleanup() from the sub-class' - * cleanup() implementation. + * achieved by a call to SecurityManager::reset() from the sub-class' + * reset() implementation. * * @return BLE_ERROR_NONE on success. */ - virtual ble_error_t cleanup(void) { + virtual ble_error_t reset(void) { securitySetupInitiatedCallback = NULL; securitySetupCompletedCallback = NULL; linkSecuredCallback = NULL; @@ -253,31 +253,6 @@ class SecurityManager { return BLE_ERROR_NONE; } -public: - /** - * Clear all SecurityManager state of the object pointed to by - * securityManagerInstance. - * - * This function is meant to be called by the overridden BLE::shutdown() - * in the platform-specific sub-class. - * - * @return BLE_ERROR_NONE on success. - * - * @note: If securityManagerInstance is NULL then it is assumed that Gap has - * not been instantiated and a call to SecurityManager::shutdown() will - * succeed. - */ - static ble_error_t shutdown(void) { - if (securityManagerInstance) { - return securityManagerInstance->cleanup(); - } - return BLE_ERROR_NONE; - } - -protected: - static SecurityManager *securityManagerInstance; /**< Pointer to the SecurityManager object instance. - * If NULL, then SecurityManager has not been initialized. */ - protected: SecuritySetupInitiatedCallback_t securitySetupInitiatedCallback; SecuritySetupCompletedCallback_t securitySetupCompletedCallback; diff --git a/ble/ServiceDiscovery.h b/ble/ServiceDiscovery.h index 89ad140..ed7df10 100644 --- a/ble/ServiceDiscovery.h +++ b/ble/ServiceDiscovery.h @@ -136,14 +136,14 @@ class ServiceDiscovery { * Clear all ServiceDiscovery state of the associated object. * * This function is meant to be overridden in the platform-specific - * sub-class. Nevertheless, the sub-class is only expected to clean up its + * sub-class. Nevertheless, the sub-class is only expected to reset its * state and not the data held in ServiceDiscovery members. This shall be - * achieved by a call to ServiceDiscovery::cleanup() from the sub-class' - * cleanup() implementation. + * achieved by a call to ServiceDiscovery::reset() from the sub-class' + * reset() implementation. * * @return BLE_ERROR_NONE on success. */ - virtual ble_error_t cleanup(void) { + virtual ble_error_t reset(void) { connHandle = 0; matchingServiceUUID = UUID::ShortUUIDBytes_t(BLE_UUID_UNKNOWN); serviceCallback = NULL; diff --git a/source/BLE.cpp b/source/BLE.cpp index f2e537a..c1ac1b2 100644 --- a/source/BLE.cpp +++ b/source/BLE.cpp @@ -131,7 +131,6 @@ bool BLE::hasInitialized(void) const ble_error_t BLE::shutdown(void) { - clearAdvertisingPayload(); if (!transport) { error("bad handle to underlying transport"); } diff --git a/source/Gap.cpp b/source/Gap.cpp deleted file mode 100644 index 17a50c5..0000000 --- a/source/Gap.cpp +++ /dev/null @@ -1,19 +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 "ble/Gap.h" - -Gap *Gap::gapInstance = NULL; diff --git a/source/GattClient.cpp b/source/GattClient.cpp deleted file mode 100644 index 5186e7c..0000000 --- a/source/GattClient.cpp +++ /dev/null @@ -1,19 +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 "ble/GattClient.h" - -GattClient *GattClient::gattClientInstance = NULL; diff --git a/source/GattServer.cpp b/source/GattServer.cpp deleted file mode 100644 index 35c475d..0000000 --- a/source/GattServer.cpp +++ /dev/null @@ -1,19 +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 "ble/GattServer.h" - -GattServer *GattServer::gattServerInstance = NULL; diff --git a/source/SecurityManager.cpp b/source/SecurityManager.cpp deleted file mode 100644 index f36026a..0000000 --- a/source/SecurityManager.cpp +++ /dev/null @@ -1,19 +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 "ble/SecurityManager.h" - -SecurityManager *SecurityManager::securityManagerInstance = NULL;