19#ifndef MBED_BLE_SERVICE_DISOVERY_H__
20#define MBED_BLE_SERVICE_DISOVERY_H__
22#include "ble/common/blecommon.h"
24#include "ble/gatt/GattAttribute.h"
Representation of a characteristic discovered.
Representation of a GATT service discovered.
Function like object adapter over freestanding and member functions.
Host callback types needed by the service discovery procedure.
virtual ble_error_t launch(ble::connection_handle_t connectionHandle, ServiceCallback_t sc=nullptr, CharacteristicCallback_t cc=nullptr, const UUID &matchingServiceUUID=UUID::ShortUUIDBytes_t(BLE_UUID_UNKNOWN), const UUID &matchingCharacteristicUUIDIn=UUID::ShortUUIDBytes_t(BLE_UUID_UNKNOWN))=0
Launch service discovery.
virtual void terminate()=0
Terminate an ongoing service discovery.
ble::connection_handle_t connHandle
Connection handle as provided by the SoftDevice.
UUID matchingCharacteristicUUID
UUID-based filter that specifies the characteristic that the application is interested in.
FunctionPointerWithContext< const DiscoveredService * > ServiceCallback_t
Service discovered event handler.
virtual ble_error_t reset()
Clear all ServiceDiscovery state of the associated object.
ServiceCallback_t serviceCallback
The registered callback handle for when a matching service is found during service-discovery.
virtual bool isActive() const =0
Check whether service-discovery is currently active.
UUID matchingServiceUUID
UUID-based filter that specifies the service that the application is interested in.
virtual void onTermination(TerminationCallback_t callback)=0
Set up a callback to be invoked when service discovery is terminated.
CharacteristicCallback_t characteristicCallback
The registered callback handler for when a matching characteristic is found during service-discovery.
FunctionPointerWithContext< const DiscoveredCharacteristic * > CharacteristicCallback_t
Characteristic discovered event handler.
FunctionPointerWithContext< ble::connection_handle_t > TerminationCallback_t
Service discovery ended event.
Representation of a Universally Unique Identifier (UUID).
uint16_t ShortUUIDBytes_t
Type for a 16-bit UUID.
ble_error_t
Error codes for the BLE API.
@ BLE_UUID_UNKNOWN
Reserved UUID.
@ BLE_ERROR_NONE
No error.
uintptr_t connection_handle_t
Opaque reference to a connection.