wersion 1.9
Fork of BLE_API by
common/BLEInstanceBase.h@546:9fdf3d960d12, 2015-06-19 (annotated)
- Committer:
- rgrover1
- Date:
- Fri Jun 19 15:52:09 2015 +0100
- Revision:
- 546:9fdf3d960d12
- Parent:
- 538:fff02872b62f
Synchronized with git rev ebd6bbce
Author: Rohit Grover
introduce SecurityManager
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
rgrover1 | 528:8d21604fe31d | 1 | /* mbed Microcontroller Library |
rgrover1 | 528:8d21604fe31d | 2 | * Copyright (c) 2006-2013 ARM Limited |
rgrover1 | 528:8d21604fe31d | 3 | * |
rgrover1 | 528:8d21604fe31d | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
rgrover1 | 528:8d21604fe31d | 5 | * you may not use this file except in compliance with the License. |
rgrover1 | 528:8d21604fe31d | 6 | * You may obtain a copy of the License at |
rgrover1 | 528:8d21604fe31d | 7 | * |
rgrover1 | 528:8d21604fe31d | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
rgrover1 | 528:8d21604fe31d | 9 | * |
rgrover1 | 528:8d21604fe31d | 10 | * Unless required by applicable law or agreed to in writing, software |
rgrover1 | 528:8d21604fe31d | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
rgrover1 | 528:8d21604fe31d | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
rgrover1 | 528:8d21604fe31d | 13 | * See the License for the specific language governing permissions and |
rgrover1 | 528:8d21604fe31d | 14 | * limitations under the License. |
rgrover1 | 528:8d21604fe31d | 15 | */ |
rgrover1 | 528:8d21604fe31d | 16 | |
rgrover1 | 528:8d21604fe31d | 17 | #ifndef __BLE_DEVICE_INSTANCE_BASE__ |
rgrover1 | 528:8d21604fe31d | 18 | #define __BLE_DEVICE_INSTANCE_BASE__ |
rgrover1 | 528:8d21604fe31d | 19 | |
rgrover1 | 528:8d21604fe31d | 20 | #include "Gap.h" |
rgrover1 | 528:8d21604fe31d | 21 | |
rgrover1 | 528:8d21604fe31d | 22 | /* forward declarations */ |
rgrover1 | 528:8d21604fe31d | 23 | class GattServer; |
rgrover1 | 528:8d21604fe31d | 24 | class GattClient; |
rgrover1 | 528:8d21604fe31d | 25 | |
rgrover1 | 528:8d21604fe31d | 26 | /** |
rgrover1 | 528:8d21604fe31d | 27 | * The interface for the transport object to be created by the target library's |
rgrover1 | 528:8d21604fe31d | 28 | * createBLEInstance(). |
rgrover1 | 528:8d21604fe31d | 29 | */ |
rgrover1 | 528:8d21604fe31d | 30 | class BLEInstanceBase |
rgrover1 | 528:8d21604fe31d | 31 | { |
rgrover1 | 528:8d21604fe31d | 32 | public: |
rgrover1 | 538:fff02872b62f | 33 | virtual ble_error_t init(void) = 0; |
rgrover1 | 538:fff02872b62f | 34 | virtual ble_error_t shutdown(void) = 0; |
rgrover1 | 538:fff02872b62f | 35 | virtual const char *getVersion(void) = 0; |
rgrover1 | 538:fff02872b62f | 36 | virtual Gap& getGap() = 0; |
rgrover1 | 538:fff02872b62f | 37 | virtual const Gap& getGap() const = 0; |
rgrover1 | 538:fff02872b62f | 38 | virtual GattServer& getGattServer() = 0; |
rgrover1 | 538:fff02872b62f | 39 | virtual const GattServer& getGattServer() const = 0; |
rgrover1 | 538:fff02872b62f | 40 | virtual GattClient& getGattClient() = 0; |
rgrover1 | 546:9fdf3d960d12 | 41 | virtual SecurityManager& getSecurityManager() = 0; |
rgrover1 | 546:9fdf3d960d12 | 42 | virtual const SecurityManager& getSecurityManager() const = 0; |
rgrover1 | 528:8d21604fe31d | 43 | virtual void waitForEvent(void) = 0; |
rgrover1 | 528:8d21604fe31d | 44 | }; |
rgrover1 | 528:8d21604fe31d | 45 | |
rgrover1 | 528:8d21604fe31d | 46 | /** |
rgrover1 | 528:8d21604fe31d | 47 | * BLE uses composition to hide an interface object encapsulating the |
rgrover1 | 528:8d21604fe31d | 48 | * backend transport. |
rgrover1 | 528:8d21604fe31d | 49 | * |
rgrover1 | 528:8d21604fe31d | 50 | * The following API is used to create the singleton interface object. An |
rgrover1 | 528:8d21604fe31d | 51 | * implementation for this function must be provided by the device-specific |
rgrover1 | 528:8d21604fe31d | 52 | * library, otherwise there will be a linker error. |
rgrover1 | 528:8d21604fe31d | 53 | */ |
rgrover1 | 528:8d21604fe31d | 54 | extern BLEInstanceBase *createBLEInstance(void); |
rgrover1 | 528:8d21604fe31d | 55 | |
rgrover1 | 528:8d21604fe31d | 56 | #endif // ifndef __BLE_DEVICE_INSTANCE_BASE__ |