ZOO-Project
Data Structures | Macros | Typedefs | Functions | Variables
service_internal.h File Reference
#include <libintl.h>
#include <locale.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <sys/sem.h>
#include <stdio.h>
#include <time.h>
#include <ctype.h>
#include <unistd.h>
#include <fcntl.h>
#include "service.h"

Go to the source code of this file.

Data Structures

struct  zooLock
 The lock structure used by the ZOO-Kernel to ensure atomicity of operations. More...
 

Macros

#define DEFAULT_SERVICE_URL   "http://www.zoo-project.org/"
 The default service url (overriden by serverAddress) More...
 
#define TIME_SIZE   40
 The time size. More...
 
#define _(String)   dgettext ("zoo-kernel",String)
 ZOO-Kernel internal messages translation function. More...
 
#define _ss(String)   dgettext ("zoo-services",String)
 ZOO-Services messages translation function. More...
 
#define ZOO_LOCK_CREATE_FAILED   -4
 ZOO-Kernel was unable to create a lock. More...
 
#define ZOO_LOCK_ACQUIRE_FAILED   -5
 ZOO-Kernel was unable to acquire a lock. More...
 
#define ZOO_LOCK_RELEASE_FAILED   -6
 ZOO-Kernel was unable to release a lock. More...
 
#define ZOO_LOCK_MAX_RETRY   180
 Number of time the ZOO-Kernel will try to acquire lock. More...
 
#define semid   int
 Cross platform type used for Lock identifier. More...
 

Typedefs

typedef struct zooLock zooLock
 The lock structure used by the ZOO-Kernel to ensure atomicity of operations. More...
 

Functions

ZOO_DLL_EXPORT char * readVSIFile (maps *, const char *)
 Read a file using the GDAL VSI API. More...
 
ZOO_DLL_EXPORT int setOutputValue (maps *, const char *, char *, size_t)
 Set an output value. More...
 
ZOO_DLL_EXPORT char * getInputValue (maps *, const char *, size_t *)
 Access an input value. More...
 
ZOO_DLL_EXPORT struct zooLocklockFile (maps *, const char *, const char)
 Lock a file for read, write and upload. More...
 
ZOO_DLL_EXPORT int unlockFile (maps *, struct zooLock *)
 Remove a lock. More...
 
ZOO_DLL_EXPORT void unhandleStatus (maps *)
 Stop handling status repport. More...
 
ZOO_DLL_EXPORT int _updateStatus (maps *)
 Update the current status of the running service. More...
 
ZOO_DLL_EXPORT char * _getStatus (maps *, char *)
 Get the ongoing status of a running service. More...
 
ZOO_DLL_EXPORT char * _getStatusFile (maps *, char *)
 Read the cache file of a running service. More...
 
ZOO_DLL_EXPORT char * getStatus (int)
 Get the current status of the running service. More...
 
ZOO_DLL_EXPORT char * getStatusId (maps *, char *)
 Read the sid file attached of a service if any. More...
 
ZOO_DLL_EXPORT int updateStatus (maps *, const int, const char *)
 Update the status of an ongoing service. More...
 
ZOO_DLL_EXPORT int removeShmLock (maps *, int)
 Try to remove a semaphore set. More...
 
ZOO_DLL_EXPORT semid acquireLock (maps *)
 Acquire the global lock. More...
 
ZOO_DLL_EXPORT semid getShmLockId (maps *, int)
 Try to create or access a semaphore set. More...
 
ZOO_DLL_EXPORT int lockShm (semid)
 
ZOO_DLL_EXPORT