Refactoring of BLE service discovery : it is now implemented into the classes of the services.
This commit is contained in:
24
src/components/ble/ServiceDiscovery.h
Normal file
24
src/components/ble/ServiceDiscovery.h
Normal file
@@ -0,0 +1,24 @@
|
||||
#pragma once
|
||||
|
||||
#include <array>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include "BleClient.h"
|
||||
|
||||
namespace Pinetime {
|
||||
namespace Controllers {
|
||||
class ServiceDiscovery {
|
||||
public:
|
||||
ServiceDiscovery(std::array<BleClient*, 2>&& bleClients);
|
||||
|
||||
void StartDiscovery(uint16_t connectionHandle);
|
||||
|
||||
|
||||
private:
|
||||
BleClient** clientIterator;
|
||||
std::array<BleClient*, 2> clients;
|
||||
void OnServiceDiscovered(uint16_t connectionHandle);
|
||||
void DiscoverNextService(uint16_t connectionHandle);
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user