navigator_invoke_event_get_viewer()

The use of viewers has been deprecated - use applications or cards as invocation targets instead.

Synopsis:

#include <bps/navigator_invoke.h>
 
BPS_API const navigator_invoke_viewer_t* navigator_invoke_event_get_viewer(bps_event_t *event) BPS_DEPRECATED

Since:

BlackBerry 10.0.0

Arguments:

event

The NAVIGATOR_INVOKE_VIEWER event targeted by the viewer.

Library:

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

Description:

Deprecated:

The use of viewers has been deprecated - use applications or cards as invocation targets instead.

The navigator_invoke_event_get_viewer() function extracts a pointer to the navigator_invoke_viewer_t structure that has been sent to the handler calling this function. Call this function from the event handler upon receiving the NAVIGATOR_INVOKE_VIEWER event to extract the invocation viewer properties (see the navigator_invoke_viewer_*() functions for further details about the navigator_invoke_viewer_t structure). The pointer to the navigator_invoke_viewer_t structure is valid until the bps_get_event() function is called again.

If you encounter an error in processing the viewer invocation, we recommend that you call the navigator_event_get_err() function to determine the nature of the error. The possible errors are:
  • INVOKE_NO_TARGET_ERROR
  • INVOKE_BAD_REQUEST_ERROR
  • INVOKE_INTERNAL_ERROR
  • INVOKE_TARGET_ERROR

Note that "ownership" of the event is not passed to the handler. For this reason, don't call the navigator_invoke_viewer_destroy() function from the handler on navigator_invoke_viewer_t structures that are retrieved using this function.

Returns:

A pointer to the navigator_invoke_viewer_t structure upon success, NULL with errno set otherwise.