bps_io_events_t

The bit to use when adding a file descriptor.

Synopsis:

#include <bps/bps.h>
 
typedef enum {
      BPS_IO_INPUT = 1 << 0   
      BPS_IO_OUTPUT = 1 << 1   
      BPS_IO_EXCEPT = 1 << 2   
} bps_io_events_t;

Since:

BlackBerry 10.0.0

Data:

BPS_IO_INPUT
Indicate that there is data available for reading.
BPS_IO_OUTPUT
Indicate that there is room in the output buffer for more data.
BPS_IO_EXCEPT
Indicate one of three things occurred:
  • An error occurred.
  • The device has been disconnected.
  • The provided file descriptor was invalid.

Library:

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

Description:

When you call bps_add_fd() to register an I/O handler with a channel, you specify the type of I/O to monitor with a bitwise OR of the corresponding bps_io_events_t bits.

When the I/O handler is called by the BPS library, the type of I/O event is passed into the second argument of the callback. You can perform a bitwise OR operation on this argument with the values of the bps_io_events_t enumeration to determine the I/O condition that was met.