50 int (*
tile_read)(
struct storage_backend *store,
const char *xmlconfig,
const char *options,
int x,
int y,
int z,
char *buf,
size_t sz,
int *compressed,
char *err_msg);
60 char *(*tile_storage_id)(
struct storage_backend *store,
const char *xmlconfig,
const char *options,
int x,
int y,
int z,
char *string);
struct storage_backend * init_storage_backend(const char *options)
Instantiate and initialize a storage backend from a path or URI specification.
Definition store.c:56
Metadata and expiry state returned when querying a stored tile or metatile.
Definition store.h:32
time_t ctime
Timestamp of last status change (seconds since Unix epoch).
Definition store.h:40
time_t mtime
Timestamp of last tile modification/render (seconds since Unix epoch).
Definition store.h:38
off_t size
Total tile payload size in bytes (< 0 indicates the tile does not exist).
Definition store.h:34
int expired
Non-zero if the tile is marked expired and needs re-rendering; 0 if fresh.
Definition store.h:42
time_t atime
Timestamp of last tile access (seconds since Unix epoch).
Definition store.h:36
Virtual dispatch table and context handle for a pluggable tile/metatile storage backend.
Definition store.h:48
int(*) metatile_write(struct storage_backend *store, const char *xmlconfig, const char *options, int x, int y, int z, const char *buf, int sz)
Persist a serialized METATILE x METATILE archive buffer into the backend.
Definition store.h:54
int(*) metatile_delete(struct storage_backend *store, const char *xmlconfig, int x, int y, int z)
Remove the metatile containing coordinates (x, y, z) from the backend.
Definition store.h:56
int(*) tile_read(struct storage_backend *store, const char *xmlconfig, const char *options, int x, int y, int z, char *buf, size_t sz, int *compressed, char *err_msg)
Read a single tile's payload into buf, returning bytes read or < 0 on error.
Definition store.h:50
int(*) metatile_expire(struct storage_backend *store, const char *xmlconfig, int x, int y, int z)
Mark the metatile containing coordinates (x, y, z) as expired.
Definition store.h:58
void * storage_ctx
Opaque pointer to backend-specific private state/configuration context.
Definition store.h:65
int(*) close_storage(struct storage_backend *store)
Release backend-specific resources and free the storage_backend instance.
Definition store.h:62
struct stat_info(*) tile_stat(struct storage_backend *store, const char *xmlconfig, const char *options, int x, int y, int z)
Query size, timestamps, and expiry status of a tile without reading its full payload.
Definition store.h:52