add support for accessing GAP's state

This commit is contained in:
Rohit Grover 2014-06-06 11:17:37 +01:00
parent d9b07e95ef
commit 435e999162
2 changed files with 11 additions and 0 deletions

View file

@ -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
*/

View file

@ -90,6 +90,10 @@ public:
}
}
GapState_t getState(void) const {
return state;
}
protected:
Gap() :
state(),