(Page 14 of 19 in this chapter)


nfxReceiveFax

Description

This function starts the receive side of T.30 protocol session and then places all received documents into the receive queue.

Prototype

DWORD nfxReceiveFax (CTAHD ctahd,
NFX_QUEUE_HANDLE receive_queue_handle,
NFX_RECEIVE_PARMS *ptr_receive_parms)

ctahd Handle returned by ctaCreateContext

receive_queue_handle Queue to receive documents

ptr_receive_parms Pointer to parameters for receiving fax documents, or NULL to use default parameters; the NFX_RECEIVE_PARMS structure is as follows:

typedef struct
{
DWORD size; /* size of this structure */
DWORD modemtype; /* NFX_MODEM_TYPE_V27 */
/* NFX_MODEM_TYPE_V29.*/
/* Advertised capabilities */
/* for fax receiver */
DWORD minrate; /* NFX_BIT_RATE_2400 */
/* NFX_BIT_RATE_4800 */
/* NFX_BIT_RATE_7200 */
/* NFX_BIT_RATE_9600 */
DWORD resolution; /* NFX_RESOLUTION_HIGH */
/* NFX_RESOLUTION_LOW */
/* NFX_RESOLUTION_SUPER_HIGH */
DWORD encoding; /* NFX_ENCODE_1D or NFX_ENCODE_2D */
DWORD pollingenabled; /* NFX_YES or NFX_NO */
DWORD badlineaction; /* NFX_BAD_LINE_ACTION_NONE */
/* NFX_BAD_LINE_ACTION_DROP */
/* NFX_BAD_LINE_ACTION_REPT */
/* NFX_BAD_LINE_ACTION_TICK */
DWORD pagewidth; /* NFX_PAGE_WIDTH_A4 */
/* NFX_PAGE_WIDTH_B4 */
/* NFX_PAGE_WIDTH_A3 */
DWORD OTFmode; /* NFX_OTF_NEVER, */
/* NFX_OTF_ALWAYS, */
/* NFX_OTF_ONLY_IF_FAIL */
DWORD reserved;
DWORD lineerrors; /* % line errors before */
/* retrain negative */
DWORD NSFlength; /* Length of NSF field or */
/* 0 if none */
char SID[NFX_MAX_SID]; /* Subscriber ID string */
BYTE NSF[NFX_MAX_USER_NSF];
/* default NSF for session */
} NFX_RECEIVE_PARMS;

Return Values

Events

Details

If a fax license unit has not been allocated to this CTA context, this function will attempt to allocate one. NFXEVN_nnn events indicate progress of the fax session and completion of the fax session.

Note: Keep in mind that you must continue processing events during an active fax session. Make sure that file I/O intensive operations do not interfere with the handling of events and cause the fax session to time out. Events should be processed within three seconds.

To enable polling, make sure that the called fax terminal has pollingenabled in NFX_RECEIVE_PARMS set to NFX_YES. If polling is enabled and the sender subsequently requests polling, the event NFXEVN_POLLED is received. Use nfxAnswerFaxPoll to continue the fax operation.

Receiving any of the events above indicates that the fax session status has been updated. Use nfxGetSessionStatus to examine the current session status in more detail.

See Also

nfxAnswerFaxPoll, nfxGetLicenseStatus, nfxSendFax



(Page 14 of 19 in this chapter)


tech_support@nmss.com
Copyright © 1997, Natural MicroSystems, Inc. All rights reserved.