bt_ldev_get_friendly_name()

Retrieve the friendly name of the local Bluetooth-enabled device.

Synopsis:

#include <btapi/btdevice.h>
 
int bt_ldev_get_friendly_name(char *friendly_name, int friendly_name_len)

Since:

BlackBerry 10.0.0

Arguments:

friendly_name

A string buffer where the Bluetooth friendly name is stored.

friendly_name_len

The size of the buffer. The minimum size is 2 bytes and the maximum is 256 bytes. The buffer length must include room for the terminating NULL character.

Library:

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

Description:

The friendly name is a string value that helps to make it easier to identify the local device. After you call the function, the name is retrieved from the friendly_name argument. You must allocate a buffer that is large enough to store the name including the terminating NULL character.

Returns:

0 is returned upon success, -1 with the errno set otherwise. Any errno value other than the following indicates that a system error has occurred:
  • ENOENT: The friendly name of the local device could not be found.

Last modified: 2014-05-14



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

comments powered by Disqus