mirror of https://github.com/ARMmbed/mbed-os.git
added constructor to use with deprecated data
parent
93b0b9f6e2
commit
019b0c2146
|
@ -541,6 +541,13 @@ public:
|
||||||
_minimiseFragmentation(false) {
|
_minimiseFragmentation(false) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AdvertisingData(uint8_t* buffer, size_t buffer_size) :
|
||||||
|
_buffer(buffer, buffer_size),
|
||||||
|
_payloadLen(0),
|
||||||
|
_appearance(GENERIC_TAG),
|
||||||
|
_minimiseFragmentation(false) {
|
||||||
|
}
|
||||||
|
|
||||||
void setMinimiseFragmentation(bool enable = true) {
|
void setMinimiseFragmentation(bool enable = true) {
|
||||||
_minimiseFragmentation = enable;
|
_minimiseFragmentation = enable;
|
||||||
}
|
}
|
||||||
|
@ -549,7 +556,7 @@ public:
|
||||||
return _minimiseFragmentation;
|
return _minimiseFragmentation;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t getBufferSize() {
|
size_t getBufferSize() const {
|
||||||
return _buffer.size();
|
return _buffer.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -961,10 +968,10 @@ class GapAdvertisingData : public AdvertisingData
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
GapAdvertisingData() :
|
GapAdvertisingData() :
|
||||||
_buffer(_payload, GAP_ADVERTISING_DATA_MAX_PAYLOAD) { }
|
AdvertisingData(_payload, GAP_ADVERTISING_DATA_MAX_PAYLOAD) { }
|
||||||
|
|
||||||
GapAdvertisingData(const GapAdvertisingData& other) :
|
GapAdvertisingData(const GapAdvertisingData& other) :
|
||||||
_buffer(_payload, GAP_ADVERTISING_DATA_MAX_PAYLOAD)
|
AdvertisingData(_payload, GAP_ADVERTISING_DATA_MAX_PAYLOAD)
|
||||||
{
|
{
|
||||||
memcpy(_payload, other.getPayload(), GAP_ADVERTISING_DATA_MAX_PAYLOAD);
|
memcpy(_payload, other.getPayload(), GAP_ADVERTISING_DATA_MAX_PAYLOAD);
|
||||||
_payloadLen = other.getPayloadLen();
|
_payloadLen = other.getPayloadLen();
|
||||||
|
|
Loading…
Reference in New Issue