(Page 4 of 19 in this chapter)


nfxAnswerFaxPoll

Description

This function provides a queue of documents to send in response to a poll request from the remote sending fax terminal.

Prototype

DWORD nfxAnswerFaxPoll (CTAHD ctahd,
NFX_QUEUE_HANDLE send_queue_handle,
NFX_TRANSMIT_PARMS *ptr_transmit_parms)

ctahd Handle returned by ctaCreateContext

send_queue_handle Queue of documents to send

ptr_transmit_parms Pointer to data structure containing the parameters for sending fax documents or NULL to use default parameters; the NFX_TRANSMIT_PARMS structure is as follows:

typedef struct
{
 DWORD size;       /* size of this structure */
DWORD modemtype; /* NFX_MODEM_TYPE_V17, */
/* NFX_MODEM_TYPE_V33, */
/* NFX_MODEM_TYPE_V29, */
/* NFX_MODEM_TYPE_V27 */
DWORD minrate; /* NFX_BIT_RATE_14400, */
/* NFX_BIT_RATE_12000, */
/* NFX_BIT_RATE_9600, */
/* NFX_BIT_RATE_7200, */
/* NFX_BIT_RATE_4800 */
/* NFX_BIT_RATE_2400.*/
DWORD resolution; /* NFX_RESOLUTION_HIGH */
/* NFX_RESOLUTION_LOW */
/* NFX_RESOLUTION_SUPER_HIGH */
DWORD encoding; /* NFX_ENCODE_1D */
/* NFX_ENCODE_2D */
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 useCNG; /* NFX_YES or NFX_NO */ DWORD PRIenabled; /* NFX_YES or NFX_NO */ DWORD timeout; /* number of seconds to wait */
/* for receiver */
DWORD retrainaction; /* NFX_RTN_NEXT_PAGE */
/* NFX_RTN_REPEAT_PAGE */
DWORD addheader; /* NFX_YES or NFX_NO */ INT32 level; /* dBm level for */
/* transmission (-150 to 0)*/
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_TRANSMIT_PARMS;

Return Values

Events

Details

nfxAnswerFaxPoll must be called within three seconds of the receipt of NFXEVN_POLLED, which is the event that indicates a poll request. If nfxAnswerPoll is not called within three seconds, the fax session times out and the application receives an NFXEVN_SESSION_DONE event.

When NFXEVN_POLLED is received, nfxStopSession may be called to refuse the poll request from the called fax terminal.

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 when any of the information events are received.

Fax Header:

The addheader parameter in the NFX_TRANSMIT_PARMS structure indicates whether headers are added to the transmitted image data. The header is a fixed string in the following format:

FROM: transmit_SID Date Time Page N of M

By default, addheader is set to NFX_YES, and a header is added to the document being transmitted.

If the environment variable NMFHEADERFONT is not defined, no header is added regardless of the setting of addheader. See the NaturalFax Installation Manual for details.

See Also

nfxGetSessionStatus, nfxReceiveFax



(Page 4 of 19 in this chapter)


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