add support for accessing GAP's state
This commit is contained in:
parent
d9b07e95ef
commit
435e999162
2 changed files with 11 additions and 0 deletions
|
@ -143,6 +143,8 @@ public:
|
|||
|
||||
ble_error_t addService(GattService &service);
|
||||
|
||||
Gap::GapState_t getGapState(void) const;
|
||||
|
||||
private:
|
||||
/**
|
||||
* Internal helper to udpate the transport backend with advertising data
|
||||
|
@ -338,6 +340,11 @@ BLEDevice::addService(GattService &service) {
|
|||
return transport->getGattServer().addService(service);
|
||||
}
|
||||
|
||||
inline Gap::GapState_t
|
||||
BLEDevice::getGapState(void) const {
|
||||
return transport->getGap().getState();
|
||||
}
|
||||
|
||||
/*
|
||||
* ALL OF THE FOLLOWING METHODS ARE DEPRECATED
|
||||
*/
|
||||
|
|
4
hw/Gap.h
4
hw/Gap.h
|
@ -90,6 +90,10 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
GapState_t getState(void) const {
|
||||
return state;
|
||||
}
|
||||
|
||||
protected:
|
||||
Gap() :
|
||||
state(),
|
||||
|
|
Loading…
Reference in a new issue