
Developing a Fax Application
for (;;)
{
BT_ZERO(args_fax); args_fax.s_tp = tp; args_fax.combine = 0;
if (BfvFaxNextPageTiff(lp,&args_fax) <= 0) break;
BT_ZERO(args_fax); args_fax.s_tp = tp;
if (BfvFaxSendPageTiff(lp,&args_fax) < 0) break;
}
Loops through the
BfvFaxEndOfDocument(lp, &args_fax);
Finishes up when the TIFF data is exhausted.
BT_ZERO(args_tiff); args_tiff.tp = tp; BfvTiffClose(&args_tiff);
Closes the
BT_ZERO(args_admin);
BfvLineDetach (lp, &args_admin);
Frees all the memory for the attached line and closes the device.
Receiving a Fax Using Calls for TIFF-F Files
One way to receive a fax using function calls for
BT_ZERO(args_admin); args_admin.unit = unit;
lp = BfvLineAttach(&args_admin);
Attaches to a free channel and gets a BTLINE pointer.
args_admin.config_file_name = "usrcnfig.cfg"; BfvLineReset(lp,&args_admin);
Resets the channel and sets the
BT_ZERO(args_tiff); args_tiff.fname = name; args_tiff.fmode = "w";
tp = BfvTiffOpen(&args_tiff);
Opens the TIFF-F file name to store the received fax.
November 2009 | 76 |