bt_gatt_included_services()

Perform a Generic Attribute (GATT) call to retrieve a list of included services of the given primary service.

Synopsis:

#include <btapi/btgatt.h>
 
int bt_gatt_included_services(int instance, bt_gatt_included_service_t *services, uint16_t size)

Since:

BlackBerry 10.0.0

Arguments:

instance

The identifier used to reference the connected primary service.

services

An array of services that is populated when the function completes successfully. The string representation for GATT services is 0x1435.

size

The size of the array that is passed to the function. The size indicates the number of structures in the array and not the memory size required for the structures.

Library:

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

Description:

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.
  • EBUSY: The stack was busy and could not complete the request.
  • EDEADLK: A potential deadlock has been avoided.
  • EINVAL: Invalid stack parameters or connection to the remote Bluetooth-enabled device is not available.
  • ENODEV: The requested Bluetooth-enabled device could not be found.
  • ENOMEM: Sufficient memory is not available to perform the request.
  • ENOSYS: The operation failed at the stack level.
  • EPROTO: The operation failed because the response from remote Bluetooth-enabled device had a protocol error.
  • 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