YAZ  5.25.0
Typedefs | Functions
mime.h File Reference

Small utility to manage MIME types. More...

Go to the source code of this file.


typedef struct yaz_mime_infoyaz_mime_types


yaz_mime_types yaz_mime_types_create (void)
void yaz_mime_types_add (yaz_mime_types t, const char *suffix, const char *mime_type)
const char * yaz_mime_lookup_suffix (yaz_mime_types t, const char *suffix)
const char * yaz_mime_lookup_fname (yaz_mime_types t, const char *fname)
void yaz_mime_types_destroy (yaz_mime_types t)

Detailed Description

Small utility to manage MIME types.

Definition in file mime.h.

Typedef Documentation

◆ yaz_mime_types

typedef struct yaz_mime_info* yaz_mime_types

Definition at line 35 of file mime.h.

Function Documentation

◆ yaz_mime_lookup_fname()

const char* yaz_mime_lookup_fname ( yaz_mime_types  t,
const char *  fname 

Definition at line 58 of file mime.c.

References yaz_mime_lookup_suffix().

Referenced by process_http_request().

◆ yaz_mime_lookup_suffix()

const char* yaz_mime_lookup_suffix ( yaz_mime_types  t,
const char *  suffix 

◆ yaz_mime_types_add()

void yaz_mime_types_add ( yaz_mime_types  t,
const char *  suffix,
const char *  mime_type 

◆ yaz_mime_types_create()

yaz_mime_types yaz_mime_types_create ( void  )

Definition at line 30 of file mime.c.

References yaz_mime_info::table, and xmalloc.

Referenced by process_http_request().

◆ yaz_mime_types_destroy()

void yaz_mime_types_destroy ( yaz_mime_types  t)