1 #ifndef EL__MIME_MIME_H
2 #define EL__MIME_MIME_H
4 #include "main/module.h"
10 unsigned char *description
;
11 unsigned char *backend_name
;
14 unsigned char program
[1]; /* XXX: Keep last! */
17 extern struct module mime_module
;
19 /* Guess content type of the document. Either from the protocol header or
20 * scanning the uri for extensions. */
21 unsigned char *get_content_type(struct cache_entry
*cached
);
23 /* Guess content type by looking at configurations of the given @extension */
24 unsigned char *get_extension_content_type(unsigned char *extension
);
26 /* Find program to handle mimetype. The @xwin tells about X capabilities. */
28 get_mime_type_handler(unsigned char *content_type
, int xwin
);
30 /* Extracts strictly the filename part (the crap between path and query) and
31 * adds it to the @string. Note that there are cases where the string will be
32 * empty ("") (ie. http://example.com/?crash=elinks). */
33 struct string
*add_mime_filename_to_string(struct string
*string
, struct uri
*uri
);