
Description | Example | Source Code | Errors | See Also
Name: |
void fx_setiott(iotp,fhandle,dtype,cont) | |
Inputs: |
DF_IOTT *iotp |
pointer to DF_IOTT |
|
int fhandle |
file descriptor |
|
unsigned short dtype |
type of fax data |
|
unsigned short cont |
Phase D continuation value |
Returns: |
None | |
Includes: |
srllib.h | |
|
dxxxlib.h | |
|
faxlib.h | |
Category: |
initialize DF_IOTT | |
Mode: |
synchronous | |
|
||
The fx_setiott( ) function sets up default DF_IOTT structure values for the specified type of fax data.
Use this function to initialize the DF_IOTT structure before setting specific DF_IOTT field values.
The DF_IOTT structure consists of fields describing the fax data for one fax document to be transmitted. A linked list or array of DF_IOTT structures can be created to specify multiple fax documents for transmission. The structure defines raw, TIFF/F and ASCII data.
The default setting for the fx_setiott( ) function is to send fax data from a file with the next DF_IOTT entry contiguous in memory. See the fx_setiott( ) Source Code section and the examples in the fx_sendfax( ) function reference.
|
||
Parameter |
Description | |
iotp |
Pointer to DF_IOTT structure. For more information on this structure, see Section 7.6. DF_IOTT -- Fax Transmit Data Description on page 109. | |
fhandle |
Specifies the file descriptor. | |
dtype |
Specifies the type of fax data to be transmitted. Valid values: | |
|
DF_TIFF |
TIFF/F structured formatted fax data |
|
DF_RAW |
Raw, unformatted fax data |
|
DF_ASCII |
ASCII text file data |
cont |
||
|
DFC_AUTO |
Automatic Phase D Messaging. The fax library automatically determines the T.30 Phase D continuation value based on the width, resolution and position of the current fax page, next fax page and the remote receiver's capability. Possible values automatically assigned are DFC_EOM, DFC_EOP and DFC_MPS. |
|
DFC_MPG |
Merge-page. The data specified for the DF_IOTT entry directly following the current DF_IOTT entry is concatenated to the same page. |
|
DFC_EOP |
End of Procedure (T.30). Terminate current fax session, progress to Phase E and disconnect fax call. |
|
DFC_MPS |
Multi-Page Signal (T.30). End of current fax document page; next fax document page is in the same format as the current page; proceed directly to Phase C. |
|
DFC_EOM |
End of Message (T.30). End of current fax document page; more fax data to follow at different resolution or width; return to Phase B and negotiate parameters for next fax document page. |
Details
For usage information on DF_IOTT, see Section 4.5. Specifying Fax Data for Transmission in a DF_IOTT Table Entry on page 44. For reference information on DF_IOTT, see Section 7.6. DF_IOTT -- Fax Transmit Data Description on page 109.
Connecting DF_IOTT Entries
When the next DF_IOTT entry is contiguous in memory, the io_type logical OR field specifies IO_CONT, and io_nextp and io_prevp specify NULL.
When the next DF_IOTT entry is linked to the current entry, after the current entry's call to fx_setiott( ), the io_type logical OR field specifies IO_LINK and io_nextp specifies a pointer to the next entry. For sample code, see the examples in the fx_sendfax( ) function reference.
TIFF/F File Entry Defaults
If fx_setiott( ) dtype parameter specifies DF_TIFF, the descriptor defines TIFF/F formatted data. The DF_IOTT default values for TIFF/F specify that all pages in the TIFF/F are transmitted:
io_firstpg = 0L;
io_pgcount = -1L;
If io_phdcont specifies DFC_MPG, the io_pgcount field is set to 1. Specify the starting page of the TIFF/F file to send in io_firstpg. For sample code, see the examples in the fx_sendfax( ) function reference.
Raw File Entry Defaults
If fx_setiott( ) dtype parameter specifies DF_RAW, the descriptor defines raw fax data that includes no other formatting. The DF_IOTT default values for raw data specify that the following is sent: a disk file of raw, Group 3 MH-encoded data with no offset at the standard carriage width (8.5") and at fine (high) resolution:
io_offset = 0L;
io_length = -1L;
io_width = DF_WID1728;
io_resln = DF_RESHI;
io_coding = DF_MH;
For sample code, see the fx_setiott( ) Source Code section.
ASCII File Entry Defaults
If fx_setiott( ) dtype parameter specifies DF_ASCII, the descriptor defines an ASCII text file. The DF_IOTT default values for ASCII text file specify that the following is sent: ASCII data at standard carriage width (8.5") and coarse (low) resolution. The NULL pointer passed to io_datap in place of the DF_ASCIIDATA structure results in default values being used for margins and other graphical attributes.
io_offset = 0L;
io_length = -1L;
io_width = DF_WID1728;
io_resln = DF_RESLO;
io_datap = (void *) NULL;
For sample code, see the fx_setiott( ) Source Code section.
See the examples in the fx_sendfax( ) function reference.
void fx_setiott(iotp,fhandle,dtype,cont)
DF_IOTT *iotp;
int fhandle;
unsigned short dtype;
unsigned short cont;
{
/* Data in file, next entry contiguous. */
iotp->io_type = IO_DEV;
iotp->io_fhandle = fhandle;
iotp->io_nextp = (DF_IOTT *)NULL;
iotp->io_prevp = (DF_IOTT *)NULL;
iotp->io_datatype = dtype;
iotp->io_phdcont = cont;
switch (dtype) {
/* For TIFF/F, set up firstpg and pgcount to send all pages. */
case DF_TIFF:
iotp->io_firstpg = 0L;
iotp->io_pgcount = (cont == DFC_MPG) ?1 : -1L;
break;
/*
* For raw file, set up to send complete file at default width and
* resolution.
*/
case DF_RAW:
iotp->io_offset = 0L;
iotp->io_length = -1L;
iotp->io_width = DF_WID1728;
iotp->io_resln = DF_RESHI;
iotp->io_coding = DF_MH;
break;
/*
* For ASCII file, set up to send complete file at default width and
* resolution.
*/
case DF_ASCII:
iotp->io_offset = 0L;
iotp->io_length = -1L;
iotp->io_width = DF_WID1728;
iotp->io_resln = DF_RESLO;
iotp->io_datap = (void *)NULL;
break;
default:
break;
}
return;
}
None
Click here to contact Dialogic Customer Engineering
Copyright 2002, Intel Corporation