
Developing a Fax Application
Receiving and Storing a Fax in MMR or MR Format
Receiving an
A typical way to receive a fax that is made up of infopkts and store it in MMR format is demonstrated below. Each function is presented in sequential order, and the action it performs is described beneath it.
When MR or MMR facsimiles are received in infopkt format, the data format type specification is automatically included through the g3strppkt infopkt structure. Retransmission of these infopkt files is done the same way transmission of MH files is done (see Sending a Fax Using
The application controls the format of images received from the channel; this format is independent of the format of data received by the channel.
BT_ZERO(args_admin); args_admin.unit = unit;
lp = BfvLineAttach(&args_admin);
Attaches to a free channel and gets a line pointer.
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 = "w";
ips = BfvInfopktOpen(&args_infopkt);
Opens the
BT_ZERO(args_tel); args_tel.timeout = 0L; BfvLineWaitForCall (lp, &args_tel);
Waits without a timeout for an incoming call.
BfvLineAnswer (lp, &args_tel);
Takes the line
November 2009 | 78 |