From 648f9fc5b05b23cb8aca3301a21a8c46a21775f9 Mon Sep 17 00:00:00 2001 From: Irit Arkin Date: Mon, 16 Nov 2015 08:44:17 +0000 Subject: [PATCH] New version Based on the main repo's master version, with edits to the API. --- ble/BLEInstanceBase.h | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/ble/BLEInstanceBase.h b/ble/BLEInstanceBase.h index db050f5..ea141a5 100644 --- a/ble/BLEInstanceBase.h +++ b/ble/BLEInstanceBase.h @@ -18,8 +18,10 @@ #define __BLE_DEVICE_INSTANCE_BASE__ #include "Gap.h" +#include "ble/SecurityManager.h" +#include "ble/BLE.h" -/* forward declarations */ +/* Forward declarations. */ class GattServer; class GattClient; @@ -30,17 +32,19 @@ class GattClient; class BLEInstanceBase { public: - virtual ble_error_t init(void) = 0; - virtual ble_error_t shutdown(void) = 0; - virtual const char *getVersion(void) = 0; - virtual Gap& getGap() = 0; - virtual const Gap& getGap() const = 0; - virtual GattServer& getGattServer() = 0; - virtual const GattServer& getGattServer() const = 0; - virtual GattClient& getGattClient() = 0; - virtual SecurityManager& getSecurityManager() = 0; + virtual ble_error_t init(BLE::InstanceID_t instanceID, + FunctionPointerWithContext initCallback) = 0; + virtual bool hasInitialized(void) const = 0; + virtual ble_error_t shutdown(void) = 0; + virtual const char * getVersion(void) = 0; + virtual Gap& getGap() = 0; + virtual const Gap& getGap() const = 0; + virtual GattServer& getGattServer() = 0; + virtual const GattServer& getGattServer() const = 0; + virtual GattClient& getGattClient() = 0; + virtual SecurityManager& getSecurityManager() = 0; virtual const SecurityManager& getSecurityManager() const = 0; - virtual void waitForEvent(void) = 0; + virtual void waitForEvent(void) = 0; }; /**