mod_tile 0.9.1
Renders map tiles with Mapnik and serves them using Apache HTTP Server
Loading...
Searching...
No Matches
store_ro_http_proxy.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_HTTP_PROXY_H
19#define STORE_RO_HTTP_PROXY_H
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
25#include "config.h"
26
27#ifdef HAVE_LIBCURL
28#include <curl/curl.h>
29
30#include "protocol.h"
31#include "store.h"
32
49
61
65 struct MemoryStruct {
67 char *memory;
69 size_t size;
70 };
71#endif /* HAVE_LIBCURL */
72
73 struct storage_backend *init_storage_ro_http_proxy(const char *connection_string);
74
75#ifdef __cplusplus
76}
77#endif
78
79#endif /* STORE_RO_HTTP_PROXY_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_http_proxy(const char *connection_string)
Allocate and initialize a read-only HTTP proxy storage_backend.
Definition store_ro_http_proxy.c:408
Dynamically resized memory buffer used by libcurl's write callback to accumulate HTTP response bodies...
Definition store_ro_http_proxy.h:65
char * memory
Heap-allocated response payload buffer.
Definition store_ro_http_proxy.h:67
size_t size
Current number of valid bytes stored in memory.
Definition store_ro_http_proxy.h:69
Per-backend state for the read-only HTTP proxy storage engine.
Definition store_ro_http_proxy.h:53
struct ro_http_proxy_tile_cache cache
Single-entry cache storing the last fetched tile payload and stat metadata.
Definition store_ro_http_proxy.h:59
CURL * ctx
Reusable libcurl easy handle configured for upstream tile requests.
Definition store_ro_http_proxy.h:55
char * baseurl
Base URL template/prefix of the upstream tile server.
Definition store_ro_http_proxy.h:57
Single-tile cache holding the most recently fetched remote tile and its metadata.
Definition store_ro_http_proxy.h:39
int z
Definition store_ro_http_proxy.h:45
int y
Definition store_ro_http_proxy.h:45
struct stat_info st_stat
Metadata and expiry status derived from the upstream HTTP response headers.
Definition store_ro_http_proxy.h:41
char xmlname[41]
Logical map style name (xmlname) corresponding to the cached tile.
Definition store_ro_http_proxy.h:47
int x
Tile X, Y, and zoom coordinates of the cached tile (-1 when invalid).
Definition store_ro_http_proxy.h:45
char * tile
Heap-allocated buffer holding the fetched tile payload bytes.
Definition store_ro_http_proxy.h:43
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