bt_rdev_get_services_gatt()

Retrieve the list of remote device GATT (Generic Attributes) services.

Synopsis:

#include <btapi/btdevice.h>
 
char** bt_rdev_get_services_gatt(const bt_remote_device_t *remote_device)

Since:

BlackBerry 10.0.0

Arguments:

remote_device

A pointer to a remote device structure.

Library:

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

Description:

Retrieves an array of GATT services from either the paired or found devices list. The following example shows how to retrieve a list of remote device services:

 char **services_array;
 if( ( services_array = bt_rdev_get_services_gatt(remote_device)) != NULL) {
     // work with the services listing
     bt_rdev_free_services(services_array);
 }

Returns:

An allocated, NULL-terminated array of remote device service strings is returned upon success, NULL with the errno set otherwise. Any errno value other than the following indicates that a system error has occurred:
  • EINVAL: An invalid value was passed in for remote_device.
  • ENOMEM: There was insufficient memory to allocate required structures.
  • ENOENT: There are no GATT services listed for the remote device.

Last modified: 2014-05-14



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

comments powered by Disqus