tinyows 1.2.2
ows_struct.h
Go to the documentation of this file.
1/*
2 Copyright (c) <2007-2012> <Barbara Philippot - Olivier Courtin>
3
4 Permission is hereby granted, free of charge, to any person obtaining a copy
5 of this software and associated documentation files (the "Software"), to deal
6 in the Software without restriction, including without limitation the rights
7 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 copies of the Software, and to permit persons to whom the Software is
9 furnished to do so, subject to the following conditions:
10
11 The above copyright notice and this permission notice shall be included in
12 all copies or substantial portions of the Software.
13
14 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
20 IN THE SOFTWARE.
21*/
22
23
24#ifndef OWS_STRUCT_H
25#define OWS_STRUCT_H
26
27#include <stdbool.h>
28#include <stdio.h> /* FILE prototype */
29
30
31/* ========= Structures ========= */
32
33#define BUFFER_SIZE_INIT 256
34
35typedef struct Buffer {
36 size_t use;
37 size_t size;
38 size_t realloc;
39 char * buf;
41
42
43typedef struct List_node {
45 struct List_node * next;
46 struct List_node * prev;
48
49typedef struct List {
52 unsigned int size;
54
55
56typedef struct Mlist_node {
58 struct Mlist_node * next;
59 struct Mlist_node * prev;
61
62typedef struct Mlist {
65 unsigned int size;
67
68
74
79
80
86
91
92
93/* ========= OWS Common ========= */
94
95typedef struct Ows_layer_storage {
100 int srid;
104 bool is_geographic; /* true for a geographic CRS (or a compound CRS
105 whose base is geographic), false for a projected
106 CRS (or a compound CRS whose base is projected) */
109
110typedef struct Ows_srs {
111 int srid;
114 bool is_geographic; /* true for a geographic CRS (or a compound
115 CRS whose base is geographic), false for
116 a projected CRS (or a compound CRS whose
117 base is projected) */
118 bool is_axis_order_gis_friendly; /* true for a CRS whose axis order is
119 typically easting, northing (e.g most
120 projected CRS, such as EPSG:32631)
121 false for example for EPSG:4326 (WGS 84),
122 EPSG:2393 (KKJ / Finland Uniform Coordinate System) */
123
124 /* The two below fields are not properties of the SRS, but of its context
125 * of use. */
126 bool honours_authority_axis_order; /* true for a context where the axis order
127 as defined by the authority should be
128 respected */
129 bool is_long; /* true for a context where the srsname must
130 be exported as a long URN */
132
133
134typedef struct Ows_bbox {
135 double xmin;
136 double ymin;
137 double xmax;
138 double ymax;
141
142typedef struct Ows_geobbox {
143 double east;
144 double west;
145 double south;
146 double north;
148
154
155/*cf table 19 in OWS specification*/
172
173
174typedef struct Ows_layer {
176 int depth;
177 buffer * name; /* Nominally concatenation of ns_uri:name_no_uri, e.g. "http://www.tinyows.org/:world" , or name_no_uri if no ns_uri */
178 buffer * name_prefix; /* Nominally concatenation of ns_prefix:name_no_uri, e.g. "tows:world" , or name_no_uri if no ns_prefix */
179 buffer * name_no_uri; /* the name as in the "name" attribute in the config, e.g "world" */
192 buffer * ns_prefix; /* value of the "ns_prefix" attribute in the config, e.g. "tows" */
193 buffer * ns_uri; /* value of the "ns_uri" attribute in the config, e.g. "http://www.tinyows.org/" */
197
203
209
210
221
239
245
251
252
253/* ========= WFS ========= */
254
255
268
276
288
294
299
322
323
324/* ========= FE ========= */
325
326
341
348
349
350/* ========= OWS Request & Main ========= */
351
360
361#define OWS_DEFAULT_XML_ENCODING "UTF-8"
362#define OWS_DEFAULT_DB_ENCODING "UTF8"
363
364#define OWS_MAX_DOUBLE 1e15 /* %f vs %g */
365
410
411#endif /* OWS_STRUCT_H */
412
413
414/*
415 * vim: expandtab sw=4 ts=4
416 */
struct Ows_meta ows_meta
struct Ows_layer_list ows_layer_list
struct Ows_contact ows_contact
struct List_node list_node
struct Ows_version ows_version
struct Ows_layer_node ows_layer_node
struct Buffer buffer
struct Mlist_node mlist_node
struct Ows ows
wfs_format
Definition ows_struct.h:277
@ WFS_APPLICATION_XML
Definition ows_struct.h:286
@ WFS_FORMAT_UNKNOWN
Definition ows_struct.h:278
@ WFS_GEOJSON
Definition ows_struct.h:283
@ WFS_TEXT_XML
Definition ows_struct.h:285
@ WFS_XML_SCHEMA
Definition ows_struct.h:279
@ WFS_GML311
Definition ows_struct.h:281
@ WFS_GML321
Definition ows_struct.h:282
@ WFS_GML212
Definition ows_struct.h:280
@ WFS_JSONP
Definition ows_struct.h:284
struct Mlist mlist
struct Ows_layer ows_layer
struct Array_node array_node
fe_error_code
Definition ows_struct.h:327
@ FE_NO_ERROR
Definition ows_struct.h:328
@ FE_ERROR_NAMESPACE
Definition ows_struct.h:339
@ FE_ERROR_UNITS
Definition ows_struct.h:334
@ FE_ERROR_FILTER
Definition ows_struct.h:330
@ FE_ERROR_PROPERTYNAME
Definition ows_struct.h:332
@ FE_ERROR_SRS
Definition ows_struct.h:337
@ FE_ERROR_GEOM_PROPERTYNAME
Definition ows_struct.h:333
@ FE_ERROR_BBOX
Definition ows_struct.h:331
@ FE_ERROR_GEOMETRY
Definition ows_struct.h:335
@ FE_ERROR_FUNCTION
Definition ows_struct.h:338
@ FE_ERROR_FEATUREID
Definition ows_struct.h:329
@ FE_ERROR_FID
Definition ows_struct.h:336
ows_method
Definition ows_struct.h:246
@ OWS_METHOD_KVP
Definition ows_struct.h:248
@ OWS_METHOD_UNKNOWN
Definition ows_struct.h:247
@ OWS_METHOD_XML
Definition ows_struct.h:249
wfs_error_code
Definition ows_struct.h:256
@ WFS_ERROR_INVALID_VERSION
Definition ows_struct.h:257
@ WFS_ERROR_EXCLUSIVE_PARAMETERS
Definition ows_struct.h:262
@ WFS_ERROR_INVALID_PARAMETER
Definition ows_struct.h:265
@ WFS_ERROR_INCORRECT_SIZE_PARAMETER
Definition ows_struct.h:263
@ WFS_ERROR_NO_MATCHING
Definition ows_struct.h:264
@ WFS_ERROR_LAYER_NOT_WRITABLE
Definition ows_struct.h:261
@ WFS_ERROR_MISSING_PARAMETER
Definition ows_struct.h:266
@ WFS_ERROR_OUTPUT_FORMAT_NOT_SUPPORTED
Definition ows_struct.h:258
@ WFS_ERROR_LAYER_NOT_RETRIEVABLE
Definition ows_struct.h:260
@ WFS_ERROR_LAYER_NOT_DEFINED
Definition ows_struct.h:259
struct Alist alist
struct Ows_layer_storage ows_layer_storage
struct Alist_node alist_node
wfs_insert_idgen
Definition ows_struct.h:289
@ WFS_GENERATE_NEW
Definition ows_struct.h:290
@ WFS_REPLACE_DUPLICATE
Definition ows_struct.h:292
@ WFS_USE_EXISTING
Definition ows_struct.h:291
struct Ows_srs ows_srs
ows_error_code
Definition ows_struct.h:156
@ OWS_ERROR_OPERATION_NOT_SUPPORTED
Definition ows_struct.h:157
@ OWS_ERROR_REQUEST_HTTP
Definition ows_struct.h:167
@ OWS_ERROR_CONNECTION_FAILED
Definition ows_struct.h:164
@ OWS_ERROR_NO_SRS_DEFINED
Definition ows_struct.h:170
@ OWS_ERROR_NO_APPLICABLE_CODE
Definition ows_struct.h:162
@ OWS_ERROR_VERSION_NEGOTIATION_FAILED
Definition ows_struct.h:160
@ OWS_ERROR_MISSING_PARAMETER_VALUE
Definition ows_struct.h:158
@ OWS_ERROR_INVALID_PARAMETER_VALUE
Definition ows_struct.h:159
@ OWS_ERROR_INVALID_UPDATE_SEQUENCE
Definition ows_struct.h:161
@ OWS_ERROR_FORBIDDEN_CHARACTER
Definition ows_struct.h:168
@ OWS_ERROR_REQUEST_SQL_FAILED
Definition ows_struct.h:166
@ OWS_ERROR_CONFIG_FILE
Definition ows_struct.h:165
@ OWS_ERROR_MISSING_METADATA
Definition ows_struct.h:169
struct Ows_bbox ows_bbox
struct Ows_geobbox ows_geobbox
wfs_request
Definition ows_struct.h:269
@ WFS_TRANSACTION
Definition ows_struct.h:274
@ WFS_GET_CAPABILITIES
Definition ows_struct.h:271
@ WFS_REQUEST_UNKNOWN
Definition ows_struct.h:270
@ WFS_GET_FEATURE
Definition ows_struct.h:273
@ WFS_DESCRIBE_FEATURE_TYPE
Definition ows_struct.h:272
struct Ows_request ows_request
struct Filter_encoding filter_encoding
ows_schema_type
Definition ows_struct.h:295
@ WFS_SCHEMA_TYPE_110
Definition ows_struct.h:297
@ WFS_SCHEMA_TYPE_100
Definition ows_struct.h:296
struct Array array
ows_service
Definition ows_struct.h:240
@ OWS_SERVICE_UNKNOWN
Definition ows_struct.h:243
@ WMS
Definition ows_struct.h:241
@ WFS
Definition ows_struct.h:242
struct List list
buffer * key
Definition ows_struct.h:70
list * value
Definition ows_struct.h:71
struct Alist_node * next
Definition ows_struct.h:72
alist_node * last
Definition ows_struct.h:77
alist_node * first
Definition ows_struct.h:76
buffer * value
Definition ows_struct.h:83
buffer * key
Definition ows_struct.h:82
struct Array_node * next
Definition ows_struct.h:84
array_node * last
Definition ows_struct.h:89
array_node * first
Definition ows_struct.h:88
size_t size
size used for data
Definition ows_struct.h:37
char * buf
size to next realloc
Definition ows_struct.h:39
size_t realloc
memory available
Definition ows_struct.h:38
size_t use
Definition ows_struct.h:36
enum fe_error_code error_code
Definition ows_struct.h:346
struct List_node * next
Definition ows_struct.h:45
buffer * value
Definition ows_struct.h:44
struct List_node * prev
Definition ows_struct.h:46
unsigned int size
Definition ows_struct.h:52
list_node * last
Definition ows_struct.h:51
list_node * first
Definition ows_struct.h:50
struct Mlist_node * prev
Definition ows_struct.h:59
struct Mlist_node * next
Definition ows_struct.h:58
list * value
Definition ows_struct.h:57
mlist_node * last
Definition ows_struct.h:64
mlist_node * first
Definition ows_struct.h:63
unsigned int size
Definition ows_struct.h:65
ows_srs * srs
Definition ows_struct.h:139
double xmax
Definition ows_struct.h:137
double ymin
Definition ows_struct.h:136
double ymax
Definition ows_struct.h:138
double xmin
Definition ows_struct.h:135
buffer * instructions
Definition ows_struct.h:237
buffer * phone
Definition ows_struct.h:227
buffer * address
Definition ows_struct.h:230
buffer * state
Definition ows_struct.h:233
buffer * postcode
Definition ows_struct.h:231
buffer * position
Definition ows_struct.h:226
buffer * name
Definition ows_struct.h:223
buffer * indiv_name
Definition ows_struct.h:225
buffer * hours
Definition ows_struct.h:236
buffer * online_resource
Definition ows_struct.h:229
buffer * fax
Definition ows_struct.h:228
buffer * city
Definition ows_struct.h:232
buffer * email
Definition ows_struct.h:235
buffer * country
Definition ows_struct.h:234
buffer * site
Definition ows_struct.h:224
double east
Definition ows_struct.h:143
double south
Definition ows_struct.h:145
double north
Definition ows_struct.h:146
double west
Definition ows_struct.h:144
unsigned int size
Definition ows_struct.h:207
ows_layer_node * first
Definition ows_struct.h:205
ows_layer_node * last
Definition ows_struct.h:206
struct Ows_layer_node * prev
Definition ows_struct.h:201
ows_layer * layer
Definition ows_struct.h:199
struct Ows_layer_node * next
Definition ows_struct.h:200
buffer * pkey_default
Definition ows_struct.h:103
buffer * pkey_sequence
Definition ows_struct.h:102
list * not_null_columns
Definition ows_struct.h:99
list * srid
Definition ows_struct.h:183
buffer * name
Definition ows_struct.h:177
buffer * ns_uri
Definition ows_struct.h:193
list * gml_ns
Definition ows_struct.h:191
bool retrievable
Definition ows_struct.h:181
buffer * ns_prefix
Definition ows_struct.h:192
bool writable
Definition ows_struct.h:182
list * include_items
Definition ows_struct.h:188
buffer * name_prefix
Definition ows_struct.h:178
buffer * name_no_uri
Definition ows_struct.h:179
struct Ows_layer * parent
Definition ows_struct.h:175
buffer * encoding
Definition ows_struct.h:194
buffer * abstract
Definition ows_struct.h:185
list * keywords
Definition ows_struct.h:186
ows_layer_storage * storage
Definition ows_struct.h:195
buffer * title
Definition ows_struct.h:180
buffer * pkey
Definition ows_struct.h:189
ows_geobbox * geobbox
Definition ows_struct.h:184
buffer * pkey_sequence
Definition ows_struct.h:190
list * exclude_items
Definition ows_struct.h:187
list * keywords
Definition ows_struct.h:217
buffer * abstract
Definition ows_struct.h:216
buffer * type
Definition ows_struct.h:212
buffer * access_constraints
Definition ows_struct.h:219
buffer * name
Definition ows_struct.h:214
buffer * title
Definition ows_struct.h:215
list * versions
Definition ows_struct.h:213
buffer * fees
Definition ows_struct.h:218
ows_version * version
Definition ows_struct.h:353
enum ows_service service
Definition ows_struct.h:355
wfs_request * wfs
Definition ows_struct.h:357
enum ows_method method
Definition ows_struct.h:354
union Ows_request::@061103224255043274127022210112340325046267027263 request
bool honours_authority_axis_order
Definition ows_struct.h:126
bool is_long
Definition ows_struct.h:129
buffer * auth_name
Definition ows_struct.h:112
int auth_srid
Definition ows_struct.h:113
bool is_geographic
Definition ows_struct.h:114
bool is_axis_order_gis_friendly
Definition ows_struct.h:118
ows_request * request
Definition ows_struct.h:403
ows_version * wfs_default_version
Definition ows_struct.h:404
ows_contact * contact
Definition ows_struct.h:385
ows_meta * metadata
Definition ows_struct.h:384
bool check_valid_geom
Definition ows_struct.h:398
bool mapfile
Definition ows_struct.h:370
PGconn * pg
Definition ows_struct.h:369
int degree_precision
Definition ows_struct.h:387
array * cgi
Definition ows_struct.h:400
list * psql_requests
Definition ows_struct.h:401
bool exit
Definition ows_struct.h:368
buffer * encoding
Definition ows_struct.h:375
int meter_precision
Definition ows_struct.h:388
buffer * log_file
Definition ows_struct.h:380
bool display_bbox
Definition ows_struct.h:393
bool estimated_extent
Definition ows_struct.h:395
bool expose_pk
Definition ows_struct.h:394
FILE * log
Definition ows_struct.h:378
buffer * schema_dir
Definition ows_struct.h:372
bool check_schema
Definition ows_struct.h:397
int log_level
Definition ows_struct.h:379
ows_geobbox * max_geobbox
Definition ows_struct.h:391
bool init
Definition ows_struct.h:367
buffer * online_resource
Definition ows_struct.h:373
int max_features
Definition ows_struct.h:390
buffer * pg_dsn
Definition ows_struct.h:374
buffer * config_file
Definition ows_struct.h:371
buffer * db_encoding
Definition ows_struct.h:376
xmlSchemaPtr schema_wfs_110
Definition ows_struct.h:408
ows_version * postgis_version
Definition ows_struct.h:405
xmlSchemaPtr schema_wfs_100
Definition ows_struct.h:407
ows_layer_list * layers
Definition ows_struct.h:402
FILE * output
Definition ows_struct.h:382
ows_bbox * bbox
Definition ows_struct.h:304
ows_srs * srs
Definition ows_struct.h:307
list * filter
Definition ows_struct.h:309
list * sections
Definition ows_struct.h:314
int update_results
Definition ows_struct.h:319
enum wfs_format format
Definition ows_struct.h:302
buffer * operation
Definition ows_struct.h:310
mlist * featureid
Definition ows_struct.h:308
enum wfs_request request
Definition ows_struct.h:301
list * handle
Definition ows_struct.h:311
buffer * callback
Definition ows_struct.h:315
alist * insert_results
Definition ows_struct.h:317
mlist * propertyname
Definition ows_struct.h:305
buffer * resulttype
Definition ows_struct.h:312
buffer * sortby
Definition ows_struct.h:313
int delete_results
Definition ows_struct.h:318

Generated for tinyows by doxygen 1.13.2