From 29f8074fcb844cf9668a5bf071e9cffa47299c99 Mon Sep 17 00:00:00 2001 From: JF Date: Thu, 29 Oct 2020 16:06:01 +0100 Subject: Refactoring of BLE service discovery : it is now implemented into the classes of the services. --- src/components/ble/ServiceDiscovery.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/components/ble/ServiceDiscovery.h (limited to 'src/components/ble/ServiceDiscovery.h') diff --git a/src/components/ble/ServiceDiscovery.h b/src/components/ble/ServiceDiscovery.h new file mode 100644 index 00000000..c86fc4ec --- /dev/null +++ b/src/components/ble/ServiceDiscovery.h @@ -0,0 +1,24 @@ +#pragma once + +#include +#include +#include +#include "BleClient.h" + +namespace Pinetime { + namespace Controllers { + class ServiceDiscovery { + public: + ServiceDiscovery(std::array&& bleClients); + + void StartDiscovery(uint16_t connectionHandle); + + + private: + BleClient** clientIterator; + std::array clients; + void OnServiceDiscovered(uint16_t connectionHandle); + void DiscoverNextService(uint16_t connectionHandle); + }; + } +} -- cgit v1.2.3