83 lwc_string *imime_type;
89 if (lerror != lwc_error_ok)
93 if (lwc_string_caseless_isequal(imime_type, entry->
mime_type,
94 &match) == lwc_error_ok && match)
108 lwc_string_unref(imime_type);
129 &match) == lwc_error_ok && match) {
171 lwc_string *effective_type)
174 const char *content_type_header;
186 content_type_header =
188 if (content_type_header != NULL) {
nserror http_parse_content_type(const char *header_value, http_content_type **result)
Parse an HTTP Content-Type header value.
void http_content_type_destroy(http_content_type *victim)
Destroy a content type object.
Content handling interface.
struct content_handler_entry content_handler_entry
Entry in list of content handlers.
static const content_handler * content_lookup(lwc_string *mime_type)
Find a handler for a MIME type.
nserror content_factory_register_handler(const char *mime_type, const content_handler *handler)
Register a handler with the content factory.
content_type content_factory_type_from_mime_type(lwc_string *mime_type)
Compute the generic content type for a MIME type.
struct content * content_factory_create_content(llcache_handle *llcache, const char *fallback_charset, bool quirks, lwc_string *effective_type)
Create a content object.
void content_factory_fini(void)
Clean up after the content factory.
static content_handler_entry * content_handlers
Protected interface to Content handling.
content_type
The type of a content.
@ CONTENT_NONE
no type for content
nserror
Enumeration of error codes.
@ NSERROR_NOMEM
Memory exhaustion.
HTTP header parsing functions.
static struct llcache_s * llcache
low level cache state
const char * llcache_handle_get_header(const llcache_handle *handle, const char *key)
Retrieve a header value associated with a low-level cache object.
Low-level resource cache (interface)
Interface to utility string handling.
Entry in list of content handlers.
lwc_string * mime_type
MIME type handled by handler.
struct content_handler_entry * next
Next entry.
const content_handler * handler
Content handler object.
Content operation function table.
nserror(* create)(const struct content_handler *handler, lwc_string *imime_type, const struct http_parameter *params, struct llcache_handle *llcache, const char *fallback_charset, bool quirks, struct content **c)
content_type(* type)(void)
Content which corresponds to a single URL.
bool quirks
Content is in quirks mode.
char * fallback_charset
Fallback charset, or NULL.
const struct content_handler * handler
Handler for content.
http_parameter * parameters
Handle to low-level cache object.