From 230779848e22f5d185cbeb0ccaae0c16cbc5836c Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Fri, 7 Oct 2011 18:12:47 +0000 Subject: metadata links stored in contents browser uses metadata links for favicons svn path=/trunk/netsurf/; revision=12977 --- content/content.h | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'content/content.h') diff --git a/content/content.h b/content/content.h index eb8fbe689..3fd0bd63a 100644 --- a/content/content.h +++ b/content/content.h @@ -75,6 +75,18 @@ typedef enum { CONTENT_MSG_LINK, /**< RFC5988 link */ } content_msg; +/** RFC5988 metadata link */ +struct content_rfc5988_link { + struct content_rfc5988_link *next; /**< next rfc5988_link in list */ + + lwc_string *rel; /**< the link relationship - must be present */ + nsurl *href; /* the link href - must be present */ + lwc_string *hreflang; + lwc_string *type; + lwc_string *media; + lwc_string *sizes; +}; + /** Extra data for some content_msg messages. */ union content_msg_data { const char *error; /**< Error message, for CONTENT_MSG_ERROR. */ @@ -97,11 +109,7 @@ union content_msg_data { /** Low-level cache handle, for CONTENT_MSG_DOWNLOAD */ struct llcache_handle *download; /** rfc5988 link data CONTENT_MSG_RFC5988_LINK */ - struct { - nsurl *url; - char *rel; - char *type; - } rfc5988_link; + struct content_rfc5988_link *rfc5988_link; }; @@ -167,6 +175,8 @@ void content_close(struct hlcache_handle *h); struct selection *content_get_selection(struct hlcache_handle *h); void content_get_contextual_content(struct hlcache_handle *h, int x, int y, struct contextual_content *data); +struct content_rfc5988_link *content_find_rfc5988_link(struct hlcache_handle *c, + lwc_string *rel); /* Member accessors */ content_type content_get_type(struct hlcache_handle *c); -- cgit v1.2.3