diff options
author | James Bursa <james@netsurf-browser.org> | 2003-12-27 20:15:23 +0000 |
---|---|---|
committer | James Bursa <james@netsurf-browser.org> | 2003-12-27 20:15:23 +0000 |
commit | ce0d5294d5898b6100269bd39d38c0884d5fd4b4 (patch) | |
tree | 3a073e5a6d069113c6272f108fcedd668cd186a8 /content/content.c | |
parent | 01c0332607e1e9646b74add201a6488ce5265844 (diff) | |
download | netsurf-ce0d5294d5898b6100269bd39d38c0884d5fd4b4.tar.gz netsurf-ce0d5294d5898b6100269bd39d38c0884d5fd4b4.tar.bz2 |
[project @ 2003-12-27 20:15:22 by bursa]
Use charset from Content-Type header.
svn path=/import/netsurf/; revision=460
Diffstat (limited to 'content/content.c')
-rw-r--r-- | content/content.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/content/content.c b/content/content.c index 280364b9d..a3ff9f777 100644 --- a/content/content.c +++ b/content/content.c @@ -57,7 +57,7 @@ static const struct mime_entry mime_map[] = { /** An entry in handler_map. */ struct handler_entry { - void (*create)(struct content *c); + void (*create)(struct content *c, const char *params[]); void (*process_data)(struct content *c, char *data, unsigned long size); int (*convert)(struct content *c, unsigned int width, unsigned int height); void (*revive)(struct content *c, unsigned int width, unsigned int height); @@ -169,9 +169,15 @@ struct content * content_create(char *url) * status is changed to CONTENT_STATUS_LOADING. CONTENT_MSG_LOADING is sent to * all users. The create function for the type is called to initialise the type * specific parts of the content structure. + * + * \param c content structure + * \param type content_type to initialise to + * \param mime_type MIME-type string for this content + * \param params array of strings, ordered attribute, value, attribute, ..., 0 */ -void content_set_type(struct content *c, content_type type, char* mime_type) +void content_set_type(struct content *c, content_type type, char* mime_type, + const char *params[]) { assert(c != 0); assert(c->status == CONTENT_STATUS_TYPE_UNKNOWN); @@ -180,7 +186,7 @@ void content_set_type(struct content *c, content_type type, char* mime_type) c->type = type; c->mime_type = xstrdup(mime_type); c->status = CONTENT_STATUS_LOADING; - handler_map[type].create(c); + handler_map[type].create(c, params); content_broadcast(c, CONTENT_MSG_LOADING, 0); /* c may be destroyed at this point as a result of * CONTENT_MSG_LOADING, so must not be accessed */ |