source: trunk/zoo-kernel/service_internal.h @ 284

Last change on this file since 284 was 284, checked in by djay, 13 years ago

Add the ZOOMakefile.opts file used from service providers' Makefiles.

File size: 4.1 KB
RevLine 
[1]1/**
2 * Author : Gérald FENOY
3 *
[76]4 * Copyright (c) 2009-2011 GeoLabs SARL
[1]5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to deal
8 * in the Software without restriction, including without limitation the rights
9 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 * copies of the Software, and to permit persons to whom the Software is
11 * furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 * THE SOFTWARE.
23 */
24
25#ifndef ZOO_SERVICE_INTERNAL_H
26#define ZOO_SERVICE_INTERNAL_H 1
27
28#pragma once
29
[34]30#define DEFAULT_SERVICE_URL "http://www.zoo-project.org/"
[1]31#define TIME_SIZE 40
32
[34]33#include <libintl.h>
34#include <locale.h>
35#define _(String) dgettext ("zoo-kernel",String)
36#define _ss(String) dgettext ("zoo-services",String)
37
[26]38#include <sys/stat.h>
[1]39#include <sys/types.h>
[216]40#ifndef WIN32
[26]41#include <sys/ipc.h>
42#include <sys/shm.h>
[216]43#else
44#include <direct.h>
45#endif
[26]46#include <stdio.h>
[1]47#include <unistd.h>
48#include <time.h>
49#include <ctype.h>
50#ifndef WIN32
51#include <xlocale.h>
52#endif
53#include "service.h"
54#include <openssl/sha.h>
55#include <openssl/hmac.h>
56#include <openssl/evp.h>
57#include <openssl/bio.h>
58#include <openssl/buffer.h>
59
[253]60#include "cgic.h"
[281]61#include "ulinet.h"
[253]62
[114]63extern   int getServiceFromFile(const char*,service**);
64extern   int conf_read(const char*,maps*);
[1]65
[26]66#ifdef USE_JS
67#define XP_UNIX 0
68#include "service_internal_js.h"
69#endif
70
[1]71#ifdef __cplusplus
72extern "C" {
73#endif
74#include <libxml/parser.h>
[280]75#include <libxml/xpath.h>
76
[1]77  static char* SERVICE_URL;
[280]78  static xmlNsPtr usedNs[10];
79  static char* nsName[10];
[9]80  static int nbNs=0;
[1]81
[216]82  void unhandleStatus(maps*);
83  void updateStatus(maps*);
[26]84  char* getStatus(int);
[9]85
[26]86#ifdef USE_JS
87  char* JSValToChar(JSContext*,jsval*);
[274]88  JSBool JSUpdateStatus(JSContext*,uintN,jsval *);
[26]89#endif
90 
[1]91  void URLDecode(char *);
92  char *url_encode(char *);
[9]93  char* getEncoding(maps*);
94
[114]95  int zooXmlSearchForNs(const char*);
96  int zooXmlAddNs(xmlNodePtr,const char*,const char*);
[9]97  void zooXmlCleanupNs();
[1]98 
99  void printExceptionReportResponse(maps*,map*);
[26]100  xmlNodePtr createExceptionReportNode(maps*,map*,int);
[114]101  void printProcessResponse(maps*,map*,int,service*,const char*,int,maps*,maps*);
102  xmlNodePtr printGetCapabilitiesHeader(xmlDocPtr,const char*,maps*);
[1]103  void printGetCapabilitiesForProcess(maps*,xmlNodePtr,service*);
[114]104  xmlNodePtr printDescribeProcessHeader(xmlDocPtr,const char*,maps*);
[9]105  void printDescribeProcessForProcess(maps*,xmlNodePtr,service*,int);
[114]106  void printFullDescription(elements*,const char*,xmlNsPtr,xmlNodePtr);
[9]107  void printDocument(maps*,xmlDocPtr,int);
[114]108  void printDescription(xmlNodePtr,xmlNsPtr,const char*,map*);
109  void printIOType(xmlDocPtr,xmlNodePtr,xmlNsPtr,xmlNsPtr,xmlNsPtr,elements*,maps*,const char*);
110  map* parseBoundingBox(const char*);
[76]111  void printBoundingBox(xmlNsPtr,xmlNodePtr,map*);
112  void printBoundingBoxDocument(maps*,maps*,FILE*);
[114]113  void printOutputDefinitions1(xmlDocPtr,xmlNodePtr,xmlNsPtr,xmlNsPtr,elements*,maps*,const char*);
[1]114 
115  void outputResponse(service*,maps*,maps*,map*,int,maps*,int);
116
[216]117  char *base64(const char*,int);
118  char *base64d(const char*,int,int*);
[88]119  void ensureDecodedBase64(maps**);
[1]120
[63]121  char* addDefaultValues(maps**,elements*,maps*,int);
[1]122
[9]123  int errorException(maps *m, const char *message, const char *errorcode);
124
[280]125  int checkForSoapEnvelope(xmlDocPtr);
126
127  void addToCache(maps*,char*,char*,int);
128  char* isInCache(maps*,char*);
[281]129  void loadRemoteFile(maps*,map*,HINTERNET,char*);
[280]130 
[1]131#ifdef __cplusplus
132}
133#endif
134
135#endif
Note: See TracBrowser for help on using the repository browser.

Search

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png