Go to the documentation of this file.
26 #define ZOO_SERVICE_H 1
32 #define ZOO_DLL_EXPORT __declspec( dllexport )
34 #define ZOO_DLL_EXPORT
38 #define zDateFormat "%Y-%m-%dT%H:%M:%SZ"
41 #define zLogDateFormat "%Y-%m-%d %H:%M:%S"
54 #ifndef __bool_true_false_are_defined
55 #define __bool_true_false_are_defined 1
59 #define strtok_r strtok_s
60 #define strncasecmp _strnicmp
61 #define strcasecmp _stricmp
62 #if defined(_MSC_VER) && _MSC_VER < 1900
63 #define snprintf _snprintf
65 #define zStrdup _strdup
67 #define zGetpid _getpid
70 #define zUnlink _unlink
75 #define zGetCwd _getcwd
76 #include <sys/timeb.h>
88 struct _timeb theTime;
90 tp->tv_sec = theTime.time;
91 tp->tv_usec = theTime.millitm * 1000;
96 #define zStatStruct struct _stati64
97 #define zStat _stati64
100 #include <sys/stat.h>
104 #define zStrdup strdup
109 return mkdir(pccPath,0777);
122 #define zUnlink unlink
139 static int zSleep(
const long millisecond){
140 return usleep(millisecond*1000);
145 #define zGettimeofday gettimeofday
149 #define ztimeval timeval
153 #define zGetpid getpid
155 #define zStatStruct struct stat64
158 #define zGetCwd getcwd
168 #include <mapserver.h>
186 #define SERVICE_ACCEPTED 0
190 #define SERVICE_STARTED 1
194 #define SERVICE_PAUSED 2
198 #define SERVICE_SUCCEEDED 3
202 #define SERVICE_FAILED 4
206 #define SERVICE_DISMISSED 5
210 #define SERVICE_DEPLOYED 6
214 #define SERVICE_UNDEPLOYED 7
224 #define ZOO_DEBUG_LEVEL_TRACE 0
228 #define ZOO_DEBUG_LEVEL_DEBUG 1
232 #define ZOO_DEBUG_LEVEL_INFO 2
236 #define ZOO_DEBUG_LEVEL_SUCCESS 3
240 #define ZOO_DEBUG_LEVEL_WARNING 4
244 #define ZOO_DEBUG_LEVEL_ERROR 5
248 #define ZOO_DEBUG_LEVEL_FATAL 6
295 #define ZOO_DEBUG(message) _ZOO_DEBUG(message,__FILE__,__func__,__LINE__)
328 #define ZOO_COLOR_START "\e[0;"
333 #define ZOO_COLOR_START_BOLD "\e[1;"
338 #define ZOO_COLOR_STANDARD "3"
343 #define ZOO_COLOR_HIGH_INTENSITY "9"
345 #define ZOO_COLOR_BLACK "0m"
346 #define ZOO_COLOR_RED "1m"
347 #define ZOO_COLOR_GREEN "2m"
348 #define ZOO_COLOR_YELLOW "3m"
349 #define ZOO_COLOR_BLUE "4m"
350 #define ZOO_COLOR_MAGENTA "5m"
351 #define ZOO_COLOR_CYAN "6m"
352 #define ZOO_COLOR_WHITE "7m"
354 #define ZOO_COLOR_START_BACKGROUND "\e[4"
355 #define ZOO_COLOR_START_BACKGROUND_HIGH_INTENSITY "\e[0;10"
357 #define ZOO_COLOR_RESET "\e[0m"
383 #define _ZOO_DEBUG(message,pccFile,pccFunc,iLine) \
385 if(iZooLogLevel<=iMinZooLogLevel)\
388 int iSaTTY=isatty(2); \
389 const struct tm *pcsTm; \
392 struct ztimeval sztv; \
393 ttNow = time ( NULL ); \
394 pcsTm = localtime ( &ttNow ); \
395 char* pcaLocalTime = (char*)malloc((TIME_SIZE+1)*sizeof(char)); \
396 zGettimeofday(&sztv, NULL); \
397 int iMillisec = int(sztv.tv_usec/1000.0); \
398 if (iMillisec>=1000) { \
402 stLen = strftime ( pcaLocalTime, TIME_SIZE, zLogDateFormat, pcsTm ); \
403 char pcExtra[8]={0}; \
406 for(int iCnt=strlen(pccLogLevel[iZooLogLevel]);iCnt<8;iCnt++){ \
407 pcExtra[iCounter]=' '; \
410 char* pcaFormated=NULL; \
411 char acFormated[64]={0}; \
413 int aiTypes[7]={0,0,0,0,0,0,0}; \
414 int iInternalCnt=0; \
415 for(int iCnt=0;iCnt<strlen(ZOO_LOG_FORMAT);iCnt++){ \
416 if(ZOO_LOG_FORMAT[iCnt]=='%'){ \
417 int iLen=strlen(acFormated); \
418 acFormated[iLen]=ZOO_LOG_FORMAT[iCnt]; \
419 acFormated[iLen+1]='s'; \
420 const char* pcColor="\e[0;97m"; \
421 switch(iZooLogLevel){ \
422 case ZOO_DEBUG_LEVEL_TRACE:\
423 pcColor=ZOO_COLOR_START_BOLD\
427 case ZOO_DEBUG_LEVEL_DEBUG:\
428 pcColor=ZOO_COLOR_START_BOLD\
429 ZOO_COLOR_HIGH_INTENSITY\
432 case ZOO_DEBUG_LEVEL_INFO:\
433 pcColor=ZOO_COLOR_START_BOLD\
434 ZOO_COLOR_HIGH_INTENSITY\
437 case ZOO_DEBUG_LEVEL_SUCCESS:\
438 pcColor=ZOO_COLOR_START_BOLD\
439 ZOO_COLOR_HIGH_INTENSITY\
442 case ZOO_DEBUG_LEVEL_WARNING:\
443 pcColor=ZOO_COLOR_START_BOLD\
444 ZOO_COLOR_HIGH_INTENSITY\
447 case ZOO_DEBUG_LEVEL_ERROR:\
448 pcColor=ZOO_COLOR_START_BOLD\
449 ZOO_COLOR_HIGH_INTENSITY\
452 case ZOO_DEBUG_LEVEL_FATAL:\
453 pcColor=ZOO_COLOR_START_BACKGROUND\
455 ZOO_COLOR_START_BOLD\
456 ZOO_COLOR_HIGH_INTENSITY\
460 if(ZOO_LOG_FORMAT[iCnt+1]=='d'){ \
462 apcaArgv[iInternalCnt]=(char*) malloc(37*sizeof(char)); \
464 sprintf(apcaArgv[iInternalCnt],\
465 ZOO_COLOR_START_BOLD\
470 pcaLocalTime,iMillisec); \
472 sprintf(apcaArgv[iInternalCnt],"%s.%03d",pcaLocalTime,iMillisec); \
474 else if(ZOO_LOG_FORMAT[iCnt+1]=='l'){ \
476 apcaArgv[iInternalCnt]=(char*) malloc(36*sizeof(char)); \
478 sprintf(apcaArgv[iInternalCnt],\
482 pccLogLevel[iZooLogLevel],\
485 sprintf(apcaArgv[iInternalCnt],"%s %s",pccLogLevel[iZooLogLevel],pcExtra); \
487 else if(ZOO_LOG_FORMAT[iCnt+1]=='p'){ \
489 apcaArgv[iInternalCnt]=(char*) malloc(10*sizeof(char)); \
490 sprintf(apcaArgv[iInternalCnt],"%d",getpid()); \
492 else if(ZOO_LOG_FORMAT[iCnt+1]=='f'){ \
494 apcaArgv[iInternalCnt]=(char*) malloc((strlen(pccFile)+8)*sizeof(char)); \
496 sprintf(apcaArgv[iInternalCnt],\
503 sprintf(apcaArgv[iInternalCnt],"%s",pccFile); \
505 else if(ZOO_LOG_FORMAT[iCnt+1]=='u'){ \
507 apcaArgv[iInternalCnt]=(char*) malloc((strlen(pccFunc)+1)*sizeof(char)); \
508 sprintf(apcaArgv[iInternalCnt],"%s",pccFunc); \
510 else if(ZOO_LOG_FORMAT[iCnt+1]=='i'){ \
512 apcaArgv[iInternalCnt]=(char*) malloc(14*sizeof(char)); \
514 sprintf(apcaArgv[iInternalCnt],\
519 sprintf(apcaArgv[iInternalCnt],"%d",iLine); \
521 else if(ZOO_LOG_FORMAT[iCnt+1]=='m'){ \
523 apcaArgv[iInternalCnt]=(char*) malloc((strlen(message)+25)*sizeof(char)); \
525 sprintf(apcaArgv[iInternalCnt],\
530 sprintf(apcaArgv[iInternalCnt],"%s",message); \
536 if(acFormated[0]!=0)\
537 iLen=strlen(acFormated);\
538 acFormated[iLen]=ZOO_LOG_FORMAT[iCnt];\
539 acFormated[iLen+1]=0;\
543 switch(iInternalCnt) {\
545 fprintf(stderr,(char*)acFormated,\
550 fprintf(stderr,(char*)acFormated,\
556 fprintf(stderr,(char*)acFormated,\
563 fprintf(stderr,(char*)acFormated,\
571 fprintf(stderr,(char*)acFormated,\
580 fprintf(stderr,(char*)acFormated,\
590 fprintf(stderr,(char*)acFormated,\
602 free(pcaLocalTime); \
603 for(int iCnt=iInternalCnt-1;iCnt>=0;iCnt--){ \
604 free(apcaArgv[iCnt]); \
611 #define ELEMENTS_SIZE (sizeof(char*)+(((2*sizeof(char*))+sizeof(maps*))*3)+sizeof(char*)+((sizeof(map*) + sizeof(iotype*))*2)+(2*sizeof(elements*)))
616 #define MAP_SIZE (2*sizeof(char*))+sizeof(map*)
621 #define IOTYPE_SIZE sizeof(map*) + sizeof(iotype*)
626 #define MAPS_SIZE sizeof(char*)+sizeof(map*)+(2*sizeof(maps*))
631 #define SERVICE_SIZE sizeof(char*) + 3*sizeof(map*) + 2*sizeof(elements*)
636 #define SERVICES_SIZE sizeof(service*)+sizeof(services*)
641 #define REGISTRY_SIZE sizeof(char*)+sizeof(services*)+sizeof(registry*)
648 void debugStack(
const char* file,
const int line){
650 fprintf(stderr,
"stack %p (%s: %d) \n",&stack,file,line);
664 #define NULLMAP ((map*) 0)
752 "SERVICE_UNDEPLOYED",
798 "MissingParameterValue",
799 "InvalidParameterValue",
804 "StorageNotSupported",
805 "VersionNegotiationFailed",
816 "InternalServerError",
819 "InvalidQueryParameterValue",
822 "UnsupportedMediaType",
862 "invalid-query-parameter-value",
863 "duplicated-process",
865 "unsupported-media-type",
875 "application/cwl+yaml",
876 "application/ogcapppkg+json",
885 "No problem detected",
886 "Operation request does not include a parameter value, and this server did not declare a default value for that parameter.",
887 "Operation request contains an invalid parameter value.",
888 "No other exceptionCode specified by this service and server applies to this exception.",
889 "The server does not have enough space available to store the inputs and outputs associated with the request.",
890 "The server is too busy to accept and queue the request at this time.",
891 "The file size of one of the input parameters was too large for this process to handle.",
892 "Execute operation request included transmission=”reference” for one of the outputs, but storage is not offered by this server.",
893 "Service version for a ComplexData xlink:href input was not supported by the referenced server, and version negotiation failed.",
894 "One of the identifiers passed does not match with any of the processes offered by this server.",
895 "The process does not permit the desired execution mode.",
896 "One or more of the input identifiers passed does not match with any of the input identifiers of this process.",
897 "One or more of the output identifiers passed does not match with any of the input identifiers of this process.",
898 "One of the referenced input data sets was inaccessible.",
899 "The size of one of the input parameters was too large for this process to handle.",
900 "Too many input items have been specified.",
901 "Too many output items have been specified.",
902 "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.",
903 "One or more of inputs for which the service was able to retrieve the data but could not read it.",
905 "The JobID from the request does not match any of the Jobs running on this server.",
906 "The result for the requested JobID has not yet been generated."
979 #if defined(_MSC_VER) && _MSC_VER < 1800
990 ZOO_DLL_EXPORT void logMessage(
const char* source,
const char*
function,
int line,
const char* file = NULL,
const char* message = NULL);
992 #define zooLogMsg(file,message) logMessage(__FILE__, __func__, __LINE__, (file), (message))
993 #define zooLog logMessage(__FILE__, __func__, __LINE__)
1007 #ifdef LOG_CONSOLE_ENABLED
1008 void logConsoleMessage(
const char*);
ZOO_DLL_EXPORT void freeIOType(iotype **)
Free allocated memory of an iotype.
Definition: service.c:471
@ NoSuchInput
Definition: service.h:779
struct services services
Services chained list.
@ NoSuchOutput
Definition: service.h:780
ZOO_DLL_EXPORT maps * dupMaps(maps **)
Duplicate a Maps.
Definition: service.c:936
ZOO_DLL_EXPORT void addMapToIoType(iotype **, map *)
Add a map to iotype.
Definition: service.c:765
@ NoSuchMode
Definition: service.h:778
Not named linked list.
Definition: service.h:690
ZOO_DLL_EXPORT void inheritIOType(iotype **, iotype *)
Apply inheritance to an out iotype from a reference in iotype.
Definition: service.c:1716
static const char * ZOO_STATUS[]
Statuses list.
Definition: service.h:744
ZOO_DLL_EXPORT void freeMap(map **)
Free allocated memory of a map.
Definition: service.c:385
ZOO_DLL_EXPORT map * getLastMap(map *)
Access the last map.
Definition: service.c:351
@ FileSizeExceeded
Definition: service.h:771
ZOO_DLL_EXPORT void dumpMapsToFile(maps *, char *, int)
Dump a maps to a file, see _dumpMapsToFile().
Definition: service.c:147
@ NotEnoughStorage
Definition: service.h:769
struct elements * next
the pointer to the next element if any (or NULL)
Definition: service.h:709
@ TooManyOutputs
Definition: service.h:784
ZOO_DLL_EXPORT void freeMaps(maps **mo)
Free allocated memory of a maps.
Definition: service.c:409
static const char *const OAPIPExceptionCode[]
OGC API - Processes exception codes.
Definition: service.h:858
ZOO_DLL_EXPORT bool hasKey(map *, const char *)
Verify if a key exist in a map.
Definition: service.c:295
@ TooManyInputs
Definition: service.h:783
pair PAIR FOUND n
Definition: service_conf.y:613
struct map * content
the content map
Definition: service.h:702
ZOO_DLL_EXPORT map * getMapArray(map *, const char *, int)
Access a specific map array element.
Definition: service.c:998
@ NoSuchProcess
Definition: service.h:777
ZOO_DLL_EXPORT map * getMap(map *, const char *)
Access a specific map.
Definition: service.c:333
ZOO_DLL_EXPORT void addToElements(elements **, elements *)
Add an elements to another elements.
Definition: service.c:1458
ZOO_DLL_EXPORT void inheritElements(elements **, elements *)
Apply inheritance to an out elements from a reference in elements.
Definition: service.c:1739
ZOO_DLL_EXPORT void setServiceName(service **, char *)
Set the name of a service.
Definition: service.c:1473
ZOO_DLL_EXPORT void dumpMapToFile(map *, FILE *)
Dump a map to a file.
Definition: service.c:87
void logMessage(const char *pccSource, const char *pccFunction, int iLne, const char *pccFile, const char *pccMessage)
Print debug message.
Definition: service.c:1925
@ ServerBusy
Definition: service.h:770
char * value
the value
Definition: service.h:659
@ ResultNotReady
Definition: service.h:789
snprintf(current_maps->name,(strlen($1)+1),"%s", $1)
ZOO_DLL_EXPORT void addMapsToMaps(maps **, maps *)
Add a maps at the end of another maps.
Definition: service.c:963
ZOO_DLL_EXPORT void dumpMap(map *)
Dump a map on stderr, see _dumpMap()
Definition: service.c:73
Metadata information about a full Service.
Definition: service.h:715
struct service * content
the content service pointer
Definition: service.h:728
Metadata information about input or output.
Definition: service.h:700
struct map * additional_parameters
the additional parameters map
Definition: service.h:719
@ VersionNegotiationFailed
Definition: service.h:773
ZOO_DLL_EXPORT char * getMapArrayKey(map *, const char *, int)
Get the key name for a specific map array element.
Definition: service.c:1025
struct registry registry
Profile registry.
static const int OAPIPExceptionLimits[1][2]
OGC API - Processes exception limits.
Definition: service.h:850
struct maps maps
linked list of map pointer
#define ztimeval
The crossplatform timeval alias.
Definition: service.h:149
ZOO_DLL_EXPORT elements * createEmptyElements()
Create an empty elements.
Definition: service.c:1206
@ NoSuchFormat
Definition: service.h:785
ZOO_DLL_EXPORT int zooDebugPrint(const char *format,...)
@ StorageNotSupported
Definition: service.h:772
static const char * pccLogLevel[7]
The global log level names.
Definition: service.h:253
ZOO_DLL_EXPORT map * getMapType(map *)
Access the map "type".
Definition: service.c:1098
ZOO_DLL_EXPORT map * getMapFromMaps(maps *, const char *, const char *)
Access a specific map from a maps.
Definition: service.c:370
struct services * next
the pointer to the next services*
Definition: service.h:729
ZOO_DLL_EXPORT bool addServiceToRegistry(registry **, char *, service *)
Add a service to the registry.
Definition: service.c:1590
ZOO_DLL_EXPORT bool compareCnt(maps *, const char *, const char *)
Compare a value with conf / lenv / serviceCnt.
Definition: service.c:2179
ZOO_DLL_EXPORT iotype * createIoType()
Create a new iotype*.
Definition: service.c:159
struct iotype * supported
the supported iotype
Definition: service.h:707
@ WrongInputData
Definition: service.h:786
char * name
the name
Definition: service.h:736
ZOO_DLL_EXPORT void _dumpMap(map *)
Dump a map on stderr.
Definition: service.c:58
ZOO_DLL_EXPORT void dumpElementsAsYAML(elements *, int)
Dump an elements on stderr using the YAML syntaxe.
Definition: service.c:1306
ZOO_DLL_EXPORT bool contains(map *, map *)
Verify if a map is contained in another map.
Definition: service.c:807
char * name
the name
Definition: service.h:701
struct elements * outputs
the outputs elements
Definition: service.h:721
ZOO_DLL_EXPORT map * createMap(const char *, const char *)
Create a new map.
Definition: service.c:173
ZOO_DLL_EXPORT char * allocateMapValue(map *node, size_t num_bytes)
Definition: service.c:2051
struct map map
KVP linked list.
ZOO_DLL_EXPORT int countMapName(map *, const char *)
Count number of a specific map in a map.
Definition: service.c:234
static const int OAPIPCorrespondances[8][2]
WPS exception codes to OGC API - Processes ones.
Definition: service.h:830
ZOO_DLL_EXPORT bool hasElement(elements *, const char *)
Verify if an elements contains a name equal to the given key.
Definition: service.c:438
static const char *const WPSExceptionText[]
WPS exception text (associated with the exception code)
Definition: service.h:884
ZOO_DLL_EXPORT void addMapToMap(map **, map *)
Add a map at the end of another map.
Definition: service.c:735
struct services * content
the content services pointer
Definition: service.h:737
struct iotype iotype
Not named linked list.
ZOO_DLL_EXPORT void addIntToMapArray(map *, const char *, int, const unsigned long)
Add a key and an integer value to an existing map array.
Definition: service.c:1085
@ DataNotAccessible
Definition: service.h:781
ZOO_DLL_EXPORT service * getServiceFromRegistry(registry *, char *, char *)
Access a service in the registry.
Definition: service.c:1673
ZOO_DLL_EXPORT int countMapNameValue(map *, const char *)
Count number of a specific map value in a map.
Definition: service.c:251
ZOO_DLL_EXPORT void dumpService(service *)
Dump a service on stderr.
Definition: service.c:1487
struct maps * next
the pointer to the next maps if any or NULL
Definition: service.h:682
ZOO_DLL_EXPORT bool nonempty(map *map)
Verify that a map has a value.
Definition: service.c:1873
ZOO_DLL_EXPORT void freeRegistry(registry **)
Free memory allocated for the registry.
Definition: service.c:1647
@ MissingParameterValue
Definition: service.h:766
ZOO_DLL_EXPORT void dumpMaps(maps *m)
Dump a maps on stderr, see dumpMap().
Definition: service.c:100
static int zMkdir(const char *pccPath)
The crossplatform mkdir alias.
Definition: service.h:108
@ InvalidParameterValue
Definition: service.h:767
ZOO_DLL_EXPORT char * getValueFromMaps(maps *, const char *)
Definition: service.c:2074
linked list of map pointer
Definition: service.h:678
ZOO_DLL_EXPORT void addToMap(map *, const char *, const char *)
Add key value pair to an existing map.
Definition: service.c:578
ZOO_DLL_EXPORT maps * createMaps(const char *)
Create a new maps with the given name.
Definition: service.c:187
WPSException
Definition: service.h:757
@ SizeExceeded
Definition: service.h:782
void setErrorMessage(maps *&pmsaConf, const char *pccService, WPSException weExc, const char *pccMessage)
Definition: service.c:1903
ZOO_DLL_EXPORT elements * getElements(elements *, const char *)
Access a specific elements named key.
Definition: service.c:455
struct elements * inputs
the inputs elements
Definition: service.h:720
ZOO_DLL_EXPORT service * createService()
Allocate memory for a service.
Definition: service.c:531
ZOO_DLL_EXPORT void mapsToCharXXX(maps *, char ***)
Convert a maps to a char*** (only used for Fortran support)
Definition: service.c:1807
struct map * content
the content map
Definition: service.h:691
Services chained list.
Definition: service.h:727
ZOO_DLL_EXPORT void updateCnt(maps *, const char *, const char *)
Update the counter value (in conf / lenv / serviceCnt.
Definition: service.c:2155
ZOO_DLL_EXPORT int countMaps(maps *)
Count number of maps in a maps.
Definition: service.c:218
static const char *const WPSExceptionCode[]
Standard WPS exception codes.
Definition: service.h:796
KVP linked list.
Definition: service.h:657
char * name
the key
Definition: service.h:658
ZOO_DLL_EXPORT maps * getMaps(maps *, const char *)
Access a specific maps.
Definition: service.c:315
struct map * content
the content map
Definition: service.h:680
ZOO_DLL_EXPORT int addMapsArrayToMaps(maps **, maps *, char *)
Add a Maps containing a MapArray to a Maps.
Definition: service.c:1121
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:869
ZOO_DLL_EXPORT void dumpRegistry(registry *)
Print the registry on stderr.
Definition: service.c:1569
ZOO_DLL_EXPORT elements * createElements(const char *)
Create a named elements.
Definition: service.c:1226
struct map * additional_parameters
the additional parameters map
Definition: service.h:704
ZOO_DLL_EXPORT iotype * getIoTypeFromElement(elements *, char *, map *)
Access a specific iotype from an elements.
Definition: service.c:833
struct iotype * next
the pointer to the next iotype if any or NULL
Definition: service.h:692
ZOO_DLL_EXPORT void charxxxToMaps(char ***, maps **)
Convert a char*** to a maps (only used for Fortran support)
Definition: service.c:1843
struct service service
Metadata information about a full Service.
ZOO_DLL_EXPORT void dumpServiceAsYAML(service *)
Dump a service on stderr using the YAML syntaxe.
Definition: service.c:1517
struct registry * next
the next registry pointer
Definition: service.h:738
struct map * next
the pointer to the next map if any or NULL
Definition: service.h:660
char * format
the format: LiteralData or ComplexData or BoundingBoxData
Definition: service.h:705
ZOO_DLL_EXPORT void addIntToMap(map *, const char *, const int)
Add a key and an integer value to an existing map.
Definition: service.c:676
ZOO_DLL_EXPORT void dumpElements(elements *)
Dump an elements on stderr.
Definition: service.c:1264
#define ZOO_DLL_EXPORT
Definition: service.h:34
struct maps * child
the child maps
Definition: service.h:681
struct elements * child
the pointer to the children element if any (or NULL)
Definition: service.h:708
struct elements elements
Metadata information about input or output.
static const char *const OAPIPSupportedContentTypes[]
OGC API - Processes supported Content-Type list.
Definition: service.h:872
static int iZooLogLevel
The global log level.
Definition: service.h:266
ZOO_DLL_EXPORT elements * dupElements(elements *)
Duplicate an elements.
Definition: service.c:1390
ZOO_DLL_EXPORT void _translateChar(char *, char, char)
Replace a char by another one in a string.
Definition: service.c:2110
ZOO_DLL_EXPORT int count(map *)
Count number of map in a map.
Definition: service.c:202
static int zSleep(const long millisecond)
The crossplatform sleep alias.
Definition: service.h:139
@ NoSuchJob
Definition: service.h:788
struct map * metadata
the metadata map
Definition: service.h:703
ZOO_DLL_EXPORT void freeElements(elements **)
Free allocated memory of an elements.
Definition: service.c:489
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:1177
char * name
the maps name
Definition: service.h:679
@ StatusOK
Definition: service.h:762
Profile registry.
Definition: service.h:735
struct map * metadata
the metadata map
Definition: service.h:718
struct map * content
the content map
Definition: service.h:717
ZOO_DLL_EXPORT void loadMapBinaries(map **, map *)
Load binary values from a map (in) and add them to another map (out).
Definition: service.c:908
ZOO_DLL_EXPORT map * getMapOrFill(map **, const char *, const char *)
Access a specific map or set its value.
Definition: service.c:784
char * name
the name
Definition: service.h:716
ZOO_DLL_EXPORT void freeService(service **)
Free allocated memory of a service.
Definition: service.c:548
@ InternalServerError
Definition: service.h:787
static int iMinZooLogLevel
The global log level.
Definition: service.h:271
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:703
@ NoApplicableCode
Definition: service.h:768
ZOO_DLL_EXPORT void setElementsName(elements **, char *)
Set the name of an elements.
Definition: service.c:1247
struct iotype * defaults
the default iotype
Definition: service.h:706
ZOO_DLL_EXPORT void inheritMap(map **, map *)
Apply inheritance to an out map from a reference in map.
Definition: service.c:1696
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:1045
ZOO_DLL_EXPORT service * dupService(service *)
Duplicate a service.
Definition: service.c:1550
ZOO_DLL_EXPORT void inheritance(registry *, service **)
Apply inheritance to a service based on a registry.
Definition: service.c:1771
ZOO_DLL_EXPORT void addToMapA(map *, const char *, const char *)
Add key value pair to an existing map or append the value.
Definition: service.c:604
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:1889
#define zGettimeofday
The crossplatform gettimeofday alias.
Definition: service.h:145