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