Main Page   Data Structures   File List   Data Fields   Globals   Related Pages  

mime.h File Reference

mime type helper function. More...

#include "common.h"

Include dependency graph for mime.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Functions

int mimeInit (const char *mime_types_file)
 initialise global MIME table. More...

char * mimeLookup (const char *file_ext)
 look up the MIME type for a given file extension. More...

int mimeTerminate ()
 destroys the gobal MIME type table. More...


Detailed Description

mime type helper function.

Definition in file mime.h.


Function Documentation

int mimeInit (  const char *    mime_types_file ) 
 

initialise global MIME table.

mimeInit reads the mime.types definition file and creates the global file extension to MIME type mapping table.

Returns:
0 on success, -1 on failure

char* mimeLookup (  const char *    file_ext ) 
 

look up the MIME type for a given file extension.

Parameters:
file_ext  a file extension without the leading "."
Returns:
a char* pointing to the MIME type or NULL if no MIME type could be found

Referenced by rhfGetContentType().

int mimeTerminate (    ) 
 

destroys the gobal MIME type table.

This destroys the global MIME type table and frees all of it's allocated ressources.

Returns:
0 on success, -1 on failure


Generated on Fri Jan 25 22:40:53 2002 for PDepp Webserver by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001