
Name: |
int gfqSubmitPlist (char *gfqFileName, GFQRECORD *qrec, char *phonelist); | |
Inputs: |
char *gfqFileName |
|
|
GFQRECORD *qrec |
|
|
char *phonelist |
|
Outputs: |
None |
|
Returns: |
GFQSUCCESS |
|
|
GFQFILE_BUSY |
|
|
GFQFILE_CREATE_ERROR |
|
|
GFQFILE_INCOMPATIBLE |
|
|
GFQFILE_NOTFOUND |
|
|
GFQSUCCESS |
|
|
GFQFILE_BUSY |
|
|
GFQFILE_CREATE_ERROR |
|
Includes: |
gfq.h |
|
The gfqSubmitPlist( ) function submits a fax for each entry in a phone list.
This function starts fax broadcasting by submitting records to the Pending List for an entire phone list. The phone-list file is automatically opened, processed, and closed. gfqSubmitPlist( ) writes a record for each phone number from the phone list into the Pending List of the Queue File.
The operation field of the queue record determines the action to be taken on each record submitted, such as Dial and Send, Dial and Receive, or Answer Immediately. The queue record is inserted into the Pending List if the operation field of the record has the values between GFQDIAL_SEND and GFQLAST_OPERATION. If the operation for a record is appropriate, gfqSubmitPlist( ) calls gfqInsertPlist( ) and passes the record, specifying the Pending List as the target. The caller should verify that the phone-list file exists and is correctly formatted. See gfqInsertPlist( ) for the phone-record format.
These fields of the queue record are set to their defaults in the phone list: 30 seconds for cd_timeout and GFQMAX_RATE bps for trans_rate.
#include "gfq.h" #include "gfqpath.h" GFQRECORD qrec; char queuefile[128] = "\0"; char phonelist[128] = "c:\\broadcst\\phonelst.txt"; int status; /* get fully qualified path to queue file */ if (gfqGetPath(GFQDIR_QUEUE, "gfax.$qu", queuefile)
!= GFQSUCCESS) { fprintf(stderr, "GFAX environment variable not defined\n"); exit(1); } /* initialize queue record */ gfqClearRec(&qrec); qrec.operation = GFQDIAL_SEND; strcpy(qrec.fn_send, "c:\\faxsend\\broadcst.tif"); status = gfqSubmitPlist(queuefile, &qrec, phonelist); if (status != GFQSUCCESS) { printf("gfqSubmitPlist error %d\n", status); myErrorRoutine(status); } else printf("fax broadcast submitted successfully\n");
Click here to contact Dialogic Customer Engineering
Copyright 2000, Dialogic Corporation