source: trunk/zoo-project/zoo-kernel/service_internal.h @ 467

Last change on this file since 467 was 467, checked in by djay, 10 years ago

Various fixes for tickets #93, #94, #95, #95, #96.

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/x-chdr
File size: 4.3 KB
RevLine 
[1]1/**
2 * Author : Gérald FENOY
3 *
[392]4 * Copyright (c) 2009-2013 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
[467]44#include "cgic.h"
[216]45#include <direct.h>
46#endif
[26]47#include <stdio.h>
[1]48#include <time.h>
49#include <ctype.h>
[453]50#ifdef WIN32
51#ifndef USE_RUBY
52#include <unistd.h>
53#endif
54#endif
[1]55#ifndef WIN32
56#include <xlocale.h>
57#endif
58#include "service.h"
59#include <openssl/sha.h>
[291]60#include <openssl/md5.h>
[1]61#include <openssl/hmac.h>
62#include <openssl/evp.h>
63#include <openssl/bio.h>
64#include <openssl/buffer.h>
65
[281]66#include "ulinet.h"
[253]67
[114]68extern   int conf_read(const char*,maps*);
[1]69
[26]70#ifdef USE_JS
[364]71#ifdef WIN32
72#define XP_WIN 1
73#else
[26]74#define XP_UNIX 0
[364]75#endif
[26]76#include "service_internal_js.h"
77#endif
78
[453]79
[1]80#ifdef __cplusplus
81extern "C" {
82#endif
83#include <libxml/parser.h>
[280]84#include <libxml/xpath.h>
85
[1]86  static char* SERVICE_URL;
[280]87  static xmlNsPtr usedNs[10];
88  static char* nsName[10];
[9]89  static int nbNs=0;
[1]90
[465]91  int getServiceFromYAML(maps*,char*,service**,char *name);
92  int readServiceFile(maps*, char*,service**,char *);
93 
94
[375]95  void printHeaders(maps*);
[216]96  void unhandleStatus(maps*);
97  void updateStatus(maps*);
[26]98  char* getStatus(int);
[9]99
[26]100#ifdef USE_JS
101  char* JSValToChar(JSContext*,jsval*);
[274]102  JSBool JSUpdateStatus(JSContext*,uintN,jsval *);
[26]103#endif
104 
[1]105  void URLDecode(char *);
106  char *url_encode(char *);
[328]107  char *url_decode(char *);
[9]108  char* getEncoding(maps*);
109
[114]110  int zooXmlSearchForNs(const char*);
111  int zooXmlAddNs(xmlNodePtr,const char*,const char*);
[9]112  void zooXmlCleanupNs();
[1]113 
114  void printExceptionReportResponse(maps*,map*);
[26]115  xmlNodePtr createExceptionReportNode(maps*,map*,int);
[114]116  void printProcessResponse(maps*,map*,int,service*,const char*,int,maps*,maps*);
117  xmlNodePtr printGetCapabilitiesHeader(xmlDocPtr,const char*,maps*);
[1]118  void printGetCapabilitiesForProcess(maps*,xmlNodePtr,service*);
[114]119  xmlNodePtr printDescribeProcessHeader(xmlDocPtr,const char*,maps*);
[9]120  void printDescribeProcessForProcess(maps*,xmlNodePtr,service*,int);
[114]121  void printFullDescription(elements*,const char*,xmlNsPtr,xmlNodePtr);
[9]122  void printDocument(maps*,xmlDocPtr,int);
[114]123  void printDescription(xmlNodePtr,xmlNsPtr,const char*,map*);
124  void printIOType(xmlDocPtr,xmlNodePtr,xmlNsPtr,xmlNsPtr,xmlNsPtr,elements*,maps*,const char*);
125  map* parseBoundingBox(const char*);
[76]126  void printBoundingBox(xmlNsPtr,xmlNodePtr,map*);
127  void printBoundingBoxDocument(maps*,maps*,FILE*);
[114]128  void printOutputDefinitions1(xmlDocPtr,xmlNodePtr,xmlNsPtr,xmlNsPtr,elements*,maps*,const char*);
[1]129 
130  void outputResponse(service*,maps*,maps*,map*,int,maps*,int);
131
[216]132  char *base64(const char*,int);
133  char *base64d(const char*,int,int*);
[88]134  void ensureDecodedBase64(maps**);
[1]135
[63]136  char* addDefaultValues(maps**,elements*,maps*,int);
[1]137
[459]138  int errorException(maps *, const char *, const char *, const char*);
[9]139
[280]140  int checkForSoapEnvelope(xmlDocPtr);
141
[446]142  void addToCache(maps*,char*,char*,char*,int);
[280]143  char* isInCache(maps*,char*);
[364]144  int loadRemoteFile(maps*,map*,HINTERNET,char*);
[392]145
[1]146#ifdef __cplusplus
147}
148#endif
149
150#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