Index: trunk/zoo-project/zoo-kernel/service_internal.h
===================================================================
--- trunk/zoo-project/zoo-kernel/service_internal.h	(revision 631)
+++ trunk/zoo-project/zoo-kernel/service_internal.h	(revision 640)
@@ -74,84 +74,32 @@
 #include <time.h>
 #include <ctype.h>
-#ifdef WIN32
 #ifndef USE_RUBY
 #include <unistd.h>
-#endif
 #endif
 #ifndef WIN32
 #include <xlocale.h>
 #endif
-#include "ulinet.h"
 
 #include "service.h"
-#include <openssl/sha.h>
-#include <openssl/md5.h>
-#include <openssl/hmac.h>
-#include <openssl/evp.h>
-#include <openssl/bio.h>
-#include <openssl/buffer.h>
 
-extern   int conf_read(const char*,maps*);
+#if defined(macintosh) || (defined(__MACH__) && defined(__APPLE__))
 
-#ifdef USE_JS
-#ifdef WIN32
-#define XP_WIN 1
-#else
-#define XP_UNIX 0
+#include <CoreServices/CoreServices.h>
+#include <SystemConfiguration/SystemConfiguration.h>
+
 #endif
-#include "service_internal_js.h"
-#endif
-
 
 #ifdef __cplusplus
 extern "C" {
 #endif
-#include <libxml/parser.h>
-#include <libxml/xpath.h>
 
-  /**
-   * Maximum number of XML namespaces
-   */
-#define ZOO_NS_MAX 10
-  /**
-   * Maximum number of XML docs
-   */
-#define ZOO_DOC_MAX 20
+  int  setOutputValue( maps*, const char*, char*, size_t);
+  char* getInputValue( maps*,const char*,size_t*);
 
-  /**
-   * Global char* to store the serverAddress value of the mmmmmain section
-   */
-  static char* SERVICE_URL;
-  /**
-   * Array of xmlNsPtr storing all used XML namespace
-   */
-  static xmlNsPtr usedNs[ZOO_NS_MAX];
-  /**
-   * Array storing names of the used XML namespace
-   */
-  static char* nsName[ZOO_NS_MAX];
-  /**
-   * Number of XML namespaces
-   */
-  static int nbNs=0;
-  /**
-   * Array of xmlDocPtr storing XML docs
-   */
-  static xmlDocPtr iDocs[ZOO_DOC_MAX];
-  /**
-   * Number of XML docs
-   */
-  static int nbDocs=0;
-
-  int getServiceFromYAML(maps*,char*,service**,char *name);
-  int readServiceFile(maps*, char*,service**,char *);
-  int isValidLang(maps*,const char*);
-  void addLangAttr(xmlNodePtr,maps*);
-
-  void printHeaders(maps*);
   void unhandleStatus(maps*);
   int _updateStatus(maps*);
   char* _getStatus(maps*,int);
   char* getStatus(int);
+  int updateStatus( maps*,const int,const char*);
   int removeShmLock(maps*, int);
   /**
@@ -170,62 +118,4 @@
 #endif
   
-  void readGeneratedFile(maps*,map*,char*);
-
-  void URLDecode(char *);
-  char *url_encode(char *);
-  char *url_decode(char *);
-  char* getEncoding(maps*);
-
-  int zooXmlSearchForNs(const char*);
-  int zooXmlAddNs(xmlNodePtr,const char*,const char*);
-  void zooXmlCleanupNs();
-
-  int zooXmlAddDoc(xmlNodePtr,const char*,const char*);
-  void zooXmlCleanupDocs();
-  
-  void printExceptionReportResponse(maps*,map*);
-  xmlNodePtr createExceptionReportNode(maps*,map*,int);
-  void printProcessResponse(maps*,map*,int,service*,const char*,int,maps*,maps*);
-  xmlNodePtr printWPSHeader(xmlDocPtr,maps*,const char*,const char*);
-  xmlNodePtr printGetCapabilitiesHeader(xmlDocPtr,maps*);
-  void printGetCapabilitiesForProcess(maps*,xmlNodePtr,service*);
-  void printDescribeProcessForProcess(maps*,xmlNodePtr,service*);
-  void printFullDescription(int,elements*,const char*,xmlNsPtr,xmlNodePtr);
-  void printDocument(maps*,xmlDocPtr,int);
-  void printDescription(xmlNodePtr,xmlNsPtr,const char*,map*);
-  void printIOType(xmlDocPtr,xmlNodePtr,xmlNsPtr,xmlNsPtr,xmlNsPtr,elements*,maps*,const char*);
-  map* parseBoundingBox(const char*);
-  void printBoundingBox(xmlNsPtr,xmlNodePtr,map*);
-  void printBoundingBoxDocument(maps*,maps*,FILE*);
-  void printOutputDefinitions(xmlDocPtr,xmlNodePtr,xmlNsPtr,xmlNsPtr,elements*,maps*,const char*);
-
-  void outputResponse(service*,maps*,maps*,map*,int,maps*,int);
-
-  void dumpMapsValuesToFiles(maps**,maps**);
-
-  char *base64(const char*,int);
-  char *base64d(const char*,int,int*);
-  void ensureDecodedBase64(maps**);
-  void checkValidValue(map*,map**,const char*,const char**,int);
-  char* addDefaultValues(maps**,elements*,maps*,int,map**);
-
-  int errorException(maps *, const char *, const char *, const char*);
-
-  xmlNodePtr soapEnvelope(maps*,xmlNodePtr);
-  int checkForSoapEnvelope(xmlDocPtr);
-  
-  void addToCache(maps*,char*,char*,char*,int,char*,size_t);
-  char* isInCache(maps*,char*);
-  int runHttpRequests(maps**,maps**,HINTERNET*);
-  void addRequestToQueue(maps**,HINTERNET*,const char*,bool);
-  int loadRemoteFile(maps**,map**,HINTERNET*,char*);
-
-  char *readVSIFile(maps*,const char*);
-  void parseIdentifier(maps*,char*,char*,char*);
-  int updateStatus( maps*,const int,const char*);
-  char* getInputValue( maps*,const char*,size_t*);
-  int  setOutputValue( maps*, const char*, char*, size_t);
-  
-  char* getLastErrorMessage();
 #ifdef __cplusplus
 }
