mirror of
https://github.com/h2zero/esp-nimble-cpp.git
synced 2026-01-27 09:32:19 +01:00
Refactor NimBLEExtAdvertising
* General code cleanup * `NimBLEExtAdvertisement` : All functions that set data now return `bool`, true = success. * Added new method, `NimBLEExtAdvertisement::removeData`, which will remove the data of the specified type from the advertisement. * Added new method, `NimBLEExtAdvertisement::addServiceUUID`, which will append to the service uuids advertised. * Added new method, `NimBLEExtAdvertisement::removeServiceUUID`, which will remove the service from the uuids advertised. * Added new method, `NimBLEExtAdvertisement::removeServices`, which will remove all service uuids advertised. * Added overloads for `NimBLEExtAdvertisement::setServiceData` with the parameters `const NimBLEUUID& uuid, const uint8_t* data, size_t length` and `const NimBLEUUID& uuid, const std::vector<uint8_t>& data`. * Added new method, `NimBLEExtAdvertisement::getDataLocation`, which returns the location in the advertisment data of the type requested in parameter `uint8_t type`. * Added new method, `toString` which returns a Hex string representation of the advertisement data.
This commit is contained in: