23#ifndef NETSURF_CONTENT_LLCACHE_H_
24#define NETSURF_CONTENT_LLCACHE_H_
nserror
Enumeration of error codes.
void llcache_clean(bool purge)
Cause the low-level cache to attempt to perform cleanup.
nserror llcache_handle_clone(llcache_handle *handle, llcache_handle **result)
Clone a low-level cache handle, producing a new handle to the same fetch/content.
nserror llcache_initialise(const struct llcache_parameters *parameters)
Initialise the low-level cache.
nserror(* llcache_handle_callback)(llcache_handle *handle, const llcache_event *event, void *pw)
Client callback for low-level cache events.
nserror llcache_handle_abort(llcache_handle *handle)
Abort a low-level fetch, informing all users of this action.
struct llcache_post_data llcache_post_data
POST data object for low-level cache requests.
void llcache_finalise(void)
Finalise the low-level cache.
bool llcache_handle_references_same_object(const llcache_handle *a, const llcache_handle *b)
Determine if the same underlying object is referenced by the given handles.
nsurl * llcache_handle_get_url(const llcache_handle *handle)
Retrieve the post-redirect URL of a low-level cache object.
const uint8_t * llcache_handle_get_source_data(const llcache_handle *handle, size_t *size)
Retrieve source data of a low-level cache object.
const char * llcache_handle_get_header(const llcache_handle *handle, const char *key)
Retrieve a header value associated with a low-level cache object.
nserror llcache_handle_change_callback(llcache_handle *handle, llcache_handle_callback cb, void *pw)
Change the callback associated with a low-level cache handle.
nserror llcache_handle_retrieve(nsurl *url, uint32_t flags, nsurl *referer, const llcache_post_data *post, llcache_handle_callback cb, void *pw, llcache_handle **result)
Retrieve a handle for a low-level cache object.
nserror llcache_handle_force_stream(llcache_handle *handle)
Force a low-level cache handle into streaming mode.
nserror llcache_handle_invalidate_cache_data(llcache_handle *handle)
Invalidate cache data for a low-level cache object.
llcache_retrieve_flag
Flags for low-level cache object retrieval.
@ LLCACHE_RETRIEVE_STREAM_DATA
@ LLCACHE_RETRIEVE_NO_ERROR_PAGES
Stream data (implies that object is not cacheable)
@ LLCACHE_RETRIEVE_VERIFIABLE
Requested URL was verified.
@ LLCACHE_RETRIEVE_FORCE_FETCH
Force a new fetch.
nserror llcache_handle_release(llcache_handle *handle)
Release a low-level cache handle.
llcache_event_type
Low-level cache event types.
@ LLCACHE_EVENT_DONE
Finished fetching data.
@ LLCACHE_EVENT_ERROR
An error occurred during fetch.
@ LLCACHE_EVENT_GOT_CERTS
SSL certificates arrived.
@ LLCACHE_EVENT_REDIRECT
Fetch URL redirect occured.
@ LLCACHE_EVENT_PROGRESS
Fetch progress update.
@ LLCACHE_EVENT_HAD_HEADERS
Received all headers.
@ LLCACHE_EVENT_HAD_DATA
Received some data.
NetSurf URL handling (interface).
struct nsurl nsurl
NetSurf URL object.
Fetch POST multipart data.
const struct cert_chain * chain
Certificate chain.
nsurl * to
Redirect target.
const char * msg
Error message.
nserror code
The error code.
size_t len
Byte length of buffer.
const char * progress_msg
Progress message.
llcache_event_type type
Type of event.
nsurl * from
Redirect origin.
const uint8_t * buf
Buffer of data.
Handle to low-level cache object.
Parameters to configure the low level cache.
struct llcache_store_parameters store
int minimum_lifetime
The minimum lifetime to consider sending objects to backing store.
size_t hysteresis
The hysteresis around the target size.
size_t limit
The target upper bound for the RAM cache size.
size_t maximum_bandwidth
The maximum bandwidth to allow the backing store to use in bytes/second.
uint32_t fetch_attempts
The number of fetches to attempt when timing out.
size_t minimum_bandwidth
The minimum bandwidth to allow the backing store to use in bytes/second.
unsigned long time_quantum
The time quantum over which to calculate the bandwidth values.
POST data object for low-level cache requests.
struct fetch_multipart_data * multipart
Multipart data.
@ LLCACHE_POST_URL_ENCODED
enum llcache_post_data::@122 type
Type of POST data.
union llcache_post_data::@123 data
POST data content.
char * urlenc
URL encoded data.
Parameters to configure the low level cache backing store.
size_t hysteresis
The hysteresis around the target size.
size_t limit
The backing store upper bound target size.
const char * path
The path to the backing store.