ZOO-Project
service.h
Go to the documentation of this file.
1 /*
2  * Author : Gérald FENOY
3  *
4  * Copyright (c) 2009-2019 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_H
26 #define ZOO_SERVICE_H 1
27 
28 #pragma once
29 
30 #ifdef WIN32
31 #define ZOO_DLL_EXPORT __declspec( dllexport )
32 #else
33 #define ZOO_DLL_EXPORT
34 #endif
35 
36  // knut: add bool if necessary
37 #ifndef __cplusplus
38 #ifndef WIN32
39 #include <stdbool.h>
40 #else
41 typedef int bool;
42 #define false 0
43 #define true 1
44 #endif
45 #endif
46 #ifndef __bool_true_false_are_defined
47 #define __bool_true_false_are_defined 1
48 #endif
49 
50 #ifdef WIN32
51 #define strtok_r strtok_s
52 #define strncasecmp _strnicmp
53 #define strcasecmp _stricmp
54 #if defined(_MSC_VER) && _MSC_VER < 1900
55 #define snprintf _snprintf
56 #endif
57 #define zStrdup _strdup
58 #define zMkdir _mkdir
59 #define zGetpid _getpid
60 #define zOpen _open
61 #define zClose _close
62 #define zUnlink _unlink
63 #define zDup _dup
64 #define zDup2 _dup2
65 #define zWrite _write
66 #define zSleep Sleep
67 #include <sys/timeb.h>
68 struct ztimeval {
69  long tv_sec; /* seconds */
70  long tv_usec; /* and microseconds */
71 };
72 static int zGettimeofday(struct ztimeval* tp, void* tzp)
73 {
74  if (tp == 0) {
75  return -1;
76  }
77 
78  struct _timeb theTime;
79  _ftime(&theTime);
80  tp->tv_sec = theTime.time;
81  tp->tv_usec = theTime.millitm * 1000;
82 
83  return 0; // The gettimeofday() function shall return 0 on success
84 }
85 
86 #define zStatStruct struct _stati64
87 #define zStat _stati64
88 
89 #else
90 #include <sys/stat.h>
94 #define zStrdup strdup
95 
98 static int zMkdir(const char* pccPath){
99  return mkdir(pccPath,0777);
100 }
104 #define zOpen open
105 
108 #define zClose close
109 
112 #define zUnlink unlink
113 
116 #define zDup dup
117 
120 #define zDup2 dup2
121 
124 #define zWrite write
125 #include "unistd.h"
129 static int zSleep(const long millisecond){
130  return usleep(millisecond*1000);
131 }
135 #define zGettimeofday gettimeofday
136 
139 #define ztimeval timeval
140 
143 #define zGetpid getpid
144 
145 #define zStatStruct struct stat64
146 #define zStat stat64
147 
148 #endif
149 
150 #ifdef __cplusplus
151 extern "C" {
152 #endif
153 
154 #ifdef WIN32
155 #ifdef USE_MS
156 #include <mapserver.h>
157 #endif
158 #endif
159 #include <stdlib.h>
160 #include <ctype.h>
161 
162 #include <stdio.h>
163 
164 #include <string.h>
165 #ifndef WIN32
166 #include <ctype.h>
167 #include <stdbool.h>
168 #endif
169 
173 #define SERVICE_ACCEPTED 0
174 
177 #define SERVICE_STARTED 1
178 
181 #define SERVICE_PAUSED 2
182 
185 #define SERVICE_SUCCEEDED 3
186 
189 #define SERVICE_FAILED 4
190 
193 #define SERVICE_DISMISSED 5
194 
198 #define ELEMENTS_SIZE (sizeof(char*)+(((2*sizeof(char*))+sizeof(maps*))*3)+sizeof(char*)+((sizeof(map*) + sizeof(iotype*))*2)+(2*sizeof(elements*)))
199 
202 //#define MAP_SIZE (2*sizeof(char*))+sizeof(NULL) // knut: size of NULL pointer may be different from regular pointer (platform dependent)
203 #define MAP_SIZE (2*sizeof(char*))+sizeof(map*)
204 
207 //#define IOTYPE_SIZE MAP_SIZE+sizeof(NULL)
208 #define IOTYPE_SIZE sizeof(map*) + sizeof(iotype*)
209 
212 //#define MAPS_SIZE (2*sizeof(char*))+sizeof(map*)+MAP_SIZE
213 #define MAPS_SIZE sizeof(char*)+sizeof(map*)+(2*sizeof(maps*))
214 
217 //#define SERVICE_SIZE (ELEMENTS_SIZE*2)+(MAP_SIZE*2)+sizeof(char*)
218 #define SERVICE_SIZE sizeof(char*) + 3*sizeof(map*) + 2*sizeof(elements*)
219 
222 //#define SERVICES_SIZE SERVICE_SIZE+sizeof(services*)
223 #define SERVICES_SIZE sizeof(service*)+sizeof(services*)
224 
227 //#define REGISTRY_SIZE SERVICES_SIZE+sizeof(char*)
228 #define REGISTRY_SIZE sizeof(char*)+sizeof(services*)+sizeof(registry*)
229 
230 #define SHMSZ 27
231 
232 #include "version.h"
233 
234 #ifdef DEBUG_STACK
235  void debugStack(const char* file,const int line){
236  int stack;
237  fprintf(stderr,"stack %p (%s: %d) \n",&stack,file,line);
238  }
239 #endif
240 
244  typedef struct map{
245  char* name;
246  char* value;
247  struct map* next;
248  } map;
249 
250 #ifdef WIN32
251 #define NULLMAP ((map*) 0)
252 // knut: see new definition above
253 //#define bool int
254 //#define true 1
255 //#define false 0
256 #else
257 #define NULLMAP NULL
258 #endif
259 
265  typedef struct maps{
266  char* name;
267  struct map* content;
268  struct maps* child;
269  struct maps* next;
270  } maps;
271 
277  typedef struct iotype{
278  struct map* content;
279  struct iotype* next;
280  } iotype;
281 
287  typedef struct elements{
288  char* name;
289  struct map* content;
290  struct map* metadata;
291  struct map* additional_parameters;
292  char* format;
293  struct iotype* defaults;
294  struct iotype* supported;
295  struct elements* child;
296  struct elements* next;
297  } elements;
298 
302  typedef struct service{
303  char* name;
304  struct map* content;
305  struct map* metadata;
306  struct map* additional_parameters;
307  struct elements* inputs;
308  struct elements* outputs;
309  } service;
310 
314  typedef struct services{
315  struct service* content;
316  struct services* next;
317  } services;
318 
322  typedef struct registry{
323  char *name;
324  struct services* content;
325  struct registry* next;
326  } registry;
327 
328  // knut
330  /*
331  * StatusOK is not a WPS exception, it is added
332  * here for convenience.
333  */
335  /*
336  * See WPS 1.0 specification, Table 38 and Table 62.
337  */
346  /*
347  * See WPS 2.0 specification, Tables 41, 46, 48, and 50.
348  */
362  };
363 
364  static const char* const WPSExceptionCode[] = {
365  "StatusOK",
366  "MissingParameterValue",
367  "InvalidParameterValue",
368  "NoApplicableCode",
369  "NotEnoughStorage",
370  "ServerBusy",
371  "FileSizeExceeded",
372  "StorageNotSupported",
373  "VersionNegotiationFailed",
374  "NoSuchProcess",
375  "NoSuchMode",
376  "NoSuchInput",
377  "NoSuchOutput",
378  "DataNotAccessible",
379  "SizeExceeded",
380  "TooManyInputs",
381  "TooManyOutputs",
382  "NoSuchFormat",
383  "WrongInputData",
384  "InternalServerError",
385  "NoSuchJob",
386  "ResultNotReady"
387  };
388 
389  static const char* const WPSExceptionText[] = {
390  "No problem detected",
391  "Operation request does not include a parameter value, and this server did not declare a default value for that parameter.",
392  "Operation request contains an invalid parameter value.",
393  "No other exceptionCode specified by this service and server applies to this exception.",
394  "The server does not have enough space available to store the inputs and outputs associated with the request.",
395  "The server is too busy to accept and queue the request at this time.",
396  "The file size of one of the input parameters was too large for this process to handle.",
397  "Execute operation request included transmission=”reference” for one of the outputs, but storage is not offered by this server.",
398  "Service version for a ComplexData xlink:href input was not supported by the referenced server, and version negotiation failed.",
399  "One of the identifiers passed does not match with any of the processes offered by this server.",
400  "The process does not permit the desired execution mode.",
401  "One or more of the input identifiers passed does not match with any of the input identifiers of this process.",
402  "One or more of the output identifiers passed does not match with any of the input identifiers of this process.",
403  "One of the referenced input data sets was inaccessible.",
404  "The size of one of the input parameters was too large for this process to handle.",
405  "Too many input items have been specified.",
406  "Too many output items have been specified.",
407  "One or more of the input or output formats specified in the request did not match with any of the formats defined for that particular input or output.",
408  "One or more of inputs for which the service was able to retrieve the data but could not read it.",
409  "",
410  "The JobID from the request does not match any of the Jobs running on this server.",
411  "The result for the requested JobID has not yet been generated."
412  };
413 
414  ZOO_DLL_EXPORT void _dumpMap(map*);
415  ZOO_DLL_EXPORT void dumpMap(map*);
416  ZOO_DLL_EXPORT void dumpMaps(maps* m);
417  ZOO_DLL_EXPORT void dumpMapToFile(map*,FILE*); // (used only internally)
418  ZOO_DLL_EXPORT void dumpMapsToFile(maps*,char*,int);
419  ZOO_DLL_EXPORT map* createMap(const char*,const char*);
420  ZOO_DLL_EXPORT maps* createMaps(const char*);
421  ZOO_DLL_EXPORT int count(map*);
422  ZOO_DLL_EXPORT bool hasKey(map*,const char*);
423  ZOO_DLL_EXPORT maps* getMaps(maps*,const char*);
424  ZOO_DLL_EXPORT map* getMap(map*,const char*);
426  ZOO_DLL_EXPORT map* getMapFromMaps(maps*,const char*,const char*);
427  ZOO_DLL_EXPORT void freeMap(map**);
428  ZOO_DLL_EXPORT void freeMaps(maps** mo);
431  ZOO_DLL_EXPORT elements* createElements(const char*);
433  ZOO_DLL_EXPORT bool hasElement(elements*,const char*);
437  ZOO_DLL_EXPORT void setServiceName(service**,char*);
440  ZOO_DLL_EXPORT void addToMap(map*,const char*,const char*);
441  ZOO_DLL_EXPORT void addIntToMap(map*,const char*,const int);
442  ZOO_DLL_EXPORT void addIntToMapArray(map*,const char*,int,const int);
443  ZOO_DLL_EXPORT map* addToMapWithSize(map*,const char*,const char*,int);
446  ZOO_DLL_EXPORT map* getMapOrFill(map**,const char*,const char*);
447  ZOO_DLL_EXPORT bool contains(map*,map*);
449  ZOO_DLL_EXPORT void loadMapBinary(map**,map*,int);
453  ZOO_DLL_EXPORT map* getMapArray(map*,const char*,int);
454  ZOO_DLL_EXPORT void setMapArray(map*,const char*,int,const char*);
457  ZOO_DLL_EXPORT void setMapInMaps(maps*,const char*,const char*,const char*);
469  ZOO_DLL_EXPORT void inheritMap(map**,map*);
473  ZOO_DLL_EXPORT void mapsToCharXXX(maps*,char***);
474  ZOO_DLL_EXPORT void charxxxToMaps(char***,maps**);
475 #if defined(_MSC_VER) && _MSC_VER < 1800
476  // snprintf for Visual Studio compiler;
477  // it is also used by services (e.g., GetStatus), therefore exported to shared library
478  ZOO_DLL_EXPORT int snprintf(char *buffer, size_t n, const char *format, ...);
479 #endif
480 
481  // knut: some new utility functions; logMessage is primarily intended for debugging
483  ZOO_DLL_EXPORT bool hasvalue(maps* source, const char* node, const char* key, map** kvp);
484 #ifdef __cplusplus
485  ZOO_DLL_EXPORT void setErrorMessage(maps*& conf, const char* service, WPSException exc, const char* message = NULL);
486  ZOO_DLL_EXPORT void logMessage(const char* source, const char* function, int line, const char* file = NULL, const char* message = NULL);
487 #endif
488  #define zooLogMsg(file,message) logMessage(__FILE__, __func__, __LINE__, (file), (message))
489  #define zooLog logMessage(__FILE__, __func__, __LINE__)
490 
491  // knut : function for pre-allocated memory for a map value;
492  // processing algorithms may be able to write directly to this space, thereby avoiding unneccesary copying of data
493  ZOO_DLL_EXPORT char* allocateMapValue(map* node, size_t num_bytes);
494 
495 #ifdef __cplusplus
496 }
497 #endif
498 
499 #endif
ZOO_DLL_EXPORT void freeMap(map **)
Free allocated memory of a map.
Definition: service.c:325
ZOO_DLL_EXPORT void inheritance(registry *, service **)
Apply inheritance to a service based on a registry.
Definition: service.c:1614
ZOO_DLL_EXPORT void freeMaps(maps **mo)
Free allocated memory of a maps.
Definition: service.c:349
struct registry registry
Profile registry.
ZOO_DLL_EXPORT void dumpMapsToFile(maps *, char *, int)
Dump a maps to a file, see _dumpMapsToFile().
Definition: service.c:147
Definition: service.h:356
void logMessage(const char *pccSource, const char *pccFunction, int iLne, const char *pccFile, const char *pccMessage)
Print debug message.
Definition: service.c:1768
struct maps maps
linked list of map pointer
char * name
the maps name
Definition: main_conf_read.y:293
ZOO_DLL_EXPORT void freeIOType(iotype **)
Free allocated memory of an iotype.
Definition: service.c:411
char * format
the format: LiteralData or ComplexData or BoundingBoxData
Definition: main_conf_read.y:319
ZOO_DLL_EXPORT void dumpMap(map *)
Dump a map on stderr, see _dumpMap()
Definition: service.c:73
ZOO_DLL_EXPORT bool hasKey(map *, const char *)
Verify if a key exist in a map.
Definition: service.c:235
Definition: service.h:339
ZOO_DLL_EXPORT void addMapToIoType(iotype **, map *)
Add a map to iotype.
Definition: service.c:632
ZOO_DLL_EXPORT void setElementsName(elements **, char *)
Set the name of an elements.
Definition: service.c:1090
ZOO_DLL_EXPORT map * getMapArray(map *, const char *, int)
Access a specific map array element.
Definition: service.c:863
Definition: service.h:338
ZOO_DLL_EXPORT void inheritElements(elements **, elements *)
Apply inheritance to an out elements from a reference in elements.
Definition: service.c:1582
struct service * content
the content service pointer
Definition: main_conf_read.y:342
struct map * content
the content map
Definition: main_conf_read.y:305
#define ztimeval
The crossplatform timeval alias.
Definition: service.h:139
ZOO_DLL_EXPORT void addToElements(elements **, elements *)
Add an elements to another elements.
Definition: service.c:1301
ZOO_DLL_EXPORT void setServiceName(service **, char *)
Set the name of a service.
Definition: service.c:1316
Definition: service.h:360
ZOO_DLL_EXPORT map * getMap(map *, const char *)
Access a specific map.
Definition: service.c:273
ZOO_DLL_EXPORT bool hasvalue(maps *source, const char *node, const char *key, map **kvp)
Verify that a particular map value exists in a maps data structure, and obtain that value...
Definition: service.c:1732
Definition: service.h:334
ZOO_DLL_EXPORT map * getMapType(map *)
Access the map "type".
Definition: service.c:941
struct iotype * next
the pointer to the next iotype if any or NULL
Definition: main_conf_read.y:306
Definition: service.h:342
Definition: service.h:340
ZOO_DLL_EXPORT map * getMapFromMaps(maps *, const char *, const char *)
Access a specific map from a maps.
Definition: service.c:310
struct elements * inputs
the inputs elements
Definition: main_conf_read.y:334
struct map * metadata
the metadata map
Definition: main_conf_read.y:317
ZOO_DLL_EXPORT void dumpElementsAsYAML(elements *, int)
Dump an elements on stderr using the YAML syntaxe.
Definition: service.c:1149
ZOO_DLL_EXPORT bool contains(map *, map *)
Verify if a map is contained in another map.
Definition: service.c:672
char * value
the value
Definition: service.h:246
Definition: service.h:351
ZOO_DLL_EXPORT elements * createEmptyElements()
Create an empty elements.
Definition: service.c:1049
snprintf(current_maps->name,(strlen($1)+1),"%s", $1)
struct iotype * supported
the supported iotype
Definition: main_conf_read.y:321
ZOO_DLL_EXPORT void addMapsToMaps(maps **, maps *)
Add a maps at the end of another maps.
Definition: service.c:823
ZOO_DLL_EXPORT void _dumpMap(map *)
Dump a map on stderr.
Definition: service.c:58
ZOO_DLL_EXPORT iotype * createIoType()
Create a new iotype*.
Definition: service.c:159
struct registry * next
the next registry pointer
Definition: main_conf_read.y:352
ZOO_DLL_EXPORT service * getServiceFromRegistry(registry *, char *, char *)
Access a service in the registry.
Definition: service.c:1516
Definition: service.h:353
struct map map
KVP linked list.
Definition: service.h:344
ZOO_DLL_EXPORT void dumpMapToFile(map *, FILE *)
Dump a map to a file.
Definition: service.c:87
ZOO_DLL_EXPORT map * createMap(const char *, const char *)
Create a new map.
Definition: service.c:173
static const char *const WPSExceptionText[]
Definition: service.h:389
Definition: service.h:350
struct map * content
the content map
Definition: main_conf_read.y:294
struct elements * outputs
the outputs elements
Definition: main_conf_read.y:335
ZOO_DLL_EXPORT maps * createMaps(const char *)
Create a new maps with the given name.
Definition: service.c:187
ZOO_DLL_EXPORT elements * getElements(elements *, const char *)
Access a specific elements named key.
Definition: service.c:395
ZOO_DLL_EXPORT void addToMap(map *, const char *, const char *)
Add key value pair to an existing map.
Definition: service.c:518
Definition: service.h:361
Definition: service.h:349
ZOO_DLL_EXPORT bool nonempty(map *map)
Verify that a map has a value.
Definition: service.c:1716
Definition: service.h:359
linked list of map pointer
Definition: main_conf_read.y:292
ZOO_DLL_EXPORT void mapsToCharXXX(maps *, char ***)
Convert a maps to a char*** (only used for Fortran support)
Definition: service.c:1650
char * name
the name
Definition: main_conf_read.y:315
struct services services
Services chained list.
ZOO_DLL_EXPORT service * createService()
Allocate memory for a service.
Definition: service.c:471
ZOO_DLL_EXPORT char * allocateMapValue(map *node, size_t num_bytes)
Definition: service.c:1857
struct map * metadata
the metadata map
Definition: main_conf_read.y:332
ZOO_DLL_EXPORT bool hasElement(elements *, const char *)
Verify if an elements contains a name equal to the given key.
Definition: service.c:378
ZOO_DLL_EXPORT void addMapToMap(map **, map *)
Add a map at the end of another map.
Definition: service.c:602
ZOO_DLL_EXPORT bool addServiceToRegistry(registry **, char *, service *)
Add a service to the registry.
Definition: service.c:1433
ZOO_DLL_EXPORT maps * getMaps(maps *, const char *)
Access a specific maps.
Definition: service.c:255
char * name
the name
Definition: main_conf_read.y:350
struct service service
Metadata information about a full Service.
void setErrorMessage(maps *&pmsaConf, const char *pccService, WPSException weExc, const char *pccMessage)
Definition: service.c:1746
ZOO_DLL_EXPORT void dumpService(service *)
Dump a service on stderr.
Definition: service.c:1330
ZOO_DLL_EXPORT void dumpMaps(maps *m)
Dump a maps on stderr, see dumpMap().
Definition: service.c:100
KVP linked list.
Definition: service.h:244
ZOO_DLL_EXPORT void dumpRegistry(registry *)
Print the registry on stderr.
Definition: service.c:1412
ZOO_DLL_EXPORT void dumpElements(elements *)
Dump an elements on stderr.
Definition: service.c:1107
Definition: service.h:352
ZOO_DLL_EXPORT void freeRegistry(registry **)
Free memory allocated for the registry.
Definition: service.c:1490
ZOO_DLL_EXPORT void loadMapBinary(map **, map *, int)
Load binary values from a map (in) and add them to another map (out)
Definition: service.c:734
static int zMkdir(const char *pccPath)
The crossplatform mkdir alias.
Definition: service.h:98
ZOO_DLL_EXPORT void addIntToMap(map *, const char *, const int)
Add a key and an integer value to an existing map.
Definition: service.c:543
Definition: service.h:355
Metadata information about a full Service.
Definition: main_conf_read.y:329
struct services * content
the content services pointer
Definition: main_conf_read.y:351
struct elements elements
Metadata information about input or output.
Definition: service.h:345
ZOO_DLL_EXPORT elements * dupElements(elements *)
Duplicate an elements.
Definition: service.c:1233
ZOO_DLL_EXPORT void charxxxToMaps(char ***, maps **)
Convert a char*** to a maps (only used for Fortran support)
Definition: service.c:1686
ZOO_DLL_EXPORT void dumpServiceAsYAML(service *)
Dump a service on stderr using the YAML syntaxe.
Definition: service.c:1360
char * name
the key
Definition: service.h:245
Profile registry.
Definition: main_conf_read.y:349
Not named linked list.
Definition: main_conf_read.y:304
struct maps * next
the pointer to the next maps if any or NULL
Definition: main_conf_read.y:296
struct maps * child
the child maps
Definition: main_conf_read.y:295
Definition: service.h:341
static const char *const WPSExceptionCode[]
Definition: service.h:364
struct map * additional_parameters
the additional parameters map
Definition: main_conf_read.y:333
ZOO_DLL_EXPORT int addMapsArrayToMaps(maps **, maps *, char *)
Add a Maps containing a MapArray to a Maps.
Definition: service.c:964
Definition: service.h:343
ZOO_DLL_EXPORT map * getMapOrFill(map **, const char *, const char *)
Access a specific map or set its value.
Definition: service.c:651
struct map * next
the pointer to the next map if any or NULL
Definition: service.h:247
ZOO_DLL_EXPORT map * addToMapWithSize(map *, const char *, const char *, int)
Add a key and a binary value to an existing map.
Definition: service.c:570
ZOO_DLL_EXPORT void inheritMap(map **, map *)
Apply inheritance to an out map from a reference in map.
Definition: service.c:1539
struct iotype * defaults
the default iotype
Definition: main_conf_read.y:320
ZOO_DLL_EXPORT void freeService(service **)
Free allocated memory of a service.
Definition: service.c:488
struct elements * next
the pointer to the next element if any (or NULL)
Definition: main_conf_read.y:323
struct iotype iotype
Not named linked list.
#define ZOO_DLL_EXPORT
Definition: service.h:33
ZOO_DLL_EXPORT void setMapArray(map *, const char *, int, const char *)
Add a key value in a MapArray for a specific index.
Definition: service.c:890
#define zGettimeofday
The crossplatform gettimeofday alias.
Definition: service.h:135
Metadata information about input or output.
Definition: main_conf_read.y:314
struct map * content
the content map
Definition: main_conf_read.y:316
ZOO_DLL_EXPORT void addIntToMapArray(map *, const char *, int, const int)
Add a key and an integer value to an existing map array.
Definition: service.c:928
ZOO_DLL_EXPORT int count(map *)
Count number of map in a map.
Definition: service.c:202
ZOO_DLL_EXPORT elements * createElements(const char *)
Create a named elements.
Definition: service.c:1069
ZOO_DLL_EXPORT iotype * getIoTypeFromElement(elements *, char *, map *)
Access a specific iotype from an elements.
Definition: service.c:698
ZOO_DLL_EXPORT void setMapInMaps(maps *, const char *, const char *, const char *)
Set a key value pair to a map contained in a Maps.
Definition: service.c:1020
Definition: service.h:357
char * name
the name
Definition: main_conf_read.y:330
ZOO_DLL_EXPORT void inheritIOType(iotype **, iotype *)
Apply inheritance to an out iotype from a reference in iotype.
Definition: service.c:1559
ZOO_DLL_EXPORT map * getLastMap(map *)
Access the last map.
Definition: service.c:291
ZOO_DLL_EXPORT void loadMapBinaries(map **, map *)
Load binary values from a map (in) and add them to another map (out).
Definition: service.c:769
WPSException
Definition: main_conf_read.y:356
struct elements * child
the pointer to the children element if any (or NULL)
Definition: main_conf_read.y:322
ZOO_DLL_EXPORT service * dupService(service *)
Duplicate a service.
Definition: service.c:1393
Definition: service.h:354
struct map * content
the content map
Definition: main_conf_read.y:331
struct map * additional_parameters
the additional parameters map
Definition: main_conf_read.y:318
struct services * next
the pointer to the next services*
Definition: main_conf_read.y:343
static int zSleep(const long millisecond)
The crossplatform sleep alias.
Definition: service.h:129
ZOO_DLL_EXPORT void freeElements(elements **)
Free allocated memory of an elements.
Definition: service.c:429
Definition: service.h:358
Services chained list.
Definition: main_conf_read.y:341
ZOO_DLL_EXPORT maps * dupMaps(maps **)
Duplicate a Maps.
Definition: service.c:797
pair PAIR FOUND n
Definition: service_conf.y:1113