YAZ  5.23.1
Data Structures | Functions
mime.c File Reference

Small utility to manage MIME types. More...

#include <stdio.h>
#include <string.h>
#include <yaz/xmalloc.h>
#include "mime.h"

Go to the source code of this file.

Data Structures

struct  yaz_mime_entry
 
struct  yaz_mime_info
 

Functions

yaz_mime_types yaz_mime_types_create ()
 
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.c.

Function Documentation

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().

const char* yaz_mime_lookup_suffix ( yaz_mime_types  t,
const char *  suffix 
)
void yaz_mime_types_add ( yaz_mime_types  t,
const char *  suffix,
const char *  mime_type 
)
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().

void yaz_mime_types_destroy ( yaz_mime_types  t)