1 /******************************************************************************
2  *
3  * Project:  MapCache
4  * Author:   Thomas Bonfort and the MapServer team.
5  *
6  ******************************************************************************
7  * Copyright (c) 1996-2016 Regents of the University of Minnesota.
8  *
9  * Permission is hereby granted, free of charge, to any person obtaining a
10  * copy of this software and associated documentation files (the "Software"),
11  * to deal in the Software without restriction, including without limitation
12  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
13  * and/or sell copies of the Software, and to permit persons to whom the
14  * Software is furnished to do so, subject to the following conditions:
15  *
16  * The above copyright notice and this permission notice shall be included in
17  * all copies of this Software or works derived from this Software.
18  *
19  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
20  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
24  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25  * DEALINGS IN THE SOFTWARE.
26  *****************************************************************************/
27 
28 /*! \file mapcache_services.h
29     \brief structure declarations for supported services
30  */
31 
32 
33 #ifndef MAPCACHE_SERVICES_H_
34 #define MAPCACHE_SERVICES_H_
35 
36 #include "mapcache.h"
37 
38 
39 /** \addtogroup services */
40 /** @{ */
41 
42 typedef struct mapcache_request_get_capabilities_wmts mapcache_request_get_capabilities_wmts;
43 typedef struct mapcache_service_wmts mapcache_service_wmts;
44 
45 struct mapcache_request_get_capabilities_wmts {
46   mapcache_request_get_capabilities request;
47 };
48 
49 /**\class mapcache_service_wmts
50  * \brief a WMTS service
51  * \implements mapcache_service
52  */
53 struct mapcache_service_wmts {
54   mapcache_service service;
55 };
56 
57 
58 
59 typedef struct mapcache_service_wms mapcache_service_wms;
60 typedef struct mapcache_request_get_capabilities_wms mapcache_request_get_capabilities_wms;
61 
62 struct mapcache_request_get_capabilities_wms {
63   mapcache_request_get_capabilities request;
64 };
65 
66 /**\class mapcache_service_wms
67  * \brief an OGC WMS service
68  * \implements mapcache_service
69  */
70 struct mapcache_service_wms {
71   mapcache_service service;
72   int maxsize;
73   apr_array_header_t *forwarding_rules;
74   mapcache_getmap_strategy getmap_strategy;
75   mapcache_resample_mode resample_mode;
76   mapcache_image_format *getmap_format;
77   int allow_format_override; /* can the client specify which image format should be returned */
78 };
79 
80 typedef struct mapcache_service_ve mapcache_service_ve;
81 
82 /**\class mapcache_service_ve
83  * \brief a virtualearth service
84  * \implements mapcache_service
85  */
86 struct mapcache_service_ve {
87   mapcache_service service;
88 };
89 
90 
91 typedef struct mapcache_service_gmaps mapcache_service_gmaps;
92 typedef struct mapcache_service_tms mapcache_service_tms;
93 typedef struct mapcache_request_get_capabilities_tms mapcache_request_get_capabilities_tms;
94 
95 /**\class mapcache_service_tms
96  * \brief a TMS service
97  * \implements mapcache_service
98  */
99 struct mapcache_service_tms {
100   mapcache_service service;
101   int reverse_y;
102 };
103 
104 struct mapcache_request_get_capabilities_tms {
105   mapcache_request_get_capabilities request;
106   mapcache_tileset *tileset;
107   mapcache_grid_link *grid_link;
108   char *version;
109 };
110 
111 
112 typedef struct mapcache_service_mapguide mapcache_service_mapguide;
113 
114 struct mapcache_service_mapguide {
115   mapcache_service service;
116   int rows_per_folder;
117   int cols_per_folder;
118 };
119 
120 
121 
122 typedef struct mapcache_service_kml mapcache_service_kml;
123 typedef struct mapcache_request_get_capabilities_kml mapcache_request_get_capabilities_kml;
124 struct mapcache_request_get_capabilities_kml {
125   mapcache_request_get_capabilities request;
126   mapcache_tile *tile;
127   mapcache_tileset *tileset;
128   mapcache_grid_link *grid;
129 };
130 /**\class mapcache_service_kml
131  * \brief a KML superoverlay service
132  * \implements mapcache_service
133  */
134 struct mapcache_service_kml {
135   mapcache_service service;
136 };
137 
138 typedef struct mapcache_request_get_capabilities_demo mapcache_request_get_capabilities_demo;
139 typedef struct mapcache_service_demo mapcache_service_demo;
140 
141 /**
142  * the capabilities request for a specific service, to be able to create
143  * demo pages specific to a given service
144  */
145 struct mapcache_request_get_capabilities_demo {
146   mapcache_request_get_capabilities request;
147   mapcache_service *service;
148 };
149 
150 /**\class mapcache_service_demo
151  * \brief a demo service
152  * \implements mapcache_service
153  */
154 struct mapcache_service_demo {
155   mapcache_service service;
156 
157 };
158 
159 
160 
161 
162 #endif /*MAPCACHE_SERVICES_H*/
163