Bluetooth Framework C++ Edition

◆ SubscribeForNotifications()

int SubscribeForNotifications ( const wclGattCharacteristic Characteristic,
const wclGattOperationFlag  Flag = goNone,
const wclGattProtectionLevel  Protection = plNone,
const wclGattSubscribeKind  SubscribeKind = skManual 
)

Subscribes for the characteristic changes notifications and writes the client configuration descriptor to the device.

Parameters
CharacteristicA characteristic object in that changes an application is interested.
FlagOperation behavior flag.
ProtectionDescribes the required protection level.
SubscribeKindIndicates a characteristic value change notification method that should be used. If a characteristic has both IsIndicatable and IsNotifiable properties set then this parameter allows to control which notification method should be used.
Returns
If the function succeed the return value is WCL_E_SUCCESS. Otherwise the method returns one of the WCL error codes.

You can use this method to replace calls to the Subscribe and to the WriteClientConfiguration methods.

See also
wclGattCharacteristic, wclGattOperationFlag, wclGattProtectionLevel, wclGattSubscribeKind