source: branches/PublicaMundi_David_integration_01-devel/zoo-project/zoo-kernel/service_internal.h

Last change on this file was 741, checked in by david, 9 years ago
  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/x-chdr
File size: 3.2 KB
RevLine 
[579]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
[741]28
29#include <fcgiapp.h>
30
[1]31#pragma once
32
[579]33/**
34 * The default service url (overriden by serverAddress)
35 */
[34]36#define DEFAULT_SERVICE_URL "http://www.zoo-project.org/"
[579]37/**
38 * The time size
39 */
[1]40#define TIME_SIZE 40
41
[741]42//#include <libintl.h>
[34]43#include <locale.h>
[579]44/**
45 * ZOO-Kernel internal messages translation function
46 */
[34]47#define _(String) dgettext ("zoo-kernel",String)
[579]48/**
49 * ZOO-Services messages translation function
50 */
[34]51#define _ss(String) dgettext ("zoo-services",String)
52
[579]53/**
54 * ZOO-Kernel was unable to create a lock
55 */
[507]56#define ZOO_LOCK_CREATE_FAILED -4
[579]57/**
58 * ZOO-Kernel was unable to acquire a lock
59 */
[507]60#define ZOO_LOCK_ACQUIRE_FAILED -5
[579]61/**
62 * ZOO-Kernel was unable to release a lock
63 */
[507]64#define ZOO_LOCK_RELEASE_FAILED -6
[652]65/**
66 * Number of time the ZOO-Kernel will try to acquire lock
67 */
68#define ZOO_LOCK_MAX_RETRY 10
[507]69
[741]70//#include <sys/stat.h>
71//#include <sys/types.h>
72
[216]73#ifndef WIN32
[26]74#include <sys/ipc.h>
75#include <sys/shm.h>
[507]76#include <sys/sem.h>
[216]77#else
78#include <direct.h>
79#endif
[26]80#include <stdio.h>
[1]81#include <time.h>
82#include <ctype.h>
[453]83#ifndef USE_RUBY
84#include <unistd.h>
85#endif
[1]86#ifndef WIN32
87#include <xlocale.h>
88#endif
[490]89
[1]90#include "service.h"
91
[640]92#if defined(macintosh) || (defined(__MACH__) && defined(__APPLE__))
[1]93
[640]94#include <CoreServices/CoreServices.h>
95#include <SystemConfiguration/SystemConfiguration.h>
96
[364]97#endif
[26]98
[1]99#ifdef __cplusplus
100extern "C" {
101#endif
[280]102
[649]103  char *readVSIFile(maps*,const char*);
[640]104  int  setOutputValue( maps*, const char*, char*, size_t);
105  char* getInputValue( maps*,const char*,size_t*);
[579]106
[216]107  void unhandleStatus(maps*);
[471]108  int _updateStatus(maps*);
[652]109  char* _getStatus(maps*,char*);
110  char* _getStatusFile(maps*,char*);
[26]111  char* getStatus(int);
[654]112  char* getStatusId(maps*,char*);
[652]113
[640]114  int updateStatus( maps*,const int,const char*);
[507]115  int removeShmLock(maps*, int);
[579]116  /**
117   * Cross platform type used for Lock identifier
118   */
[507]119#ifndef WIN32
120#define semid int
121#else
122#define semid HANDLE
123#endif
[652]124  semid acquireLock(maps*);
[507]125  semid getShmLockId(maps*,int);
126  int lockShm(semid);
127  int unlockShm(semid);
[9]128
[1]129#ifdef __cplusplus
130}
131#endif
132
133#endif
Note: See TracBrowser for help on using the repository browser.

Search

Context Navigation

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