
Developing a Fax Application
args_admin.config_file_name = "usrcnfig.cfg"; BfvLineReset(lp,&args_admin);
Resets the channel and sets the
BT_ZERO(args_infopkt); args_infopkt.fname = name; args_infopkt.fmode = "r";
ips = BfvInfopktOpen(&args_infopkt);
Opens the
BT_ZERO(args_tel);
args_tel.phonenum = "w7814499009";
args_tel.call_protocol_code = CALL_PROTOCOL_FAX; args_tel.func = userfunc;
args_tel.arg = userarg; BfvLineOriginateCall(lp,&args_tel);
Dials the phone number, monitors call progress, calls the user function to optionally decide when to terminate call progress.
BT_ZERO(args_fax); args_fax.s_ips = ips; args_fax.local_id = local_id; BfvFaxSend(lp,&args_fax);
Transmits documents based on an infopkt stream.
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.
Receiving a Fax Using
BT_ZERO(args_admin); args_admin.unit = unit;
lp = BfvLineAttach(&args_admin);
Attaches to a free channel and gets a line pointer.
November 2009 | 65 |