bps_channel_push_event()

Post an event to the selected channel.

Synopsis:

#include <bps/bps.h>
 
BPS_API int bps_channel_push_event(int chid,
                                   bps_event_t *event)

Since:

BlackBerry 10.0.0

Arguments:

chid

The event channel to push the event onto.

event

The event to post to the event queue.

Library:

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

Description:

The bps_channel_push_event() function allows an application to post an event to any channel. You can use the bps_event_create() function to create a custom event in your application, and then use the bps_channel_push_event(chid, event) function to add the event to a channel that isn't currently active, or owned by the thread.

You can also use this function to dispatch an event to a different channel than the channel the event originated on. This makes passing events off to a different thread possible. In order for the transfer of event ownership to work properly, the active channel should be the same channel that the event was originally retrieved from.

Returns:

BPS_SUCCESS when the function completes successfully, BPS_FAILURE with errno value set otherwise.

Last modified: 2014-09-30



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

comments powered by Disqus