NodeC  0.1
MIME Types.

MIME type functionality. More...

Functions

const char * nodec_mime_info_from_fname (const char *fname, bool *compressible, const char **charset)
 Mime info from a filename. More...
 
const char * nodec_mime_from_fname (const char *fname)
 Mime name from a file name. More...
 
void nodec_info_from_mime (const char *mime_type, const char **preferred_ext, bool *compressible, const char **charset)
 Information for a MIME type. More...
 
const char * nodec_ext_from_mime (const char *mime_type)
 The preferred extension for a MIME type. More...
 

Detailed Description

MIME type functionality.

The default MIME information is generated from the mime-db project.

Function Documentation

◆ nodec_ext_from_mime()

const char* nodec_ext_from_mime ( const char *  mime_type)

The preferred extension for a MIME type.

Parameters
mime_typeThe MIME type.
Returns
The preferrred extensions (do not free).

◆ nodec_info_from_mime()

void nodec_info_from_mime ( const char *  mime_type,
const char **  preferred_ext,
bool *  compressible,
const char **  charset 
)

Information for a MIME type.

Parameters
mime_typeThe MIME type.
[out]preferred_extThe preferred extension.
[out]compressibleSet to true if this kind of file can be further compressed by gzip.
[out]charsetSet to the default character set for this MIME type. (do not free).

◆ nodec_mime_from_fname()

const char* nodec_mime_from_fname ( const char *  fname)

Mime name from a file name.

Parameters
fnameThe file name.
Returns
The MIME type. (do not free).

◆ nodec_mime_info_from_fname()

const char* nodec_mime_info_from_fname ( const char *  fname,
bool *  compressible,
const char **  charset 
)

Mime info from a filename.

Parameters
fnameThe file name.
[out]compressibleSet to true if this kind of file can be further compressed by gzip.
[out]charsetSet to the default character set for this MIME type. (do not free).
Returns
The MIME type. (do not free).