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

Last change on this file since 26 was 26, checked in by djay, 14 years ago

ZOO-Kernel updates and bug fixes :

  • Fixing gestion of RawDataOutput? when the Service return SERVICE_FAILED an ExceptionReport? was returned to the client.
  • Use gcc when compiling service_internal.c to avoid strange error messages about switch ....
  • Function setMapInMaps was added in service.h to let users set the value of a specific map in a maps.
  • Fixing JavaScript? issue during the context destruction process.
  • Use the GetStatus? ZOO Service when it is available on the local installation for statusLocation.
  • Add some comments for ServiceStarted?, ServiceSucceeded?, ServiceFailed? and ServiceAccepted?.
  • Dynamic creation of a lenv maps in the main configuration file maps, containing the current status and a sid (Service ID). Those informations can be used later by the GetStatus? Service to let user check the on-going status during the Service runs.
  • Function updateStatus was added to service_internal.h which let the Services developers set the current percentCompleted value.

ZOO-Service updates and bug fixes :

  • Add GetStatus? Service and its demo longProcess Service. All are in the wps_status.zo Services Provider.
  • Use the setMapInMaps in the base-vect-ops code to enhance readibility.

ZOO-API updates :

  • Add the function ZOO.UpdateStatus? to the ZOO JavaScript? API which simply point on ZOOUpdateStatus which can be called as-is from JavaScript?. Use : ZOOUpdateStatus(conf,value) where conf is the main configuration file maps and value the the value of the current status.
File size: 3.4 KB
Line 
1/**
2 * Author : Gérald FENOY
3 *
4 * Copyright (c) 2009-2010 GeoLabs SARL
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
30#define DEFAULT_SERVICE_URL "http://dev.geolabs.fr/zoo-wps/"
31#define TIME_SIZE 40
32
33#include <sys/stat.h>
34#include <sys/types.h>
35#include <sys/ipc.h>
36#include <sys/shm.h>
37#include <stdio.h>
38#include <unistd.h>
39#include <time.h>
40#include <ctype.h>
41#ifndef WIN32
42#include <xlocale.h>
43#endif
44#include "service.h"
45#include <openssl/sha.h>
46#include <openssl/hmac.h>
47#include <openssl/evp.h>
48#include <openssl/bio.h>
49#include <openssl/buffer.h>
50
51extern   int getServiceFromFile(char*,service**);
52extern   int conf_read(char*,maps*);
53
54#ifdef USE_JS
55#define XP_UNIX 0
56#include "service_internal_js.h"
57#endif
58
59#ifdef __cplusplus
60extern "C" {
61#endif
62#include <libxml/parser.h>
63  static char* SERVICE_URL;
64  static xmlNsPtr usedNs[5];
65  static char* nsName[5];
66  static int nbNs=0;
67
68  void* unhandleStatus(maps*);
69  void* updateStatus(maps*);
70  char* getStatus(int);
71
72#ifdef USE_JS
73  char* JSValToChar(JSContext*,jsval*);
74  JSBool JSUpdateStatus(JSContext*,JSObject*,uintN,jsval *,jsval *);
75#endif
76 
77  void URLDecode(char *);
78  char *url_encode(char *);
79  char* getEncoding(maps*);
80
81  int zooXmlSearchForNs(char*);
82  int zooXmlAddNs(xmlNodePtr,char*,char*);
83  void zooXmlCleanupNs();
84 
85  void printExceptionReportResponse(maps*,map*);
86  xmlNodePtr createExceptionReportNode(maps*,map*,int);
87  void printProcessResponse(maps*,map*,int,service*,char*,int,maps*,maps*);
88  xmlNodePtr printGetCapabilitiesHeader(xmlDocPtr,char*,maps*);
89  void printGetCapabilitiesForProcess(maps*,xmlNodePtr,service*);
90  xmlNodePtr printDescribeProcessHeader(xmlDocPtr,char*,maps*);
91  void printDescribeProcessForProcess(maps*,xmlNodePtr,service*,int);
92  void printDocument(maps*,xmlDocPtr,int);
93  void printDescription(xmlNodePtr,xmlNsPtr,char*,map*);
94  void printIOType(xmlDocPtr,xmlNodePtr,xmlNsPtr,xmlNsPtr,elements*,maps*,char*);
95  void printOutputDefinitions1(xmlDocPtr,xmlNodePtr,xmlNsPtr,xmlNsPtr,elements*,maps*,char*);
96 
97  void outputResponse(service*,maps*,maps*,map*,int,maps*,int);
98
99  char *base64(const unsigned char*,int);
100
101  char* addDefaultValues(maps**,elements*,maps*,char*);
102
103  /*defined in zoo_loader.c*/ 
104  int errorException(maps *m, const char *message, const char *errorcode);
105
106#ifdef __cplusplus
107}
108#endif
109
110#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