bt_disc_start_inquiry_async()

Start scanning for Bluetooth-enabled devices asynchronously.

Synopsis:

#include <btapi/btdevice.h>
 
int bt_disc_start_inquiry_async(const bt_inquiry_access_t access_code, bt_disc_inquiry_complete_cb cb, void *user_data)

Since:

BlackBerry 10.3.0

Arguments:

access_code

The type of inquiry to perform.

cb

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

user_data

A user specified pointer which will be returned during the callback.

Library:

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

Description:

This function initiates a scan of in-range Bluetooth devices. The results of the scan can be found via the BT_EVT_DEVICE_ADDED events that are passed to the device library callback. For information, see bt_device_init() or one of the bt_disc_retrieve_*() functions with the BT_DISCOVERY_CACHED option. The scan does not return BT_EVT_DEVICE_ADDED events for paired devices, even if they are in range. The purpose is to discover new, non-paired devices only.

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:
  • EINVAL: An invalid value was passed in for access_code.
  • 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