summaryrefslogtreecommitdiff
path: root/content/hlcache.h
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2010-04-04 17:17:24 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2010-04-04 17:17:24 +0000
commit69f02e926f746b31500f46572d606fdc482ff0cb (patch)
tree438e52c0db585579cb75afcb0e3d59c9a777b4cb /content/hlcache.h
parent487d4c3ae384fafded41ee0b4203bd82f5268b57 (diff)
downloadnetsurf-69f02e926f746b31500f46572d606fdc482ff0cb.tar.gz
netsurf-69f02e926f746b31500f46572d606fdc482ff0cb.tar.bz2
Make the high-level cache drop contents of unacceptable type on the floor.
svn path=/trunk/netsurf/; revision=10238
Diffstat (limited to 'content/hlcache.h')
-rw-r--r--content/hlcache.h22
1 files changed, 13 insertions, 9 deletions
diff --git a/content/hlcache.h b/content/hlcache.h
index 5ef42a301..1208b15c4 100644
--- a/content/hlcache.h
+++ b/content/hlcache.h
@@ -56,20 +56,23 @@ typedef nserror (*hlcache_handle_callback)(hlcache_handle *handle,
/**
* Retrieve a high-level cache handle for an object
*
- * \param url URL of the object to retrieve handle for
- * \param flags Object retrieval flags
- * \param referer Referring URL, or NULL if none
- * \param post POST data, or NULL for a GET request
- * \param cb Callback to handle object events
- * \param pw Pointer to client-specific data for callback
- * \param child Child retrieval context, or NULL for top-level content
- * \param result Pointer to location to recieve cache handle
+ * \param url URL of the object to retrieve handle for
+ * \param flags Object retrieval flags
+ * \param referer Referring URL, or NULL if none
+ * \param post POST data, or NULL for a GET request
+ * \param cb Callback to handle object events
+ * \param pw Pointer to client-specific data for callback
+ * \param child Child retrieval context, or NULL for top-level content
+ * \param accepted_types Array of acceptable content types, or NULL for any
+ * \param result Pointer to location to recieve cache handle
* \return NSERROR_OK on success, appropriate error otherwise
*
* Child contents are keyed on the tuple < URL, quirks >.
* The quirks field is ignored for child contents whose behaviour is not
* affected by quirks mode.
*
+ * The \a accepted_types array must be terminated with CONTENT_UNKNOWN
+ *
* \todo The above rules should be encoded in the handler_map.
*
* \todo Is there any way to sensibly reduce the number of parameters here?
@@ -77,7 +80,8 @@ typedef nserror (*hlcache_handle_callback)(hlcache_handle *handle,
nserror hlcache_handle_retrieve(const char *url, uint32_t flags,
const char *referer, llcache_post_data *post,
hlcache_handle_callback cb, void *pw,
- hlcache_child_context *child, hlcache_handle **result);
+ hlcache_child_context *child,
+ const content_type *accepted_types, hlcache_handle **result);
/**
* Release a high-level cache handle