Optimize length check
[TortoiseGit.git] / ext / CrashServer / external / gsoap-win32-2.8.0 / stdsoap2.h
blob779de510184865b964ca7db9ddf9f2dafd135a00
1 /*
2 stdsoap2.h 2.8.0
4 gSOAP runtime engine
6 gSOAP XML Web services tools
7 Copyright (C) 2000-2010, Robert van Engelen, Genivia Inc., All Rights Reserved.
8 This part of the software is released under ONE of the following licenses:
9 GPL, or the gSOAP public license, or Genivia's license for commercial use.
10 --------------------------------------------------------------------------------
11 Contributors:
13 Wind River Systems, Inc., for the following additions
14 - vxWorks compatible
15 --------------------------------------------------------------------------------
16 gSOAP public license.
18 The contents of this file are subject to the gSOAP Public License Version 1.3
19 (the "License"); you may not use this file except in compliance with the
20 License. You may obtain a copy of the License at
21 http://www.cs.fsu.edu/~engelen/soaplicense.html
22 Software distributed under the License is distributed on an "AS IS" basis,
23 WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
24 for the specific language governing rights and limitations under the License.
26 The Initial Developer of the Original Code is Robert A. van Engelen.
27 Copyright (C) 2000-2010, Robert van Engelen, Genivia Inc., All Rights Reserved.
28 --------------------------------------------------------------------------------
29 GPL license.
31 This program is free software; you can redistribute it and/or modify it under
32 the terms of the GNU General Public License as published by the Free Software
33 Foundation; either version 2 of the License, or (at your option) any later
34 version.
36 This program is distributed in the hope that it will be useful, but WITHOUT ANY
37 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
38 PARTICULAR PURPOSE. See the GNU General Public License for more details.
40 You should have received a copy of the GNU General Public License along with
41 this program; if not, write to the Free Software Foundation, Inc., 59 Temple
42 Place, Suite 330, Boston, MA 02111-1307 USA
44 Author contact information:
45 engelen@genivia.com / engelen@acm.org
47 This program is released under the GPL with the additional exemption that
48 compiling, linking, and/or using OpenSSL is allowed.
49 --------------------------------------------------------------------------------
50 A commercial use license is available from Genivia, Inc., contact@genivia.com
51 --------------------------------------------------------------------------------
54 #ifdef WITH_SOAPDEFS_H
55 # include "soapdefs.h" /* include user-defined stuff */
56 #endif
58 #ifndef _THREAD_SAFE
59 # define _THREAD_SAFE
60 #endif
62 #ifndef OPENSERVER
63 # ifndef _REENTRANT
64 # define _REENTRANT
65 # endif
66 #endif
68 #ifndef SOAP_FMAC1 /* stdsoap2.h declaration macro */
69 # define SOAP_FMAC1
70 #endif
72 #ifndef SOAP_FMAC2 /* stdsoap2.h declaration macro */
73 # define SOAP_FMAC2
74 #endif
76 #ifndef SOAP_FMAC3 /* (de)serializer declaration macro */
77 # define SOAP_FMAC3
78 #endif
80 #ifndef SOAP_FMAC3S /* string converter for (de)serializer declaration macro */
81 # define SOAP_FMAC3S SOAP_FMAC3
82 #endif
84 #ifndef SOAP_FMAC4 /* (de)serializer declaration macro */
85 # define SOAP_FMAC4
86 #endif
88 #ifndef SOAP_FMAC4S /* string converter for (de)serializer declaration macro */
89 # define SOAP_FMAC4S SOAP_FMAC4
90 #endif
92 #ifndef SOAP_FMAC5 /* stub/skeleton declaration macro */
93 # define SOAP_FMAC5
94 #endif
96 #ifndef SOAP_FMAC6 /* stub/skeleton declaration macro */
97 # define SOAP_FMAC6
98 #endif
100 #ifndef SOAP_CMAC /* class declaration macro */
101 # define SOAP_CMAC
102 #endif
104 #ifndef SOAP_NMAC /* namespace table declaration macro */
105 # define SOAP_NMAC
106 #endif
108 #ifndef SOAP_SOURCE_STAMP
109 # define SOAP_SOURCE_STAMP(str)
110 #endif
112 /* gSOAP 2.7.4 and higher: fast look-aside buffering is stable */
113 #ifndef WITH_FAST
114 # define WITH_FAST
115 #endif
117 /* gSOAP 2.7.15 and higher: always retain CDATA in literal XML, unless WITH_LEAN or WITH_NOCDATA */
118 #ifndef WITH_LEAN
119 # ifndef WITH_NOCDATA
120 # ifndef WITH_CDATA
121 # define WITH_CDATA
122 # endif
123 # endif
124 #endif
126 #ifdef WITH_LEANER
127 # ifndef WITH_LEAN
128 # define WITH_LEAN
129 # endif
130 #endif
132 #ifdef WITH_LEAN
133 # ifdef WITH_COOKIES
134 # error "Cannot build WITH_LEAN code WITH_COOKIES enabled"
135 # endif
136 #endif
138 #ifndef STDSOAP_H
139 #define STDSOAP_H
141 #if defined(__vxworks) || defined(__VXWORKS__)
142 # ifndef VXWORKS
143 # define VXWORKS
144 # endif
145 #endif
147 #ifdef _WIN32
148 # ifndef WIN32
149 # define WIN32
150 # endif
151 #endif
153 #ifdef _WIN32_WCE
154 # ifndef UNDER_CE
155 # define UNDER_CE _WIN32_WCE
156 # endif
157 #endif
159 #ifdef UNDER_CE
160 # ifndef WIN32
161 # define WIN32
162 # endif
163 #endif
165 #ifdef __BORLANDC__
166 # ifdef __WIN32__
167 # ifndef WIN32
168 # define WIN32
169 # endif
170 # endif
171 #endif
173 #ifdef __CYGWIN__
174 # ifndef CYGWIN
175 # define CYGWIN
176 # endif
177 #endif
179 #ifdef __SYMBIAN32__
180 # define SYMBIAN
181 # undef WIN32
182 #endif
184 #if defined(__palmos__) || defined(PALM_GCC) || defined(__PALMOS_TRAPS__)
185 # ifndef PALM
186 # define PALM
187 # endif
188 #endif
190 #if defined(__hpux)
191 # ifndef HP_UX
192 # define HP_UX
193 # endif
194 #endif
196 #if defined(__digital__) && defined(__unix__)
197 # ifndef TRU64
198 # define TRU64
199 # endif
200 #endif
202 #ifdef __MVS__
203 # ifndef OS390
204 # define OS390
205 # endif
206 #endif
208 #ifdef HAVE_CONFIG_H
209 # include "config.h"
210 # if defined(WITH_OPENSSL)
211 # ifndef HAVE_OPENSSL_SSL_H
212 # undef WITH_OPENSSL
213 # endif
214 # endif
215 # if defined(WITH_GNUTLS)
216 # ifndef HAVE_GNUTLS_GNUTLS_H
217 # undef WITH_GNUTLS
218 # endif
219 # endif
220 # if defined(WITH_ZLIB) || defined(WITH_GZIP)
221 # ifndef HAVE_ZLIB_H
222 # undef WITH_ZLIB
223 # undef WITH_GZIP
224 # endif
225 # endif
226 #else
227 # if defined(UNDER_CE)
228 # define WITH_LEAN
229 # define HAVE_SSCANF
230 # elif defined(WIN32)
231 # define HAVE_SNPRINTF
232 # define HAVE_STRRCHR
233 # define HAVE_STRTOD
234 # define HAVE_SSCANF
235 # define HAVE_STRTOL
236 # define HAVE_STRTOUL
237 # define HAVE_SYS_TIMEB_H
238 # define HAVE_FTIME
239 # define HAVE_GMTIME
240 # define HAVE_WCTOMB
241 # define HAVE_MBTOWC
242 # define SOAP_LONG_FORMAT "%I64d"
243 # define SOAP_ULONG_FORMAT "%I64u"
244 # elif defined(CYGWIN)
245 # define HAVE_POLL
246 # define HAVE_SNPRINTF
247 # define HAVE_STRRCHR
248 # define HAVE_STRTOD
249 # define HAVE_SSCANF
250 # define HAVE_STRTOL
251 # define HAVE_STRTOUL
252 # define HAVE_SYS_TIMEB_H
253 # define HAVE_FTIME
254 # define HAVE_RAND_R
255 # define HAVE_GMTIME_R
256 # define HAVE_LOCALTIME_R
257 # define HAVE_STRERROR_R
258 # define HAVE_WCTOMB
259 # define HAVE_MBTOWC
260 # elif defined(__APPLE__)
261 # define HAVE_POLL
262 # define HAVE_SNPRINTF
263 # define HAVE_STRRCHR
264 # define HAVE_STRTOD
265 # define HAVE_SSCANF
266 # define HAVE_STRTOD_L
267 # define HAVE_SSCANF_L
268 # define HAVE_SPRINTF_L
269 # define HAVE_STRTOL
270 # define HAVE_STRTOUL
271 # define HAVE_RAND_R
272 # define HAVE_GMTIME_R
273 # define HAVE_LOCALTIME_R
274 # define HAVE_STRERROR_R
275 # define HAVE_TIMEGM
276 # define HAVE_WCTOMB
277 # define HAVE_MBTOWC
278 # elif defined(_AIX43)
279 # define HAVE_SNPRINTF
280 # define HAVE_STRRCHR
281 # define HAVE_STRTOD
282 # define HAVE_SSCANF
283 # define HAVE_STRTOL
284 # define HAVE_STRTOUL
285 # define HAVE_SYS_TIMEB_H
286 # define HAVE_FTIME
287 # define HAVE_RAND_R
288 # define HAVE_GMTIME_R
289 # define HAVE_LOCALTIME_R
290 # define HAVE_WCTOMB
291 # define HAVE_MBTOWC
292 # elif defined(_AIX41)
293 # define HAVE_SNPRINTF
294 # define HAVE_STRRCHR
295 # define HAVE_STRTOD
296 # define HAVE_SSCANF
297 # define HAVE_STRTOL
298 # define HAVE_STRTOUL
299 # define HAVE_SYS_TIMEB_H
300 # define HAVE_WCTOMB
301 # define HAVE_MBTOWC
302 # elif defined(HP_UX)
303 # define HAVE_SNPRINTF
304 # define HAVE_STRRCHR
305 # define HAVE_STRTOD
306 # define HAVE_SSCANF
307 # define HAVE_STRTOL
308 # define HAVE_STRTOUL
309 # define HAVE_SYS_TIMEB_H
310 # define HAVE_FTIME
311 # define HAVE_RAND_R
312 # define HAVE_GMTIME_R
313 # define HAVE_LOCALTIME_R
314 # define HAVE_STRERROR_R
315 # define HAVE_WCTOMB
316 # define HAVE_MBTOWC
317 # elif defined(FREEBSD) || defined(__FreeBSD__) || defined(OPENBSD)
318 # define HAVE_POLL
319 # define HAVE_SNPRINTF
320 # define HAVE_STRRCHR
321 # define HAVE_STRTOD
322 # define HAVE_SSCANF
323 # define HAVE_STRTOD_L
324 # define HAVE_SSCANF_L
325 # define HAVE_SPRINTF_L
326 # define HAVE_STRTOL
327 # define HAVE_STRTOUL
328 # define HAVE_STRTOLL
329 # define HAVE_STRTOULL
330 # define HAVE_GETTIMEOFDAY
331 # define HAVE_RAND_R
332 # define HAVE_GMTIME_R
333 # define HAVE_LOCALTIME_R
334 # define HAVE_STRERROR_R
335 # define HAVE_WCTOMB
336 # define HAVE_MBTOWC
337 # define SOAP_LONG_FORMAT "%qd"
338 # define SOAP_ULONG_FORMAT "%qu"
339 # elif defined(__VMS)
340 # define HAVE_SNPRINTF
341 # define HAVE_STRRCHR
342 # define HAVE_STRTOD
343 # define HAVE_SSCANF
344 # define HAVE_STRTOL
345 # define HAVE_STRTOUL
346 # define HAVE_SYS_TIMEB_H
347 # define HAVE_FTIME
348 # define HAVE_RAND_R
349 # define HAVE_GMTIME_R
350 # define HAVE_LOCALTIME_R
351 # define HAVE_WCTOMB
352 # define HAVE_MBTOWC
353 # elif defined(__GLIBC__) || defined(__GNU__)
354 # define HAVE_POLL
355 # define HAVE_SNPRINTF
356 # define HAVE_STRRCHR
357 # define HAVE_STRTOD
358 # define HAVE_SSCANF
359 # define HAVE_STRTOD_L
360 # define HAVE_SSCANF_L
361 # define HAVE_SPRINTF_L
362 # define HAVE_STRTOL
363 # define HAVE_STRTOUL
364 # define HAVE_STRTOLL
365 # define HAVE_STRTOULL
366 # define HAVE_SYS_TIMEB_H
367 # define HAVE_FTIME
368 # define HAVE_RAND_R
369 # define HAVE_GMTIME_R
370 # define HAVE_LOCALTIME_R
371 # define HAVE_STRERROR_R
372 # define HAVE_TIMEGM
373 # define HAVE_WCTOMB
374 # define HAVE_MBTOWC
375 # define HAVE_ISNAN
376 # elif defined(TRU64)
377 # define HAVE_SNPRINTF
378 # define HAVE_STRRCHR
379 # define HAVE_STRTOD
380 # define HAVE_SSCANF
381 # define HAVE_STRTOL
382 # define HAVE_STRTOUL
383 # define HAVE_GETTIMEOFDAY
384 # define HAVE_SYS_TIMEB_H
385 # define HAVE_RAND_R
386 # define HAVE_GMTIME_R
387 # define HAVE_LOCALTIME_R
388 # define __USE_STD_IOSTREAM
389 # define HAVE_WCTOMB
390 # define HAVE_MBTOWC
391 # define SOAP_LONG_FORMAT "%ld"
392 # define SOAP_ULONG_FORMAT "%lu"
393 # elif defined(MAC_CARBON)
394 # define WITH_NOIO
395 # define HAVE_SNPRINTF
396 # define HAVE_STRRCHR
397 # define HAVE_STRTOD
398 # define HAVE_SSCANF
399 # define HAVE_STRTOD_L
400 # define HAVE_SSCANF_L
401 # define HAVE_SPRINTF_L
402 # define HAVE_STRTOL
403 # define HAVE_STRTOUL
404 # define HAVE_FTIME
405 # define HAVE_RAND_R
406 # define HAVE_GETHOSTBYNAME_R
407 # define HAVE_GMTIME_R
408 # define HAVE_LOCALTIME_R
409 # define HAVE_STRERROR_R
410 # define HAVE_WCTOMB
411 # define HAVE_MBTOWC
412 # elif defined(PALM)
413 # define WITH_LEAN
414 # define HAVE_STRTOD /* strtod() is defined in palmFunctions.h */
415 # include <stdlib.h> /* Needs to be included before unix headers */
416 # include <sys_types.h>
417 # define IGNORE_STDIO_STUBS
418 # include <StdIOPalm.h>
419 # define O_NONBLOCK FNONBIO
420 # include <sys_socket.h>
421 # include "palmFunctions.h"
422 # elif defined(SYMBIAN)
423 # define WITH_LEAN
424 # define WITH_NONAMESPACES
425 # define HAVE_STRTOD /* use STRTOD since sscanf doesn't seem to work */
426 # include <e32def.h>
427 # include <sys/ioctl.h>
428 # elif defined(VXWORKS)
429 # ifdef _WRS_KERNEL
430 # define _POSIX_THREADS 1
431 # endif
432 # define HAVE_STRRCHR
433 # define HAVE_STRTOD
434 # define HAVE_SSCANF
435 # define HAVE_STRTOL
436 # define HAVE_STRTOUL
437 # define HAVE_GMTIME
438 # define HAVE_LOCALTIME
439 # define HAVE_MKTIME
440 # elif defined(OS390)
441 # define HAVE_SNPRINTF
442 # define HAVE_STRRCHR
443 # define HAVE_STRTOD
444 # define HAVE_SSCANF
445 # define HAVE_STRTOL
446 # define HAVE_STRTOUL
447 # define HAVE_SYS_TIMEB_H
448 # define HAVE_FTIME
449 # define HAVE_RAND_R
450 # define HAVE_GMTIME_R
451 # define HAVE_LOCALTIME_R
452 # define HAVE_WCTOMB
453 # define HAVE_MBTOWC
454 # elif defined(AS400)
455 # define HAVE_SNPRINTF
456 # define HAVE_STRRCHR
457 # define HAVE_STRTOD
458 # define HAVE_SSCANF
459 # define HAVE_STRTOL
460 # define HAVE_STRTOUL
461 # define HAVE_SYS_TIMEB_H
462 # define HAVE_FTIME
463 # define HAVE_RAND_R
464 # define HAVE_GMTIME_R
465 # define HAVE_LOCALTIME_R
466 # define HAVE_WCTOMB
467 # define HAVE_MBTOWC
468 # elif defined(__QNX__) || defined(QNX)
469 /* QNX does not have a working version of strtof */
470 # undef HAVE_STRTOF
471 # define HAVE_POLL
472 # define HAVE_SNPRINTF
473 # define HAVE_STRRCHR
474 # define HAVE_STRTOD
475 # define HAVE_SSCANF
476 # define HAVE_STRTOL
477 # define HAVE_STRTOUL
478 # define HAVE_SYS_TIMEB_H
479 # define HAVE_FTIME
480 # define HAVE_RAND_R
481 # define HAVE_GETHOSTBYNAME_R
482 # define HAVE_GMTIME_R
483 # define HAVE_LOCALTIME_R
484 # define HAVE_STRERROR_R
485 # define HAVE_WCTOMB
486 # define HAVE_MBTOWC
487 # define LONG64 long
488 # define ULONG64 unsigned LONG64
489 # define SOAP_LONG_FORMAT "%ld"
490 # define SOAP_ULONG_FORMAT "%lu"
491 # else
492 /* Default assumptions for supported functions */
493 # define HAVE_SNPRINTF
494 # define HAVE_STRRCHR
495 # define HAVE_STRTOD
496 # define HAVE_SSCANF
497 # define HAVE_STRTOL
498 # define HAVE_STRTOUL
499 # define HAVE_SYS_TIMEB_H
500 # define HAVE_FTIME
501 # define HAVE_RAND_R
502 # define HAVE_GETHOSTBYNAME_R
503 # define HAVE_GMTIME_R
504 # define HAVE_LOCALTIME_R
505 # define HAVE_STRERROR_R
506 # ifdef MB_LEN_MAX
507 # define HAVE_WCTOMB
508 # define HAVE_MBTOWC
509 # endif
510 # endif
511 #endif
513 /* native Win and HP-UX compilers don't like empty structs */
514 #if defined(WIN32) || defined(HP_UX) || defined(_AIX41) || defined(_AIX43) || defined(VXWORKS)
515 # define WITH_NOEMPTYSTRUCT
516 #endif
518 #ifdef HP_UX
519 # undef HAVE_STRTOLL
520 # undef HAVE_STRTOULL
521 #endif
523 /* older OpenVMS TCP/IP stacks cannot handle 65536 bytes */
524 #ifdef __VMS
525 # ifndef SOAP_BUFLEN
526 # define SOAP_BUFLEN (65535)
527 # endif
528 #endif
530 /* if we have xlocale.h we use it to avoid decimal point conversion issues */
531 #ifdef WITH_C_LOCALE
532 # include <locale.h>
533 # include <xlocale.h>
534 #else
535 # undef HAVE_STRTOF_L
536 # undef HAVE_STRTOD_L
537 # undef HAVE_SSCANF_L
538 # undef HAVE_SPRINTF_L
539 #endif
541 #ifndef WITH_NOSTDLIB
542 # include <stdlib.h>
543 # ifndef PALM
544 # include <stdio.h>
545 # include <string.h>
546 # endif
547 # include <ctype.h>
548 # include <limits.h>
549 #endif
551 #ifdef HAVE_POLL
552 # include <poll.h>
553 #endif
555 #if defined(__cplusplus) && !defined(WITH_LEAN) && !defined(WITH_COMPAT)
556 # include <string>
557 # include <iostream>
558 #endif
560 #ifdef WITH_NOHTTP
561 # ifndef WITH_NOIO
562 # define WITH_NOIO
563 # undef WITH_COOKIES
564 # endif
565 #endif
567 /* Suggestion when SOAP_FD_EXCEEDED error occurs:
568 Some systems allow increasing FD_SETSIZE before including sys/types.h:
569 #define FD_SETSIZE (2048)
572 #ifndef UNDER_CE
573 # ifndef PALM
574 # ifndef WITH_NOIO
575 # include <errno.h>
576 # include <sys/types.h>
577 # endif
578 # ifndef WITH_LEAN
579 # ifdef HAVE_SYS_TIMEB_H
580 # include <sys/timeb.h> /* for ftime() */
581 # endif
582 # include <time.h>
583 # endif
584 # endif
585 #endif
587 #ifdef OPENSERVER
588 # include <sys/socket.h>
589 # include <sys/stream.h>
590 # include <sys/protosw.h>
591 extern int h_errno;
592 #endif
594 #ifndef WITH_NOIO
595 # ifndef WIN32
596 # ifndef PALM
597 # include <sys/socket.h>
598 # ifdef VXWORKS
599 # include <sockLib.h>
600 # include <selectLib.h>
601 # ifndef _WRS_KERNEL
602 # include <strings.h>
603 # endif
604 # else
605 # ifndef SYMBIAN
606 # include <strings.h>
607 # endif
608 # endif
609 # ifdef SUN_OS
610 # include <sys/stream.h> /* SUN */
611 # include <sys/socketvar.h> /* SUN < 2.8 (?) */
612 # endif
613 # ifdef VXWORKS
614 # ifdef _WRS_KERNEL
615 # include <sys/times.h>
616 # endif
617 # else
618 # include <sys/time.h>
619 # endif
620 # include <netinet/in.h>
621 # ifdef OS390
622 # include <netinet/tcp_var.h>
623 # else
624 # include <netinet/tcp.h> /* TCP_NODELAY */
625 # endif
626 # include <arpa/inet.h>
627 # endif
628 # endif
629 #endif
631 #ifdef WIN32
632 # define SOAP_WINSOCKINT int
633 #else
634 # define SOAP_WINSOCKINT size_t
635 #endif
637 #ifdef WITH_IPV6
638 # ifdef IPV6_V6ONLY
639 # if !defined(WITH_NO_IPV6_V6ONLY) && !defined(WITH_IPV6_V6ONLY)
640 # define WITH_NO_IPV6_V6ONLY /* turn on IPv6-IPv4 switching */
641 # endif
642 # endif
643 #endif
645 #if defined(WITH_IPV6_V6ONLY) || defined(WITH_NO_IPV6_V6ONLY)
646 # ifndef WITH_IPV6
647 # define WITH_IPV6
648 # endif
649 #endif
651 #ifdef WIN32
652 # ifndef UNDER_CE
653 # include <io.h>
654 # include <fcntl.h>
655 # endif
656 # ifdef WITH_IPV6
657 # include <winsock2.h> /* Visual Studio 2005 users: you must install the Platform SDK (R2) */
658 # include <ws2tcpip.h>
659 # include <wspiapi.h>
660 # define SOAP_GAI_STRERROR gai_strerrorA
661 # else
662 # ifndef __BORLANDC__
663 # include <winsock.h> /* Visual Studio 2005 users: you must install the Platform SDK (R2) */
664 /* # include <winsock2.h> */ /* Alternative: use winsock2 (not available with eVC), enable this line and comment out the line above */
665 # else
666 # include <winsock2.h> /* Borland C */
667 # endif
668 # endif
669 #else
670 # ifdef VXWORKS
671 # include <hostLib.h>
672 # include <ioctl.h>
673 # include <ioLib.h>
674 # endif
675 # ifndef WITH_NOIO
676 # ifndef PALM
677 # include <netdb.h>
678 # include <netinet/in.h>
679 # include <unistd.h>
680 # include <fcntl.h>
681 # ifdef _AIX41
682 # include <sys/select.h>
683 # endif
684 # endif
685 # endif
686 #endif
688 #ifdef WITH_FASTCGI
689 # include <fcgi_stdio.h>
690 #endif
692 #ifdef WITH_OPENSSL
693 # undef WITH_GNUTLS
694 # define OPENSSL_NO_KRB5
695 # include <openssl/bio.h>
696 # include <openssl/err.h>
697 # include <openssl/rand.h>
698 # include <openssl/ssl.h>
699 # include <openssl/x509v3.h>
700 # ifndef ALLOW_OLD_VERSIONS
701 # if (OPENSSL_VERSION_NUMBER < 0x00905100L)
702 # error "Must use OpenSSL 0.9.6 or later"
703 # endif
704 # endif
705 #endif
707 #ifdef WITH_GNUTLS
708 # include <gnutls/gnutls.h>
709 # include <gnutls/x509.h>
710 # include <gcrypt.h>
711 # ifndef HAVE_PTHREAD_H
712 # ifdef _POSIX_THREADS
713 # define HAVE_PTHREAD_H /* make GNUTLS thread safe */
714 # endif
715 # endif
716 #endif
718 #ifdef WITH_GZIP
719 # ifndef WITH_ZLIB
720 # define WITH_ZLIB
721 # endif
722 #endif
724 #ifdef WITH_CASEINSENSITIVETAGS
725 # define SOAP_STRCMP soap_tag_cmp /* case insensitve XML element/attribute names */
726 #else
727 # define SOAP_STRCMP strcmp /* case sensitive XML element/attribute names */
728 #endif
730 #ifdef WITH_ZLIB
731 # include <zlib.h>
732 #endif
734 #ifndef WITH_NOSTDLIB
735 # ifndef PALM
736 # include <math.h> /* for isnan() */
737 # endif
738 #endif
740 /* #define DEBUG */ /* Uncomment to debug sending (in file SENT.log) receiving (in file RECV.log) and messages (in file TEST.log) */
742 #ifdef __cplusplus
743 extern "C" {
744 #endif
746 /* Portability: define SOAP_SOCKLEN_T */
747 #if defined(_AIX)
748 # if defined(_AIX43)
749 # define SOAP_SOCKLEN_T socklen_t
750 # else
751 # define SOAP_SOCKLEN_T int
752 # endif
753 #elif defined(SOCKLEN_T)
754 # define SOAP_SOCKLEN_T SOCKLEN_T
755 #elif defined(__socklen_t_defined) || defined(_SOCKLEN_T) || defined(CYGWIN) || defined(FREEBSD) || defined(__FreeBSD__) || defined(OPENBSD) || defined(__QNX__) || defined(QNX) || defined(OS390) || defined(HP_UX)
756 # define SOAP_SOCKLEN_T socklen_t
757 #elif defined(IRIX) || defined(WIN32) || defined(__APPLE__) || defined(SUN_OS) || defined(OPENSERVER) || defined(TRU64) || defined(VXWORKS)
758 # define SOAP_SOCKLEN_T int
759 #else
760 # define SOAP_SOCKLEN_T size_t
761 #endif
763 #ifndef SOAP_SOCKET
764 # ifdef WIN32
765 # define SOAP_SOCKET SOCKET
766 # define soap_closesocket(n) closesocket(n)
767 # else
768 # define SOAP_SOCKET int
769 # define soap_closesocket(n) close(n)
770 # endif
771 #endif
773 #define SOAP_INVALID_SOCKET ((SOAP_SOCKET)-1)
774 #define soap_valid_socket(n) ((n) != SOAP_INVALID_SOCKET)
776 #define SOAP_SHUT_WR 1
777 #define SOAP_SHUT_RDWR 2
779 #ifndef SOAP_GAI_STRERROR
780 # define SOAP_GAI_STRERROR gai_strerror
781 #endif
783 #ifndef FD_SETSIZE
784 # define FD_SETSIZE (1024)
785 #endif
787 #if defined(SYMBIAN)
788 # define LONG64 long
789 # define ULONG64 unsigned LONG64
790 #elif !defined(WIN32) || defined(CYGWIN) || defined(__GLIBC__) || defined(__GNU__)
791 # ifndef LONG64
792 # if defined(HAVE_STDINT_H)
793 # include <stdint.h>
794 # define LONG64 int64_t
795 # define ULONG64 uint64_t
796 # elif defined(__GLIBC__)
797 # include <bits/wordsize.h>
798 # if (__WORDSIZE == 64)
799 # define LONG64 int64_t
800 # define ULONG64 uint64_t
801 # ifndef SOAP_LONG_FORMAT
802 # define SOAP_LONG_FORMAT "%ld"
803 # endif
804 # ifndef SOAP_ULONG_FORMAT
805 # define SOAP_ULONG_FORMAT "%lu"
806 # endif
807 # else
808 # define LONG64 long long
809 # define ULONG64 unsigned LONG64
810 # endif
811 # else
812 # define LONG64 long long
813 # define ULONG64 unsigned LONG64
814 # endif
815 # endif
816 #elif defined(UNDER_CE)
817 # define LONG64 __int64
818 # define ULONG64 unsigned LONG64
819 #elif defined(__BORLANDC__)
820 # define LONG64 __int64
821 # define ULONG64 unsigned LONG64
822 #endif
824 #ifndef SOAP_LONG_FORMAT
825 # define SOAP_LONG_FORMAT "%lld" /* printf format for 64 bit ints */
826 #endif
828 #ifndef SOAP_ULONG_FORMAT
829 # define SOAP_ULONG_FORMAT "%llu" /* printf format for unsigned 64 bit ints */
830 #endif
832 #if defined(WIN32) && !defined(CYGWIN)
833 # define soap_int32 __int32
834 #elif defined(SYMBIAN)
835 # define soap_int32 long
836 #elif defined(PALM)
837 # define soap_int32 Int32
838 #elif defined(_AIX)
839 # define SOAP_NEW(type) new type /* AIX compilers don't like new (t) */
840 # if defined(_AIX43)
841 # define soap_int32 int32_t
842 # else
843 # define soap_int32 signed int
844 # endif
845 #else
846 # define soap_int32 int32_t
847 #endif
849 #ifdef WIN32
850 # define SOAP_ERANGE ERANGE
851 # define SOAP_EINTR WSAEINTR
852 # define SOAP_EAGAIN WSAEWOULDBLOCK
853 # define SOAP_EWOULDBLOCK WSAEWOULDBLOCK
854 # define SOAP_EINPROGRESS WSAEINPROGRESS
855 # define SOAP_EADDRINUSE WSAEADDRINUSE
856 #else
857 # define SOAP_ERANGE ERANGE
858 # define SOAP_EINTR EINTR
859 # define SOAP_EAGAIN EAGAIN
860 # define SOAP_EADDRINUSE EADDRINUSE
861 # ifdef SYMBIAN
862 # define SOAP_EWOULDBLOCK 9898
863 # define SOAP_EINPROGRESS 9899
864 # else
865 # define SOAP_EWOULDBLOCK EWOULDBLOCK
866 # define SOAP_EINPROGRESS EINPROGRESS
867 # endif
868 #endif
870 #ifdef WIN32
871 # ifdef UNDER_CE
872 # define soap_errno GetLastError()
873 # define soap_socket_errno(s) GetLastError()
874 # define soap_reset_errno SetLastError(0)
875 # else
876 # define soap_errno GetLastError()
877 # define soap_socket_errno(s) WSAGetLastError()
878 # define soap_reset_errno SetLastError(0)
879 # endif
880 #else
881 # ifndef WITH_NOIO
882 # define soap_errno errno
883 # define soap_socket_errno(s) errno
884 # define soap_reset_errno (errno = 0)
885 # else
886 # define soap_errno 0
887 # define soap_socket_errno(s) 0
888 # define soap_reset_errno
889 # endif
890 #endif
892 #ifndef SOAP_BUFLEN
893 # if !defined(WITH_LEAN)
894 # define SOAP_BUFLEN (65536) /* buffer length for socket packets, also used by gethostbyname_r and UDP messages, so don't make this too small */
895 # else
896 # define SOAP_BUFLEN (2048) /* lean size */
897 # endif
898 #endif
899 #ifndef SOAP_LABLEN
900 # define SOAP_LABLEN (256) /* initial look-aside buffer length */
901 #endif
902 #ifndef SOAP_PTRBLK
903 # define SOAP_PTRBLK (32) /* block allocation for pointer hash table chains */
904 #endif
905 #ifndef SOAP_PTRHASH
906 # ifndef WITH_LEAN
907 # define SOAP_PTRHASH (1024) /* size of pointer analysis hash table (must be power of 2) */
908 # else
909 # define SOAP_PTRHASH (32)
910 # endif
911 #endif
912 #ifndef SOAP_IDHASH
913 # ifndef WITH_LEAN
914 # define SOAP_IDHASH (1999) /* prime size of hash table for parsed id/ref */
915 # else
916 # define SOAP_IDHASH (19) /* 19, 199 */
917 # endif
918 #endif
919 #ifndef SOAP_BLKLEN
920 # ifndef WITH_LEAN
921 # define SOAP_BLKLEN (256) /* size of blocks to collect long strings and XML attributes */
922 # else
923 # define SOAP_BLKLEN (32)
924 # endif
925 #endif
926 #ifndef SOAP_TAGLEN
927 # ifndef WITH_LEAN
928 # define SOAP_TAGLEN (1024) /* maximum length of XML element tag/attribute name or host/path name + 1 */
929 # else
930 # define SOAP_TAGLEN (128)
931 # endif
932 #endif
933 #ifndef SOAP_HDRLEN
934 # ifndef WITH_LEAN
935 # define SOAP_HDRLEN (8192) /* maximum length of HTTP header line (must be >4096 to read cookies) */
936 # else
937 # define SOAP_HDRLEN (1024)
938 # endif
939 #endif
940 #ifndef SOAP_MAXDIMS
941 # ifndef WITH_LEAN
942 # define SOAP_MAXDIMS (16) /* maximum array dimensions (array nestings) must be less than 64 to protect soap->tmpbuf */
943 # else
944 # define SOAP_MAXDIMS (4)
945 # endif
946 #endif
948 #ifndef SOAP_MAXLOGS
949 # define SOAP_MAXLOGS (3) /* max number of debug logs per struct soap environment */
950 # define SOAP_INDEX_RECV (0)
951 # define SOAP_INDEX_SENT (1)
952 # define SOAP_INDEX_TEST (2)
953 #endif
955 /* Max iterations in soap_serve() to keep server connection alive */
956 #ifndef SOAP_MAXKEEPALIVE
957 # define SOAP_MAXKEEPALIVE (100)
958 #endif
960 /* Trusted max size of inbound SOAP array for compound array allocation.
961 Increase if necessary to allow larger arrays.
963 #ifndef SOAP_MAXARRAYSIZE
964 # define SOAP_MAXARRAYSIZE (1000000)
965 #endif
967 #ifdef VXWORKS
968 # ifdef WMW_RPM_IO
969 # include "httpLib.h"
970 # endif
971 # ifdef __INCmathh
972 # include <private/mathP.h>
973 # ifndef HAVE_ISNAN
974 # define HAVE_ISNAN
975 # endif
976 # ifndef soap_isnan
977 # define soap_isnan(num) isNan(num)
978 # endif
979 # endif
980 # ifdef WM_SECURE_KEY_STORAGE
981 # include <ipcom_key_db.h>
982 # endif
983 #endif
985 #ifdef WIN32
986 # include <float.h>
987 # ifndef HAVE_ISNAN
988 # define HAVE_ISNAN
989 # endif
990 # define soap_isnan(num) _isnan(num)
991 #endif
993 #ifdef SUN_OS
994 # define HAVE_ISNAN
995 #endif
997 #ifdef __APPLE__
998 # ifdef __cplusplus
999 # ifndef isnan
1000 extern "C" int isnan(double);
1001 # endif
1002 # endif
1003 # define HAVE_ISNAN
1004 #endif
1006 #if !defined(HAVE_ISNAN) && (defined(_MATH_H) || defined(_MATH_INCLUDED))
1007 # define HAVE_ISNAN
1008 #endif
1010 extern const struct soap_double_nan { unsigned int n1, n2; } soap_double_nan;
1012 #ifdef VXWORKS
1013 # ifndef FLT_MAX
1014 # define FLT_MAX _ARCH_FLT_MAX
1015 # endif
1016 # ifndef DBL_MAX
1017 # define DBL_MAX _ARCH_DBL_MAX
1018 # endif
1019 #endif
1021 #ifndef FLT_NAN
1022 # define FLT_NAN (*(float*)(void*)&soap_double_nan)
1023 #endif
1025 #ifndef FLT_PINFTY
1026 # if defined(FLT_MAX)
1027 # define FLT_PINFTY FLT_MAX
1028 # elif defined(HUGE_VALF)
1029 # define FLT_PINFTY (float)HUGE_VALF
1030 # elif defined(HUGE_VAL)
1031 # define FLT_PINFTY (float)HUGE_VAL
1032 # elif defined(FLOAT_MAX)
1033 # define FLT_PINFTY FLOAT_MAX
1034 # else
1035 # define FLT_PINFTY (3.40282347e+38F)
1036 # endif
1037 #endif
1039 #ifndef FLT_NINFTY
1040 # define FLT_NINFTY (-FLT_PINFTY)
1041 #endif
1043 #ifndef DBL_NAN
1044 # define DBL_NAN (*(double*)(void*)&soap_double_nan)
1045 #endif
1047 #ifndef DBL_PINFTY
1048 # if defined(DBL_MAX)
1049 # define DBL_PINFTY DBL_MAX
1050 # elif defined(HUGE_VALF)
1051 # define DBL_PINFTY (double)HUGE_VALF
1052 # elif defined(HUGE_VAL)
1053 # define DBL_PINFTY (double)HUGE_VAL
1054 # elif defined(DOUBLE_MAX)
1055 # define DBL_PINFTY DOUBLE_MAX
1056 # else
1057 # define DBL_PINFTY (1.7976931348623157e+308)
1058 # endif
1059 #endif
1061 #ifndef DBL_NINFTY
1062 # define DBL_NINFTY (-DBL_PINFTY)
1063 #endif
1065 #ifndef soap_isnan
1066 # ifdef HAVE_ISNAN
1067 # define soap_isnan(n) isnan(n)
1068 # else
1069 # define soap_isnan(n) (0)
1070 # endif
1071 #endif
1073 #define soap_ispinfd(n) ((n) >= DBL_PINFTY)
1074 #define soap_ispinff(n) ((n) >= FLT_PINFTY)
1075 #define soap_isninfd(n) ((n) <= DBL_NINFTY)
1076 #define soap_isninff(n) ((n) <= FLT_NINFTY)
1078 /* gSOAP error codes */
1080 #define SOAP_EOF EOF
1081 #define SOAP_ERR EOF
1082 #define SOAP_OK 0
1083 #define SOAP_CLI_FAULT 1
1084 #define SOAP_SVR_FAULT 2
1085 #define SOAP_TAG_MISMATCH 3
1086 #define SOAP_TYPE 4
1087 #define SOAP_SYNTAX_ERROR 5
1088 #define SOAP_NO_TAG 6
1089 #define SOAP_IOB 7
1090 #define SOAP_MUSTUNDERSTAND 8
1091 #define SOAP_NAMESPACE 9
1092 #define SOAP_USER_ERROR 10
1093 #define SOAP_FATAL_ERROR 11
1094 #define SOAP_FAULT 12
1095 #define SOAP_NO_METHOD 13
1096 #define SOAP_NO_DATA 14
1097 #define SOAP_GET_METHOD 15
1098 #define SOAP_PUT_METHOD 16
1099 #define SOAP_DEL_METHOD 17 /* deprecated */
1100 #define SOAP_HEAD_METHOD 18 /* deprecated */
1101 #define SOAP_HTTP_METHOD 19
1102 #define SOAP_EOM 20
1103 #define SOAP_MOE 21
1104 #define SOAP_HDR 22
1105 #define SOAP_NULL 23
1106 #define SOAP_DUPLICATE_ID 24
1107 #define SOAP_MISSING_ID 25
1108 #define SOAP_HREF 26
1109 #define SOAP_UDP_ERROR 27
1110 #define SOAP_TCP_ERROR 28
1111 #define SOAP_HTTP_ERROR 29
1112 #define SOAP_SSL_ERROR 30
1113 #define SOAP_ZLIB_ERROR 31
1114 #define SOAP_DIME_ERROR 32
1115 #define SOAP_DIME_HREF 33
1116 #define SOAP_DIME_MISMATCH 34
1117 #define SOAP_DIME_END 35
1118 #define SOAP_MIME_ERROR 36
1119 #define SOAP_MIME_HREF 37
1120 #define SOAP_MIME_END 38
1121 #define SOAP_VERSIONMISMATCH 39
1122 #define SOAP_PLUGIN_ERROR 40
1123 #define SOAP_DATAENCODINGUNKNOWN 41
1124 #define SOAP_REQUIRED 42
1125 #define SOAP_PROHIBITED 43
1126 #define SOAP_OCCURS 44
1127 #define SOAP_LENGTH 45
1128 #define SOAP_FD_EXCEEDED 46
1130 #define soap_xml_error_check(e) ((e) == SOAP_TAG_MISMATCH || (e) == SOAP_NO_TAG || (e) == SOAP_SYNTAX_ERROR || (e) == SOAP_NAMESPACE || (e) == SOAP_DUPLICATE_ID || (e) == SOAP_MISSING_ID || (e) == SOAP_REQUIRED || (e) == SOAP_PROHIBITED || (e) == SOAP_OCCURS || (e) == SOAP_LENGTH || (e) == SOAP_NULL || (e) == SOAP_HREF)
1131 #define soap_soap_error_check(e) ((e) == SOAP_CLI_FAULT || (e) == SOAP_SVR_FAULT || (e) == SOAP_VERSIONMISMATCH || (e) == SOAP_MUSTUNDERSTAND || (e) == SOAP_FAULT || (e) == SOAP_NO_METHOD)
1132 #define soap_tcp_error_check(e) ((e) == SOAP_EOF || (e) == SOAP_TCP_ERROR)
1133 #define soap_ssl_error_check(e) ((e) == SOAP_SSL_ERROR)
1134 #define soap_zlib_error_check(e) ((e) == SOAP_ZLIB_ERROR)
1135 #define soap_http_error_check(e) ((e) == SOAP_HTTP_ERROR || (e) == SOAP_NO_DATA || ((e) >= SOAP_GET_METHOD && (e) <= SOAP_HTTP_METHOD) || ((e) >= 100 && (e) < 600))
1137 /* gSOAP HTTP response status codes 100 to 599 are reserved */
1139 /* Codes 600 to 999 are user definable */
1141 /* Exceptional gSOAP HTTP server response status codes >= 1000 */
1143 #define SOAP_STOP 1000 /* No HTTP response */
1144 #define SOAP_FORM 1001 /* Form request/response */
1145 #define SOAP_HTML 1002 /* Custom HTML response */
1146 #define SOAP_FILE 1003 /* Custom file-based response */
1148 /* gSOAP HTTP method codes (client) */
1150 #define SOAP_POST 2000 /* POST request */
1151 #define SOAP_POST_FILE 2001 /* Custom file-based POST request */
1152 #define SOAP_GET 2002 /* GET request */
1154 /* gSOAP DIME */
1156 #define SOAP_DIME_CF 0x01
1157 #define SOAP_DIME_ME 0x02
1158 #define SOAP_DIME_MB 0x04
1159 #define SOAP_DIME_VERSION 0x08 /* DIME version 1 */
1160 #define SOAP_DIME_MEDIA 0x10
1161 #define SOAP_DIME_ABSURI 0x20
1163 /* gSOAP ZLIB */
1165 #define SOAP_ZLIB_NONE 0x00
1166 #define SOAP_ZLIB_DEFLATE 0x01
1167 #define SOAP_ZLIB_INFLATE 0x02
1168 #define SOAP_ZLIB_GZIP 0x02
1170 /* gSOAP transport, connection, and content encoding modes */
1172 typedef soap_int32 soap_mode;
1174 #define SOAP_IO 0x00000003 /* IO mask */
1175 #define SOAP_IO_FLUSH 0x00000000 /* flush output immediately, no buffering */
1176 #define SOAP_IO_BUFFER 0x00000001 /* buffer output in packets of size SOAP_BUFLEN */
1177 #define SOAP_IO_STORE 0x00000002 /* store entire output to determine length for transport */
1178 #define SOAP_IO_CHUNK 0x00000003 /* use HTTP chunked transfer AND buffer packets */
1180 #define SOAP_IO_UDP 0x00000004 /* TCP or UDP */
1181 #define SOAP_IO_LENGTH 0x00000008 /* calc message length (internal) */
1182 #define SOAP_IO_KEEPALIVE 0x00000010 /* keep connection alive */
1184 #define SOAP_ENC 0x00000FFF /* IO and ENC mask */
1185 #define SOAP_ENC_LATIN 0x00000020 /* in: accept iso-8859-1 */
1186 #define SOAP_ENC_XML 0x00000040 /* out: plain XML encoding, no HTTP header */
1187 #define SOAP_ENC_DIME 0x00000080
1188 #define SOAP_ENC_MIME 0x00000100
1189 #define SOAP_ENC_MTOM 0x00000200
1190 #define SOAP_ENC_ZLIB 0x00000400
1191 #define SOAP_ENC_SSL 0x00000800
1193 #define SOAP_XML_STRICT 0x00001000 /* in: strict validation */
1194 #define SOAP_XML_INDENT 0x00002000 /* out: emit indented XML */
1195 #define SOAP_XML_IGNORENS 0x00004000 /* in: ignore namespaces */
1196 #define SOAP_XML_DEFAULTNS 0x00008000 /* out: emit xmlns="..." */
1197 #define SOAP_XML_CANONICAL 0x00010000 /* out: excC14N canonical XML */
1198 #define SOAP_XML_TREE 0x00020000 /* out: XML tree (no id/ref) */
1199 #define SOAP_XML_GRAPH 0x00040000 /* see DOM manual */
1200 #define SOAP_XML_NIL 0x00080000 /* out: NULLs as xsi:nil */
1202 #define SOAP_C_NOIOB 0x00100000 /* don't fault on array index out of bounds (just ignore) */
1203 #define SOAP_C_UTFSTRING 0x00200000 /* (de)serialize strings with UTF8 content */
1204 #define SOAP_C_MBSTRING 0x00400000 /* (de)serialize strings with multi-byte content */
1205 #define SOAP_C_NILSTRING 0x00800000 /* serialize empty strings as nil (omitted) */
1207 #define SOAP_XML_DOM 0x01000000
1209 #define SOAP_DOM_TREE 0x02000000
1210 #define SOAP_DOM_NODE 0x04000000
1211 #define SOAP_DOM_ASIS 0x08000000
1213 #define SOAP_MIME_POSTCHECK 0x10000000 /* MIME flag (internal) */
1215 #define SOAP_XML_SEC 0x80000000 /* reserved for WS security */
1217 /* WITH_XMLNS backward compatibility: always use XML default namespaces */
1218 #ifdef WITH_XMLNS
1219 # define SOAP_IO_DEFAULT (SOAP_IO_FLUSH | SOAP_XML_DEFAULTNS)
1220 #else
1221 # define SOAP_IO_DEFAULT SOAP_IO_FLUSH
1222 #endif
1224 /* SSL client/server authentication settings */
1226 #define SOAP_SSL_NO_AUTHENTICATION 0x00 /* for testing purposes */
1227 #define SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION 0x01 /* client requires server to authenticate */
1228 #define SOAP_SSL_REQUIRE_CLIENT_AUTHENTICATION 0x02 /* server requires client to authenticate */
1229 #define SOAP_SSL_SKIP_HOST_CHECK 0x04 /* client does not check the common name of the host in certificate */
1230 #define SOAP_SSL_ALLOW_EXPIRED_CERTIFICATE 0x08 /* client does not check the expiration date of the host certificate */
1231 #define SOAP_SSL_NO_DEFAULT_CA_PATH 0x10 /* don't use default_verify_paths */
1232 #define SOAP_SSL_RSA 0x20 /* use RSA */
1233 #define SOAP_SSLv3 0x40 /* SSL v3 only */
1234 #define SOAP_TLSv1 0x80 /* TLS v1 only */
1235 #define SOAP_SSLv3_TLSv1 0x00 /* SSL v3 and TLS v1 support by default (no SSL v1/v2) */
1236 #define SOAP_SSL_CLIENT 0x100 /* client context */
1238 #define SOAP_SSL_DEFAULT (SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION | SOAP_SSLv3_TLSv1)
1240 /* state */
1242 #define SOAP_NONE 0
1243 #define SOAP_INIT 1
1244 #define SOAP_COPY 2
1246 #define soap_check_state(soap) (!(soap) || ((soap)->state != SOAP_INIT && (soap)->state != SOAP_COPY))
1248 /* part */
1250 #define SOAP_BEGIN 0
1251 #define SOAP_IN_ENVELOPE 2
1252 #define SOAP_IN_HEADER 3
1253 #define SOAP_END_HEADER 4
1254 #define SOAP_NO_BODY 5
1255 #define SOAP_IN_BODY 6
1256 #define SOAP_END_BODY 7
1257 #define SOAP_END_ENVELOPE 8
1258 #define SOAP_END 9
1259 #define SOAP_BEGIN_SECURITY 10
1260 #define SOAP_IN_SECURITY 11
1261 #define SOAP_END_SECURITY 12
1263 /* DEBUG macros */
1265 #ifndef WITH_LEAN
1266 # ifdef DEBUG
1267 # ifndef SOAP_DEBUG
1268 # define SOAP_DEBUG
1269 # endif
1270 # ifndef SOAP_MEM_DEBUG
1271 # define SOAP_MEM_DEBUG
1272 # endif
1273 # endif
1274 #endif
1276 #ifdef SOAP_MEM_DEBUG
1277 # ifndef SOAP_MALLOC
1278 # define SOAP_MALLOC(soap, size) soap_track_malloc(soap, __FILE__, __LINE__, size)
1279 # endif
1280 # ifndef SOAP_FREE
1281 # define SOAP_FREE(soap, ptr) soap_track_free(soap, __FILE__, __LINE__, ptr)
1282 # endif
1283 #endif
1285 #ifndef SOAP_MALLOC /* use libc malloc */
1286 # define SOAP_MALLOC(soap, size) malloc(size)
1287 #endif
1289 #ifndef SOAP_FREE /* use libc free */
1290 # define SOAP_FREE(soap, ptr) free(ptr)
1291 #endif
1293 #ifndef SOAP_NEW /* use C++ new operator */
1294 # if __GNUC__ <= 2
1295 # define SOAP_NEW(type) new type /* old form w/o parenthesis */
1296 # else
1297 # define SOAP_NEW(type) new (type) /* with parenthesis */
1298 # endif
1299 #endif
1301 #ifndef SOAP_NEW_COPY /* use C++ new operator for ::copy() */
1302 # define SOAP_NEW_COPY(clas) new clas
1303 #endif
1305 #ifndef SOAP_DELETE /* use C++ delete operator */
1306 # define SOAP_DELETE(obj) delete obj
1307 #endif
1309 #ifndef SOAP_DELETE_ARRAY /* use C++ delete[] operator */
1310 # define SOAP_DELETE_ARRAY(obj) delete[] obj
1311 #endif
1313 #ifdef SOAP_DEBUG
1314 # ifndef SOAP_MESSAGE
1315 # define SOAP_MESSAGE fprintf
1316 # endif
1317 # ifndef DBGLOG
1318 # define DBGLOG(DBGFILE, CMD) \
1319 { if (soap)\
1320 { if (!soap->fdebug[SOAP_INDEX_##DBGFILE])\
1321 soap_open_logfile((struct soap*)soap, SOAP_INDEX_##DBGFILE);\
1322 if (soap->fdebug[SOAP_INDEX_##DBGFILE])\
1323 { FILE *fdebug = soap->fdebug[SOAP_INDEX_##DBGFILE];\
1324 CMD;\
1325 fflush(fdebug);\
1329 # endif
1330 # ifndef DBGMSG
1331 # define DBGMSG(DBGFILE, MSG, LEN) \
1332 { if (soap)\
1333 { if (!soap->fdebug[SOAP_INDEX_##DBGFILE])\
1334 soap_open_logfile((struct soap*)soap, SOAP_INDEX_##DBGFILE);\
1335 if (soap->fdebug[SOAP_INDEX_##DBGFILE])\
1336 { fwrite((MSG), 1, (LEN), soap->fdebug[SOAP_INDEX_##DBGFILE]);\
1337 fflush(soap->fdebug[SOAP_INDEX_##DBGFILE]);\
1341 # endif
1342 # ifndef DBGFUN
1343 # define DBGFUN(FNAME) DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): %s()\n", __FILE__, __LINE__, FNAME))
1344 # define DBGFUN1(FNAME, FMT, ARG) DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): %s("FMT")\n", __FILE__, __LINE__, FNAME, (ARG)))
1345 # define DBGFUN2(FNAME, FMT1, ARG1, FMT2, ARG2) DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): %s("FMT1", "FMT2")\n", __FILE__, __LINE__, FNAME, (ARG1), (ARG2)))
1346 # 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)))
1347 # endif
1348 # ifndef DBGHEX
1349 # define DBGHEX(DBGFILE, MSG, LEN) \
1350 { if (soap)\
1351 { if (!soap->fdebug[SOAP_INDEX_##DBGFILE])\
1352 soap_open_logfile(soap, SOAP_INDEX_##DBGFILE);\
1353 if (soap->fdebug[SOAP_INDEX_##DBGFILE])\
1354 { int i; char *s;\
1355 for (s = (char*)(MSG), i = (LEN); i; i--)\
1356 fprintf(soap->fdebug[SOAP_INDEX_##DBGFILE], "%2.2X ", (int)*s++&0xFF);\
1357 fflush(soap->fdebug[SOAP_INDEX_##DBGFILE]);\
1361 # endif
1362 #else
1363 # define DBGLOG(DBGFILE, CMD)
1364 # define DBGMSG(DBGFILE, MSG, LEN)
1365 # define DBGFUN(FNAME)
1366 # define DBGFUN1(FNAME, FMT, ARG)
1367 # define DBGFUN2(FNAME, FMT1, ARG1, FMT2, ARG2)
1368 # define DBGFUN3(FNAME, FMT1, ARG1, FMT2, ARG2, FMT3, ARG3)
1369 # define DBGHEX(DBGFILE, MSG, LEN)
1370 #endif
1372 /* UCS-4 requires 32 bits (0-7FFFFFFF, the sign bit is used by gSOAP to distinguish XML entities) */
1373 typedef soap_int32 soap_wchar;
1375 /* namespace table row */
1376 struct Namespace
1377 { const char *id;
1378 const char *ns;
1379 const char *in;
1380 char *out;
1383 /* namespace stack */
1384 struct soap_nlist
1385 { struct soap_nlist *next;
1386 unsigned int level; /* nesting depth level */
1387 short index; /* corresponding entry in ns mapping table */
1388 const char *ns; /* only set when parsed ns URI is not in the ns mapping table */
1389 char id[1]; /* the actual string value flows into the allocated region below this struct */
1392 /* block stack for nested block allocations */
1393 struct soap_blist
1394 { struct soap_blist *next;
1395 char *ptr;
1396 size_t size;
1399 /* array layout */
1400 struct soap_array
1401 { void *__ptr;
1402 int __size;
1405 /* pointer serialization management */
1406 struct soap_plist
1407 { struct soap_plist *next;
1408 const void *ptr;
1409 const struct soap_array *array;
1410 int type;
1411 int id;
1412 char mark1;
1413 char mark2;
1416 /* block allocation for pointer serialization management */
1417 struct soap_pblk
1418 { struct soap_pblk *next;
1419 struct soap_plist plist[SOAP_PTRBLK];
1422 #ifdef SOAP_MEM_DEBUG
1423 /* malloc/free tracking for debugging */
1424 struct soap_mlist
1425 { struct soap_mlist *next;
1426 const void *ptr;
1427 const char *file;
1428 int line;
1429 short live;
1431 #endif
1433 /* class allocation list */
1434 struct soap_clist
1435 { struct soap_clist *next;
1436 void *ptr;
1437 int type;
1438 int size;
1439 int (*fdelete)(struct soap_clist*);
1442 /* attributes */
1443 struct soap_attribute
1444 { struct soap_attribute *next;
1445 short flag; /* soap_set_attr: 1 = normal, 2 = utf content */
1446 char *value;
1447 size_t size;
1448 char *ns;
1449 short visible;
1450 char name[1]; /* the actual name string flows into the allocated region below this struct */
1453 #ifndef WITH_LEAN
1454 struct soap_cookie
1455 { struct soap_cookie *next;
1456 char *name;
1457 char *value;
1458 char *domain;
1459 char *path;
1460 time_t expire; /* client-side: local time to expire */
1461 long maxage; /* server-side: seconds to expire */
1462 unsigned int version;
1463 short secure;
1464 short session; /* server-side */
1465 short env; /* server-side: got cookie from client and should not be (re)send */
1466 short modified; /* server-side: client cookie was modified and should be send */
1468 #endif
1470 SOAP_FMAC1 struct soap_multipart* SOAP_FMAC2 soap_next_multipart(struct soap_multipart*);
1472 #ifdef __cplusplus
1474 class soap_multipart_iterator
1475 { public:
1476 struct soap_multipart *content;
1477 bool operator==(const soap_multipart_iterator& iter) const
1478 { return (bool)(content == iter.content); }
1479 bool operator!=(const soap_multipart_iterator& iter) const
1480 { return (bool)(content != iter.content); }
1481 struct soap_multipart &operator*() const
1482 { return *content; }
1483 soap_multipart_iterator &operator++()
1484 { content = soap_next_multipart(content); return *this; }
1485 soap_multipart_iterator() : content(NULL)
1487 soap_multipart_iterator(struct soap_multipart *p) : content(p)
1490 #endif
1492 #ifndef WITH_LEANER
1493 struct soap_dime
1494 { size_t count;
1495 size_t size;
1496 size_t chunksize;
1497 size_t buflen;
1498 char flags;
1499 char *ptr;
1500 const char *id;
1501 const char *type;
1502 const char *options;
1503 struct soap_multipart *list; /* list of DIME attachments received */
1504 struct soap_multipart *first, *last; /* temporary in/out queue */
1505 #ifdef __cplusplus
1506 soap_multipart_iterator begin()
1507 { soap_multipart_iterator iter(list); return iter; };
1508 soap_multipart_iterator end()
1509 { soap_multipart_iterator iter(NULL); return iter; };
1510 #endif
1512 #endif
1514 #ifndef WITH_LEANER
1515 struct soap_mime
1516 { char *boundary; /* MIME boundary */
1517 const char *start; /* MIME start ID */
1518 struct soap_multipart *list; /* list of MIME attachments received */
1519 struct soap_multipart *first, *last; /* temporary in/out queue */
1520 #ifdef __cplusplus
1521 soap_multipart_iterator begin()
1522 { soap_multipart_iterator iter(list); return iter; };
1523 soap_multipart_iterator end()
1524 { soap_multipart_iterator iter(NULL); return iter; };
1525 #endif
1527 #endif
1529 #ifndef WITH_LEANER
1530 /* RFC2045 MIME content transfer encodings */
1531 enum soap_mime_encoding
1532 { SOAP_MIME_NONE,
1533 SOAP_MIME_7BIT,
1534 SOAP_MIME_8BIT,
1535 SOAP_MIME_BINARY,
1536 SOAP_MIME_QUOTED_PRINTABLE,
1537 SOAP_MIME_BASE64,
1538 SOAP_MIME_IETF_TOKEN,
1539 SOAP_MIME_X_TOKEN
1541 #endif
1543 #ifndef WITH_LEANER
1544 /* DIME/MIME multipart list */
1545 struct soap_multipart
1546 { struct soap_multipart *next;
1547 char *ptr; /* points to raw data content */
1548 size_t size; /* size of data content */
1549 const char *id; /* DIME/MIME content ID or form data name */
1550 const char *type; /* DIME/MIME type (MIME type format) */
1551 const char *options; /* DIME options */
1552 enum soap_mime_encoding encoding; /* MIME Content-Transfer-Encoding */
1553 const char *location; /* MIME Content-Location (optional) */
1554 const char *description; /* MIME Content-Description (optional) */
1555 #ifdef __cplusplus
1556 typedef soap_multipart_iterator iterator;
1557 #endif
1559 #endif
1561 #ifndef WITH_LEANER
1562 /* attachment DIME and MTOM XOP forwarding */
1563 struct soap_xlist
1564 { struct soap_xlist *next;
1565 unsigned char **ptr;
1566 int *size;
1567 char *id;
1568 char **type;
1569 char **options;
1571 #endif
1573 /******************************************************************************/
1575 #ifndef WITH_LEANER
1576 #ifdef __cplusplus
1577 class soap_dom_attribute_iterator
1578 { public:
1579 struct soap_dom_attribute *att;
1580 const char *nstr;
1581 const char *name;
1582 bool operator==(const soap_dom_attribute_iterator&) const;
1583 bool operator!=(const soap_dom_attribute_iterator&) const;
1584 struct soap_dom_attribute &operator*() const;
1585 soap_dom_attribute_iterator &operator++();
1586 soap_dom_attribute_iterator();
1587 soap_dom_attribute_iterator(struct soap_dom_attribute*);
1588 ~soap_dom_attribute_iterator();
1590 #endif
1591 #endif
1593 #ifndef WITH_LEANER
1594 struct soap_dom_attribute
1595 { struct soap_dom_attribute *next;
1596 const char *nstr;
1597 char *name;
1598 char *data;
1599 wchar_t *wide;
1600 struct soap *soap;
1601 #ifdef __cplusplus
1602 typedef soap_dom_attribute_iterator iterator;
1603 struct soap_dom_attribute &set(const char *nstr, const char *name); /* set namespace and name */
1604 struct soap_dom_attribute &set(const char *data); /* set data */
1605 soap_dom_attribute_iterator begin();
1606 soap_dom_attribute_iterator end();
1607 soap_dom_attribute_iterator find(const char *nstr, const char *name);
1608 void unlink();
1609 soap_dom_attribute();
1610 soap_dom_attribute(struct soap *soap);
1611 soap_dom_attribute(struct soap *soap, const char *nstr, const char *name, const char *data);
1612 ~soap_dom_attribute();
1613 #endif
1615 #endif
1617 #ifndef WITH_LEANER
1618 #ifdef __cplusplus
1619 class soap_dom_element_iterator
1620 { public:
1621 struct soap_dom_element *elt;
1622 const char *nstr;
1623 const char *name;
1624 int type;
1625 bool operator==(const soap_dom_element_iterator&) const;
1626 bool operator!=(const soap_dom_element_iterator&) const;
1627 struct soap_dom_element &operator*() const;
1628 soap_dom_element_iterator &operator++();
1629 soap_dom_element_iterator();
1630 soap_dom_element_iterator(struct soap_dom_element*);
1631 ~soap_dom_element_iterator();
1633 #endif
1634 #endif
1636 #ifndef WITH_LEANER
1637 struct soap_dom_element
1638 { struct soap_dom_element *next; /* next sibling */
1639 struct soap_dom_element *prnt; /* parent */
1640 struct soap_dom_element *elts; /* list of child elements */
1641 struct soap_dom_attribute *atts; /* list of attributes */
1642 const char *nstr; /* namespace string */
1643 char *name; /* element tag name */
1644 char *data; /* element content data (with SOAP_C_UTFSTRING flag set) */
1645 wchar_t *wide; /* element content data */
1646 int type; /* optional: serialized C/C++ data type */
1647 void *node; /* optional: pointer to serialized C/C++ data */
1648 char *head; /* leading content before start tag */
1649 char *tail; /* leading content before end tag */
1650 struct soap *soap; /* soap context that manages this node */
1651 #ifdef __cplusplus
1652 typedef soap_dom_element_iterator iterator;
1653 struct soap_dom_element &set(const char *nstr, const char *name);
1654 struct soap_dom_element &set(const char *data);
1655 struct soap_dom_element &set(void *node, int type);
1656 struct soap_dom_element &add(struct soap_dom_element*);
1657 struct soap_dom_element &add(struct soap_dom_element&);
1658 struct soap_dom_element &add(struct soap_dom_attribute*);
1659 struct soap_dom_element &add(struct soap_dom_attribute&);
1660 soap_dom_element_iterator begin();
1661 soap_dom_element_iterator end();
1662 soap_dom_element_iterator find(const char *nstr, const char *name);
1663 soap_dom_element_iterator find(int type);
1664 void unlink();
1665 soap_dom_element();
1666 soap_dom_element(struct soap *soap);
1667 soap_dom_element(struct soap *soap, const char *nstr, const char *name);
1668 soap_dom_element(struct soap *soap, const char *nstr, const char *name, const char *data);
1669 soap_dom_element(struct soap *soap, const char *nstr, const char *name, void *node, int type);
1670 ~soap_dom_element();
1671 #endif
1673 SOAP_FMAC1 struct soap_dom_element * SOAP_FMAC2 soap_dom_next_element(struct soap_dom_element *elt);
1674 SOAP_FMAC1 struct soap_dom_attribute * SOAP_FMAC2 soap_dom_next_attribute(struct soap_dom_attribute *att);
1675 #endif
1677 #if defined(__cplusplus) && !defined(WITH_LEAN) && !defined(WITH_COMPAT)
1679 extern std::ostream &operator<<(std::ostream&, const struct soap_dom_element&);
1680 extern std::istream &operator>>(std::istream&, struct soap_dom_element&);
1681 extern "C" {
1682 #endif
1684 /******************************************************************************/
1686 #ifdef WIN32
1687 # ifdef SOAP_STD_EXPORTS
1688 # define SOAP_STD_API __declspec(dllexport)
1689 # else
1690 # define SOAP_STD_API
1691 # endif
1692 #else
1693 # define SOAP_STD_API
1694 #endif
1696 struct SOAP_STD_API soap
1697 { short state; /* 0 = uninitialized, 1 = initialized, 2 = copy of another soap struct */
1698 short version; /* 1 = SOAP1.1 and 2 = SOAP1.2 (set automatically from namespace URI in nsmap table) */
1699 soap_mode mode;
1700 soap_mode imode;
1701 soap_mode omode;
1702 const char *float_format; /* user-definable format string for floats (<1024 chars) */
1703 const char *double_format; /* user-definable format string for doubles (<1024 chars) */
1704 const char *dime_id_format; /* user-definable format string for integer DIME id (<SOAP_TAGLEN chars) */
1705 const char *http_version; /* HTTP version used "1.0" or "1.1" */
1706 const char *http_content; /* optional custom response content type (with SOAP_FILE) */
1707 const char *encodingStyle; /* default = NULL which means that SOAP encoding is used */
1708 const char *actor; /* SOAP-ENV:actor or role attribute value */
1709 const char *lang; /* xml:lang attribute value of SOAP-ENV:Text */
1710 int recv_timeout; /* when > 0, gives socket recv timeout in seconds, < 0 in usec */
1711 int send_timeout; /* when > 0, gives socket send timeout in seconds, < 0 in usec */
1712 int connect_timeout; /* when > 0, gives socket connect() timeout in seconds, < 0 in usec */
1713 int accept_timeout; /* when > 0, gives socket accept() timeout in seconds, < 0 in usec */
1714 int socket_flags; /* socket recv() and send() flags, e.g. set to MSG_NOSIGNAL to disable sigpipe */
1715 int connect_flags; /* connect() SOL_SOCKET sockopt flags, e.g. set to SO_DEBUG to debug socket */
1716 int bind_flags; /* bind() SOL_SOCKET sockopt flags, e.g. set to SO_REUSEADDR to enable reuse */
1717 int accept_flags; /* accept() SOL_SOCKET sockopt flags */
1718 unsigned short linger_time; /* linger time for SO_LINGER option */
1719 const struct Namespace *namespaces; /* Pointer to global namespace mapping table */
1720 struct Namespace *local_namespaces; /* Local namespace mapping table */
1721 struct soap_nlist *nlist; /* namespace stack */
1722 struct soap_blist *blist; /* block allocation stack */
1723 struct soap_clist *clist; /* class instance allocation list */
1724 void *alist; /* memory allocation (malloc) list */
1725 struct soap_ilist *iht[SOAP_IDHASH];
1726 struct soap_plist *pht[SOAP_PTRHASH];
1727 struct soap_pblk *pblk; /* plist block allocation */
1728 short pidx; /* plist block allocation */
1729 struct SOAP_ENV__Header *header;
1730 struct SOAP_ENV__Fault *fault;
1731 int idnum;
1732 void *user; /* to pass user-defined data */
1733 struct soap_plugin *plugins; /* linked list of plug-in data */
1734 const char *userid; /* HTTP Basic authorization userid */
1735 const char *passwd; /* HTTP Basic authorization passwd */
1736 int (*fpost)(struct soap*, const char*, const char*, int, const char*, const char*, size_t);
1737 int (*fget)(struct soap*); /* HTTP GET hook (not set by default) */
1738 int (*fput)(struct soap*); /* HTTP PUT hook (handled as POST) */
1739 int (*fdel)(struct soap*); /* HTTP DELETE hook (not set by default) */
1740 int (*fopt)(struct soap*); /* HTTP OPTIONS hook (not set by default) */
1741 int (*fhead)(struct soap*); /* HTTP HEAD hook (not set by default) */
1742 int (*fform)(struct soap*); /* HTTP/HTML form handler for plugins */
1743 int (*fposthdr)(struct soap*, const char*, const char*);
1744 int (*fresponse)(struct soap*, int, size_t);
1745 int (*fparse)(struct soap*);
1746 int (*fparsehdr)(struct soap*, const char*, const char*);
1747 int (*fheader)(struct soap*);
1748 int (*fresolve)(struct soap*, const char*, struct in_addr* inaddr);
1749 int (*fconnect)(struct soap*, const char*, const char*, int);
1750 int (*fdisconnect)(struct soap*);
1751 int (*fclosesocket)(struct soap*, SOAP_SOCKET);
1752 int (*fshutdownsocket)(struct soap*, SOAP_SOCKET, int);
1753 SOAP_SOCKET (*fopen)(struct soap*, const char*, const char*, int);
1754 SOAP_SOCKET (*faccept)(struct soap*, SOAP_SOCKET, struct sockaddr*, int *n);
1755 int (*fclose)(struct soap*);
1756 int (*fsend)(struct soap*, const char*, size_t);
1757 size_t (*frecv)(struct soap*, char*, size_t);
1758 int (*fpoll)(struct soap*);
1759 void (*fseterror)(struct soap*, const char **c, const char **s);
1760 int (*fignore)(struct soap*, const char*);
1761 int (*fserveloop)(struct soap*);
1762 void *(*fplugin)(struct soap*, const char*);
1763 void *(*fmalloc)(struct soap*, size_t);
1764 #ifndef WITH_LEANER
1765 int (*fprepareinitsend)(struct soap*);
1766 int (*fprepareinitrecv)(struct soap*);
1767 int (*fpreparesend)(struct soap*, const char*, size_t);
1768 int (*fpreparerecv)(struct soap*, const char*, size_t);
1769 int (*fpreparefinalsend)(struct soap*);
1770 int (*fpreparefinalrecv)(struct soap*);
1771 void *(*fdimereadopen)(struct soap*, void*, const char*, const char*, const char*);
1772 void *(*fdimewriteopen)(struct soap*, const char*, const char*, const char*);
1773 void (*fdimereadclose)(struct soap*, void*);
1774 void (*fdimewriteclose)(struct soap*, void*);
1775 size_t (*fdimeread)(struct soap*, void*, char*, size_t);
1776 int (*fdimewrite)(struct soap*, void*, const char*, size_t);
1777 void *(*fmimereadopen)(struct soap*, void*, const char*, const char*, const char*);
1778 void *(*fmimewriteopen)(struct soap*, void*, const char*, const char*, const char*, enum soap_mime_encoding);
1779 void (*fmimereadclose)(struct soap*, void*);
1780 void (*fmimewriteclose)(struct soap*, void*);
1781 size_t (*fmimeread)(struct soap*, void*, char*, size_t);
1782 int (*fmimewrite)(struct soap*, void*, const char*, size_t);
1783 #endif
1784 SOAP_SOCKET master;
1785 SOAP_SOCKET socket;
1786 #if defined(__cplusplus) && !defined(WITH_LEAN) && !defined(WITH_COMPAT)
1787 std::ostream *os;
1788 std::istream *is;
1789 #else
1790 void *os; /* preserve struct size */
1791 void *is; /* preserve struct size */
1792 #endif
1793 #ifndef UNDER_CE
1794 int sendfd;
1795 int recvfd;
1796 #else
1797 FILE *sendfd;
1798 FILE *recvfd;
1799 #endif
1800 size_t bufidx; /* index in soap.buf[] */
1801 size_t buflen; /* length of soap.buf[] content */
1802 soap_wchar ahead; /* parser lookahead */
1803 short cdata; /* CDATA parser state */
1804 short body; /* parsed XML element has a body or not */
1805 unsigned int level; /* XML nesting level */
1806 size_t count; /* message length counter */
1807 size_t length; /* message length as set by HTTP header */
1808 char *labbuf; /* look-aside buffer */
1809 size_t lablen; /* look-aside buffer allocated length */
1810 size_t labidx; /* look-aside buffer index to available part */
1811 char buf[SOAP_BUFLEN];/* send and receive buffer */
1812 char msgbuf[1024]; /* in/out buffer for HTTP/MIME headers >=1024 bytes */
1813 char tmpbuf[1024]; /* in/out buffer for HTTP/MIME headers, simpleType values, element and attribute tag names, and DIME must be >=1024 bytes */
1814 char tag[SOAP_TAGLEN];
1815 char id[SOAP_TAGLEN];
1816 char href[SOAP_TAGLEN];
1817 char type[SOAP_TAGLEN];
1818 char arrayType[SOAP_TAGLEN];
1819 char arraySize[SOAP_TAGLEN];
1820 char arrayOffset[SOAP_TAGLEN];
1821 short other;
1822 short position;
1823 int positions[SOAP_MAXDIMS];
1824 short root;
1825 struct soap_attribute *attributes; /* attribute list */
1826 short encoding; /* when set, output encodingStyle */
1827 short mustUnderstand; /* a mustUnderstand element was parsed or is output */
1828 short null; /* parsed XML is xsi:nil */
1829 short ns; /* when not set, output full xmlns bindings */
1830 short part; /* parsing state */
1831 short alloced;
1832 short peeked;
1833 size_t chunksize;
1834 size_t chunkbuflen;
1835 char endpoint[SOAP_TAGLEN];
1836 char path[SOAP_TAGLEN];
1837 char host[SOAP_TAGLEN];
1838 char *action;
1839 char *authrealm; /* HTTP authentication realm */
1840 char *prolog; /* XML declaration prolog */
1841 unsigned long ip; /* IP number */
1842 int port; /* port number */
1843 short keep_alive; /* connection should be kept open */
1844 short tcp_keep_alive; /* enable SO_KEEPALIVE */
1845 unsigned int tcp_keep_idle; /* set TCP_KEEPIDLE */
1846 unsigned int tcp_keep_intvl; /* set TCP_KEEPINTVL */
1847 unsigned int tcp_keep_cnt; /* set TCP_KEEPCNT */
1848 unsigned int max_keep_alive; /* maximum keep-alive session (default=100) */
1849 const char *proxy_http_version;/* HTTP version of proxy "1.0" or "1.1" */
1850 const char *proxy_host; /* Proxy Server host name */
1851 int proxy_port; /* Proxy Server port (default = 8080) */
1852 const char *proxy_userid; /* Proxy Authorization user name */
1853 const char *proxy_passwd; /* Proxy Authorization password */
1854 const char *proxy_from; /* X-Forwarding-For header returned by proxy */
1855 int status; /* -1 when request, else error code to be returned by server */
1856 int error;
1857 int errmode;
1858 int errnum;
1859 #ifndef WITH_LEANER
1860 struct soap_dom_element *dom;
1861 struct soap_dime dime;
1862 struct soap_mime mime;
1863 struct soap_xlist *xlist;
1864 #endif
1865 #if !defined(WITH_LEAN) || defined(SOAP_DEBUG)
1866 const char *logfile[SOAP_MAXLOGS];
1867 FILE *fdebug[SOAP_MAXLOGS];
1868 struct soap_mlist *mht[SOAP_PTRHASH];
1869 #endif
1870 #ifndef WITH_LEAN
1871 const char *wsuid; /* space-separated string of element tags */
1872 const char *c14nexclude; /* space-separated string of prefixes */
1873 struct soap_cookie *cookies;
1874 const char *cookie_domain;
1875 const char *cookie_path;
1876 int cookie_max;
1877 #endif
1878 #ifndef WITH_NOIO
1879 int ipv6_multicast_if; /* always include this to keep the soap struct size the same in v4 and v6 */
1880 char* ipv4_multicast_if; /* always include this to keep the soap struct size the same in v4 and v6 */
1881 int ipv4_multicast_ttl; /* multicast scope */
1882 #ifdef WITH_IPV6
1883 struct sockaddr_storage peer; /* IPv6: set by soap_accept and by UDP recv */
1884 #else
1885 struct sockaddr_in peer; /* IPv4: set by soap_connect/soap_accept and by UDP recv */
1886 #endif
1887 #endif
1888 size_t peerlen;
1889 #if defined(WITH_OPENSSL) /* OpenSSL */
1890 int (*fsslauth)(struct soap*);
1891 int (*fsslverify)(int, X509_STORE_CTX*);
1892 BIO *bio;
1893 SSL *ssl;
1894 SSL_CTX *ctx;
1895 SSL_SESSION *session;
1896 const char *dhfile;
1897 const char *randfile;
1898 #elif defined(WITH_GNUTLS) /* GNUTLS */
1899 int (*fsslauth)(struct soap*);
1900 void *fsslverify;
1901 gnutls_certificate_credentials_t xcred; /* cert pointer */
1902 gnutls_anon_client_credentials_t acred; /* anon pointer */
1903 gnutls_priority_t cache; /* priority cache pointer */
1904 gnutls_session_t session; /* session pointer */
1905 gnutls_dh_params_t dh_params;
1906 gnutls_rsa_params_t rsa_params;
1907 #else /* No SSL/TLS */
1908 void *fsslauth; /* dummy members, to preserve struct size */
1909 void *fsslverify;
1910 void *bio;
1911 void *ssl;
1912 void *ctx;
1913 void *session;
1914 void *dh_params;
1915 void *rsa_params;
1916 #endif
1917 unsigned short ssl_flags;
1918 const char *keyfile;
1919 const char *password;
1920 const char *cafile;
1921 const char *capath;
1922 const char *crlfile;
1923 char session_host[SOAP_TAGLEN];
1924 int session_port;
1925 #ifdef WITH_C_LOCALE
1926 locale_t c_locale; /* set to C locale by default */
1927 #else
1928 void *c_locale;
1929 #endif
1930 #ifdef WITH_ZLIB
1931 z_stream *d_stream; /* decompression stream */
1932 uLong z_crc; /* internal gzip crc */
1933 #else
1934 void *d_stream; /* dummy members, to preserve struct size */
1935 soap_int32 z_crc;
1936 #endif
1937 const char *z_dict; /* support for zlib static dictionaries */
1938 unsigned int z_dict_len;
1939 short zlib_state; /* SOAP_ZLIB_NONE, SOAP_ZLIB_DEFLATE, or SOAP_ZLIB_INFLATE */
1940 short zlib_in; /* SOAP_ZLIB_NONE, SOAP_ZLIB_DEFLATE, or SOAP_ZLIB_GZIP */
1941 short zlib_out; /* SOAP_ZLIB_NONE, SOAP_ZLIB_DEFLATE, or SOAP_ZLIB_GZIP */
1942 char *z_buf; /* buffer */
1943 size_t z_buflen;
1944 unsigned short z_level; /* compression level to be used (0=none, 1=fast to 9=best) */
1945 float z_ratio_in; /* detected compression ratio compressed_length/length of inbound message */
1946 float z_ratio_out; /* detected compression ratio compressed_length/length of outbound message */
1947 #ifdef WMW_RPM_IO /* VxWorks */
1948 void *rpmreqid;
1949 #endif
1950 #ifdef __cplusplus
1951 soap();
1952 soap(soap_mode);
1953 soap(soap_mode, soap_mode);
1954 soap(const struct soap&);
1955 virtual ~soap();
1956 #else
1957 void (*dummy)(void);
1958 #endif
1961 struct soap_code_map
1962 { long code;
1963 const char *string;
1966 /* forwarding list */
1967 struct soap_flist
1968 { struct soap_flist *next;
1969 int type;
1970 void *ptr;
1971 unsigned int level;
1972 size_t len;
1973 void (*fcopy)(struct soap*, int, int, void*, size_t, const void*, size_t);
1976 /* id-ref forwarding list */
1977 struct soap_ilist
1978 { struct soap_ilist *next;
1979 int type;
1980 size_t size;
1981 void *link;
1982 void *copy;
1983 struct soap_flist *flist;
1984 void *ptr;
1985 unsigned int level;
1986 char id[1]; /* the actual id string value flows into the allocated region below this struct */
1989 struct soap_plugin
1990 { struct soap_plugin *next;
1991 const char *id;
1992 void *data;
1993 int (*fcopy)(struct soap *soap, struct soap_plugin *dst, struct soap_plugin *src);
1994 void (*fdelete)(struct soap *soap, struct soap_plugin *p); /* should delete fields of plugin only and not free(p) */
1997 #ifndef WITH_NONAMESPACES
1998 extern SOAP_NMAC struct Namespace namespaces[];
1999 #endif
2001 #ifndef WITH_LEAN
2002 # define soap_get0(soap) (((soap)->bufidx>=(soap)->buflen && soap_recv(soap)) ? EOF : (unsigned char)(soap)->buf[(soap)->bufidx])
2003 # define soap_get1(soap) (((soap)->bufidx>=(soap)->buflen && soap_recv(soap)) ? EOF : (unsigned char)(soap)->buf[(soap)->bufidx++])
2004 #else
2005 soap_wchar soap_get0(struct soap*);
2006 soap_wchar soap_get1(struct soap*);
2007 #endif
2009 #define soap_revget1(soap) ((soap)->bufidx--)
2010 #define soap_unget(soap, c) ((soap)->ahead = c)
2011 #define soap_register_plugin(soap, plugin) soap_register_plugin_arg(soap, plugin, NULL)
2012 #define soap_imode(soap, n) ((soap)->mode = (soap)->imode = (n))
2013 #define soap_set_imode(soap, n) ((soap)->imode |= (n))
2014 #define soap_clr_imode(soap, n) ((soap)->imode &= ~(n))
2015 #define soap_omode(soap, n) ((soap)->mode = (soap)->omode = (n))
2016 #define soap_set_omode(soap, n) ((soap)->omode |= (n))
2017 #define soap_clr_omode(soap, n) ((soap)->omode &= ~(n))
2018 #define soap_set_mode(soap, n) ((soap)->imode |= (n), (soap)->omode |= (n))
2019 #define soap_clr_mode(soap, n) ((soap)->imode &= ~(n), (soap)->omode &= ~(n))
2020 #define soap_destroy(soap) soap_delete((soap), NULL)
2022 #ifdef HAVE_STRRCHR
2023 # define soap_strrchr(s, t) strrchr(s, t)
2024 #else
2025 SOAP_FMAC1 char* SOAP_FMAC2 soap_strrchr(const char *s, int t);
2026 #endif
2028 #ifdef HAVE_STRTOL
2029 # define soap_strtol(s, t, b) strtol(s, t, b)
2030 #else
2031 SOAP_FMAC1 long SOAP_FMAC2 soap_strtol(const char *s, char **t, int b);
2032 #endif
2034 #ifdef HAVE_STRTOUL
2035 # define soap_strtoul(s, t, b) strtoul(s, t, b)
2036 #else
2037 SOAP_FMAC1 unsigned long SOAP_FMAC2 soap_strtoul(const char *s, char **t, int b);
2038 #endif
2040 #if defined(WITH_OPENSSL)
2041 # define soap_random soap_rand()
2042 SOAP_FMAC1 int SOAP_FMAC2 soap_rand(void);
2043 #elif defined(HAVE_RANDOM)
2044 # define soap_random (int)random()
2045 #else
2046 # define soap_random rand()
2047 #endif
2049 #ifdef WITH_NOIDREF
2050 # define soap_embedded(s, p, t) (0)
2051 # define soap_id_lookup(s, i, p, t, n, k) (p)
2052 # define soap_id_forward(s, h, p, len, st, tt, n, k, fc) (p)
2053 # define soap_reference(s, a, t) (1)
2054 # define soap_array_reference(s, p, a, n, t) (1)
2055 # define soap_embed(s, p, a, n, t, pp) (0)
2056 # define soap_embedded_id(s, i, p, t) (i)
2057 # define soap_is_embedded(s, p) (0)
2058 # define soap_is_single(s, p) (1)
2059 # define soap_lookup_type(s, i) (0)
2060 # define soap_getindependent(s) (0)
2061 # define soap_putindependent(s) (0)
2062 # define soap_getelement(s, n) (n)
2063 # define soap_putelement(s, p, t, i, n) (0)
2064 # define soap_markelement(s, p, n) (0)
2065 #endif
2067 SOAP_FMAC1 void SOAP_FMAC2 soap_header(struct soap*);
2068 SOAP_FMAC1 void SOAP_FMAC2 soap_fault(struct soap*);
2069 SOAP_FMAC1 const char** SOAP_FMAC2 soap_faultcode(struct soap*);
2070 SOAP_FMAC1 const char** SOAP_FMAC2 soap_faultsubcode(struct soap*);
2071 SOAP_FMAC1 const char** SOAP_FMAC2 soap_faultstring(struct soap*);
2072 SOAP_FMAC1 const char** SOAP_FMAC2 soap_faultdetail(struct soap*);
2073 SOAP_FMAC1 void SOAP_FMAC2 soap_serializeheader(struct soap*);
2074 SOAP_FMAC1 int SOAP_FMAC2 soap_putheader(struct soap*);
2075 SOAP_FMAC1 int SOAP_FMAC2 soap_getheader(struct soap*);
2076 SOAP_FMAC1 void SOAP_FMAC2 soap_serializefault(struct soap*);
2077 SOAP_FMAC1 int SOAP_FMAC2 soap_putfault(struct soap*);
2078 SOAP_FMAC1 int SOAP_FMAC2 soap_getfault(struct soap*);
2080 SOAP_FMAC1 void SOAP_FMAC2 soap_ssl_init(void);
2081 SOAP_FMAC1 int SOAP_FMAC2 soap_poll(struct soap*);
2082 SOAP_FMAC1 int SOAP_FMAC2 soap_connect_command(struct soap*, int, const char*, const char*);
2083 SOAP_FMAC1 int SOAP_FMAC2 soap_connect(struct soap*, const char*, const char*);
2084 SOAP_FMAC1 SOAP_SOCKET SOAP_FMAC2 soap_bind(struct soap*, const char*, int, int);
2085 SOAP_FMAC1 SOAP_SOCKET SOAP_FMAC2 soap_accept(struct soap*);
2086 SOAP_FMAC1 int SOAP_FMAC2 soap_ssl_accept(struct soap*);
2087 SOAP_FMAC1 const char * SOAP_FMAC2 soap_ssl_error(struct soap*, int);
2089 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*);
2090 SOAP_FMAC1 int SOAP_FMAC2 soap_ssl_client_context(struct soap*, unsigned short, const char*, const char*, const char*, const char*, const char*);
2092 SOAP_FMAC1 int SOAP_FMAC2 soap_puthttphdr(struct soap*, int status, size_t count);
2094 SOAP_FMAC1 const char* SOAP_FMAC2 soap_get_header_attribute(struct soap*, const char*, const char*);
2095 SOAP_FMAC1 const char* SOAP_FMAC2 soap_decode_key(char*, size_t, const char*);
2096 SOAP_FMAC1 const char* SOAP_FMAC2 soap_decode_val(char*, size_t, const char*);
2098 SOAP_FMAC1 size_t SOAP_FMAC2 soap_hash(const char*);
2099 SOAP_FMAC1 void SOAP_FMAC2 soap_set_endpoint(struct soap*, const char*);
2100 SOAP_FMAC1 int SOAP_FMAC2 soap_flush_raw(struct soap*, const char*, size_t);
2101 SOAP_FMAC1 int SOAP_FMAC2 soap_flush(struct soap*);
2102 SOAP_FMAC1 soap_wchar SOAP_FMAC2 soap_get(struct soap*);
2103 SOAP_FMAC1 soap_wchar SOAP_FMAC2 soap_getchar(struct soap*);
2104 SOAP_FMAC1 int SOAP_FMAC2 soap_tag_cmp(const char*, const char*);
2105 SOAP_FMAC1 void SOAP_FMAC2 soap_set_fault(struct soap*);
2106 SOAP_FMAC1 int SOAP_FMAC2 soap_sender_fault(struct soap*, const char*, const char*);
2107 SOAP_FMAC1 int SOAP_FMAC2 soap_sender_fault_subcode(struct soap*, const char*, const char*, const char*);
2108 SOAP_FMAC1 int SOAP_FMAC2 soap_receiver_fault(struct soap*, const char*, const char*);
2109 SOAP_FMAC1 int SOAP_FMAC2 soap_receiver_fault_subcode(struct soap*, const char*, const char*, const char*);
2110 SOAP_FMAC1 int SOAP_FMAC2 soap_set_sender_error(struct soap*, const char*, const char*, int);
2111 SOAP_FMAC1 int SOAP_FMAC2 soap_set_receiver_error(struct soap*, const char*, const char*, int);
2113 SOAP_FMAC1 int SOAP_FMAC2 soap_send_raw(struct soap*, const char*, size_t);
2114 SOAP_FMAC1 int SOAP_FMAC2 soap_recv_raw(struct soap*);
2115 SOAP_FMAC1 int SOAP_FMAC2 soap_recv(struct soap*);
2116 SOAP_FMAC1 int SOAP_FMAC2 soap_send(struct soap*, const char*);
2117 SOAP_FMAC1 int SOAP_FMAC2 soap_send2(struct soap*, const char*, const char*);
2118 SOAP_FMAC1 int SOAP_FMAC2 soap_send3(struct soap*, const char*, const char*, const char*);
2120 SOAP_FMAC1 int SOAP_FMAC2 soap_pututf8(struct soap*, unsigned long);
2121 SOAP_FMAC1 soap_wchar SOAP_FMAC2 soap_getutf8(struct soap*);
2123 SOAP_FMAC1 int SOAP_FMAC2 soap_putbase64(struct soap*, const unsigned char*, int);
2124 SOAP_FMAC1 unsigned char* SOAP_FMAC2 soap_getbase64(struct soap*, int*, int);
2125 SOAP_FMAC1 int SOAP_FMAC2 soap_puthex(struct soap*, const unsigned char*, int);
2126 SOAP_FMAC1 unsigned char* SOAP_FMAC2 soap_gethex(struct soap*, int*);
2128 #ifndef WITH_LEANER
2129 SOAP_FMAC1 int SOAP_FMAC2 soap_xop_forward(struct soap*, unsigned char**, int*, char**, char**, char**);
2130 SOAP_FMAC1 int SOAP_FMAC2 soap_dime_forward(struct soap*, unsigned char**, int*, char**, char**, char**);
2131 #endif
2133 #ifndef WITH_NOIDREF
2134 SOAP_FMAC1 int SOAP_FMAC2 soap_pointer_lookup_id(struct soap*, void *p, int t, struct soap_plist**);
2135 SOAP_FMAC1 int SOAP_FMAC2 soap_pointer_lookup(struct soap*, const void *p, int t, struct soap_plist**);
2136 SOAP_FMAC1 int SOAP_FMAC2 soap_pointer_enter(struct soap*, const void *p, const struct soap_array *a, int n, int t, struct soap_plist**);
2137 SOAP_FMAC1 int SOAP_FMAC2 soap_array_pointer_lookup(struct soap*, const void *p, const struct soap_array *a, int n, int t, struct soap_plist**);
2138 SOAP_FMAC1 int SOAP_FMAC2 soap_embed(struct soap *soap, const void *p, const struct soap_array *a, int n, const char *tag, int type);
2139 SOAP_FMAC1 struct soap_ilist* SOAP_FMAC2 soap_lookup(struct soap*, const char*);
2140 SOAP_FMAC1 struct soap_ilist* SOAP_FMAC2 soap_enter(struct soap*, const char*);
2141 SOAP_FMAC1 int SOAP_FMAC2 soap_resolve(struct soap*);
2142 SOAP_FMAC1 void SOAP_FMAC2 soap_embedded(struct soap*, const void *p, int t);
2143 SOAP_FMAC1 int SOAP_FMAC2 soap_reference(struct soap*, const void *p, int t);
2144 SOAP_FMAC1 int SOAP_FMAC2 soap_array_reference(struct soap*, const void *p, const struct soap_array *a, int n, int t);
2145 SOAP_FMAC1 int SOAP_FMAC2 soap_embedded_id(struct soap*, int id, const void *p, int t);
2146 SOAP_FMAC1 int SOAP_FMAC2 soap_is_embedded(struct soap*, struct soap_plist*);
2147 SOAP_FMAC1 int SOAP_FMAC2 soap_is_single(struct soap*, struct soap_plist*);
2148 SOAP_FMAC1 void SOAP_FMAC2 soap_set_embedded(struct soap*, struct soap_plist*);
2149 #endif
2151 SOAP_FMAC1 int SOAP_FMAC2 soap_begin_count(struct soap*);
2152 SOAP_FMAC1 int SOAP_FMAC2 soap_end_count(struct soap*);
2153 SOAP_FMAC1 int SOAP_FMAC2 soap_begin_send(struct soap*);
2154 SOAP_FMAC1 int SOAP_FMAC2 soap_end_send(struct soap*);
2156 SOAP_FMAC1 const struct soap_code_map* SOAP_FMAC2 soap_code(const struct soap_code_map*, const char*);
2157 SOAP_FMAC1 long SOAP_FMAC2 soap_code_int(const struct soap_code_map*, const char*, long);
2158 SOAP_FMAC1 const char* SOAP_FMAC2 soap_code_str(const struct soap_code_map*, long);
2159 SOAP_FMAC1 long SOAP_FMAC2 soap_code_bits(const struct soap_code_map*, const char*);
2160 SOAP_FMAC1 const char* SOAP_FMAC2 soap_code_list(struct soap*, const struct soap_code_map*, long);
2162 SOAP_FMAC1 int SOAP_FMAC2 soap_getline(struct soap*, char*, int);
2163 SOAP_FMAC1 int SOAP_FMAC2 soap_begin_recv(struct soap*);
2164 SOAP_FMAC1 int SOAP_FMAC2 soap_end_recv(struct soap*);
2166 SOAP_FMAC1 void* SOAP_FMAC2 soap_malloc(struct soap*, size_t);
2167 SOAP_FMAC1 void SOAP_FMAC2 soap_dealloc(struct soap*, void*);
2168 SOAP_FMAC1 struct soap_clist * SOAP_FMAC2 soap_link(struct soap*, void*, int, int, int (*fdelete)(struct soap_clist*));
2169 SOAP_FMAC1 void SOAP_FMAC2 soap_unlink(struct soap*, const void*);
2170 SOAP_FMAC1 void SOAP_FMAC2 soap_free_temp(struct soap*);
2171 SOAP_FMAC1 void SOAP_FMAC2 soap_del(struct soap*);
2173 SOAP_FMAC1 void* SOAP_FMAC2 soap_track_malloc(struct soap*, const char*, int, size_t);
2174 SOAP_FMAC1 void SOAP_FMAC2 soap_track_free(struct soap*, const char*, int, void*);
2176 #ifndef WITH_NOIDREF
2177 SOAP_FMAC1 int SOAP_FMAC2 soap_lookup_type(struct soap*, const char *id);
2178 SOAP_FMAC1 void* SOAP_FMAC2 soap_id_lookup(struct soap*, const char *id, void **p, int t, size_t n, unsigned int k);
2179 SOAP_FMAC1 void* SOAP_FMAC2 soap_id_forward(struct soap*, const char *id, void *p, size_t len, int st, int tt, size_t n, unsigned int k, void(*fcopy)(struct soap*, int, int, void*, size_t, const void*, size_t));
2180 #endif
2181 SOAP_FMAC1 void* SOAP_FMAC2 soap_id_enter(struct soap*, const char *id, void *p, int t, size_t n, unsigned int k, const char *type, const char *arrayType, void *(*finstantiate)(struct soap*, int, const char*, const char*, size_t*));
2182 SOAP_FMAC1 void SOAP_FMAC2 soap_fcopy(struct soap *soap, int st, int tt, void *p, size_t, const void *q, size_t n);
2184 SOAP_FMAC1 int SOAP_FMAC2 soap_size(const int *, int);
2185 SOAP_FMAC1 int SOAP_FMAC2 soap_getoffsets(const char *, const int *, int *, int);
2186 SOAP_FMAC1 int SOAP_FMAC2 soap_getsize(const char *, const char *, int *);
2187 SOAP_FMAC1 int SOAP_FMAC2 soap_getsizes(const char *, int *, int);
2188 SOAP_FMAC1 int SOAP_FMAC2 soap_getposition(const char *, int *);
2190 SOAP_FMAC1 char* SOAP_FMAC2 soap_putsize(struct soap*, const char *, int);
2191 SOAP_FMAC1 char* SOAP_FMAC2 soap_putsizesoffsets(struct soap*, const char *, const int *, const int *, int);
2192 SOAP_FMAC1 char* SOAP_FMAC2 soap_putsizes(struct soap*, const char *, const int *, int);
2193 SOAP_FMAC1 char* SOAP_FMAC2 soap_putoffset(struct soap*, int);
2194 SOAP_FMAC1 char* SOAP_FMAC2 soap_putoffsets(struct soap*, const int *, int);
2196 SOAP_FMAC1 int SOAP_FMAC2 soap_closesock(struct soap*);
2198 SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_new(void);
2199 SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_new1(soap_mode);
2200 SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_new2(soap_mode, soap_mode);
2201 SOAP_FMAC1 void SOAP_FMAC2 soap_free(struct soap*);
2202 SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_copy(const struct soap*);
2203 SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_copy_context(struct soap*, const struct soap*);
2204 SOAP_FMAC1 void SOAP_FMAC2 soap_copy_stream(struct soap*, struct soap*);
2205 SOAP_FMAC1 void SOAP_FMAC2 soap_free_stream(struct soap*);
2206 SOAP_FMAC1 void SOAP_FMAC2 soap_init(struct soap*);
2207 SOAP_FMAC1 void SOAP_FMAC2 soap_init1(struct soap*, soap_mode);
2208 SOAP_FMAC1 void SOAP_FMAC2 soap_init2(struct soap*, soap_mode, soap_mode);
2209 SOAP_FMAC1 void SOAP_FMAC2 soap_done(struct soap*);
2210 SOAP_FMAC1 void SOAP_FMAC2 soap_cleanup(struct soap*);
2211 SOAP_FMAC1 void SOAP_FMAC2 soap_begin(struct soap*);
2212 SOAP_FMAC1 void SOAP_FMAC2 soap_end(struct soap*);
2213 SOAP_FMAC1 void SOAP_FMAC2 soap_delete(struct soap*, void*);
2214 SOAP_FMAC1 void SOAP_FMAC2 soap_delegate_deletion(struct soap*, struct soap*);
2216 /* API functions available with DEBUG or SOAP_DEBUG defined: */
2217 SOAP_FMAC1 void SOAP_FMAC2 soap_set_recv_logfile(struct soap*, const char*);
2218 SOAP_FMAC1 void SOAP_FMAC2 soap_set_sent_logfile(struct soap*, const char*);
2219 SOAP_FMAC1 void SOAP_FMAC2 soap_set_test_logfile(struct soap*, const char*);
2220 SOAP_FMAC1 void SOAP_FMAC2 soap_close_logfiles(struct soap*);
2221 SOAP_FMAC1 void SOAP_FMAC2 soap_open_logfile(struct soap*, int);
2222 /* */
2224 SOAP_FMAC1 const char* SOAP_FMAC2 soap_value(struct soap*);
2226 SOAP_FMAC1 int SOAP_FMAC2 soap_match_tag(struct soap*, const char*, const char *);
2227 SOAP_FMAC1 int SOAP_FMAC2 soap_match_array(struct soap*, const char*);
2229 SOAP_FMAC1 int SOAP_FMAC2 soap_element(struct soap*, const char*, int, const char*);
2230 SOAP_FMAC1 int SOAP_FMAC2 soap_element_begin_out(struct soap*, const char *tag, int id, const char *type);
2231 SOAP_FMAC1 int SOAP_FMAC2 soap_array_begin_out(struct soap*, const char *tag, int id, const char *type, const char *offset);
2232 SOAP_FMAC1 int SOAP_FMAC2 soap_element_ref(struct soap*, const char *tag, int id, int href);
2233 SOAP_FMAC1 int SOAP_FMAC2 soap_element_href(struct soap*, const char *tag, int id, const char *ref, const char *val);
2234 SOAP_FMAC1 int SOAP_FMAC2 soap_element_null(struct soap*, const char *tag, int id, const char *type);
2235 SOAP_FMAC1 int SOAP_FMAC2 soap_element_nil(struct soap*, const char *tag);
2236 SOAP_FMAC1 int SOAP_FMAC2 soap_element_id(struct soap*, const char *tag, int id, const void *p, const struct soap_array *a, int d, const char *type, int n);
2237 SOAP_FMAC1 int SOAP_FMAC2 soap_element_result(struct soap*, const char *tag);
2238 SOAP_FMAC1 void SOAP_FMAC2 soap_check_result(struct soap*, const char *tag);
2239 SOAP_FMAC1 int SOAP_FMAC2 soap_element_end_out(struct soap*, const char *tag);
2240 SOAP_FMAC1 int SOAP_FMAC2 soap_element_start_end_out(struct soap*, const char *tag);
2242 SOAP_FMAC1 int SOAP_FMAC2 soap_attribute(struct soap*, const char*, const char*);
2244 SOAP_FMAC1 int SOAP_FMAC2 soap_element_begin_in(struct soap*, const char *tag, int nillable, const char *type);
2246 SOAP_FMAC1 int SOAP_FMAC2 soap_element_end_in(struct soap*, const char *tag);
2248 SOAP_FMAC1 int SOAP_FMAC2 soap_peek_element(struct soap*);
2250 SOAP_FMAC1 void SOAP_FMAC2 soap_retry(struct soap*);
2251 SOAP_FMAC1 void SOAP_FMAC2 soap_revert(struct soap*);
2253 SOAP_FMAC1 char* SOAP_FMAC2 soap_strdup(struct soap*, const char*);
2254 SOAP_FMAC1 wchar_t* SOAP_FMAC2 soap_wstrdup(struct soap*, const wchar_t*);
2255 SOAP_FMAC1 const char * SOAP_FMAC2 soap_tagsearch(const char *big, const char *little);
2257 SOAP_FMAC1 int SOAP_FMAC2 soap_string_out(struct soap*, const char *s, int flag);
2258 SOAP_FMAC1 char* SOAP_FMAC2 soap_string_in(struct soap*, int, long, long);
2260 #ifndef WITH_LEANER
2261 SOAP_FMAC1 int SOAP_FMAC2 soap_wstring_out(struct soap*, const wchar_t *s, int flag);
2262 SOAP_FMAC1 wchar_t* SOAP_FMAC2 soap_wstring_in(struct soap*, int, long, long);
2263 #endif
2265 SOAP_FMAC1 int SOAP_FMAC2 soap_match_namespace(struct soap*, const char *, const char*, size_t n1, size_t n2);
2267 SOAP_FMAC1 int SOAP_FMAC2 soap_set_namespaces(struct soap*, const struct Namespace*);
2268 SOAP_FMAC1 void SOAP_FMAC2 soap_set_local_namespaces(struct soap*);
2270 SOAP_FMAC1 void SOAP_FMAC2 soap_pop_namespace(struct soap*);
2271 SOAP_FMAC1 struct soap_nlist* SOAP_FMAC2 soap_push_namespace(struct soap*, const char *,const char *);
2272 SOAP_FMAC1 const char* SOAP_FMAC2 soap_current_namespace(struct soap *soap, const char *tag);
2274 SOAP_FMAC1 struct soap_nlist* SOAP_FMAC2 soap_lookup_ns(struct soap *soap, const char *tag, size_t n);
2276 SOAP_FMAC1 int SOAP_FMAC2 soap_store_lab(struct soap*, const char*, size_t);
2277 SOAP_FMAC1 int SOAP_FMAC2 soap_append_lab(struct soap*, const char*, size_t);
2279 SOAP_FMAC1 struct soap_blist* SOAP_FMAC2 soap_new_block(struct soap*);
2280 SOAP_FMAC1 void* SOAP_FMAC2 soap_push_block(struct soap*, struct soap_blist*, size_t);
2281 SOAP_FMAC1 void SOAP_FMAC2 soap_pop_block(struct soap*, struct soap_blist*);
2282 SOAP_FMAC1 size_t SOAP_FMAC2 soap_size_block(struct soap*, struct soap_blist*, size_t);
2283 SOAP_FMAC1 char* SOAP_FMAC2 soap_first_block(struct soap*, struct soap_blist*);
2284 SOAP_FMAC1 char* SOAP_FMAC2 soap_next_block(struct soap*, struct soap_blist*);
2285 SOAP_FMAC1 size_t SOAP_FMAC2 soap_block_size(struct soap*, struct soap_blist*);
2286 SOAP_FMAC1 char* SOAP_FMAC2 soap_save_block(struct soap*, struct soap_blist*, char*, int);
2287 SOAP_FMAC1 void SOAP_FMAC2 soap_end_block(struct soap*, struct soap_blist*);
2289 SOAP_FMAC1 int SOAP_FMAC2 soap_envelope_begin_out(struct soap*);
2290 SOAP_FMAC1 int soap_envelope_end_out(struct soap*);
2292 SOAP_FMAC1 char * SOAP_FMAC2 soap_get_http_body(struct soap*);
2294 SOAP_FMAC1 int SOAP_FMAC2 soap_envelope_begin_in(struct soap*);
2295 SOAP_FMAC1 int SOAP_FMAC2 soap_envelope_end_in(struct soap*);
2297 SOAP_FMAC1 int SOAP_FMAC2 soap_body_begin_out(struct soap*);
2298 SOAP_FMAC1 int SOAP_FMAC2 soap_body_end_out(struct soap*);
2300 SOAP_FMAC1 int SOAP_FMAC2 soap_body_begin_in(struct soap*);
2301 SOAP_FMAC1 int SOAP_FMAC2 soap_body_end_in(struct soap*);
2303 SOAP_FMAC1 int SOAP_FMAC2 soap_recv_header(struct soap*);
2305 SOAP_FMAC1 int SOAP_FMAC2 soap_response(struct soap*, int);
2307 SOAP_FMAC1 int SOAP_FMAC2 soap_send_empty_response(struct soap*, int status);
2308 SOAP_FMAC1 int SOAP_FMAC2 soap_recv_empty_response(struct soap*);
2310 SOAP_FMAC1 int SOAP_FMAC2 soap_send_fault(struct soap*);
2311 SOAP_FMAC1 int SOAP_FMAC2 soap_recv_fault(struct soap*, int check);
2313 #ifndef WITH_NOSTDLIB
2314 SOAP_FMAC1 void SOAP_FMAC2 soap_print_fault(struct soap*, FILE*);
2315 SOAP_FMAC1 void SOAP_FMAC2 soap_print_fault_location(struct soap*, FILE*);
2316 # ifndef WITH_LEAN
2317 # ifdef __cplusplus
2318 SOAP_FMAC1 void SOAP_FMAC2 soap_stream_fault(struct soap*, std::ostream&);
2319 # endif
2320 SOAP_FMAC1 char* SOAP_FMAC2 soap_sprint_fault(struct soap*, char*, size_t);
2321 # endif
2322 #endif
2324 SOAP_FMAC1 int SOAP_FMAC2 soap_s2byte(struct soap*, const char*, char*);
2325 SOAP_FMAC1 int SOAP_FMAC2 soap_s2short(struct soap*, const char*, short*);
2326 SOAP_FMAC1 int SOAP_FMAC2 soap_s2int(struct soap*, const char*, int*);
2327 SOAP_FMAC1 int SOAP_FMAC2 soap_s2long(struct soap*, const char*, long*);
2328 SOAP_FMAC1 int SOAP_FMAC2 soap_s2LONG64(struct soap*, const char*, LONG64*);
2329 SOAP_FMAC1 int SOAP_FMAC2 soap_s2float(struct soap*, const char*, float*);
2330 SOAP_FMAC1 int SOAP_FMAC2 soap_s2double(struct soap*, const char*, double*);
2331 SOAP_FMAC1 int SOAP_FMAC2 soap_s2unsignedByte(struct soap*, const char*, unsigned char*);
2332 SOAP_FMAC1 int SOAP_FMAC2 soap_s2unsignedShort(struct soap*, const char*, unsigned short*);
2333 SOAP_FMAC1 int SOAP_FMAC2 soap_s2unsignedInt(struct soap*, const char*, unsigned int*);
2334 SOAP_FMAC1 int SOAP_FMAC2 soap_s2unsignedLong(struct soap*, const char*, unsigned long*);
2335 SOAP_FMAC1 int SOAP_FMAC2 soap_s2ULONG64(struct soap*, const char*, ULONG64*);
2336 SOAP_FMAC1 int SOAP_FMAC2 soap_s2string(struct soap*, const char*, char**, long minlen, long maxlen);
2337 SOAP_FMAC1 int SOAP_FMAC2 soap_s2QName(struct soap*, const char*, char**, long minlen, long maxlen);
2339 #ifndef WITH_LEAN
2340 SOAP_FMAC1 int SOAP_FMAC2 soap_s2wchar(struct soap*, const char*, wchar_t**, long minlen, long maxlen);
2341 SOAP_FMAC1 int SOAP_FMAC2 soap_s2dateTime(struct soap*, const char*, time_t*);
2342 SOAP_FMAC1 char* SOAP_FMAC2 soap_s2base64(struct soap*, const unsigned char*, char*, int);
2343 SOAP_FMAC1 char* SOAP_FMAC2 soap_s2hex(struct soap*, const unsigned char*, char*, int);
2344 #endif
2346 SOAP_FMAC1 const char* SOAP_FMAC2 soap_byte2s(struct soap*, char);
2347 SOAP_FMAC1 const char* SOAP_FMAC2 soap_short2s(struct soap*, short);
2348 SOAP_FMAC1 const char* SOAP_FMAC2 soap_int2s(struct soap*, int);
2349 SOAP_FMAC1 const char* SOAP_FMAC2 soap_long2s(struct soap*, long);
2350 SOAP_FMAC1 const char* SOAP_FMAC2 soap_LONG642s(struct soap*, LONG64);
2351 SOAP_FMAC1 const char* SOAP_FMAC2 soap_float2s(struct soap*, float);
2352 SOAP_FMAC1 const char* SOAP_FMAC2 soap_double2s(struct soap*, double);
2353 SOAP_FMAC1 const char* SOAP_FMAC2 soap_unsignedByte2s(struct soap*, unsigned char);
2354 SOAP_FMAC1 const char* SOAP_FMAC2 soap_unsignedShort2s(struct soap*, unsigned short);
2355 SOAP_FMAC1 const char* SOAP_FMAC2 soap_unsignedInt2s(struct soap*, unsigned int);
2356 SOAP_FMAC1 const char* SOAP_FMAC2 soap_unsignedLong2s(struct soap*, unsigned long);
2357 SOAP_FMAC1 const char* SOAP_FMAC2 soap_ULONG642s(struct soap*, ULONG64);
2358 SOAP_FMAC1 const char* SOAP_FMAC2 soap_QName2s(struct soap*, const char*);
2360 #ifndef WITH_LEAN
2361 SOAP_FMAC1 const char* SOAP_FMAC2 soap_wchar2s(struct soap*, const wchar_t*);
2362 SOAP_FMAC1 const char* SOAP_FMAC2 soap_dateTime2s(struct soap*, time_t);
2363 SOAP_FMAC1 const char* SOAP_FMAC2 soap_base642s(struct soap*, const char*, char*, size_t, int*);
2364 SOAP_FMAC1 const char* SOAP_FMAC2 soap_hex2s(struct soap*, const char*, char*, size_t, int*);
2365 #endif
2368 SOAP_FMAC1 int* SOAP_FMAC2 soap_inint(struct soap*, const char *tag, int *p, const char *, int);
2369 SOAP_FMAC1 char* SOAP_FMAC2 soap_inbyte(struct soap*, const char *tag, char *p, const char *, int);
2370 SOAP_FMAC1 long* SOAP_FMAC2 soap_inlong(struct soap*, const char *tag, long *p, const char *, int);
2371 SOAP_FMAC1 LONG64* SOAP_FMAC2 soap_inLONG64(struct soap*, const char *tag, LONG64 *p, const char *, int);
2372 SOAP_FMAC1 short* SOAP_FMAC2 soap_inshort(struct soap*, const char *tag, short *p, const char *, int);
2373 SOAP_FMAC1 float* SOAP_FMAC2 soap_infloat(struct soap*, const char *tag, float *p, const char *, int);
2374 SOAP_FMAC1 double* SOAP_FMAC2 soap_indouble(struct soap*, const char *tag, double *p, const char *, int);
2375 SOAP_FMAC1 unsigned char* SOAP_FMAC2 soap_inunsignedByte(struct soap*, const char *tag, unsigned char *p, const char *, int);
2376 SOAP_FMAC1 unsigned short* SOAP_FMAC2 soap_inunsignedShort(struct soap*, const char *tag, unsigned short *p, const char *, int);
2377 SOAP_FMAC1 unsigned int* SOAP_FMAC2 soap_inunsignedInt(struct soap*, const char *tag, unsigned int *p, const char *, int);
2378 SOAP_FMAC1 unsigned long* SOAP_FMAC2 soap_inunsignedLong(struct soap*, const char *tag, unsigned long *p, const char *, int);
2379 SOAP_FMAC1 ULONG64* SOAP_FMAC2 soap_inULONG64(struct soap*, const char *tag, ULONG64 *p, const char *, int);
2380 SOAP_FMAC1 char** SOAP_FMAC2 soap_instring(struct soap*, const char *tag, char **p, const char *, int, int, long, long);
2381 SOAP_FMAC1 char** SOAP_FMAC2 soap_inliteral(struct soap*, const char *tag, char **p);
2383 #ifndef WITH_LEAN
2384 SOAP_FMAC1 time_t* SOAP_FMAC2 soap_indateTime(struct soap*, const char *tag, time_t *p, const char *, int);
2385 SOAP_FMAC1 time_t SOAP_FMAC2 soap_timegm(struct tm*);
2386 #endif
2388 #ifndef WITH_LEANER
2389 SOAP_FMAC1 wchar_t** SOAP_FMAC2 soap_inwstring(struct soap*, const char *tag, wchar_t **p, const char *, int, long, long);
2390 SOAP_FMAC1 wchar_t** SOAP_FMAC2 soap_inwliteral(struct soap*, const char *tag, wchar_t **p);
2391 #endif
2393 SOAP_FMAC1 int SOAP_FMAC2 soap_outbyte(struct soap*, const char *tag, int id, const char *p, const char *, int);
2394 SOAP_FMAC1 int SOAP_FMAC2 soap_outshort(struct soap*, const char *tag, int id, const short *p, const char *, int);
2395 SOAP_FMAC1 int SOAP_FMAC2 soap_outint(struct soap*, const char *tag, int id, const int *p, const char *, int);
2396 SOAP_FMAC1 int SOAP_FMAC2 soap_outlong(struct soap*, const char *tag, int id, const long *p, const char *, int);
2397 SOAP_FMAC1 int SOAP_FMAC2 soap_outLONG64(struct soap*, const char *tag, int id, const LONG64 *p, const char *, int);
2398 SOAP_FMAC1 int SOAP_FMAC2 soap_outfloat(struct soap*, const char *tag, int id, const float *p, const char *, int);
2399 SOAP_FMAC1 int SOAP_FMAC2 soap_outdouble(struct soap*, const char *tag, int id, const double *p, const char *, int);
2400 SOAP_FMAC1 int SOAP_FMAC2 soap_outunsignedByte(struct soap*, const char *tag, int id, const unsigned char *p, const char *, int);
2401 SOAP_FMAC1 int SOAP_FMAC2 soap_outunsignedShort(struct soap*, const char *tag, int id, const unsigned short *p, const char *, int);
2402 SOAP_FMAC1 int SOAP_FMAC2 soap_outunsignedInt(struct soap*, const char *tag, int id, const unsigned int *p, const char *, int);
2403 SOAP_FMAC1 int SOAP_FMAC2 soap_outunsignedLong(struct soap*, const char *tag, int id, const unsigned long *p, const char *, int);
2404 SOAP_FMAC1 int SOAP_FMAC2 soap_outULONG64(struct soap*, const char *tag, int id, const ULONG64 *p, const char *, int);
2405 SOAP_FMAC1 int SOAP_FMAC2 soap_outstring(struct soap*, const char *tag, int id, char *const*p, const char *, int);
2406 SOAP_FMAC1 int SOAP_FMAC2 soap_outliteral(struct soap*, const char *tag, char *const*p, const char *type);
2408 #ifndef WITH_LEAN
2409 SOAP_FMAC1 int SOAP_FMAC2 soap_outdateTime(struct soap*, const char *tag, int id, const time_t *p, const char *, int);
2410 #endif
2412 #ifndef WITH_LEANER
2413 SOAP_FMAC1 int SOAP_FMAC2 soap_outwstring(struct soap*, const char *tag, int id, wchar_t *const*p, const char *, int);
2414 SOAP_FMAC1 int SOAP_FMAC2 soap_outwliteral(struct soap*, const char *tag, wchar_t *const*p, const char *type);
2415 #endif
2417 #ifndef WITH_LEANER
2418 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);
2419 SOAP_FMAC1 int SOAP_FMAC2 soap_move(struct soap*, long);
2420 SOAP_FMAC1 size_t SOAP_FMAC2 soap_tell(struct soap*);
2421 SOAP_FMAC1 char* SOAP_FMAC2 soap_dime_option(struct soap*, unsigned short, const char*);
2422 SOAP_FMAC1 int SOAP_FMAC2 soap_getdimehdr(struct soap*);
2423 SOAP_FMAC1 int SOAP_FMAC2 soap_getdime(struct soap*);
2424 SOAP_FMAC1 int SOAP_FMAC2 soap_putdimehdr(struct soap*);
2425 SOAP_FMAC1 int SOAP_FMAC2 soap_putdime(struct soap*);
2426 SOAP_FMAC1 int SOAP_FMAC2 soap_getmimehdr(struct soap*);
2427 SOAP_FMAC1 int SOAP_FMAC2 soap_getmime(struct soap*);
2428 SOAP_FMAC1 int SOAP_FMAC2 soap_putmimehdr(struct soap*, struct soap_multipart*);
2429 SOAP_FMAC1 int SOAP_FMAC2 soap_putmime(struct soap*);
2430 SOAP_FMAC1 void SOAP_FMAC2 soap_set_dime(struct soap*);
2431 SOAP_FMAC1 void SOAP_FMAC2 soap_set_mime(struct soap*, const char *boundary, const char *start);
2432 SOAP_FMAC1 void SOAP_FMAC2 soap_clr_dime(struct soap*);
2433 SOAP_FMAC1 void SOAP_FMAC2 soap_clr_mime(struct soap*);
2434 SOAP_FMAC1 int SOAP_FMAC2 soap_set_dime_attachment(struct soap*, char *ptr, size_t size, const char *type, const char *id, unsigned short optype, const char *option);
2435 SOAP_FMAC1 int SOAP_FMAC2 soap_set_mime_attachment(struct soap*, char *ptr, size_t size, enum soap_mime_encoding encoding, const char *type, const char *id, const char *location, const char *description);
2436 SOAP_FMAC1 void SOAP_FMAC2 soap_post_check_mime_attachments(struct soap *soap);
2437 SOAP_FMAC1 int SOAP_FMAC2 soap_check_mime_attachments(struct soap *soap);
2438 SOAP_FMAC1 struct soap_multipart* SOAP_FMAC2 soap_get_mime_attachment(struct soap *soap, void *handle);
2439 SOAP_FMAC1 int SOAP_FMAC2 soap_match_cid(struct soap*, const char*, const char*);
2440 #endif
2442 SOAP_FMAC1 int SOAP_FMAC2 soap_register_plugin_arg(struct soap*, int (*fcreate)(struct soap*, struct soap_plugin*, void*), void*);
2443 SOAP_FMAC1 void* SOAP_FMAC2 soap_lookup_plugin(struct soap*, const char*);
2445 SOAP_FMAC1 const char* SOAP_FMAC2 soap_attr_value(struct soap *soap, const char *name, int flag);
2446 SOAP_FMAC1 int SOAP_FMAC2 soap_set_attr(struct soap *soap, const char *name, const char *value, int flag);
2447 SOAP_FMAC1 void SOAP_FMAC2 soap_clr_attr(struct soap *soap);
2449 #ifdef WITH_COOKIES
2450 SOAP_FMAC1 void SOAP_FMAC2 soap_getcookies(struct soap *soap, const char *val);
2451 SOAP_FMAC1 size_t SOAP_FMAC2 soap_encode_cookie(const char*, char*, size_t);
2452 SOAP_FMAC1 extern struct soap_cookie* SOAP_FMAC2 soap_set_cookie(struct soap*, const char*, const char*, const char*, const char*);
2453 SOAP_FMAC1 extern struct soap_cookie* SOAP_FMAC2 soap_cookie(struct soap*, const char*, const char*, const char*);
2454 SOAP_FMAC1 extern char* SOAP_FMAC2 soap_cookie_value(struct soap*, const char*, const char*, const char*);
2455 SOAP_FMAC1 extern char* SOAP_FMAC2 soap_env_cookie_value(struct soap*, const char*, const char*, const char*);
2456 SOAP_FMAC1 extern time_t SOAP_FMAC2 soap_cookie_expire(struct soap*, const char*, const char*, const char*);
2457 SOAP_FMAC1 extern int SOAP_FMAC2 soap_set_cookie_expire(struct soap*, const char*, long, const char*, const char*);
2458 SOAP_FMAC1 extern int SOAP_FMAC2 soap_set_cookie_session(struct soap*, const char*, const char*, const char*);
2459 SOAP_FMAC1 extern int SOAP_FMAC2 soap_clr_cookie_session(struct soap*, const char*, const char*, const char*);
2460 SOAP_FMAC1 extern void SOAP_FMAC2 soap_clr_cookie(struct soap*, const char*, const char*, const char*);
2461 SOAP_FMAC1 extern int SOAP_FMAC2 soap_getenv_cookies(struct soap*);
2462 SOAP_FMAC1 extern struct soap_cookie* SOAP_FMAC2 soap_copy_cookies(struct soap*, const struct soap*);
2463 SOAP_FMAC1 extern void SOAP_FMAC2 soap_free_cookies(struct soap*);
2464 SOAP_FMAC1 int SOAP_FMAC2 soap_putsetcookies(struct soap *soap);
2465 SOAP_FMAC1 int SOAP_FMAC2 soap_putcookies(struct soap *soap, const char *domain, const char *path, int secure);
2466 #endif
2468 #ifdef __cplusplus
2469 } /* extern "C" */
2470 #endif
2472 #endif /* STDSOAP_H */