diff options
Diffstat (limited to 'dep/gsoap/stdsoap2.h')
-rw-r--r-- | dep/gsoap/stdsoap2.h | 258 |
1 files changed, 192 insertions, 66 deletions
diff --git a/dep/gsoap/stdsoap2.h b/dep/gsoap/stdsoap2.h index 87185924135..31aece07f1a 100644 --- a/dep/gsoap/stdsoap2.h +++ b/dep/gsoap/stdsoap2.h @@ -1,10 +1,10 @@ /* - stdsoap2.h 2.8.10 + stdsoap2.h 2.8.17r gSOAP runtime engine gSOAP XML Web services tools -Copyright (C) 2000-2012, Robert van Engelen, Genivia Inc., All Rights Reserved. +Copyright (C) 2000-2013, Robert van Engelen, Genivia Inc., All Rights Reserved. This part of the software is released under ONE of the following licenses: GPL, or the gSOAP public license, or Genivia's license for commercial use. -------------------------------------------------------------------------------- @@ -24,7 +24,7 @@ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. The Initial Developer of the Original Code is Robert A. van Engelen. -Copyright (C) 2000-2012, Robert van Engelen, Genivia Inc., All Rights Reserved. +Copyright (C) 2000-2013, Robert van Engelen, Genivia Inc., All Rights Reserved. -------------------------------------------------------------------------------- GPL license. @@ -51,7 +51,7 @@ A commercial use license is available from Genivia, Inc., contact@genivia.com -------------------------------------------------------------------------------- */ -#define GSOAP_VERSION 20810 +#define GSOAP_VERSION 20817 #ifdef WITH_SOAPDEFS_H # include "soapdefs.h" /* include user-defined stuff */ @@ -216,7 +216,9 @@ A commercial use license is available from Genivia, Inc., contact@genivia.com # define WITH_LEAN # define HAVE_SSCANF # elif defined(WIN32) -# define HAVE_SNPRINTF +# if _MSC_VER >= 1400 +# define HAVE_SNPRINTF +# endif # define HAVE_STRRCHR # define HAVE_STRTOD # define HAVE_SSCANF @@ -225,8 +227,8 @@ A commercial use license is available from Genivia, Inc., contact@genivia.com # define HAVE_STRTOL # define HAVE_STRTOUL # if _MSC_VER >= 1300 -# define HAVE_STRTOLL // use _strtoi64 -# define HAVE_STRTOULL // use _strtoui64 +# define HAVE_STRTOLL /* use _strtoi64 */ +# define HAVE_STRTOULL /* use _strtoui64 */ # endif # define HAVE_SYS_TIMEB_H # define HAVE_FTIME @@ -264,11 +266,14 @@ A commercial use license is available from Genivia, Inc., contact@genivia.com # define HAVE_STRTOUL # define HAVE_RAND_R # define HAVE_GMTIME_R +# define HAVE_TM_GMTOFF +# define HAVE_GETTIMEOFDAY # define HAVE_LOCALTIME_R # define HAVE_STRERROR_R # define HAVE_TIMEGM # define HAVE_WCTOMB # define HAVE_MBTOWC +# define HAVE_INTTYPES_H # elif defined(_AIX43) # define HAVE_SNPRINTF # define HAVE_STRRCHR @@ -482,10 +487,6 @@ A commercial use license is available from Genivia, Inc., contact@genivia.com # define HAVE_STRERROR_R # define HAVE_WCTOMB # define HAVE_MBTOWC -# define LONG64 long -# define ULONG64 unsigned LONG64 -# define SOAP_LONG_FORMAT "%ld" -# define SOAP_ULONG_FORMAT "%lu" # elif defined(SUN_OS) # define HAVE_SNPRINTF # define HAVE_STRRCHR @@ -543,7 +544,7 @@ A commercial use license is available from Genivia, Inc., contact@genivia.com #endif /* native Win, HP-UX, and AIX compilers don't like empty structs */ -#if defined(WIN32) || defined(HP_UX) || defined(_AIX41) || defined(_AIX43) || defined(VXWORKS) +#if defined(WIN32) || defined(HP_UX) || defined(_AIX) || defined(AIX) || defined(VXWORKS) # define WITH_NOEMPTYSTRUCT #endif @@ -579,7 +580,7 @@ A commercial use license is available from Genivia, Inc., contact@genivia.com # undef HAVE_SPRINTF_L #endif -#ifdef TANDEM_NONSTOP +#ifdef TANDEM_NONSTOP /* Support for Guardian */ # define SOAP_BUFLEN (32767) /*# define WITH_NOSTDLIB */ /* uncommment to remove stdlib dependences */ # define WITH_NOIO /* no IO dependences, e.g. remove TCP/IP */ @@ -610,6 +611,9 @@ A commercial use license is available from Genivia, Inc., contact@genivia.com # include <cextdecs.h(TIME,FILE_CLOSE_,AWAITIOX,DELAY,FILEINFO,FILE_GETINFO_)> # define INET_ERROR 4294967295 #pragma list +#elif defined(__TANDEM) /* Support for OSS */ +# define int32_t int +# define SOAP_BUFLEN (32767) #endif #ifndef WITH_NOSTDLIB @@ -723,17 +727,18 @@ A commercial use license is available from Genivia, Inc., contact@genivia.com # include <io.h> # include <fcntl.h> # endif -// When you get macro redefinition errors when compiling the code below: -// try arrange your include list that <windows.h> is included after "stdsoap2.h" -// or define _WINSOCKAPI_ first: -// #define _WINSOCKAPI_ // stops windows.h including winsock.h -// #include <windows.h> -// #include "stdsoap2.h" -# include <winsock2.h> /* Visual Studio 2005 users: install Platform SDK (R2) */ +// When you get macro redefinition errors when compiling the code below, then: +// a) try arrange your includes so <windows.h> is included after "stdsoap2.h" +// b) or define _WINSOCKAPI_ first: +// #define _WINSOCKAPI_ // stops windows.h including winsock.h +// #include <windows.h> +// #include "stdsoap2.h" +// c) or compile with the -DWIN32_LEAN_AND_MEAN switch +# include <winsock2.h> // Visual Studio 2005 users: install Platform SDK (R2) # include <ws2tcpip.h> -// # define _WSPIAPI_COUNTOF /* DEV NOTE: enble to fix problems with VC6 */ +// # define _WSPIAPI_COUNTOF // DEV NOTE: enble to fix problems with VC6 // # include <wspiapi.h> -# include <ws2spi.h> /* DEV NOTE: replaces older wspiapi.h above */ +# include <ws2spi.h> // DEV NOTE: replaces older wspiapi.h above # ifdef WITH_IPV6 # define SOAP_GAI_STRERROR gai_strerrorA # endif @@ -815,14 +820,16 @@ A commercial use license is available from Genivia, Inc., contact@genivia.com # endif #endif -/* #define DEBUG */ /* Uncomment to debug sending (in file SENT.log) receiving (in file RECV.log) and messages (in file TEST.log) */ +/* #define DEBUG */ /* Uncomment to debug sending (in file SENT.log) receiving (in file RECV.log) and internal operations (in file TEST.log) */ + +/* #define DEBUG_STAMP */ /* Uncomment to debug sending (in file SENT.log) receiving (in file RECV.log) and time-stamped operations (in file TEST.log) */ #ifdef __cplusplus extern "C" { #endif /* Portability: define SOAP_SOCKLEN_T */ -#if defined(_AIX) +#if defined(_AIX) || defined(AIX) # if defined(_AIX43) # define SOAP_SOCKLEN_T socklen_t # else @@ -830,7 +837,7 @@ extern "C" { # endif #elif defined(SOCKLEN_T) # define SOAP_SOCKLEN_T SOCKLEN_T -#elif defined(__socklen_t_defined) || defined(_SOCKLEN_T) || defined(CYGWIN) || defined(FREEBSD) || defined(__FreeBSD__) || defined(OPENBSD) || defined(__QNX__) || defined(QNX) || defined(OS390) +#elif defined(__socklen_t_defined) || defined(_SOCKLEN_T) || defined(CYGWIN) || defined(FREEBSD) || defined(__FreeBSD__) || defined(OPENBSD) || defined(__QNX__) || defined(QNX) || defined(OS390) || defined(__ANDROID__) # define SOAP_SOCKLEN_T socklen_t #elif defined(IRIX) || defined(WIN32) || defined(__APPLE__) || defined(SUN_OS) || defined(OPENSERVER) || defined(TRU64) || defined(VXWORKS) || defined(HP_UX) # define SOAP_SOCKLEN_T int @@ -868,12 +875,29 @@ extern "C" { # define SOAP_CHK_EOF (soap->error ? soap->error : SOAP_EOF) #endif +#ifdef __cplusplus +# ifndef __STDC_FORMAT_MACROS +# define __STDC_FORMAT_MACROS +# endif +#endif + #if defined(SYMBIAN) # define LONG64 long # define ULONG64 unsigned LONG64 #elif !defined(WIN32) || defined(CYGWIN) || defined(__GLIBC__) || defined(__GNU__) # ifndef LONG64 -# if defined(HAVE_STDINT_H) +# if defined(HAVE_INTTYPES_H) +# ifdef HAVE_STDINT_H +# include <stdint.h> +# endif +# include <inttypes.h> +# define LONG64 int64_t +# define ULONG64 uint64_t +# elif defined(HAVE_SYS_INTTYPES_H) +# include <sys/inttypes.h> +# define LONG64 int64_t +# define ULONG64 uint64_t +# elif defined(HAVE_STDINT_H) # include <stdint.h> # define LONG64 int64_t # define ULONG64 uint64_t @@ -905,6 +929,18 @@ extern "C" { # define ULONG64 unsigned LONG64 #endif +#ifdef PRId64 +# ifndef SOAP_LONG_FORMAT +# define SOAP_LONG_FORMAT "%" PRId64 +# endif +#endif + +#ifdef PRIu64 +# ifndef SOAP_ULONG_FORMAT +# define SOAP_ULONG_FORMAT "%" PRIu64 +# endif +#endif + #ifndef SOAP_LONG_FORMAT # define SOAP_LONG_FORMAT "%lld" /* printf format for 64 bit ints */ #endif @@ -919,7 +955,7 @@ extern "C" { # define soap_int32 long #elif defined(PALM) # define soap_int32 Int32 -#elif defined(_AIX) +#elif defined(_AIX) || defined(AIX) # if defined(_AIX43) # define soap_int32 int32_t # else @@ -1035,6 +1071,12 @@ extern "C" { # define SOAP_INDEX_TEST (2) #endif +/* Max number of EINTR while poll/select on a socket */ +/* Each EINTR can lengthen the I/O blocking time by at most one second */ +#ifndef SOAP_MAXEINTR +# define SOAP_MAXEINTR (10) +#endif + /* Max iterations in soap_serve() to keep server connection alive */ #ifndef SOAP_MAXKEEPALIVE # define SOAP_MAXKEEPALIVE (100) @@ -1047,6 +1089,14 @@ extern "C" { # define SOAP_MAXARRAYSIZE (1000000) #endif +/* Trusted max size of inbound DIME data. + Increase if necessary to allow larger attachments, or decrease when server + resources are limited. +*/ +#ifndef SOAP_MAXDIMESIZE +# define SOAP_MAXDIMESIZE (8388608) /* 8 MB */ +#endif + #ifdef VXWORKS # ifdef WMW_RPM_IO # include "httpLib.h" @@ -1180,13 +1230,15 @@ extern const char soap_base64o[], soap_base64i[]; #ifdef HAVE_SNPRINTF # ifdef WIN32 -# define soap_snprintf _snprintf +# define soap_snprintf(buf, len, ...) (_snprintf((buf), (len), __VA_ARGS__), (buf)[(len)-1] = '\0') # else # define soap_snprintf snprintf # endif #endif -/* gSOAP error codes */ +/* gSOAP status/error codes */ + +typedef soap_int32 soap_status; #define SOAP_EOF EOF #define SOAP_ERR EOF @@ -1306,14 +1358,14 @@ typedef soap_int32 soap_mode; #define SOAP_ENC_ZLIB 0x00000400 #define SOAP_ENC_SSL 0x00000800 -#define SOAP_XML_STRICT 0x00001000 /* in: strict validation */ +#define SOAP_XML_STRICT 0x00001000 /* in: strict validation */ #define SOAP_XML_INDENT 0x00002000 /* out: emit indented XML */ -#define SOAP_XML_IGNORENS 0x00004000 /* in: ignore namespaces */ +#define SOAP_XML_IGNORENS 0x00004000 /* in: ignore namespaces */ #define SOAP_XML_DEFAULTNS 0x00008000 /* out: emit xmlns="..." */ #define SOAP_XML_CANONICAL 0x00010000 /* out: excC14N canonical XML */ -#define SOAP_XML_TREE 0x00020000 /* out: XML tree (no id/ref) */ +#define SOAP_XML_TREE 0x00020000 /* in/out: XML tree (no id/ref) */ #define SOAP_XML_NIL 0x00040000 /* out: NULLs as xsi:nil */ -#define SOAP_XML_NOTYPE 0x00080000 /* out: NULLs as xsi:nil */ +#define SOAP_XML_NOTYPE 0x00080000 /* out: do not add xsi:type */ #define SOAP_DOM_TREE 0x00100000 /* see DOM manual */ #define SOAP_DOM_NODE 0x00200000 @@ -1325,7 +1377,7 @@ typedef soap_int32 soap_mode; #define SOAP_C_NILSTRING 0x08000000 /* serialize empty strings as nil (omitted) */ #define SOAP_XML_DOM 0x10000000 /* enable internal DOM */ -#define SOAP_XML_GRAPH 0x20000000 /* id-ref graph in DOM */ +#define SOAP_XML_GRAPH 0x20000000 /* force id-ref XML graph */ #define SOAP_MIME_POSTCHECK 0x40000000 /* MIME flag (internal) */ @@ -1383,6 +1435,11 @@ typedef soap_int32 soap_mode; /* DEBUG macros */ #ifndef WITH_LEAN +# ifdef DEBUG_STAMP +# ifndef DEBUG +# define DEBUG +# endif +# endif # ifdef DEBUG # ifndef SOAP_DEBUG # define SOAP_DEBUG @@ -1410,20 +1467,40 @@ typedef soap_int32 soap_mode; # define SOAP_FREE(soap, ptr) free(ptr) #endif -#ifndef SOAP_NEW /* use C++ new operator */ -# if (defined(__GNUC__) && (__GNUC__ <= 2) && !defined(__BORLANDC__)) || defined(__clang__) || defined(_AIX) -# define SOAP_NEW(type) new type /* old form w/o parenthesis */ -# else -# define SOAP_NEW(type) new (type) /* prefer with parenthesis */ -# endif +#if defined(__GNUC__) && (__GNUC__ <= 2) +# define SOAP_NOTHROW +#elif !defined(WITH_LEAN) && !defined(WITH_COMPAT) && !defined(SOAP_NOTHROW) +# define SOAP_NOTHROW (std::nothrow) +#else +# define SOAP_NOTHROW #endif -#ifndef SOAP_PLACEMENT_NEW -# define SOAP_PLACEMENT_NEW(buf, type) new (buf) type +#if (defined(__GNUC__) && (__GNUC__ <= 2) && !defined(__BORLANDC__)) || defined(__clang__) || defined(_AIX) || defined(AIX) +/* old form w/o parenthesis */ +# ifndef SOAP_NEW +# define SOAP_NEW(type) new SOAP_NOTHROW type +# endif +# ifndef SOAP_NEW_ARRAY +# define SOAP_NEW_ARRAY(type, n) new SOAP_NOTHROW type[n] +# endif +# ifndef SOAP_PLACEMENT_NEW +# define SOAP_PLACEMENT_NEW(buf, type) new (buf) type +# endif +#else +/* new form with parenthesis */ +# ifndef SOAP_NEW +# define SOAP_NEW(type) new SOAP_NOTHROW (type) +# endif +# ifndef SOAP_NEW_ARRAY +# define SOAP_NEW_ARRAY(type, n) new SOAP_NOTHROW type[n] +# endif +# ifndef SOAP_PLACEMENT_NEW +# define SOAP_PLACEMENT_NEW(buf, type) new (buf) (type) +# endif #endif #ifndef SOAP_NEW_COPY /* use C++ new operator for ::copy() */ -# define SOAP_NEW_COPY(clas) new clas /* prefer w/o parenthesis */ +# define SOAP_NEW_COPY(clas) new SOAP_NOTHROW clas #endif #ifndef SOAP_DELETE /* use C++ delete operator */ @@ -1439,17 +1516,53 @@ typedef soap_int32 soap_mode; # define SOAP_MESSAGE fprintf # endif # ifndef DBGLOG -# define DBGLOG(DBGFILE, CMD) \ +# ifdef DEBUG_STAMP +# ifdef WIN32 +# define DBGLOG(DBGFILE, CMD) \ { if (soap)\ { if (!soap->fdebug[SOAP_INDEX_##DBGFILE])\ soap_open_logfile((struct soap*)soap, SOAP_INDEX_##DBGFILE);\ if (soap->fdebug[SOAP_INDEX_##DBGFILE])\ { FILE *fdebug = soap->fdebug[SOAP_INDEX_##DBGFILE];\ + SYSTEMTIME _localTime;\ + ::GetLocalTime(&_localTime); \ + fprintf(fdebug, "%02d%02d%02d %02d:%02d:%02d.%03d|", _localTime.wYear%100, _localTime.wMonth, _localTime.wDay, _localTime.wHour, _localTime.wMinute, _localTime.wSecond, _localTime.wMilliseconds);\ CMD;\ fflush(fdebug);\ }\ }\ } +# else +# define DBGLOG(DBGFILE, CMD) \ +{ if (soap)\ + { if (!soap->fdebug[SOAP_INDEX_##DBGFILE])\ + soap_open_logfile((struct soap*)soap, SOAP_INDEX_##DBGFILE);\ + if (soap->fdebug[SOAP_INDEX_##DBGFILE])\ + { FILE *fdebug = soap->fdebug[SOAP_INDEX_##DBGFILE];\ + struct timeval _tv;\ + struct tm _tm;\ + gettimeofday(&_tv, NULL);\ + localtime_r(&_tv.tv_sec, &_tm);\ + fprintf(fdebug, "%02d%02d%02d %02d:%02d:%02d.%06d|", _tm.tm_year%100, _tm.tm_mon+1, _tm.tm_mday, _tm.tm_hour, _tm.tm_min, _tm.tm_sec, _tv.tv_usec);\ + CMD;\ + fflush(fdebug);\ + }\ + }\ +} +# endif +# else +# define DBGLOG(DBGFILE, CMD) \ +{ if (soap)\ + { if (!soap->fdebug[SOAP_INDEX_##DBGFILE])\ + soap_open_logfile((struct soap*)soap, SOAP_INDEX_##DBGFILE);\ + if (soap->fdebug[SOAP_INDEX_##DBGFILE])\ + { FILE *fdebug = soap->fdebug[SOAP_INDEX_##DBGFILE];\ + CMD;\ + fflush(fdebug);\ + }\ + }\ +} +# endif # endif # ifndef DBGMSG # define DBGMSG(DBGFILE, MSG, LEN) \ @@ -1465,9 +1578,9 @@ typedef soap_int32 soap_mode; # endif # ifndef DBGFUN # define DBGFUN(FNAME) DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): %s()\n", __FILE__, __LINE__, FNAME)) -# define DBGFUN1(FNAME, FMT, ARG) DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): %s("FMT")\n", __FILE__, __LINE__, FNAME, (ARG))) -# define DBGFUN2(FNAME, FMT1, ARG1, FMT2, ARG2) DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): %s("FMT1", "FMT2")\n", __FILE__, __LINE__, FNAME, (ARG1), (ARG2))) -# define DBGFUN3(FNAME, FMT1, ARG1, FMT2, ARG2, FMT3, ARG3) DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): %s("FMT1", "FMT2", "FMT3")\n", __FILE__, __LINE__, FNAME, (ARG1), (ARG2), (ARG3))) +# define DBGFUN1(FNAME, FMT, ARG) DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): %s(" FMT ")\n", __FILE__, __LINE__, FNAME, (ARG))) +# define DBGFUN2(FNAME, FMT1, ARG1, FMT2, ARG2) DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): %s(" FMT1 ", " FMT2 ")\n", __FILE__, __LINE__, FNAME, (ARG1), (ARG2))) +# define DBGFUN3(FNAME, FMT1, ARG1, FMT2, ARG2, FMT3, ARG3) DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): %s(" FMT1 ", " FMT2 ", " FMT3 ")\n", __FILE__, __LINE__, FNAME, (ARG1), (ARG2), (ARG3))) # endif # ifndef DBGHEX # define DBGHEX(DBGFILE, MSG, LEN) \ @@ -1533,7 +1646,7 @@ struct soap_plist const struct soap_array *array; int type; int id; - char mark1; + char mark1; /* 0=single-ref, 1=embedded-multi-ref (SOAP1.1), 2=multi-ref, 3=attachment */ char mark2; }; @@ -1819,7 +1932,7 @@ extern "C" { struct SOAP_STD_API soap { short state; /* 0 = uninitialized, 1 = initialized, 2 = copy of another soap struct */ - short version; /* 1 = SOAP1.1 and 2 = SOAP1.2 (set automatically from namespace URI in nsmap table) */ + short version; /* 1 = SOAP1.1 and 2 = SOAP1.2 (set automatically from namespace URI in nsmap table), 0 indicates non-SOAP content */ soap_mode mode; soap_mode imode; soap_mode omode; @@ -1828,7 +1941,7 @@ struct SOAP_STD_API soap const char *dime_id_format; /* user-definable format string for integer DIME id (<SOAP_TAGLEN chars) */ const char *http_version; /* HTTP version used "1.0" or "1.1" */ const char *http_content; /* optional custom response content type (with SOAP_FILE) */ - const char *encodingStyle; /* default = NULL which means that SOAP encoding is used */ + const char *encodingStyle; /* default = "" which means that SOAP encoding is used */ const char *actor; /* SOAP-ENV:actor or role attribute value */ const char *lang; /* xml:lang attribute value of SOAP-ENV:Text */ int recv_timeout; /* when > 0, gives socket recv timeout in seconds, < 0 in usec */ @@ -1846,10 +1959,12 @@ struct SOAP_STD_API soap struct soap_blist *blist; /* block allocation stack */ struct soap_clist *clist; /* class instance allocation list */ void *alist; /* memory allocation (malloc) list */ +#if !defined(WITH_LEAN) || !defined(WITH_NOIDREF) struct soap_ilist *iht[SOAP_IDHASH]; struct soap_plist *pht[SOAP_PTRHASH]; struct soap_pblk *pblk; /* plist block allocation */ short pidx; /* plist block allocation */ +#endif struct SOAP_ENV__Header *header; struct SOAP_ENV__Fault *fault; int idnum; @@ -1941,7 +2056,7 @@ struct SOAP_STD_API soap size_t buflen; /* length of soap.buf[] content */ soap_wchar ahead; /* parser lookahead */ short cdata; /* CDATA parser state */ - short body; /* parsed XML element has a body or not */ + short body; /* HTTP or XML element has a body (1) or not (0) */ unsigned int level; /* XML nesting level */ size_t count; /* message length counter */ size_t length; /* message length as set by HTTP header */ @@ -2017,7 +2132,7 @@ struct SOAP_STD_API soap int cookie_max; #endif #ifndef WITH_NOIO - int ipv6_multicast_if; /* in6addr->sin6_scope_id IPv6 value */ + unsigned int ipv6_multicast_if; /* in_addr_t in6addr->sin6_scope_id IPv6 value */ char* ipv4_multicast_if; /* IP_MULTICAST_IF IPv4 setsockopt interface_addr */ unsigned char ipv4_multicast_ttl; /* IP_MULTICAST_TTL value 0..255 */ #ifdef WITH_IPV6 @@ -2057,6 +2172,7 @@ struct SOAP_STD_API soap #endif unsigned short ssl_flags; const char *keyfile; + const char *keyid; const char *password; const char *cafile; const char *capath; @@ -2139,9 +2255,7 @@ struct soap_plugin void (*fdelete)(struct soap *soap, struct soap_plugin *p); /* should delete fields of plugin only and not free(p) */ }; -#ifndef WITH_NONAMESPACES extern SOAP_NMAC struct Namespace namespaces[]; -#endif #ifndef WITH_LEAN # define soap_get0(soap) (((soap)->bufidx>=(soap)->buflen && soap_recv(soap)) ? EOF : (unsigned char)(soap)->buf[(soap)->bufidx]) @@ -2151,6 +2265,9 @@ soap_wchar soap_get0(struct soap*); soap_wchar soap_get1(struct soap*); #endif +#define SOAP_XSTRINGIFY(s) SOAP_STRINGIFY(s) +#define SOAP_STRINGIFY(s) #s + #define soap_versioning_paste(name, ext) name##_LIBRARY_VERSION_REQUIRED_##ext #define soap_versioning_ext(name, ext) soap_versioning_paste(name, ext) #define soap_versioning(name) soap_versioning_ext(name, GSOAP_VERSION) @@ -2195,13 +2312,13 @@ soap_wchar soap_get1(struct soap*); SOAP_FMAC1 unsigned long SOAP_FMAC2 soap_strtoul(const char *s, char **t, int b); #endif -#ifdef WIN32 +#if defined(WIN32) && !defined(__MINGW32__) # define soap_strtoll _strtoi64 #else # define soap_strtoll strtoll #endif -#ifdef WIN32 +#if defined(WIN32) && !defined(__MINGW32__) # define soap_strtoull _strtoui64 #else # define soap_strtoull strtoull @@ -2229,8 +2346,6 @@ SOAP_FMAC1 int SOAP_FMAC2 soap_rand(void); # define soap_lookup_type(s, i) (0) # define soap_getindependent(s) (0) # define soap_putindependent(s) (0) -# define soap_getelement(s, n) (n) -# define soap_putelement(s, p, t, i, n) (0) # define soap_markelement(s, p, n) (0) #endif @@ -2240,7 +2355,6 @@ typedef void soap_walker(struct soap*, void*, int, const char*, const char*); SOAP_FMAC5 int SOAP_FMAC6 soap_serve(struct soap *soap); SOAP_FMAC5 int SOAP_FMAC6 soap_serve_request(struct soap *soap); -#ifndef WITH_NOGLOBAL SOAP_FMAC3 void SOAP_FMAC4 soap_header(struct soap*); SOAP_FMAC3 void SOAP_FMAC4 soap_fault(struct soap*); SOAP_FMAC3 const char** SOAP_FMAC4 soap_faultcode(struct soap*); @@ -2250,7 +2364,6 @@ SOAP_FMAC3 const char** SOAP_FMAC4 soap_faultdetail(struct soap*); SOAP_FMAC3 const char* SOAP_FMAC4 soap_check_faultsubcode(struct soap*); SOAP_FMAC3 const char* SOAP_FMAC4 soap_check_faultdetail(struct soap*); SOAP_FMAC3 void SOAP_FMAC4 soap_serializefault(struct soap*); -#endif SOAP_FMAC1 void SOAP_FMAC2 soap_serializeheader(struct soap*); SOAP_FMAC1 int SOAP_FMAC2 soap_getheader(struct soap*); @@ -2267,8 +2380,16 @@ SOAP_FMAC1 SOAP_SOCKET SOAP_FMAC2 soap_accept(struct soap*); SOAP_FMAC1 int SOAP_FMAC2 soap_ssl_accept(struct soap*); SOAP_FMAC1 const char * SOAP_FMAC2 soap_ssl_error(struct soap*, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_ssl_server_context(struct soap*, unsigned short, const char*, const char*, const char*, const char*, const char*, const char*, const char*); -SOAP_FMAC1 int SOAP_FMAC2 soap_ssl_client_context(struct soap*, unsigned short, const char*, const char*, const char*, const char*, const char*); +#if defined(VXWORKS) && defined(WM_SECURE_KEY_STORAGE) +SOAP_FMAC1 int SOAP_FMAC2 soap_ssl_server_context(struct soap *soap, unsigned short flags, const char *keyfile, const char *keyid, const char *password, const char *cafile, const char *capath, const char *dhfile, const char *randfile, const char *sid); +#else +SOAP_FMAC1 int SOAP_FMAC2 soap_ssl_server_context(struct soap *soap, unsigned short flags, const char *keyfile, const char *password, const char *cafile, const char *capath, const char *dhfile, const char *randfile, const char *sid); +#endif +#if defined(VXWORKS) && defined(WM_SECURE_KEY_STORAGE) +SOAP_FMAC1 int SOAP_FMAC2 soap_ssl_client_context(struct soap *soap, unsigned short flags, const char *keyfile, const char *keyid, const char *password, const char *cafile, const char *capath, const char *randfile); +#else +SOAP_FMAC1 int SOAP_FMAC2 soap_ssl_client_context(struct soap *soap, unsigned short flags, const char *keyfile, const char *password, const char *cafile, const char *capath, const char *randfile); +#endif SOAP_FMAC1 int SOAP_FMAC2 soap_puthttphdr(struct soap*, int status, size_t count); @@ -2333,6 +2454,7 @@ SOAP_FMAC1 int SOAP_FMAC2 soap_begin_count(struct soap*); SOAP_FMAC1 int SOAP_FMAC2 soap_end_count(struct soap*); SOAP_FMAC1 int SOAP_FMAC2 soap_begin_send(struct soap*); SOAP_FMAC1 int SOAP_FMAC2 soap_end_send(struct soap*); +SOAP_FMAC1 int SOAP_FMAC2 soap_end_send_flush(struct soap*); SOAP_FMAC1 const struct soap_code_map* SOAP_FMAC2 soap_code(const struct soap_code_map*, const char*); SOAP_FMAC1 long SOAP_FMAC2 soap_code_int(const struct soap_code_map*, const char*, long); @@ -2385,6 +2507,7 @@ SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_copy_context(struct soap*, const struct SOAP_FMAC1 void SOAP_FMAC2 soap_copy_stream(struct soap*, struct soap*); SOAP_FMAC1 void SOAP_FMAC2 soap_free_stream(struct soap*); SOAP_FMAC1 void SOAP_FMAC2 soap_versioning(soap_init)(struct soap*, soap_mode, soap_mode); +SOAP_FMAC1 void SOAP_FMAC2 soap_initialize(struct soap*); SOAP_FMAC1 void SOAP_FMAC2 soap_done(struct soap*); SOAP_FMAC1 void SOAP_FMAC2 soap_cleanup(struct soap*); SOAP_FMAC1 void SOAP_FMAC2 soap_begin(struct soap*); @@ -2443,6 +2566,7 @@ SOAP_FMAC1 wchar_t* SOAP_FMAC2 soap_wstring_in(struct soap*, int, long, long); SOAP_FMAC1 int SOAP_FMAC2 soap_match_namespace(struct soap*, const char *, const char*, size_t n1, size_t n2); +SOAP_FMAC1 void SOAP_FMAC2 soap_set_version(struct soap*, short); SOAP_FMAC1 int SOAP_FMAC2 soap_set_namespaces(struct soap*, const struct Namespace*); SOAP_FMAC1 void SOAP_FMAC2 soap_set_local_namespaces(struct soap*); @@ -2467,9 +2591,9 @@ SOAP_FMAC1 void SOAP_FMAC2 soap_end_block(struct soap*, struct soap_blist*); SOAP_FMAC1 void SOAP_FMAC2 soap_update_pointers(struct soap *soap, char *start, char *end, char *p1, char *p2); SOAP_FMAC1 int SOAP_FMAC2 soap_envelope_begin_out(struct soap*); -SOAP_FMAC1 int soap_envelope_end_out(struct soap*); +SOAP_FMAC1 int SOAP_FMAC2 soap_envelope_end_out(struct soap*); -SOAP_FMAC1 char * SOAP_FMAC2 soap_get_http_body(struct soap*); +SOAP_FMAC1 char * SOAP_FMAC2 soap_get_http_body(struct soap*, size_t *len); SOAP_FMAC1 int SOAP_FMAC2 soap_envelope_begin_in(struct soap*); SOAP_FMAC1 int SOAP_FMAC2 soap_envelope_end_in(struct soap*); @@ -2598,7 +2722,7 @@ SOAP_FMAC1 int SOAP_FMAC2 soap_outwliteral(struct soap*, const char *tag, wchar_ #ifndef WITH_LEANER SOAP_FMAC1 int SOAP_FMAC2 soap_attachment(struct soap *, const char*, int, const void*, const struct soap_array*, const char*, const char*, const char*, int, const char*, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_move(struct soap*, long); +SOAP_FMAC1 int SOAP_FMAC2 soap_move(struct soap*, size_t); SOAP_FMAC1 size_t SOAP_FMAC2 soap_tell(struct soap*); SOAP_FMAC1 char* SOAP_FMAC2 soap_dime_option(struct soap*, unsigned short, const char*); SOAP_FMAC1 int SOAP_FMAC2 soap_getdimehdr(struct soap*); @@ -2628,9 +2752,11 @@ SOAP_FMAC1 const char* SOAP_FMAC2 soap_attr_value(struct soap *soap, const char SOAP_FMAC1 int SOAP_FMAC2 soap_set_attr(struct soap *soap, const char *name, const char *value, int flag); SOAP_FMAC1 void SOAP_FMAC2 soap_clr_attr(struct soap *soap); +SOAP_FMAC1 const char* SOAP_FMAC2 soap_url(struct soap *soap, const char*, const char*); +SOAP_FMAC1 size_t SOAP_FMAC2 soap_encode_url(const char*, char*, size_t); +SOAP_FMAC1 const char* SOAP_FMAC2 soap_encode_url_string(struct soap*, const char*); #ifdef WITH_COOKIES SOAP_FMAC1 void SOAP_FMAC2 soap_getcookies(struct soap *soap, const char *val); -SOAP_FMAC1 size_t SOAP_FMAC2 soap_encode_cookie(const char*, char*, size_t); SOAP_FMAC1 extern struct soap_cookie* SOAP_FMAC2 soap_set_cookie(struct soap*, const char*, const char*, const char*, const char*); SOAP_FMAC1 extern struct soap_cookie* SOAP_FMAC2 soap_cookie(struct soap*, const char*, const char*, const char*); SOAP_FMAC1 extern char* SOAP_FMAC2 soap_cookie_value(struct soap*, const char*, const char*, const char*); |