mod_tile 0.9.1
Renders map tiles with Mapnik and serves them using Apache HTTP Server
Loading...
Searching...
No Matches
store_ro_composite.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2007 - 2026 by mod_tile contributors (see AUTHORS file)
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; If not, see http://www.gnu.org/licenses/.
16 */
17
18#ifndef STORE_RO_COMPOSITE_H
19#define STORE_RO_COMPOSITE_H
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
25#include "config.h"
26
27#ifdef HAVE_CAIRO
28#include <cairo/cairo.h>
29
30#include "protocol.h"
31#include "store.h"
32
49
67
71 typedef struct {
73 char *data;
75 unsigned int max_size;
77 unsigned int pos;
79#endif /* HAVE_CAIRO */
80
81 struct storage_backend *init_storage_ro_composite(const char *connection_string);
82
83#ifdef __cplusplus
84}
85#endif
86
87#endif /* STORE_RO_COMPOSITE_H */
#define XMLCONFIG_MAX
Maximum buffer size (including NUL terminator) for map style names, MIME types, and options.
Definition protocol.h:60
struct storage_backend * init_storage_ro_composite(const char *connection_string)
Allocate and initialize a read-only Cairo compositing storage_backend.
Definition store_ro_composite.c:338
Closure state passed to Cairo's cairo_surface_write_to_png_stream() callback.
Definition store_ro_composite.h:71
unsigned int pos
Current write cursor offset (and total bytes written) in data.
Definition store_ro_composite.h:77
unsigned int max_size
Maximum writable byte capacity of data.
Definition store_ro_composite.h:75
char * data
Destination byte buffer receiving encoded PNG chunks.
Definition store_ro_composite.h:73
Per-backend state for the read-only composite storage engine.
Definition store_ro_composite.h:53
int render_size
Target tile width and height in pixels (e.g., 256 or 512).
Definition store_ro_composite.h:65
struct store_ro_composite_tile_cache cache
Single-entry cache storing the last composited tile payload and stat metadata.
Definition store_ro_composite.h:63
char xmlconfig_secondary[41]
Map style name (xmlconfig) passed to store_secondary.
Definition store_ro_composite.h:61
struct storage_backend * store_secondary
Background (base) storage backend composited beneath store_primary.
Definition store_ro_composite.h:59
char xmlconfig_primary[41]
Map style name (xmlconfig) passed to store_primary.
Definition store_ro_composite.h:57
struct storage_backend * store_primary
Foreground (top) storage backend layered over store_secondary.
Definition store_ro_composite.h:55
Metadata and expiry state returned when querying a stored tile or metatile.
Definition store.h:32
Virtual dispatch table and context handle for a pluggable tile/metatile storage backend.
Definition store.h:48
Single-tile cache holding the most recently composited PNG tile and its metadata.
Definition store_ro_composite.h:39
char * tile
Heap-allocated PNG byte buffer (MAX_TILE_SIZE bytes) holding the composited image.
Definition store_ro_composite.h:43
int x
Tile X, Y, and zoom coordinates of the cached tile (-1 when invalid).
Definition store_ro_composite.h:45
struct stat_info st_stat
Combined metadata and expiry status for the cached composited tile.
Definition store_ro_composite.h:41
int y
Definition store_ro_composite.h:45
char xmlname[41]
Logical map style name (xmlname) corresponding to the cached tile.
Definition store_ro_composite.h:47
int z
Definition store_ro_composite.h:45