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