bt_ldev_set_power_async()

Enable or disable the Bluetooth radio asynchronously.

Synopsis:

#include <btapi/btdevice.h>
 
int bt_ldev_set_power_async(const bool power_on, bt_ldev_set_power_cb cb, void *user_data)

Since:

BlackBerry 10.3.0

Arguments:

power_on

Set to a value of true to turn on the Bluetooth radio, false to turn off the Bluetooth radio.

cb

The callback function to be executed when the operation has completed.

user_data

A user specified pointer that is returned during the callback.

Library:

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

Description:

When the operation completes successfully, the bt_ldev_set_power_cb callback is invoked and the BT_EVT_RADIO_INIT or BT_EVT_RADIO_SHUTDOWN event is sent.

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:
  • ENOMEM: There was insufficient memory to allocate required structures.
  • ENOENT: A required data entry was not found (internal error).
  • EPERM: There was an error accessing required system data (internal error).

Last modified: 2014-05-14



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

comments powered by Disqus