Set the thread's active channel.


#include <bps/bps.h>
BPS_API int bps_channel_set_active(int chid)


BlackBerry 10.0.0



A channel ID supplied by a previous call to the bps_channel_create() function.


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


The active channel for a thread determines which channel subsequent calls affect. Calls to various functions, such as the bps_get_event(), bps_push_event(), bps_add_fd() functions, work on the active channel. In addition, several service functions affect the active channel. Typically, function names that end in _request_events() adds a service's file descriptor to the active channel so that the events will start to enter the active channel's event queue.

A call to the bps_channel_set_active() function is only necessary when the application has created a channel using the bps_channel_create() function. A call to the bps_initialize() function creates a default channel, and that default channel is set as the active channel.


The previous active channel ID, BPS_FAILURE with errno value set otherwise.

Last modified: 2014-05-14

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

comments powered by Disqus