NetSurf
Data Fields
gui_llcache_table Struct Reference

low level cache backing store operation table More...

#include <backing_store.h>

Data Fields

nserror(* initialise )(const struct llcache_store_parameters *parameters)
 Initialise the backing store. More...
 
nserror(* finalise )(void)
 Finalise the backing store. More...
 
nserror(* store )(struct nsurl *url, enum backing_store_flags flags, uint8_t *data, const size_t datalen)
 Place an object in the backing store. More...
 
nserror(* fetch )(struct nsurl *url, enum backing_store_flags flags, uint8_t **data, size_t *datalen)
 Retrieve an object from the backing store. More...
 
nserror(* release )(struct nsurl *url, enum backing_store_flags flags)
 release a previously fetched or stored memory object. More...
 
nserror(* invalidate )(struct nsurl *url)
 Invalidate a source object from the backing store. More...
 

Detailed Description

low level cache backing store operation table

The low level cache (source objects) has the capability to make objects and their metadata (headers etc) persistent by writing to a backing store using these operations.

Definition at line 44 of file backing_store.h.

Field Documentation

◆ fetch

nserror(* gui_llcache_table::fetch) (struct nsurl *url, enum backing_store_flags flags, uint8_t **data, size_t *datalen)

Retrieve an object from the backing store.

The backing store will manage its own memory and the allocations returned in data must not be altered.

The caller must assume nothing about the backing store allocated buffers and the storage and must be freed by calling the release method.

Parameters
[in]urlThe url is used as the unique primary key for the data.
[in]flagsThe flags to control how the object is retrieved.
[out]dataThe retrieved objects data.
[out]datalenThe length of the data retrieved.
Returns
NSERROR_OK on success or error code on failure.

Definition at line 99 of file backing_store.h.

Referenced by llcache_process_metadata(), llcache_retrieve_persisted_data(), and verify_llcache_register().

◆ finalise

nserror(* gui_llcache_table::finalise) (void)

Finalise the backing store.

Returns
NSERROR_OK on success or error code on failure.

Definition at line 58 of file backing_store.h.

Referenced by llcache_finalise(), llcache_persist_slowcheck(), and verify_llcache_register().

◆ initialise

nserror(* gui_llcache_table::initialise) (const struct llcache_store_parameters *parameters)

Initialise the backing store.

Parameters
parametersto configure backing store.
Returns
NSERROR_OK on success or error code on failure.

Definition at line 51 of file backing_store.h.

Referenced by llcache_initialise(), and verify_llcache_register().

◆ invalidate

nserror(* gui_llcache_table::invalidate) (struct nsurl *url)

Invalidate a source object from the backing store.

The entry (if present in the backing store) must no longer be returned as a result to the fetch or meta operations.

If the entry had data allocated it will be released.

Parameters
urlThe url is used as the unique primary key to invalidate.
Returns
NSERROR_OK on success or error code on failure.

Definition at line 122 of file backing_store.h.

Referenced by llcache_clean(), verify_llcache_register(), and write_backing_store().

◆ release

nserror(* gui_llcache_table::release) (struct nsurl *url, enum backing_store_flags flags)

release a previously fetched or stored memory object.

Parameters
urlThe url is used as the unique primary key to invalidate.
[in]flagsThe flags to control how the object data is released.
Returns
NSERROR_OK on success or error code on failure.

Definition at line 109 of file backing_store.h.

Referenced by llcache_clean(), llcache_object_destroy(), llcache_process_metadata(), verify_llcache_register(), and write_backing_store().

◆ store

nserror(* gui_llcache_table::store) (struct nsurl *url, enum backing_store_flags flags, uint8_t *data, const size_t datalen)

Place an object in the backing store.

The object is placed in the persistent store and may be retrieved with the fetch method.

The backing store will take a reference to the passed data, subsequently the caller should explicitly release the allocation using the release method and not free the data itself.

The caller may not assume that the persistent storage has been completely written on return.

Parameters
[in]urlThe url is used as the unique primary key for the data.
[in]flagsThe flags to control how the object is stored.
[in]dataThe objects data.
[in]datalenThe length of the data.
Returns
NSERROR_OK on success or error code on failure.

Definition at line 80 of file backing_store.h.

Referenced by verify_llcache_register(), and write_backing_store().


The documentation for this struct was generated from the following file: