mirror of
https://github.com/openstreetmap/mod_tile.git
synced 2025-08-08 08:24:25 +00:00
Extend the storage backends to support options
This commit is contained in:
@ -33,7 +33,7 @@ extern "C" {
|
||||
|
||||
class metaTile {
|
||||
public:
|
||||
metaTile(const std::string &xmlconfig, int x, int y, int z);
|
||||
metaTile(const std::string &xmlconfig, const std::string &options, int x, int y, int z);
|
||||
void clear();
|
||||
void set(int x, int y, const std::string &data);
|
||||
const std::string get(int x, int y);
|
||||
@ -43,6 +43,7 @@ class metaTile {
|
||||
private:
|
||||
int x_, y_, z_;
|
||||
std::string xmlconfig_;
|
||||
std::string options_;
|
||||
std::string tile[METATILE][METATILE];
|
||||
static const int header_size = sizeof(struct meta_layout) + (sizeof(struct entry) * (METATILE * METATILE));
|
||||
|
||||
|
@ -22,12 +22,12 @@ extern "C" {
|
||||
};
|
||||
|
||||
struct storage_backend {
|
||||
int (*tile_read)(struct storage_backend * store, const char *xmlconfig, int x, int y, int z, char *buf, size_t sz, int * compressed, char * err_msg);
|
||||
struct stat_info (*tile_stat)(struct storage_backend * store, const char *xmlconfig, int x, int y, int z);
|
||||
int (*metatile_write)(struct storage_backend * store, const char *xmlconfig, int x, int y, int z, const char *buf, int sz);
|
||||
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);
|
||||
struct stat_info (*tile_stat)(struct storage_backend * store, const char *xmlconfig, const char *options, int x, int y, int z);
|
||||
int (*metatile_write)(struct storage_backend * store, const char *xmlconfig, const char *options, int x, int y, int z, const char *buf, int sz);
|
||||
int (*metatile_delete)(struct storage_backend * store, const char *xmlconfig, int x, int y, int z);
|
||||
int (*metatile_expire)(struct storage_backend * store, const char *xmlconfig, int x, int y, int z);
|
||||
char * (*tile_storage_id)(struct storage_backend * store, const char *xmlconfig, int x, int y, int z, char * string);
|
||||
char * (*tile_storage_id)(struct storage_backend * store, const char *xmlconfig, const char *options, int x, int y, int z, char * string);
|
||||
int (*close_storage)(struct storage_backend * store);
|
||||
|
||||
void * storage_ctx;
|
||||
|
Reference in New Issue
Block a user