bt_gatt_descriptors_async()

Perform a Generic Attribute (GATT) call to asynchronously retrieve the list of descriptors for a provided characteristic.

Synopsis:

#include <btapi/btgatt.h>
 
int bt_gatt_descriptors_async(int instance, const bt_gatt_characteristic_t *characteristic, bt_gatt_descriptors_cb cb, void *user_data)

Since:

BlackBerry 10.3.0

Arguments:

instance

The identifier used to reference the connected primary service.

characteristic

The characteristic for which this function retrieves descriptors.

cb

The callback function to be executed when the operation has completed.

user_data

A user specified pointer that is returned during the callback.

Library:

libbtapi (For the qcc command, use the -l btapi option to link against this library)

Description:

For the characteristic argument, if you provide a handle of 0x0000, then the first characteristic that matches the universally unique identifier (UUID) will be discovered.

Returns:

The number of included services that were retrieved when the function is successfully completed, -1 with the errno set otherwise. The error codes that can be returned are as follows:
  • EACCESS: Insufficient authentication or authorization.
  • EINVAL: Invalid stack parameters or connection to the remote Bluetooth-enabled device is not available.
  • ENOMEM: Insufficient memory to perform the request.
  • ESRCH: The service connection was not available.
  • ESRVRFAULT: An internal error has occurred.

Last modified: 2014-05-14



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus