bt_ldev_invoke_decode_event()

This function is used to parse the Bluetooth event data received over the invoke interface when "bb.action.bluetooth.EVENT" occurs.

Synopsis:

#include <btapi/btdevice.h>
 
int bt_ldev_invoke_decode_event(const char *invoke_data, int invoke_len, int *event, const char **bdaddr, const char **event_data)

Since:

BlackBerry 10.3.0

Arguments:

invoke_data

The data provided by the invoke interface.

invoke_len

The length of the data provided by the invoke interface.

event

Returns the event which triggered the invoke.

bdaddr

A pointer to the Bluetooth address of the event from within the invoke data. This pointer is valid only for the lifespan of the invoke data.

event_data

A pointer to the event data from within the invoke data. This pointer references is valid only for the lifespan of the invoke data.

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.event". You must call bt_device_init() before calling this function.

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_device_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.

Last modified: 2014-05-14



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

comments powered by Disqus