add BLE::gattServer()
This commit is contained in:
parent
68683f1c43
commit
42aaf6bb99
2 changed files with 19 additions and 7 deletions
|
@ -30,13 +30,14 @@ 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 GattClient& getGattClient() = 0;
|
||||
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 ble_error_t initializeSecurity(bool enableBonding = true,
|
||||
bool requireMITM = true,
|
||||
Gap::SecurityIOCapabilities_t iocaps = Gap::IO_CAPS_NONE,
|
||||
|
|
11
public/BLE.h
11
public/BLE.h
|
@ -74,6 +74,17 @@ public:
|
|||
return transport->getGap();
|
||||
}
|
||||
|
||||
/*
|
||||
* Accessors to GATT Server. Please refer to GattServer.h. All GATTServer related
|
||||
* functionality requires going through this accessor.
|
||||
*/
|
||||
const GattServer& gattServer() const {
|
||||
return transport->getGattServer();
|
||||
}
|
||||
GattServer& gattServer() {
|
||||
return transport->getGattServer();
|
||||
}
|
||||
|
||||
/**
|
||||
* Yield control to the BLE stack or to other tasks waiting for events. This
|
||||
* is a sleep function which will return when there is an application
|
||||
|
|
Loading…
Reference in a new issue