navigator_invoke_event_get_query_result_action_count()

Get the number of action values in an invocation query result.

Synopsis:

#include <bps/navigator_invoke.h>
 
BPS_API int navigator_invoke_event_get_query_result_action_count(bps_event_t *event)

Since:

BlackBerry 10.0.0

Arguments:

event

The NAVIGATOR_INVOKE_QUERY_RESULT event targeted by the query result.

Library:

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

Description:

The navigator_invoke_event_get_query_result_action_count() function extracts the number of navigator_invoke_query_result_action_t structure results that are returned from an invocation query. The navigator_invoke_query_result_action_t action structures returned are considered viable actions based on the information supplied through the navigator_invoke_query_t structure that invoked the query. Call this function from an event handler upon receiving the NAVIGATOR_INVOKE_QUERY_RESULT event to determine how many viable actions were returned. You can use this value to create a loop of the returned values.

If you encounter an error in processing the query, we recommend that you call the navigator_event_get_err() function to determine the nature of the error. The possible errors are:
  • invalid_argument
  • response_too_large
  • server_error

Returns:

The number of actions inside the invocation query result, -1 otherwise.