inc/textOut.h

Go to the documentation of this file.
00001 /* textOut - set up stdout to be HTTP text, file or compressed file. */
00002 
00003 #ifndef TEXTOUT_H
00004 #define TEXTOUT_H
00005 
00006 #include "pipeline.h"
00007 
00008 /* Supported compression types: */
00009 #define textOutCompressNone "none"
00010 #define textOutCompressBzip2 "bzip2"
00011 #define textOutCompressCompress "compress"
00012 #define textOutCompressGzip "gzip"
00013 #define textOutCompressZip "zip"
00014 
00015 /* Menu and values for passing to cgiMakeDropListFull: */
00016 /* (not declaring the static char *[]'s here because those can lead to 
00017  * "variable defined but not used" warnings -- declare locally.) */
00018 #define textOutCompressMenuContents { "plain text",\
00019                                        "gzip compressed (.gz)",\
00020                                        "bzip2 compressed (.bz2)",\
00021                                        "LZW compressed (.Z)",\
00022                                        "zip compressed (.zip)",\
00023                                        NULL\
00024                                      }
00025 
00026 #define textOutCompressValuesContents { textOutCompressNone,\
00027                                          textOutCompressGzip,\
00028                                          textOutCompressBzip2,\
00029                                          textOutCompressCompress,\
00030                                          textOutCompressZip,\
00031                                          NULL\
00032                                        }
00033 
00034 
00035 struct pipeline *textOutInit(char *fileName, char *compressType);
00036 /* Set up stdout to be HTTP text, file (if fileName is specified), or 
00037  * compressed file (if both fileName and a supported compressType are 
00038  * specified). 
00039  * Return NULL if no compression, otherwise a pipeline handle on which 
00040  * textOutClose should be called when we're done writing stdout. */
00041 
00042 void textOutClose(struct pipeline **pCompressPipeline);
00043 /* Flush and close stdout, wait for the pipeline to finish, and then free 
00044  * the pipeline object. */
00045 
00046 #endif /* TEXTOUT_H */

Generated on Tue Dec 25 18:39:29 2007 for blat by  doxygen 1.5.2