BLE_API_Tiny_BLE
Fork of BLE_API by
common/BLEDeviceInstanceBase.hpp@106:a20be740075d, 2014-07-23 (annotated)
- Committer:
- Rohit Grover
- Date:
- Wed Jul 23 15:09:23 2014 +0100
- Revision:
- 106:a20be740075d
- Child:
- 108:c85ab5f1eca0
initial re-organization of BLE_API directory structure
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Rohit Grover |
106:a20be740075d | 1 | /* mbed Microcontroller Library |
Rohit Grover |
106:a20be740075d | 2 | * Copyright (c) 2006-2013 ARM Limited |
Rohit Grover |
106:a20be740075d | 3 | * |
Rohit Grover |
106:a20be740075d | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
Rohit Grover |
106:a20be740075d | 5 | * you may not use this file except in compliance with the License. |
Rohit Grover |
106:a20be740075d | 6 | * You may obtain a copy of the License at |
Rohit Grover |
106:a20be740075d | 7 | * |
Rohit Grover |
106:a20be740075d | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
Rohit Grover |
106:a20be740075d | 9 | * |
Rohit Grover |
106:a20be740075d | 10 | * Unless required by applicable law or agreed to in writing, software |
Rohit Grover |
106:a20be740075d | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
Rohit Grover |
106:a20be740075d | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
Rohit Grover |
106:a20be740075d | 13 | * See the License for the specific language governing permissions and |
Rohit Grover |
106:a20be740075d | 14 | * limitations under the License. |
Rohit Grover |
106:a20be740075d | 15 | */ |
Rohit Grover |
106:a20be740075d | 16 | |
Rohit Grover |
106:a20be740075d | 17 | #ifndef __BLE_DEVICE_INSTANCE_BASE__ |
Rohit Grover |
106:a20be740075d | 18 | #define __BLE_DEVICE_INSTANCE_BASE__ |
Rohit Grover |
106:a20be740075d | 19 | |
Rohit Grover |
106:a20be740075d | 20 | /** |
Rohit Grover |
106:a20be740075d | 21 | * The interface for the transport object to be created by the target library's |
Rohit Grover |
106:a20be740075d | 22 | * createBLEDeviceInstance(). |
Rohit Grover |
106:a20be740075d | 23 | */ |
Rohit Grover |
106:a20be740075d | 24 | class BLEDeviceInstanceBase |
Rohit Grover |
106:a20be740075d | 25 | { |
Rohit Grover |
106:a20be740075d | 26 | public: |
Rohit Grover |
106:a20be740075d | 27 | virtual Gap& getGap() = 0; |
Rohit Grover |
106:a20be740075d | 28 | virtual GattServer& getGattServer() = 0; |
Rohit Grover |
106:a20be740075d | 29 | virtual ble_error_t init(void) = 0; |
Rohit Grover |
106:a20be740075d | 30 | virtual ble_error_t reset(void) = 0; |
Rohit Grover |
106:a20be740075d | 31 | virtual void waitForEvent(void) = 0; |
Rohit Grover |
106:a20be740075d | 32 | }; |
Rohit Grover |
106:a20be740075d | 33 | |
Rohit Grover |
106:a20be740075d | 34 | /** |
Rohit Grover |
106:a20be740075d | 35 | * BLEDevice uses composition to hide an interface object encapsulating the |
Rohit Grover |
106:a20be740075d | 36 | * backend transport. |
Rohit Grover |
106:a20be740075d | 37 | * |
Rohit Grover |
106:a20be740075d | 38 | * The following API is used to create the singleton interface object. An |
Rohit Grover |
106:a20be740075d | 39 | * implementation for this function must be provided by the device-specific |
Rohit Grover |
106:a20be740075d | 40 | * library, otherwise there will be a linker error. |
Rohit Grover |
106:a20be740075d | 41 | */ |
Rohit Grover |
106:a20be740075d | 42 | extern BLEDeviceInstanceBase *createBLEDeviceInstance(void); |
Rohit Grover |
106:a20be740075d | 43 | |
Rohit Grover |
106:a20be740075d | 44 | #endif // ifndef __BLE_DEVICE_INSTANCE_BASE__ |