YAZ  5.34.0
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

◆ 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)