Add a sigevent handler to the active channel.
#include <bps/bps.h>
BPS_API int bps_add_sigevent_handler(struct sigevent *sigevent,
int(*sigevent_handler)(void *),
void *data)
BlackBerry 10.0.0
An allocated sigevent that will be filled in by bps_add_sigevent_handler(). A service can then use function like MsgDeliverEvent to signal the callback.
Service specific data that will be passed into every call to sigevent_handler.
This function is for situations where a service doesn't have a file descriptor with raw event data. In these cases, services can call bps_add_sigevent_handler() instead of bps_add_fd(). The purpose of the sigevent_handler callback is to push events onto the event queue. This callback has the same purpose as the bps_add_fd() functions's io_handler callback. The difference between the io_handler and sigevent_handler callbacks is that the sigevent_handler is fired whenever the channel receives the sigevent that gets filled in by calling this function and the io_handler gets fired when IO conditions are met for a file descriptor.
BPS_SUCCESS if the sigevent_handler was successfully registered, and sigevent was filled in. Otherwise, BPS_FAILURE is returned and the errno value will indicate the type of error. On failure, no callback is registered.