bt_gatt_disconnect_services()

Disconnect a list of active services or cancel pending service connections.

Synopsis:

#include <btapi/btgatt.h>
 
int bt_gatt_disconnect_services(const char *bdaddr, const char **services)

Since:

BlackBerry 10.0.0

Arguments:

bdaddr

The MAC address of the remote Bluetooth-enabled device.

services

A list of services to be disconnected or cancelled. These can be either 128-bit or 16-bit universally unique identifiers (UUIDs). The list is NULL-terminated. An example of the string representation for GATT services is 0x1435. The 128-bit UUID is traditionally represented as 0xF0000000-0451-4000-B000-000000000000.

Library:

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

Description:

Returns:

EOK on successful disconnection of service, or -1 with the errno set otherwise. Some of the possible error codes that can be returned are as follows:
  • EDEADLK: A potential deadlock has been avoided.
  • EINVAL: The passed arguments are invalid.
  • ENODEV: A connection to the specified device could not be found.
  • ENOMEM: Insufficient memory to perform the request.
  • ESRVRFAULT: An internal error has occurred.