NAME irStop - stops recording, playing, saying, faxing or calling SYNOPSIS #include <irapi.h> int irStop (channel_id cid); DESCRIPTION The irStop function immediately stops recording, playback, fax printing or fax recording on a channel indicated by a channel identifier (cid). The irStop function also aborts a call in progress [see irCall(3IRAPI)]. For play or record, the number of milliseconds played or recorded may be obtained by calling irGetVCount(3IRAPI) after IRE_PLAY_DONE or IRE_RECORD_DONE have occurred. For FAX, the number of pages printed or recorded may be obtained similarly. If the channel is in a queued state (IRS_PLAY_QUEUED, IRS_SAY_QUEUED or IRS_FAXPRINT_QUEUED) it is returned immediately to the IRS_IDLE state and all play, say, or fax requests are removed. If the cid is in the IRS_FAXPRINTING, IRS_FAXRECORDING, IRS_CALLING, IRS_SAYING, IRS_PLAYING, or IRS_RECORDING library states or is an pending state for any of these states (eg IRS_PLAYPENDING), an asynchronous stop request is sent immediately to the agent for the asynchronous activity. The cid library state remains unchanged until the activity specific IRE_<activity>_DONE event occurs. Note that if play requests are stopped via irStop when the channel is in the IRS_PLAY_PENDING state, they cannot be resumed at a later time with irPlayResume(3IRAPI). The play request must be re-sent with the appropriate irPlay(3IRAPI) and irEnd(3IRAPI) sequences. This holds true for IRS_RECORD_PENDING and irRecordResume(3IRAPI). Calling irStop when the channel is in the IRS_IDLE state has no effect. EVENT No event results directly from the call to irStop. Any out- standing activity, such as play, say, record, etc., com- pletes with a IRE_<activity>_DONE event and a IREM_STOPPED level 2 modifier. The tag of the event is the tag specified with the function which initiated the activity. RETURN VALUE IRR_OK is returned if irStop has successfully made the stop request. IRR_FAIL is returned if an error occurs. ERROR irError is set as follows if an error occurs: IRER_INVALID if the cid is invalid IRER_BADSTATE if the channel is in the IRS_CCA, IRS_CCA_PENDING, IRS_DIALING, IRS_DISCONNECTING, IRS_ECHO_STARTING, IRS_ECHO_PENDING, IRS_ECHO_STOPPING, IRS_FLASHING, IRS_ANSWERING, IRS_RECOG, IRS_RECOG_PENDING, IRS_RESOURCE, IRS_RESOURCE_PENDING, IRS_INIT, IRS_INIT_PENDING, IRS_GOING_OOS, IRS_GOING_IS or IRS_RESERVING states. In general, IRER_BADSTATE is gen- erated if the library is in an unstoppable state. IRER_DRIVER_ERROR if a driver call failure occurs (check irSysError for additional information) IRER_SYSERROR if an system or driver call failure occurs (check irSysError for additional information) SEE ALSO irPlay(3IRAPI), irFAXPrint(3IRAPI), irFAXRecord(3IRAPI), irRecord(3IRAPI), irSay(3IRAPI), irDial(3IRAPI), irCall(3IRAPI), IrEVENTS(4IRAPI), IrSTATES(4IRAPI). VERSION This is version 8/31/00 of this man page.