void ows_flush(ows * o, FILE * output) { assert(o); assert(output); fprintf(output, "exit : %d\n", o->exit?1:0); if (o->config_file) fprintf(output, "config_file: %s\nmapfile %d\n", (char *) o->config_file->buf, o->mapfile?1:0); if (o->schema_dir) fprintf(output, "schema_dir: %s\n", (char *) o->schema_dir->buf); if (o->online_resource) fprintf(output, "online_resource: %s\n", (char *) o->online_resource->buf); if (o->pg_dsn) fprintf(output, "pg: %s\n", (char *) o->pg_dsn->buf); if (o->log_file) fprintf(output, "log file: %s\n", (char *) o->log_file->buf); if (o->encoding) fprintf(output, "encoding: %s\n", (char *) o->encoding->buf); if (o->db_encoding) fprintf(output, "db_encoding: %s\n", (char *) o->db_encoding->buf); if (o->postgis_version) { fprintf(output, "PostGIS version: %d.%d.%d\n", o->postgis_version->major, o->postgis_version->minor, o->postgis_version->release); } if (o->wfs_default_version) { fprintf(output, "WFS default version: %d.%d.%d\n", o->wfs_default_version->major, o->wfs_default_version->minor, o->wfs_default_version->release); } if (o->metadata) { fprintf(output, "metadata: "); ows_metadata_flush(o->metadata, output); fprintf(output, "\n"); } if (o->contact) { fprintf(output, "contact: "); ows_contact_flush(o->contact, output); fprintf(output, "\n"); } if (o->cgi) { fprintf(output, "cgi: "); array_flush(o->cgi, output); fprintf(output, "\n"); } if (o->psql_requests) { fprintf(output, "SQL requests: "); list_flush(o->psql_requests, output); fprintf(output, "\n"); } if (o->layers) { fprintf(output, "layers: "); ows_layer_list_flush(o->layers, output); fprintf(output, "\n"); } if (o->request) { fprintf(output, "request: "); ows_request_flush(o->request, output); fprintf(output, "\n"); } fprintf(output, "max_features: %d\n", o->max_features); fprintf(output, "degree_precision: %d\n", o->degree_precision); fprintf(output, "meter_precision: %d\n", o->meter_precision); fprintf(output, "expose_pk: %d\n", o->expose_pk?1:0); if (o->max_geobbox) { fprintf(output, "max_geobbox: "); ows_geobbox_flush(o->max_geobbox, output); fprintf(output, "\n"); } fprintf(output, "display_bbox: %d\n", o->display_bbox?1:0); fprintf(output, "estimated_extent: %d\n", o->estimated_extent?1:0); fprintf(output, "check_schema: %d\n", o->check_schema?1:0); fprintf(output, "check_valid_geom: %d\n", o->check_valid_geom?1:0); fprintf(output, "schema WFS 1.0: %d\n", o->schema_wfs_100?1:0); fprintf(output, "schema WFS 1.1: %d\n", o->schema_wfs_110?1:0); }
void ows_layer_flush(ows_layer * l, FILE * output) { assert(l); assert(output); fprintf(output, "depth: %i\n", l->depth); if (l->parent) { if (l->parent->name) fprintf(output, "parent: %s\n", l->parent->name->buf); else if (l->parent->title) fprintf(output, "parent: %s\n", l->parent->title->buf); } fprintf(output, "retrievable: %i\n", l->retrievable?1:0); fprintf(output, "writable: %i\n", l->writable?1:0); if (l->title) { fprintf(output, "title: "); buffer_flush(l->title, output); fprintf(output, "\n"); } if (l->name) { fprintf(output, "name: "); buffer_flush(l->name, output); fprintf(output, "\n"); } if (l->srid) { fprintf(output, "srid: "); list_flush(l->srid, output); fprintf(output, "\n"); } if (l->keywords) { fprintf(output, "keyword: "); list_flush(l->keywords, output); fprintf(output, "\n"); } if (l->gml_ns) { fprintf(output, "gml_ns: "); list_flush(l->gml_ns, output); fprintf(output, "\n"); } if (l->geobbox) { fprintf(output, "geobbox: "); ows_geobbox_flush(l->geobbox, output); fprintf(output, "\n"); } if (l->ns_prefix) { fprintf(output, "ns_prefix: "); buffer_flush(l->ns_prefix, output); fprintf(output, "\n"); } if (l->ns_uri) { fprintf(output, "ns_uri: "); buffer_flush(l->ns_uri, output); fprintf(output, "\n"); } if (l->storage) { fprintf(output, "storage: "); ows_layer_storage_flush(l->storage, output); fprintf(output, "\n"); } if(l->exclude_items){ fprintf(output, "exclude_items: "); list_flush(l->exclude_items, output); fprintf(output, "\n"); } }