add "LE Device Address" 0x1B to advertising data types

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 #include "ble/SecurityManager.h"
00022 #include "ble/BLE.h"
00023 
00024 /* Forward declarations. */
00025 class GattServer;
00026 class GattClient;
00027 
00028 /**
00029  *  The interface for the transport object to be created by the target library's
00030  *  createBLEInstance().
00031  */
00032 class BLEInstanceBase
00033 {
00034 public:
00035     virtual ble_error_t            init(BLE::InstanceID_t instanceID,
00036                                         FunctionPointerWithContext<BLE::InitializationCompleteCallbackContext *> initCallback) = 0;
00037     virtual bool                   hasInitialized(void) const = 0;
00038     virtual ble_error_t            shutdown(void)             = 0;
00039     virtual const char *           getVersion(void)           = 0;
00040     virtual Gap&                   getGap()                   = 0;
00041     virtual const Gap&             getGap() const             = 0;
00042     virtual GattServer&            getGattServer()            = 0;
00043     virtual const GattServer&      getGattServer() const      = 0;
00044     virtual GattClient&            getGattClient()            = 0;
00045     virtual SecurityManager&       getSecurityManager()       = 0;
00046     virtual const SecurityManager& getSecurityManager() const = 0;
00047     virtual void                   waitForEvent(void)         = 0;
00048 };
00049 
00050 /**
00051  * BLE uses composition to hide an interface object encapsulating the
00052  * backend transport.
00053  *
00054  * The following API is used to create the singleton interface object. An
00055  * implementation for this function must be provided by the device-specific
00056  * library, otherwise there will be a linker error.
00057  */
00058 extern BLEInstanceBase *createBLEInstance(void);
00059 
00060 #endif // ifndef __BLE_DEVICE_INSTANCE_BASE__