Perform a Generic Attribute (GATT) call to retrieve the number of included services within the primary service.
Synopsis:
#include <btapi/btgatt.h>
int bt_gatt_included_services_count(int instance)
Arguments:
- instance
-
The identifier used to reference the connected primary service.
Library:
libbtapi (For the qcc command, use the -l btapi option to link against this library)
Returns:
The number of included services that are available 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 performing another operation. You can try again later.
- EDEADLK: A potential deadlock has been avoided.
- EINVAL: Invalid stack parameters or connection to the remote Bluetooth-enabled device is not available.
- ENODEV: Unable to find the service connection defined by the instance argument.
- 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.