tinyows 1.2.2
ows_config.c
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#include <stdio.h>
25#include <stdlib.h>
26#include <string.h>
27#include <assert.h>
28#include <libxml/xmlreader.h>
29
30#include "ows.h"
31
32
33/*
34 * Parse the configuration file's tinyows element
35 */
36static void ows_parse_config_tinyows(ows * o, xmlTextReaderPtr r)
37{
38 xmlChar *a;
39 int precision, log_level;
40
41 assert(o);
42 assert(r);
43
44 a = xmlTextReaderGetAttribute(r, (xmlChar *) "online_resource");
45 if (a) {
46 buffer_add_str(o->online_resource, (char *) a);
47 xmlFree(a);
48 }
49
50 a = xmlTextReaderGetAttribute(r, (xmlChar *) "schema_dir");
51 if (a) {
52 buffer_add_str(o->schema_dir, (char *) a);
53 xmlFree(a);
54 }
55
56 a = xmlTextReaderGetAttribute(r, (xmlChar *) "log");
57 if (a) {
58 o->log_file = buffer_init();
59 buffer_add_str(o->log_file, (char *) a);
60 xmlFree(a);
61 }
62
63 a = xmlTextReaderGetAttribute(r, (xmlChar *) "log_level");
64 if (a) {
65 log_level = atoi((char *) a);
66 if (log_level > 0 && log_level < 16) o->log_level = log_level;
67 xmlFree(a);
68 }
69
70 a = xmlTextReaderGetAttribute(r, (xmlChar *) "degree_precision");
71 if (a) {
72 precision = atoi((char *) a);
73 if (precision > 0 && precision < 12) o->degree_precision = precision;
74 xmlFree(a);
75 }
76
77 a = xmlTextReaderGetAttribute(r, (xmlChar *) "meter_precision");
78 if (a) {
79 precision = atoi((char *) a);
80 if (precision > 0 && precision < 12) o->meter_precision = precision;
81 xmlFree(a);
82 }
83
84 a = xmlTextReaderGetAttribute(r, (xmlChar *) "display_bbox");
85 if (a) {
86 if (!atoi((char *) a)) o->display_bbox = false;
87 xmlFree(a);
88 }
89
90 a = xmlTextReaderGetAttribute(r, (xmlChar *) "estimated_extent");
91 if (a) {
92 if (atoi((char *) a)) o->estimated_extent = true;
93 xmlFree(a);
94 }
95
96 a = xmlTextReaderGetAttribute(r, (xmlChar *) "check_schema");
97 if (a) {
98 if (!atoi((char *) a)) o->check_schema = false;
99 xmlFree(a);
100 }
101
102 a = xmlTextReaderGetAttribute(r, (xmlChar *) "check_valid_geom");
103 if (a) {
104 if (!atoi((char *) a)) o->check_valid_geom = false;
105 xmlFree(a);
106 }
107
108 a = xmlTextReaderGetAttribute(r, (xmlChar *) "encoding");
109 if (a) {
110 buffer_add_str(o->encoding, (char *) a);
111 xmlFree(a);
113
114 a = xmlTextReaderGetAttribute(r, (xmlChar *) "expose_pk");
115 if (a) {
116 if (atoi((char *) a)) o->expose_pk = true;
117 xmlFree(a);
118 }
119
120 a = xmlTextReaderGetAttribute(r, (xmlChar *) "wfs_default_version");
121 if (a) {
123 xmlFree(a);
124 }
125}
126
127
128/*
129 * Parse the configuration file's contact element
130 */
131static void ows_parse_config_contact(ows * o, xmlTextReaderPtr r)
132{
133 xmlChar *a;
134 ows_contact *contact = ows_contact_init();
135
136 assert(o);
137 assert(r);
138
139 a = xmlTextReaderGetAttribute(r, (xmlChar *) "name");
140 if (a) {
141 contact->name = buffer_init();
142 buffer_add_str(contact->name, (char *) a);
143 xmlFree(a);
144 }
145
146 a = xmlTextReaderGetAttribute(r, (xmlChar *) "site");
147 if (a) {
148 contact->site = buffer_init();
149 buffer_add_str(contact->site, (char *) a);
150 xmlFree(a);
151 }
152
153 a = xmlTextReaderGetAttribute(r, (xmlChar *) "individual_name");
154 if (a) {
155 contact->indiv_name = buffer_init();
156 buffer_add_str(contact->indiv_name, (char *) a);
157 xmlFree(a);
158 }
159
160 a = xmlTextReaderGetAttribute(r, (xmlChar *) "position");
161 if (a) {
162 contact->position = buffer_init();
163 buffer_add_str(contact->position, (char *) a);
164 xmlFree(a);
165 }
166
167 a = xmlTextReaderGetAttribute(r, (xmlChar *) "phone");
168 if (a) {
169 contact->phone = buffer_init();
170 buffer_add_str(contact->phone, (char *) a);
171 xmlFree(a);
172 }
173
174 a = xmlTextReaderGetAttribute(r, (xmlChar *) "fax");
175 if (a) {
176 contact->fax = buffer_init();
177 buffer_add_str(contact->fax, (char *) a);
178 xmlFree(a);
179 }
180
181 a = xmlTextReaderGetAttribute(r, (xmlChar *) "online_resource");
182 if (a) {
183 contact->online_resource = buffer_init();
184 buffer_add_str(contact->online_resource, (char *) a);
185 xmlFree(a);
186 }
187
188 a = xmlTextReaderGetAttribute(r, (xmlChar *) "address");
189 if (a) {
190 contact->address = buffer_init();
191 buffer_add_str(contact->address, (char *) a);
192 xmlFree(a);
193 }
194
195 a = xmlTextReaderGetAttribute(r, (xmlChar *) "postcode");
196 if (a) {
197 contact->postcode = buffer_init();
198 buffer_add_str(contact->postcode, (char *) a);
199 xmlFree(a);
200 }
201
202 a = xmlTextReaderGetAttribute(r, (xmlChar *) "city");
203 if (a) {
204 contact->city = buffer_init();
205 buffer_add_str(contact->city, (char *) a);
206 xmlFree(a);
207 }
208
209 a = xmlTextReaderGetAttribute(r, (xmlChar *) "administrative_area");
210 if (a) {
211 contact->state = buffer_init();
212 buffer_add_str(contact->state, (char *) a);
213 xmlFree(a);
214 }
215
216 a = xmlTextReaderGetAttribute(r, (xmlChar *) "country");
217 if (a) {
218 contact->country = buffer_init();
219 buffer_add_str(contact->country, (char *) a);
220 xmlFree(a);
221 }
222
223 a = xmlTextReaderGetAttribute(r, (xmlChar *) "email");
224 if (a) {
225 contact->email = buffer_init();
226 buffer_add_str(contact->email, (char *) a);
227 xmlFree(a);
228 }
229
230 a = xmlTextReaderGetAttribute(r, (xmlChar *) "hours_of_service");
231 if (a) {
232 contact->hours = buffer_init();
233 buffer_add_str(contact->hours, (char *) a);
234 xmlFree(a);
235 }
236
237 a = xmlTextReaderGetAttribute(r, (xmlChar *) "contact_instructions");
238 if (a) {
239 contact->instructions = buffer_init();
240 buffer_add_str(contact->instructions, (char *) a);
241 xmlFree(a);
242 }
243
244 o->contact = contact;
245}
246
247
248/*
249 * Parse the configuration file's metadata element
250 */
251static void ows_parse_config_metadata(ows * o, xmlTextReaderPtr r)
252{
253 xmlChar *a;
254
255 assert(o);
256 assert(r);
257
259
260 a = xmlTextReaderGetAttribute(r, (xmlChar *) "name");
261 if (a) {
262 o->metadata->name = buffer_init();
263 buffer_add_str(o->metadata->name, (char *) a);
264 xmlFree(a);
265 }
266
267 a = xmlTextReaderGetAttribute(r, (xmlChar *) "title");
268 if (a) {
269 o->metadata->title = buffer_init();
270 buffer_add_str(o->metadata->title, (char *) a);
271 xmlFree(a);
272 }
273
274 a = xmlTextReaderGetAttribute(r, (xmlChar *) "keywords");
275 if (a) {
276 o->metadata->keywords = list_explode_str(',', (char *) a);
277 xmlFree(a);
278 }
279
280 a = xmlTextReaderGetAttribute(r, (xmlChar *) "fees");
281 if (a) {
282 o->metadata->fees = buffer_init();
283 buffer_add_str(o->metadata->fees, (char *) a);
284 xmlFree(a);
285 }
286
287 a = xmlTextReaderGetAttribute(r, (xmlChar *) "access_constraints");
288 if (a) {
291 xmlFree(a);
292 }
293}
294
295
296/*
297 * Parse the configuration file's abstract metadata element
298 */
299static void ows_parse_config_abstract(ows * o, xmlTextReaderPtr r)
300{
301 xmlChar *v;
302
303 assert(r);
304 assert(o);
305 assert(o->metadata);
306
307 /* FIXME should use XmlTextReader expand on metadata parent */
308 xmlTextReaderRead(r);
309 v = xmlTextReaderValue(r);
310
311 if (v) {
313 buffer_add_str(o->metadata->abstract, (char *) v);
314 xmlFree(v);
315 }
316}
317
318
319/*
320 * Parse the configuration file's limits element
321 */
322static void ows_parse_config_limits(ows * o, xmlTextReaderPtr r)
323{
324 xmlChar *a;
325 ows_geobbox *geo;
326
327 assert(o);
328 assert(r);
329
330 a = xmlTextReaderGetAttribute(r, (xmlChar *) "features");
331 if (a) {
332 o->max_features = atoi((char *) a);
333 xmlFree(a);
334 }
335
336 a = xmlTextReaderGetAttribute(r, (xmlChar *) "geobbox");
337 if (a) {
338 geo = ows_geobbox_init();
339 if (ows_geobbox_set_from_str(o, geo, (char *) a)) o->max_geobbox = geo;
340 else ows_geobbox_free(geo);
341 xmlFree(a);
342 }
343}
344
345
346/*
347 * Parse the configuration file's pg element about connection information
348 */
349static void ows_parse_config_pg(ows * o, xmlTextReaderPtr r)
350{
351 xmlChar *a, *v;
352
353 assert(o);
354 assert(r);
355
356 if (xmlTextReaderMoveToFirstAttribute(r) != 1) return;
357 do {
358 a = xmlTextReaderName(r);
359
360 if ( !strcmp((char *) a, "host")
361 || !strcmp((char *) a, "user")
362 || !strcmp((char *) a, "password")
363 || !strcmp((char *) a, "dbname")
364 || !strcmp((char *) a, "port")) {
365 v = xmlTextReaderValue(r);
366 buffer_add_str(o->pg_dsn, (char *) a);
367 buffer_add_str(o->pg_dsn, "=");
368 buffer_add_str(o->pg_dsn, (char *) v);
369 buffer_add_str(o->pg_dsn, " ");
370 xmlFree(v);
371 } else if (!strcmp((char *) a, "encoding")) {
372 v = xmlTextReaderValue(r);
373 buffer_add_str(o->db_encoding, (char *) v);
374 xmlFree(v);
375 }
376
377 xmlFree(a);
378 } while (xmlTextReaderMoveToNextAttribute(r) == 1);
379
380 if (!o->db_encoding->use)
382}
383
384
385/*
386 * Return layer's parent if there is one
387 */
389{
390 ows_layer_node *ln;
391
392 if (depth == 1) return (ows_layer *) NULL;
393
394 ln = o->layers->last;
395
396 if (ln->layer->depth < depth) return ln->layer;
397 if (ln->layer->depth == depth) return ln->layer->parent;
398
399 for (/* empty */ ; ln ; ln = ln->prev)
400 if (depth == ln->layer->depth)
401 return ln->layer->parent;
402
403 return (ows_layer *) NULL;
404}
405
406
407/*
408 * Parse the configuration file's layer element and all child layers
409 */
410static void ows_parse_config_layer(ows * o, xmlTextReaderPtr r)
411{
412 ows_layer *layer;
413 xmlChar *a;
414 list *l;
415
416 assert(o);
417 assert(r);
418
419 layer = ows_layer_init();
420
421 layer->depth = xmlTextReaderDepth(r);
423
424
425 /* Not herited properties */
426
427 a = xmlTextReaderGetAttribute(r, (xmlChar *) "table");
428 if (a) {
429 buffer_add_str(layer->storage->table, (char *) a);
430 xmlFree(a);
431 }
432
433 a = xmlTextReaderGetAttribute(r, (xmlChar *) "name");
434 if (a) {
435 layer->name = buffer_init();
436 layer->name_no_uri = buffer_init();
437 layer->name_prefix = buffer_init();
438 buffer_add_str(layer->name, (char *) a);
439 buffer_copy(layer->name_no_uri, layer->name);
440 buffer_copy(layer->name_prefix, layer->name);
441 if (!layer->storage->table->use)
442 buffer_add_str(layer->storage->table, (char *) a);
443 xmlFree(a);
444 }
445
446 a = xmlTextReaderGetAttribute(r, (xmlChar *) "title");
447 if (a) {
448 layer->title = buffer_init();
449 buffer_add_str(layer->title, (char *) a);
450 xmlFree(a);
451 }
452
453 a = xmlTextReaderGetAttribute(r, (xmlChar *) "abstract");
454 if (a) {
455 layer->abstract = buffer_init();
456 buffer_add_str(layer->abstract, (char *) a);
457 xmlFree(a);
458 }
459
460 a = xmlTextReaderGetAttribute(r, (xmlChar *) "gml_ns");
461 if (a) {
462 layer->gml_ns = list_explode_str(',', (char *) a);
463 xmlFree(a);
464 }
465
466
467 /* Herited properties */
468
469 a = xmlTextReaderGetAttribute(r, (xmlChar *) "keywords");
470 if (a) {
471 layer->keywords = list_explode_str(',', (char *) a);
472 xmlFree(a);
473 } else if (layer->parent && layer->parent->keywords) {
474 layer->keywords = list_init();
475 list_add_list(layer->keywords, layer->parent->keywords);
476 }
477
478 a = xmlTextReaderGetAttribute(r, (xmlChar *) "schema");
479 if (a) {
480 buffer_add_str(layer->storage->schema, (char *) a);
481 xmlFree(a);
482 } else if (layer->parent && layer->parent->storage->schema)
483 buffer_copy(layer->storage->schema, layer->parent->storage->schema);
484 else buffer_add_str(layer->storage->schema, "public");
485
486 a = xmlTextReaderGetAttribute(r, (xmlChar *) "retrievable");
487 if (a && atoi((char *) a) == 1) {
488 layer->retrievable = true;
489 xmlFree(a);
490 } else if (!a && layer->parent && layer->parent->retrievable)
491 layer->retrievable = true;
492 else xmlFree(a);
493
494 a = xmlTextReaderGetAttribute(r, (xmlChar *) "writable");
495 if (a && atoi((char *) a) == 1) {
496 layer->writable = true;
497 xmlFree(a);
498 } else if (!a && layer->parent && layer->parent->writable)
499 layer->writable = true;
500 else xmlFree(a);
501
502 if (layer->parent && layer->parent->srid) {
503 layer->srid = list_init();
504 list_add_list(layer->srid, layer->parent->srid);
505 }
506 a = xmlTextReaderGetAttribute(r, (xmlChar *) "srid");
507 if (a) {
508 if (!layer->srid)
509 layer->srid = list_explode_str(',', (char *) a);
510 else {
511 l = list_explode_str(',', (char *) a);
512 list_add_list(layer->srid, l);
513 list_free(l);
514 }
515 xmlFree(a);
516 }
517
518 a = xmlTextReaderGetAttribute(r, (xmlChar *) "geobbox");
519 if (a) {
520 layer->geobbox = ows_geobbox_init();
521 ows_geobbox_set_from_str(o, layer->geobbox, (char *) a);
522 xmlFree(a);
523 } else if (!a && layer->parent && layer->parent->geobbox)
524 layer->geobbox = ows_geobbox_copy(layer->parent->geobbox);
525 else xmlFree(a);
526
527 a = xmlTextReaderGetAttribute(r, (xmlChar *) "ns_prefix");
528 if (a) {
529 buffer_add_str(layer->ns_prefix, (char *) a);
530 xmlFree(a);
531 } else if (!a && layer->parent && layer->parent->ns_prefix)
532 buffer_copy(layer->ns_prefix, layer->parent->ns_prefix);
533 else xmlFree(a);
534
535 a = xmlTextReaderGetAttribute(r, (xmlChar *) "ns_uri");
536 if (a) {
537 buffer_add_str(layer->ns_uri, (char *) a);
538 xmlFree(a);
539 } else if (!a && layer->parent && layer->parent->ns_uri)
540 buffer_copy(layer->ns_uri, layer->parent->ns_uri);
541 else xmlFree(a);
542
543 a = xmlTextReaderGetAttribute(r, (xmlChar *) "exclude_items");
544 if (a) {
545 layer->exclude_items = list_explode_str_trim(',', (char *) a);
546 xmlFree(a);
547 } else if (layer->parent && layer->parent->exclude_items) {
548 layer->exclude_items = list_init();
550 }
551
552 a = xmlTextReaderGetAttribute(r, (xmlChar *) "include_items");
553 if (a) {
554 layer->include_items = list_explode_str_trim(',', (char *) a);
555 xmlFree(a);
556 } else if (layer->parent && layer->parent->include_items) {
557 layer->include_items = list_init();
559 }
560
561 a = xmlTextReaderGetAttribute(r, (xmlChar *) "pkey");
562 if (a) {
563 layer->pkey = buffer_init();
564 buffer_add_str(layer->pkey, (char *) a);
565 xmlFree(a);
566 } else if (layer->parent && layer->parent->pkey) {
567 layer->pkey = buffer_init();
568 buffer_copy(layer->pkey, layer->parent->pkey);
569 }
570
571 a = xmlTextReaderGetAttribute(r, (xmlChar *) "pkey_sequence");
572 if (a) {
573 layer->pkey_sequence = buffer_init();
574 buffer_add_str(layer->pkey_sequence, (char *) a);
575 xmlFree(a);
576 } else if (layer->parent && layer->parent->pkey_sequence) {
577 layer->pkey_sequence = buffer_init();
579 }
580
581 if (layer->name && layer->ns_uri) {
582 buffer_add_head(layer->name, ':');
583 buffer_add_head_str(layer->name, layer->ns_uri->buf);
584 }
585 if (layer->name && layer->ns_prefix) {
586 buffer_add_head(layer->name_prefix, ':');
588 }
589 ows_layer_list_add(o->layers, layer);
590}
591
592
593/*
594 * Check if every mandatory element/property are
595 * rightly set from config files
596 */
597static void ows_config_check(ows * o)
598{
599 if (!o->online_resource->use) {
600 ows_error(o, OWS_ERROR_CONFIG_FILE, "No 'online_resource' property in tinyows element",
601 "parse_config_file");
602 return;
603 }
604
606 ows_error(o, OWS_ERROR_CONFIG_FILE, "WFS Default version is not correct.", "parse_config_file");
607 return;
608 }
609
610 if (!o->schema_dir->use) {
611 ows_error(o, OWS_ERROR_CONFIG_FILE, "No 'schema_dir' property in tinyows element",
612 "parse_config_file");
613 return;
614 }
615
616 if (!o->metadata) {
617 ows_error(o, OWS_ERROR_CONFIG_FILE, "No 'metadata' element", "parse_config_file");
618 return;
619 }
620
621 if (!o->metadata->name) {
622 ows_error(o, OWS_ERROR_CONFIG_FILE, "No 'name' property in metadata element",
623 "parse_config_file");
624 return;
625 }
626
627 if (!o->metadata->title) {
628 ows_error(o, OWS_ERROR_CONFIG_FILE, "No 'title' property in metadata element",
629 "parse_config_file");
630 return;
631 }
632
633 if (!o->pg_dsn->use) {
634 ows_error(o, OWS_ERROR_CONFIG_FILE, "No 'pg' element",
635 "parse_config_file");
636 return;
637 }
638}
639
640
641/*
642 * Parse the configuration file and initialize ows struct
643 */
644static void ows_parse_config_xml(ows * o, const char *filename)
645{
646 xmlTextReaderPtr r;
647 const xmlChar *name;
648 int ret;
649
650 assert(o);
651 assert(filename);
652
653 r = xmlReaderForFile(filename, "UTF-8", 0);
654 if (!r) {
655 ows_error(o, OWS_ERROR_CONFIG_FILE, "Unable to open config file !", "parse_config_file");
656 return;
657 }
658
659 if (!o->layers) o->layers = ows_layer_list_init();
660
661 while ((ret = xmlTextReaderRead(r)) == 1) {
662 if (xmlTextReaderNodeType(r) == XML_READER_TYPE_ELEMENT) {
663 name = xmlTextReaderConstLocalName(r);
664
665 if (!strcmp((char *) name, "tinyows"))
667
668 if (!strcmp((char *) name, "metadata"))
670
671 if (!strcmp((char *) name, "abstract"))
673
674 if (!strcmp((char *) name, "contact"))
676
677 if (!strcmp((char *) name, "pg"))
679
680 if (!strcmp((char *) name, "limits"))
682
683 if (!strcmp((char *) name, "layer"))
685 }
686 }
687
688 if (ret != 0) {
689 xmlFreeTextReader(r);
690 ows_error(o, OWS_ERROR_CONFIG_FILE, "Unable to open config file !", "parse_config_file");
691 return;
692 }
693
694 xmlFreeTextReader(r);
695}
696
697
698
699/*
700 *
701 */
702void ows_parse_config(ows * o, const char *filename)
703{
704 assert(o);
705 assert(filename);
706
707 if (o->mapfile) ows_parse_config_mapfile(o, filename);
708 else ows_parse_config_xml(o, filename);
709 if (!o->exit) ows_config_check(o);
710}
void buffer_copy(buffer *dest, const buffer *src)
Definition buffer.c:350
void list_free(list *l)
Definition list.c:54
ows_layer * ows_layer_init()
Definition ows_layer.c:516
bool ows_version_set_str(ows_version *v, char *str)
Definition ows_version.c:61
void buffer_add_str(buffer *buf, const char *str)
Definition buffer.c:254
bool ows_version_check(ows_version *v)
list * list_init()
Definition list.c:36
ows_meta * ows_metadata_init()
void ows_error(ows *o, enum ows_error_code code, char *message, char *locator)
Definition ows_error.c:71
list * list_explode_str_trim(char separator, const char *value)
Definition list.c:430
void ows_geobbox_free(ows_geobbox *g)
Definition ows_geobbox.c:69
void buffer_add_head_str(buffer *buf, char *str)
Definition buffer.c:239
ows_layer_list * ows_layer_list_init()
Definition ows_layer.c:36
void ows_parse_config_mapfile(ows *o, const char *filename)
void buffer_add_head(buffer *buf, char c)
Definition buffer.c:217
ows_geobbox * ows_geobbox_copy(ows_geobbox *g)
Definition ows_geobbox.c:56
void list_add_list(list *l, list *l_to_add)
Definition list.c:152
ows_geobbox * ows_geobbox_init()
Definition ows_geobbox.c:37
ows_contact * ows_contact_init()
void ows_layer_list_add(ows_layer_list *ll, ows_layer *l)
Definition ows_layer.c:440
ows_geobbox * ows_geobbox_set_from_str(ows *o, ows_geobbox *g, char *str)
buffer * buffer_init()
Definition buffer.c:61
list * list_explode_str(char separator, const char *value)
Definition list.c:401
static void ows_config_check(ows *o)
Definition ows_config.c:597
static void ows_parse_config_limits(ows *o, xmlTextReaderPtr r)
Definition ows_config.c:322
static void ows_parse_config_metadata(ows *o, xmlTextReaderPtr r)
Definition ows_config.c:251
static void ows_parse_config_xml(ows *o, const char *filename)
Definition ows_config.c:644
static void ows_parse_config_pg(ows *o, xmlTextReaderPtr r)
Definition ows_config.c:349
static void ows_parse_config_contact(ows *o, xmlTextReaderPtr r)
Definition ows_config.c:131
static void ows_parse_config_tinyows(ows *o, xmlTextReaderPtr r)
Definition ows_config.c:36
static void ows_parse_config_layer(ows *o, xmlTextReaderPtr r)
Definition ows_config.c:410
void ows_parse_config(ows *o, const char *filename)
Definition ows_config.c:702
static void ows_parse_config_abstract(ows *o, xmlTextReaderPtr r)
Definition ows_config.c:299
static ows_layer * ows_parse_config_layer_get_parent(const ows *o, int depth)
Definition ows_config.c:388
@ OWS_ERROR_CONFIG_FILE
Definition ows_struct.h:165
#define OWS_DEFAULT_DB_ENCODING
Definition ows_struct.h:362
#define OWS_DEFAULT_XML_ENCODING
Definition ows_struct.h:361
char * buf
size to next realloc
Definition ows_struct.h:39
size_t use
Definition ows_struct.h:36
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
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
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 * 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 * access_constraints
Definition ows_struct.h:219
buffer * name
Definition ows_struct.h:214
buffer * title
Definition ows_struct.h:215
buffer * fees
Definition ows_struct.h:218
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
int degree_precision
Definition ows_struct.h:387
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
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
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 * db_encoding
Definition ows_struct.h:376
ows_layer_list * layers
Definition ows_struct.h:402

Generated for tinyows by doxygen 1.9.7