Changed URIBeaconConfigService.h to work with ST board

Fork of BLE_API by Bluetooth Low Energy

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers BLEInstanceBase.h Source File

BLEInstanceBase.h

00001 /* mbed Microcontroller Library
00002  * Copyright (c) 2006-2013 ARM Limited
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  *     http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00017 #ifndef __BLE_DEVICE_INSTANCE_BASE__
00018 #define __BLE_DEVICE_INSTANCE_BASE__
00019 
00020 #include "Gap.h"
00021 
00022 /* forward declarations */
00023 class GattServer;
00024 class GattClient;
00025 
00026 /**
00027  *  The interface for the transport object to be created by the target library's
00028  *  createBLEInstance().
00029  */
00030 class BLEInstanceBase
00031 {
00032 public:
00033     virtual ble_error_t init(void)                  = 0;
00034     virtual ble_error_t shutdown(void)              = 0;
00035     virtual const char *getVersion(void)            = 0;
00036     virtual Gap&        getGap()                    = 0;
00037     virtual const Gap&  getGap() const              = 0;
00038     virtual GattServer& getGattServer()             = 0;
00039     virtual const GattServer& getGattServer() const = 0;
00040     virtual GattClient& getGattClient()             = 0;
00041     virtual SecurityManager& getSecurityManager()   = 0;
00042     virtual const SecurityManager& getSecurityManager() const = 0;
00043     virtual void        waitForEvent(void)         = 0;
00044 };
00045 
00046 /**
00047  * BLE uses composition to hide an interface object encapsulating the
00048  * backend transport.
00049  *
00050  * The following API is used to create the singleton interface object. An
00051  * implementation for this function must be provided by the device-specific
00052  * library, otherwise there will be a linker error.
00053  */
00054 extern BLEInstanceBase *createBLEInstance(void);
00055 
00056 #endif // ifndef __BLE_DEVICE_INSTANCE_BASE__