
Symbolic Constant |
Initial Search Target |
Second Target |
Meaning |
GFAXQ |
GFAX |
Locate the Queue File. | |
GFQDIR_UTILITY |
GFAXU |
GFAX |
Locate the utility programs. |
GFQDIR_SEND |
GFAXS |
current directory |
Locate the send files. |
GFQDIR_RECEIVE |
GFAXR |
current directory |
Locate the received files. |
GFQDIR_LOG |
GFAXL |
GFAX |
Locate the log files. |
GFQDIR_CONFIG |
GFAXC |
current directory |
Locate the config files. |
Name: |
void gfqInsertOne (char *gfqFileName, GFQRECORD *qrec, int list); | |
Inputs: |
Char *gfqFileName |
|
GFQRECORD *qrec |
| |
|
int list |
|
Outputs: |
None |
|
Returns: |
GFQSUCCESS |
|
|
GFQFILE_BUSY |
|
|
GFQFILE_CREATE_ERROR |
|
|
GFQFILE_INCOMPATIBLE |
|
|
GFQFILE_NOTFOUND |
|
|
GFQFILE_OPEN_ERROR |
|
|
GFQRECORD_WRITE_ERROR |
|
|
GFQLIST_NOTFOUND |
|
Includes: |
gfq.h |
|
The gfqInsertOne( ) function adds one record into the desired linked list of the Queue File. It is a general-purpose function that can be used to submit records to any linked list specified by the parameter "link." Table 28 lists the names used with gfqInsertOne( ).
Each linked list in the Queue File is kept sorted, in descending order, by a time stamp and priority. This means that events to be processed "now" are at the end of the linked list and "future" events are at the beginning. A pointer to a record and a linked-list number are passed into this function. If the linked list is out of range, the function returns GFQLIST_NOTFOUND.
Table 28. List Names Used with gfqInsertOne( )
Mnemonic |
Meaning |
Pending List | |
GFQRECV_LIST |
Received List |
GFQSENT_LIST |
Sent List |
GFQCONV_LIST |
Conversion List |
GFQCTRL_LIST |
Control List |
GFQCPST_LIST |
Control Done List |
#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 and fill in queue record */
...
status = gfqInsertOne(queuefile, &qrec, GFQPEND_LIST);
if (status != GFQSUCCESS)
{
printf("gfqInsertOne to GFQPEND_LIST failed, %d\n", status);
myErrorRoutine(status);
}
else
printf("Queue Record successfully submitted to Pending List\n");
Click here to contact Dialogic Customer Engineering
Copyright 2000, Dialogic Corporation