
Developing a Fax Application
for (;;)
{
BT_ZERO(args_fax); args_fax.s_ips = ips;
if ((ret = BfvFaxNextPage(lp, &args_fax)) <= 0 ) break;
BfvFaxSendPage(lp, &args_fax);
}
Loops through the infopkt stream, getting the next page and transmitting it to the driver.
BfvFaxEndOfDocument(lp, &args_fax);
Finishes up when the infopkt stream is exhausted.
BT_ZERO(args_infopkt); args_infopkt.ips = ips; BfvInfopktClose (&args_infopkt);
Closes the infopkt stream file after the file is sent.
BT_ZERO(args_admin);
BfvLineDetach (lp, &args_admin);
Frees all memory for the attached line and closes the device.
You can replace some
BfvLineDialString | These low level functions are |
BfvLineCallProgressEnable | replaced with the high level |
BfvDataCP | function BfvLineOriginateCall. |
BfvLineCallProgressDisable |
|
BfvFaxSetLocalID | These low level functions are |
BfvFaxBeginSend | replaced with the high level |
BfvFaxGetRemoteInfo | function BfvFaxSend. |
BfvFaxWaitForTraining |
|
BfvFaxSendPage |
|
BfvFaxEndOfDocument |
|
Receiving a Fax Using
BT_ZERO(args_admin); args_admin.unit = unit;
lp = BfvLineAttach(&args_admin);
Attaches to a free channel and gets a BTLINE pointer.
November 2009 | 68 |