navigator_invoke_invocation_set_source()

Set the source of an invocation.

Synopsis:

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

Since:

BlackBerry 10.0.0

Arguments:

invocation

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

source

The target you want the invocation target to be send results 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_source() function sets the source of a given navigator_invoke_invocation_t structure. The source member is an identifier to a target (as stated in its BAR manifest) to which the results of an invocation are sent. If you assign a source member to an invocation then the receiving target may send a response with the corresponding results.

Assigning a source member to an invocation is not mandatory, but if you do not assign one then the invoked target won't be able to communicate with the caller. Don't assign an invocation source if the sender doesn't support results.

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

Example: "com.example.result.target"

Returns:

BPS_SUCCESS upon success, BPS_FAILURE with errno set otherwise.