133 uint_t MinSize, MajSize, i;
134 const char *str = content_type;
137 for (i = 0; str[i] && str[i] !=
' ' && str[i] !=
';'; ++i) {
138 if (str[i] ==
'/' && !MajSize)
void * a_Dicache_svg_image(const char *Type, void *Ptr, CA_Callback_t *Call, void **Data)
SVG wrapper for Dicache_image()
void * a_Dicache_jpeg_image(const char *Type, void *Ptr, CA_Callback_t *Call, void **Data)
JPEG wrapper for Dicache_image()
void * a_Dicache_gif_image(const char *Type, void *Ptr, CA_Callback_t *Call, void **Data)
GIF wrapper for Dicache_image()
void * a_Dicache_png_image(const char *Type, void *Ptr, CA_Callback_t *Call, void **Data)
PNG wrapper for Dicache_image()
int dStrnAsciiCasecmp(const char *s1, const char *s2, size_t n)
#define a_List_add(list, num_items, alloc_step)
void * a_Html_text(const char *type, void *P, CA_Callback_t *Call, void **Data)
Set callback function and callback data for the "html/text" MIME type.
void a_Mime_init(void)
Initializes Mime module and, sets the supported Mime types.
static Viewer_t Mime_minor_type_fetch(const char *Key, uint_t Size)
Search the list of specific MIME viewers for a Method that matches 'Key'.
static int Mime_add_minor_type(const char *Key, Viewer_t Method)
Add a specific MIME type (as "image/png") to our viewer list.
static int Mime_add_major_type(const char *Key, Viewer_t Method)
Add a major MIME type (as "text") to our viewer list.
static int MimeMinItemsMax
static Viewer_t Mime_major_type_fetch(const char *Key, uint_t Size)
Search the list of major MIME viewers for a Method that matches 'Key'.
static MimeItem_t * MimeMinItems
static int MimeMajItemsMax
static MimeItem_t * MimeMajItems
static int MimeMinItemsSize
static int MimeMajItemsSize
Viewer_t a_Mime_get_viewer(const char *content_type)
Get the handler for the MIME type.
void * a_Plain_text(const char *Type, void *web, CA_Callback_t *Call, void **Data)
Set callback function and callback data for "text/" MIME major-type.
void *(* Viewer_t)(const char *, void *, CA_Callback_t *, void **)