navigator_invoke_invocation_set_target()

Set the target of an invocation.

Synopsis:

#include <bps/navigator_invoke.h>
 
BPS_API int navigator_invoke_invocation_set_target(navigator_invoke_invocation_t *invocation,
                                                   const char *target)

Since:

BlackBerry 10.0.0

Arguments:

invocation

A pointer to the navigator_invoke_invocation_t structure whose target you want to set.

target

The target you want the invocation to be sent to. The value must conform to the "[Domain][Sub-domain]" format (see description for further information).

Library:

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

Description:

The navigator_invoke_invocation_set_target() function sets the target of a given navigator_invoke_invocation_t structure. The target member is an identifier to the target (as stated in its BAR manifest) handler to which the invocation is sent.

If you assign a target member to an invocation then brokering is bypassed and an attempt is made to invoke the specified target. If you don't call this function, the invocation framework uses brokering along with the action and/or type member (assigned with the navigator_invoke_invocation_set_action() and navigator_invoke_invocation_set_type() functions respectively) to find the corresponding handler(s).

The format of a target member must conform to the following guidelines:
  • Maximum 50 characters
  • Target: [Domain][Sub-domain]
  • Sub-domain: NUL | .[Domain][Sub-domain]
  • Domain: [a-zA-Z]([a-zA-Z0-9_])*

Example: "com.example.invoke.target"

Returns:

BPS_SUCCESS upon success, BPS_FAILURE with errno set otherwise.