mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-11-22 06:21:45 +03:00
Add mime-type getter.
svn path=/trunk/netsurf/; revision=10259
This commit is contained in:
parent
cbf55bd418
commit
236b6a15e1
@ -1060,6 +1060,25 @@ content_type content__get_type(struct content *c)
|
||||
return c->type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve mime-type of content
|
||||
*
|
||||
* \param c Content to retrieve mime-type of
|
||||
* \return Pointer to mime-type, or NULL if not found.
|
||||
*/
|
||||
const char *content_get_mime_type(hlcache_handle *h)
|
||||
{
|
||||
return content__get_mime_type(hlcache_handle_get_content(h));
|
||||
}
|
||||
|
||||
const char *content__get_mime_type(struct content *c)
|
||||
{
|
||||
if (c == NULL)
|
||||
return NULL;
|
||||
|
||||
return c->mime_type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve URL associated with content
|
||||
*
|
||||
|
@ -131,6 +131,7 @@ void content_close(struct hlcache_handle *h);
|
||||
|
||||
/* Member accessors */
|
||||
content_type content_get_type(struct hlcache_handle *c);
|
||||
const char *content_get_mime_type(struct hlcache_handle *c);
|
||||
const char *content_get_url(struct hlcache_handle *c);
|
||||
const char *content_get_title(struct hlcache_handle *c);
|
||||
content_status content_get_status(struct hlcache_handle *c);
|
||||
|
@ -207,6 +207,7 @@ void content__reformat(struct content *c, int width, int height);
|
||||
bool content__set_title(struct content *c, const char *title);
|
||||
|
||||
content_type content__get_type(struct content *c);
|
||||
const char *content__get_mime_type(struct content *c);
|
||||
const char *content__get_url(struct content *c);
|
||||
const char *content__get_title(struct content *c);
|
||||
content_status content__get_status(struct content *c);
|
||||
|
Loading…
Reference in New Issue
Block a user