|
NetSurf
|
#include <stdbool.h>#include <libwapcaplet/libwapcaplet.h>#include "netsurf/content_type.h"#include "utils/errors.h"Go to the source code of this file.
Macros | |
| #define | CONTENT_FACTORY_REGISTER_TYPES(HNAME, HTYPELIST, HHANDLER) |
Functions | |
| void | content_factory_fini (void) |
| Clean up after the content factory. More... | |
| nserror | content_factory_register_handler (const char *mime_type, const struct content_handler *handler) |
| struct content * | content_factory_create_content (struct llcache_handle *llcache, const char *fallback_charset, bool quirks, lwc_string *effective_type) |
| Create a content object. More... | |
| content_type | content_factory_type_from_mime_type (lwc_string *mime_type) |
| Compute the generic content type for a MIME type. More... | |
| #define CONTENT_FACTORY_REGISTER_TYPES | ( | HNAME, | |
| HTYPELIST, | |||
| HHANDLER | |||
| ) |
Definition at line 29 of file content_factory.h.
| struct content * content_factory_create_content | ( | llcache_handle * | llcache, |
| const char * | fallback_charset, | ||
| bool | quirks, | ||
| lwc_string * | effective_type | ||
| ) |
Create a content object.
| llcache | Underlying source data handle |
| fallback_charset | Character set to fall back to if none specified |
| quirks | Quirkiness of containing document |
| effective_type | Effective MIME type of content |
Definition at line 169 of file content_factory.c.
References content_lookup(), content_handler::create, content::fallback_charset, content::handler, http_content_type_destroy(), http_parse_content_type(), llcache, llcache_handle_get_header(), NSERROR_OK, http_content_type::parameters, and content::quirks.
Referenced by hlcache_find_content().
| void content_factory_fini | ( | void | ) |
Clean up after the content factory.
Definition at line 53 of file content_factory.c.
References content_handlers, content_handler::fini, content_handler_entry::handler, content_handler_entry::mime_type, and content_handler_entry::next.
Referenced by netsurf_exit().
| nserror content_factory_register_handler | ( | const char * | mime_type, |
| const struct content_handler * | handler | ||
| ) |
| content_type content_factory_type_from_mime_type | ( | lwc_string * | mime_type | ) |
Compute the generic content type for a MIME type.
| mime_type | MIME type to consider |
Definition at line 147 of file content_factory.c.
References content_lookup(), CONTENT_NONE, content_handler_entry::handler, content_handler_entry::mime_type, content_handler::type, and type.
Referenced by ami_file_set_type(), box_object(), exec_inline_script(), hlcache_type_is_acceptable(), HOOKF(), and mimesniff_compute_effective_type().