bps_channel_set_active()

Set the thread's active channel.

Synopsis:

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

Since:

BlackBerry 10.0.0

Arguments:

chid

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

Library:

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

Description:

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.

Returns:

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