summaryrefslogtreecommitdiff
path: root/content/content.h
diff options
context:
space:
mode:
authorVincent Sanders <vince@netsurf-browser.org>2011-10-07 18:12:47 +0000
committerVincent Sanders <vince@netsurf-browser.org>2011-10-07 18:12:47 +0000
commit230779848e22f5d185cbeb0ccaae0c16cbc5836c (patch)
tree414dc368828574374d85553490daa23dd53e1bd6 /content/content.h
parent52ad2c1e2523b28aa5363656fbbef20e97665cce (diff)
downloadnetsurf-230779848e22f5d185cbeb0ccaae0c16cbc5836c.tar.gz
netsurf-230779848e22f5d185cbeb0ccaae0c16cbc5836c.tar.bz2
metadata links stored in contents
browser uses metadata links for favicons svn path=/trunk/netsurf/; revision=12977
Diffstat (limited to 'content/content.h')
-rw-r--r--content/content.h20
1 files changed, 15 insertions, 5 deletions
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);