TwclGattServer.AddService(TwclGattUuid,TwclGattLocalService) Method

Creates new local GATT service and adds it to the services list.

Namespace: wclBluetooth
public
 function AddService(const Uuid: TwclGattUuid;
 out Service: TwclGattLocalService): Integer;

Parameters

Uuid
Type: TwclGattUuid

The service's UUID.

Service
Type: TwclGattLocalService

If the function completed with success this parameter receives a just created GATT local service object.

Return Value

Type: Integer

If the function succeed the return value is wclErrors.WCL_E_SUCCESS. Otherwise the method returns one of the WCL error codes.