NAME irSetEvent, irGetEvent, irInitEvents - modify event control of library SYNOPSIS #include <irapi.h> int irSetEvent (channel_id cid, int event_id, int action); int irGetEvent (channel_id cid, int event_id); int irInitEvents (channel_id cid); DESCRIPTION The irSetEvent function allows the user to control the actions of the library when events occur on the channel specified by cid. Possible actions are the notification of the event or the notification plus interruption of playing, recording, saying, faxing and/or calling. Notification that the event has occurred is provided via irCheck(3IRAPI). Interruption without notification is not valid. Event_id is a valid event as specified in IrEVENTS(4IRAPI). Action is an ORed list of possible library actions on the occurrence of the event defined as follows: IRF_IGNORE Ignore the event IRF_NOTIFY Notify on event IRF_PLAYINTR Interrupt playing IRF_RECINTR Interrupt recording IRF_SAYINTR Interrupt saying IRF_CALLINTR Interrupt out calling IRF_FAXPRINTINTR Interrupt FAX printing IRF_FAXRECORDINTR Interrupt FAX recording IRF_SUBPROG_NOTIFY Notify the calling process of the event IRF_DEINIT Deinit (release ownership) of the channel cid automatically upon receipt of the event If action is set to IRF_IGNORE, the event is disabled, that is, occurrence of the event is not reported by the library. Not all events may be disabled, see IrEVENTS(4IRAPI). If IRF_IGNORE is used with any other flags, IRF_IGNORE is ignored and the remaining flags are set. When irSetEvent is called, the current setting of the event_id action is overwritten with the new value specified in action. irGetEvent returns the event action for event_id. irInitEvents returns all events for cid to their default settings. Default event assignments are described in IrEVENTS(4IRAPI). EVENT No event results from the call to irSetEvent or irGetEvent. RETURN VALUE The previous setting of the event is returned if irSetEvent is successful. The current setting of the event is returned if irGetEvent is successful. IRR_OK is returned by irInitEvents if it is successful. IRR_FAIL is returned if an error occurs for any of these functions. ERROR irError is set to IRER_INVALID if the cid, event_id, or action are not valid or if event_id cannot be ignored and action is set to IRF_IGNORE. EXAMPLE To set the IRE_INPUT event to interrupt play and notify the application when input occurs, the following code may be used: channel_id cid; ... irSetEvent(cid,IRE_INPUT,IRF_NOTIFY|IRF_PLAYINTR); SEE ALSO IrEVENTS(4IRAPI), IrERRORS(4IRAPI) VERSION This is version 11/25/02 of this man page.