NAME
irCheck - get an event from the library event queue
SYNOPSIS
#include <irapi.h>
int irCheck (ir_event_t *pir_event);
DESCRIPTION
irCheck is a non-blocking function used to access events.
The events (IRE_*) and event structure (ir_event_t) are
specified in IrEVENTS(4IRAPI). irCheck must be called after
irWait(3IRAPI) returns.
Whereas irWait(3IRAPI) blocks until an event occurs (and
does not "return" the event), irCheck is used after a
irWait(3IRAPI) to access the event.
irCheck returns information about only one event. If multi-
ple events are queued, irCheck returns the first one.
If an event is queued, then a call to irCheck accesses the
event and copies the event data into the caller allocated
ir_event_t structure. The address of that structure is
passed to the function as the pir_event argument. If an
event is not queued, then a call to irCheck immediately
returns IRE_NULL.
irCheck should be called until IRE_NULL is returned to clear
the event queue.
EVENT
No event results from the call to irCheck.
RETURN VALUE
The event_id [see IrEVENTS(4IRAPI)] of the accessed event is
returned if irCheck is successful.
IRE_NULL is returned if there are no events.
CAVEAT
The application must call irWait(3IRAPI) frequently to allow
the library to handle the asynchronous returns for speech
and telephony functions. If an application does not call
irWait(3IRAPI) frequently enough, the library can not pro-
cess asynchronous events in a timely manner and some func-
tions may return errors or otherwise fail. For this reason,
applications should not call any UNIX system calls which may
block indefinitely.
irCheck is always used after a wait call returns an indica-
tion of a IRAPI event.
SEE ALSO
irWait(3IRAPI), irWCheck(3IRAPI), IrEVENTS(4IRAPI)
VERSION
This is version 10/24/02 of this man page.