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

Last change on this file since 649 was 649, checked in by djay, 7 years ago

Migrate readVSIFile from server_internal to zoo_service shared library.

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/x-chdr
File size: 3.0 KB
Line 
1/*
2 * Author : Gérald FENOY
3 *
4 * Copyright (c) 2009-2013 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/**
31 * The default service url (overriden by serverAddress)
32 */
33#define DEFAULT_SERVICE_URL "http://www.zoo-project.org/"
34/**
35 * The time size
36 */
37#define TIME_SIZE 40
38
39#include <libintl.h>
40#include <locale.h>
41/**
42 * ZOO-Kernel internal messages translation function
43 */
44#define _(String) dgettext ("zoo-kernel",String)
45/**
46 * ZOO-Services messages translation function
47 */
48#define _ss(String) dgettext ("zoo-services",String)
49
50/**
51 * ZOO-Kernel was unable to create a lock
52 */
53#define ZOO_LOCK_CREATE_FAILED -4
54/**
55 * ZOO-Kernel was unable to acquire a lock
56 */
57#define ZOO_LOCK_ACQUIRE_FAILED -5
58/**
59 * ZOO-Kernel was unable to release a lock
60 */
61#define ZOO_LOCK_RELEASE_FAILED -6
62
63#include <sys/stat.h>
64#include <sys/types.h>
65#include "cgic.h"
66#ifndef WIN32
67#include <sys/ipc.h>
68#include <sys/shm.h>
69#include <sys/sem.h>
70#else
71#include <direct.h>
72#endif
73#include <stdio.h>
74#include <time.h>
75#include <ctype.h>
76#ifndef USE_RUBY
77#include <unistd.h>
78#endif
79#ifndef WIN32
80#include <xlocale.h>
81#endif
82
83#include "service.h"
84
85#if defined(macintosh) || (defined(__MACH__) && defined(__APPLE__))
86
87#include <CoreServices/CoreServices.h>
88#include <SystemConfiguration/SystemConfiguration.h>
89
90#endif
91
92#ifdef __cplusplus
93extern "C" {
94#endif
95
96  char *readVSIFile(maps*,const char*);
97  int  setOutputValue( maps*, const char*, char*, size_t);
98  char* getInputValue( maps*,const char*,size_t*);
99
100  void unhandleStatus(maps*);
101  int _updateStatus(maps*);
102  char* _getStatus(maps*,int);
103  char* getStatus(int);
104  int updateStatus( maps*,const int,const char*);
105  int removeShmLock(maps*, int);
106  /**
107   * Cross platform type used for Lock identifier
108   */
109#ifndef WIN32
110#define semid int
111#else
112#define semid HANDLE
113#endif
114  semid getShmLockId(maps*,int);
115  int lockShm(semid);
116  int unlockShm(semid);
117
118#ifdef USE_JS
119#endif
120 
121#ifdef __cplusplus
122}
123#endif
124
125#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