
Name: |
int gfqPurgeAll (char *gfqFileName, GFQRECORD *qrec, int list, char *user); | |
Inputs: |
char *gfqFileName |
|
|
GFQRECORD *qrec |
|
|
int list |
|
|
char *user |
|
Outputs: |
None |
|
Returns: |
GFQSUCCESS |
|
|
GFQFILE_BUSY |
|
|
GFQFILE_CREATE_ERROR |
|
|
GFQFILE_INCOMPATIBLE |
|
|
GFQFILE_NOTFOUND |
|
|
GFQFILE_OPEN_ERROR |
|
|
GFQRECORD_ACTIVE |
|
|
GFQLIST_NOTFOUND |
|
Includes: |
gfq.h |
|
The gfqPurgeAll( ) function purges from one of the Queue Files lists all records for a specific user that are not active or BUSY. If the user is NULL or "", all records on the list that are not busy are purged. If the purge succeeds, the function returns GFQSUCCESS, even when the list had no records.
To make disk space available, gfqPurgeAll( ) also automatically shrinks the Queue File to its minimum size of 78 bytes, leaving only the Queue File header, but under two conditions:
#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);
}
status = gfqPurgeAll(queuefile, &qrec, GFQSENT_LIST, Delete_Me");
if (status != GFQSUCCESS)
{
printf("gfqPurgeAll Sending List failed, %d\n", status);
myErrorRoutine(status);
}
else
printf("All 'Delete_Me' records purged from Sending List\n");
Click here to contact Dialogic Customer Engineering
Copyright 2000, Dialogic Corporation