The batch programming model relieves the developer of monitoring the fax transaction phases. This programming model is designed for applications such as automated transmission between two fax machines with no human intervention. The batch mode also minimizes the loading on the host computer.
A batch application cannot perform resource sharing or call switching. An additional limitation is that it is restricted to CP Fax hardware, which can perform direct call control (e.g. CP Fax cards with direct connection to the PSTN (analog boards or AEB connections, or direct control of signaling bits in digital environments such as PEB). As a result of the limitations of batch programming, developers generally prefer the interactive programming model, which is discussed later in this chapter.
In the batch programming model, the fax channel performs all five phases of a fax transaction. This API model can be used in the following types of applications:
Batch mode programming deals with the submission and retrieval of queue records (Chapter 4). A queue record is simply a data structure that is stored in a database (the Queue File). This "database record" describes the fax transaction from start to finish.
For example, to send a fax, a queue record is filled in with the file name of the image and the phone number. The record is then submitted to the database using gfqSubmit( ) for processing. The GDK subsystem processes the fax transaction and updates the queue record with the status, duration, and completion time of the job. The completed record can then be retrieved by the application using gfqFindFirst( ) to update its local records.
This description demonstrates the simplicity of the batch mode model. Note, however, that the queue record is a comprehensive data structure, which provides detailed transmission or receiving characteristics. Additionally, a completed queue record contains detailed measurements of line quality, fax machine characteristics, and call duration.
The level to which you program the queue record determines the sophistication of your fax application in the batch mode programming model. Conversions, fonts, headers, speeds, file transfers, retries, and special information exchanges are all available using the fields of the queue record.
GFQ APIs - Alphabetized List of the GFQ FunctionsThe following is an alphabetized list of the GFQ functions. These functions submit and retrieve transactions within the GDK Queue File (database). Any queue record that is not marked busy can be created, read, modified, or deleted from the Queue File by using the GFQ functions. For a detailed discussion of the Queue File's structure, please see Chapter 4.
Click here to contact Dialogic Customer Engineering
Copyright 2000, Dialogic Corporation