bt_le_invoke_decode_advert_complete()

This function returns the reason why the local advertisement has completed when invoke is triggered with action "bb.action.bluetooth.ADVERTCOMPLETE".

Synopsis:

#include <btapi/btle.h>
 
int bt_le_invoke_decode_advert_complete(const char *invoke_dat, int invoke_len, bt_le_advert_complete_reason_t *reason)

Since:

BlackBerry 10.3.0

Arguments:

invoke_dat

The data provided by the invoke interface.

invoke_len

The length of the data provided by the invoke interface.

reason

Returns the reason why the advertisements completed.

Library:

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

Description:

The data that is provided must have the mime-type of "application/vnd.blackberry.bluetooth.advertcomplete".

Returns:

EOK on success, -1 if an error occurred with the errno value set. These are some of the error codes that can be returned:
  • EAGAIN: bt_le_init() was not called.
  • EPROTO: The data provided is not properly formatted to the required mime-type
  • EINVAL: One or more of the variables provided are invalid.
  • ESRVRFAULT: An internal error has occurred.