[mapserver-commits] r12140 - in trunk/mapserver/mapcache: include
src
svn at osgeo.org
svn at osgeo.org
Fri Aug 26 07:01:08 EDT 2011
Author: tbonfort
Date: 2011-08-26 04:01:08 -0700 (Fri, 26 Aug 2011)
New Revision: 12140
Modified:
trunk/mapserver/mapcache/include/geocache.h
trunk/mapserver/mapcache/src/imageio.c
Log:
add initial wmts service (cannot be activated yet, needs more work)
thomas.bonfort | 2010-10-25 13:38:26 +0200 (Mon, 25 Oct 2010)
Modified: trunk/mapserver/mapcache/include/geocache.h
===================================================================
--- trunk/mapserver/mapcache/include/geocache.h 2011-08-26 11:01:04 UTC (rev 12139)
+++ trunk/mapserver/mapcache/include/geocache.h 2011-08-26 11:01:08 UTC (rev 12140)
@@ -48,17 +48,28 @@
typedef struct geocache_tileset geocache_tileset;
typedef struct geocache_cache geocache_cache;
typedef struct geocache_source geocache_source;
+typedef struct geocache_buffer geocache_buffer;
+typedef struct geocache_tile geocache_tile;
+typedef struct geocache_metatile geocache_metatile;
+typedef struct geocache_wms_source geocache_wms_source;
+typedef struct geocache_cache_disk geocache_cache_disk;
+typedef struct geocache_request geocache_request;
+typedef struct geocache_service geocache_service;
+typedef struct geocache_service_wms geocache_service_wms;
+typedef struct geocache_service_tms geocache_service_tms;
+typedef struct geocache_server_cfg geocache_server_cfg;
+typedef struct geocache_image geocache_image;
extern module AP_MODULE_DECLARE_DATA geocache_module;
-typedef struct {
+struct geocache_buffer{
unsigned char* buf ; /* buffer */
size_t size ; /* bytes used */
size_t avail ; /* bytes allocated */
apr_pool_t* pool; /*apache pool to allocate from */
-} geocache_buffer;
+};
-typedef struct {
+struct geocache_tile{
geocache_tileset *tileset;
int x,y,z;
int sx,sy;
@@ -66,14 +77,14 @@
void *lock;
apr_time_t mtime;
int expires;
-} geocache_tile;
+};
-typedef struct {
+struct geocache_metatile{
geocache_tile tile;
double bbox[4];
int ntiles;
geocache_tile *tiles;
-} geocache_metatile;
+};
struct geocache_source{
@@ -91,12 +102,12 @@
-typedef struct {
- geocache_source source;
- char *url;
- apr_table_t *wms_default_params;
- apr_table_t *wms_params;
-} geocache_wms_source;
+struct geocache_wms_source{
+ geocache_source source;
+ char *url;
+ apr_table_t *wms_default_params;
+ apr_table_t *wms_params;
+};
typedef enum {GEOCACHE_CACHE_DISK} geocache_cache_type;
@@ -114,28 +125,28 @@
int (*tile_lock_wait)(geocache_tile *tile, request_rec *r);
};
-typedef struct {
+struct geocache_cache_disk{
geocache_cache cache;
char *base_directory;
-} geocache_cache_disk;
+};
-typedef struct {
+struct geocache_request{
geocache_tile **tiles;
int ntiles;
-} geocache_request;
+};
-typedef struct {
+struct geocache_service{
geocache_service_type type;
geocache_request* (*parse_request)(request_rec *r, apr_table_t *params, geocache_cfg *config);
-} geocache_service;
+};
-typedef struct {
+struct geocache_service_wms{
geocache_service service;
-} geocache_service_wms;
+};
-typedef struct {
+struct geocache_service_tms {
geocache_service service;
-} geocache_service_tms;
+};
struct geocache_tileset {
@@ -162,15 +173,15 @@
apr_hash_t *tilesets;
};
-typedef struct {
+struct geocache_server_cfg{
apr_global_mutex_t *mutex;
-} geocache_server_cfg;
+};
-typedef struct {
+struct geocache_image{
unsigned char *data;
size_t w,h;
size_t stride;
-} geocache_image;
+};
@@ -226,11 +237,6 @@
int geocache_util_mutex_aquire(request_rec *r);
int geocache_util_mutex_release(request_rec *r);
-typedef struct {
- geocache_buffer *buffer;
- unsigned char *ptr;
-} _geocache_buffer_closure;
-
/* in image.c */
geocache_tile* geocache_image_merge_tiles(request_rec *r, geocache_tile **tiles, int ntiles);
int geocache_image_metatile_split(geocache_metatile *mt, request_rec *r);
Modified: trunk/mapserver/mapcache/src/imageio.c
===================================================================
--- trunk/mapserver/mapcache/src/imageio.c 2011-08-26 11:01:04 UTC (rev 12139)
+++ trunk/mapserver/mapcache/src/imageio.c 2011-08-26 11:01:08 UTC (rev 12140)
@@ -19,6 +19,12 @@
#include <png.h>
#include <jpeglib.h>
+typedef struct _geocache_buffer_closure _geocache_buffer_closure;
+struct _geocache_buffer_closure{
+ geocache_buffer *buffer;
+ unsigned char *ptr;
+};
+
int _geocache_imageio_image_has_alpha(geocache_image *img) {
int i,j;
unsigned char *ptr, *rptr = img->data;
More information about the mapserver-commits
mailing list