NetSurf
Functions | Variables
no_backing_store.c File Reference

Low-level resource cache null persistant storage implementation. More...

#include "utils/nsurl.h"
#include "content/backing_store.h"
Include dependency graph for no_backing_store.c:

Go to the source code of this file.

Functions

static nserror initialise (const struct llcache_store_parameters *parameters)
 
static nserror finalise (void)
 
static nserror store (nsurl *url, enum backing_store_flags flags, uint8_t *data, const size_t datalen)
 
static nserror fetch (nsurl *url, enum backing_store_flags flags, uint8_t **data_out, size_t *datalen_out)
 
static nserror invalidate (nsurl *url)
 
static nserror release (nsurl *url, enum backing_store_flags flags)
 release a previously fetched or stored memory object. More...
 

Variables

static struct gui_llcache_table llcache_table
 
struct gui_llcache_tablenull_llcache_table = &llcache_table
 

Detailed Description

Low-level resource cache null persistant storage implementation.

Definition in file no_backing_store.c.

Function Documentation

◆ fetch()

static nserror fetch ( nsurl url,
enum backing_store_flags  flags,
uint8_t **  data_out,
size_t *  datalen_out 
)
static

Definition at line 47 of file no_backing_store.c.

References NSERROR_NOT_FOUND.

◆ finalise()

static nserror finalise ( void  )
static

Definition at line 34 of file no_backing_store.c.

References NSERROR_OK.

◆ initialise()

static nserror initialise ( const struct llcache_store_parameters parameters)
static

Definition at line 29 of file no_backing_store.c.

References NSERROR_OK.

◆ invalidate()

static nserror invalidate ( nsurl url)
static

Definition at line 55 of file no_backing_store.c.

References NSERROR_NOT_FOUND.

◆ release()

static nserror release ( nsurl url,
enum backing_store_flags  flags 
)
static

release a previously fetched or stored memory object.

if the BACKING_STORE_ALLOC flag was used with the fetch or store operation for this url the returned storage is unreferenced. When the reference count drops to zero the storage is released.

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 faliure.

Definition at line 72 of file no_backing_store.c.

References NSERROR_NOT_FOUND.

◆ store()

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

Definition at line 39 of file no_backing_store.c.

References NSERROR_SAVE_FAILED.

Variable Documentation

◆ llcache_table

struct gui_llcache_table llcache_table
static
Initial value:
= {
.initialise = initialise,
.finalise = finalise,
.store = store,
.fetch = fetch,
.invalidate = invalidate,
.release = release,
}
static nserror initialise(const struct llcache_store_parameters *parameters)
static nserror store(nsurl *url, enum backing_store_flags flags, uint8_t *data, const size_t datalen)
static nserror finalise(void)
static nserror release(nsurl *url, enum backing_store_flags flags)
release a previously fetched or stored memory object.
static nserror invalidate(nsurl *url)
static nserror fetch(nsurl *url, enum backing_store_flags flags, uint8_t **data_out, size_t *datalen_out)

Definition at line 77 of file no_backing_store.c.

◆ null_llcache_table

struct gui_llcache_table* null_llcache_table = &llcache_table

Definition at line 86 of file no_backing_store.c.

Referenced by netsurf_register().