
Name: |
int gfqSubmit (char *gfqFilename, GFQRECORD *qrec); | |
Inputs: |
char *gfqFileName |
|
|
GFQRECORD *qrec |
|
Outputs: |
None |
|
Returns: |
GFQSUCCESS |
|
|
GFQFILE_BUSY |
|
|
GFQFILE_CREATE_ERROR |
|
|
GFQFILE_INCOMPATIBLE |
|
|
GFQFILE_NOTFOUND |
|
|
GFQFILE_OPEN_ERROR |
|
|
GFQRECORD_WRITE_ERROR |
|
Includes: |
gfq.h |
|
|
gfqpath.h |
|
The gfqSubmit( ) function adds one record to the Pending List. Because this list is sorted in descending order by time stamp and priority, events to be processed in the future are at the beginning of the list and events to be processed "now" are at the end. Unlike gfqInsertOne( ), which can be used to submit records to any linked list, gfqSubmit( ) is used to submit queue records only to the Pending List.
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. Table 32 lists the values that gfqSubmit( ) automatically writes to queue-record fields.
Table 32. Values Written by gfqSubmit( ) to Queue Record Field
Field |
Value |
The current time | |
Not marked busy | |
retry_counter | |
0 | |
status |
0 |
#include "gfq.h" #include "gfqpath.h" GFQRECORD qrec; char queuefile[128] = "\0"; 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:\\fax\\test001.tif"); strcpy(qrec.phone_no, "1-408-555-1212"); status = gfqSubmit(queuefile, &qrec); if (status != GFQSUCCESS) { printf("gfqSubmit error %d\n", status); myErrorRoutine(status); } else printf("fax submitted successfully\n");
Click here to contact Dialogic Customer Engineering
Copyright 2000, Dialogic Corporation