Changeset 19542 for trunk/Nebulous/nebclient/src/stdsoap2.h
- Timestamp:
- Sep 12, 2008, 3:15:59 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/Nebulous/nebclient/src/stdsoap2.h (modified) (94 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Nebulous/nebclient/src/stdsoap2.h
r3017 r19542 1 1 /* 2 3 stdsoap2.h 2.7.0d 4 5 gSOAP runtime environment. 2 stdsoap2.h 2.7.11-upd 3 4 gSOAP runtime engine 6 5 7 6 gSOAP XML Web services tools 8 Copyright (C) 2000-2004, Robert van Engelen, Genivia, Inc., All Rights Reserved. 9 7 Copyright (C) 2000-2008, Robert van Engelen, Genivia Inc., All Rights Reserved. 8 This part of the software is released under ONE of the following licenses: 9 GPL, the gSOAP public license, OR Genivia's license for commercial use. 10 -------------------------------------------------------------------------------- 10 11 Contributors: 11 12 12 Wind River Systems, Inc., for the following additions (marked WR[...]) :13 Wind River Systems, Inc., for the following additions 13 14 - vxWorks compatible 14 - Support for IPv6.15 16 15 -------------------------------------------------------------------------------- 17 16 gSOAP public license. … … 26 25 27 26 The Initial Developer of the Original Code is Robert A. van Engelen. 28 Copyright (C) 2000-200 4, Robert van Engelen, Genivia,Inc., All Rights Reserved.27 Copyright (C) 2000-2008, Robert van Engelen, Genivia Inc., All Rights Reserved. 29 28 -------------------------------------------------------------------------------- 30 29 GPL license. … … 45 44 Author contact information: 46 45 engelen@genivia.com / engelen@acm.org 46 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 47 51 -------------------------------------------------------------------------------- 48 52 */ … … 62 66 #endif 63 67 64 #ifndef SOAP_BEGIN_NAMESPACE65 # define SOAP_BEGIN_NAMESPACE(name)66 #endif67 68 #ifndef SOAP_END_NAMESPACE69 # define SOAP_END_NAMESPACE(name)70 #endif71 72 68 #ifndef SOAP_FMAC1 /* stdsoap2.h declaration macro */ 73 69 # define SOAP_FMAC1 … … 82 78 #endif 83 79 80 #ifndef SOAP_FMAC3S /* string converter for (de)serializer declaration macro */ 81 # define SOAP_FMAC3S SOAP_FMAC3 82 #endif 83 84 84 #ifndef SOAP_FMAC4 /* (de)serializer declaration macro */ 85 85 # define SOAP_FMAC4 86 86 #endif 87 87 88 #ifndef SOAP_FMAC4S /* string converter for (de)serializer declaration macro */ 89 # define SOAP_FMAC4S SOAP_FMAC4 90 #endif 91 88 92 #ifndef SOAP_FMAC5 /* stub/skeleton declaration macro */ 89 93 # define SOAP_FMAC5 … … 104 108 #ifndef SOAP_SOURCE_STAMP 105 109 # define SOAP_SOURCE_STAMP(str) 110 #endif 111 112 /* gSOAP 2.7.4 and higher: fast look-aside buffering is stable */ 113 #ifndef WITH_FAST 114 # define WITH_FAST 106 115 #endif 107 116 … … 128 137 # ifndef WIN32 129 138 # define WIN32 139 # endif 140 #endif 141 142 #ifdef _WIN32_WCE 143 # ifndef UNDER_CE 144 # define UNDER_CE _WIN32_WCE 130 145 # endif 131 146 #endif … … 157 172 158 173 #if defined(__palmos__) || defined(PALM_GCC) || defined(__PALMOS_TRAPS__) 159 # define PALM 160 #endif 161 162 #ifdef __hpux 163 # define HP_UX 164 #endif 165 166 #ifdef __alpha 167 # define TRU64 174 # ifndef PALM 175 # define PALM 176 # endif 177 #endif 178 179 #if defined(__hpux) 180 # ifndef HP_UX 181 # define HP_UX 182 # endif 183 #endif 184 185 #if defined(__digital__) && defined(__unix__) 186 # ifndef TRU64 187 # define TRU64 188 # endif 168 189 #endif 169 190 170 191 #ifdef __MVS__ 171 # define OS390 172 #endif 173 174 #ifdef _AIX 175 # define __socklen_t_defined 192 # ifndef OS390 193 # define OS390 194 # endif 176 195 #endif 177 196 178 197 #ifdef HAVE_CONFIG_H 179 198 # include "config.h" 199 # if defined(WITH_OPENSSL) 200 # ifndef HAVE_OPENSSL_SSL_H 201 # undef WITH_OPENSSL 202 # endif 203 # endif 204 # if defined(WITH_ZLIB) || defined(WITH_GZIP) 205 # ifndef HAVE_ZLIB_H 206 # undef WITH_ZLIB 207 # undef WITH_GZIP 208 # endif 209 # endif 180 210 #else 181 211 # if defined(UNDER_CE) 212 # define WITH_NOEMPTYSTRUCT 182 213 # define WITH_LEAN 183 214 # define HAVE_SSCANF 184 215 # elif defined(WIN32) 216 # define WITH_NOEMPTYSTRUCT 185 217 # define HAVE_STRRCHR 186 218 # define HAVE_STRTOD … … 192 224 # define HAVE_WCTOMB 193 225 # define HAVE_MBTOWC 226 # define SOAP_LONG_FORMAT "%I64d" 227 # define SOAP_ULONG_FORMAT "%I64u" 194 228 # elif defined(CYGWIN) 195 229 # define HAVE_STRRCHR … … 209 243 # define HAVE_STRTOD 210 244 # define HAVE_SSCANF 245 # define HAVE_STRTOD_L 246 # define HAVE_SSCANF_L 247 # define HAVE_SPRINTF_L 211 248 # define HAVE_STRTOL 212 249 # define HAVE_STRTOUL … … 217 254 # define HAVE_WCTOMB 218 255 # define HAVE_MBTOWC 219 # elif defined(_AIX VERSION_431)256 # elif defined(_AIX43) 220 257 # define HAVE_STRRCHR 221 258 # define HAVE_STRTOD … … 228 265 # define HAVE_GMTIME_R 229 266 # define HAVE_LOCALTIME_R 267 # define HAVE_WCTOMB 268 # define HAVE_MBTOWC 269 # elif defined(_AIX41) 270 # define HAVE_STRRCHR 271 # define HAVE_STRTOD 272 # define HAVE_SSCANF 273 # define HAVE_STRTOL 274 # define HAVE_STRTOUL 275 # define HAVE_SYS_TIMEB_H 230 276 # define HAVE_WCTOMB 231 277 # define HAVE_MBTOWC … … 243 289 # define HAVE_WCTOMB 244 290 # define HAVE_MBTOWC 245 # elif defined(FREEBSD) 291 # elif defined(FREEBSD) || defined(__FreeBSD__) 246 292 # define HAVE_STRRCHR 247 293 # define HAVE_STRTOD 248 294 # define HAVE_SSCANF 295 # define HAVE_STRTOD_L 296 # define HAVE_SSCANF_L 297 # define HAVE_SPRINTF_L 249 298 # define HAVE_STRTOL 250 299 # define HAVE_STRTOUL 300 # define HAVE_STRTOLL 301 # define HAVE_STRTOULL 251 302 # define HAVE_GETTIMEOFDAY 252 303 # define HAVE_RAND_R … … 255 306 # define HAVE_WCTOMB 256 307 # define HAVE_MBTOWC 308 # define SOAP_LONG_FORMAT "%qd" 309 # define SOAP_ULONG_FORMAT "%qu" 257 310 # elif defined(__VMS) 258 311 # define HAVE_STRRCHR … … 268 321 # define HAVE_WCTOMB 269 322 # define HAVE_MBTOWC 270 # elif defined(__GLIBC__) 323 # elif defined(__GLIBC__) || defined(__GNU__) 271 324 # define HAVE_STRRCHR 272 325 # define HAVE_STRTOD 273 326 # define HAVE_SSCANF 327 # define HAVE_STRTOD_L 328 # define HAVE_SSCANF_L 329 # define HAVE_SPRINTF_L 274 330 # define HAVE_STRTOL 275 331 # define HAVE_STRTOUL 332 # define HAVE_STRTOLL 333 # define HAVE_STRTOULL 276 334 # define HAVE_SYS_TIMEB_H 277 335 # define HAVE_FTIME … … 297 355 # define HAVE_WCTOMB 298 356 # define HAVE_MBTOWC 357 # define SOAP_LONG_FORMAT "%ld" 358 # define SOAP_ULONG_FORMAT "%lu" 299 359 # elif defined(MAC_CARBON) 360 # define WITH_NOIO 300 361 # define HAVE_STRRCHR 301 362 # define HAVE_STRTOD 302 363 # define HAVE_SSCANF 364 # define HAVE_STRTOD_L 365 # define HAVE_SSCANF_L 366 # define HAVE_SPRINTF_L 303 367 # define HAVE_STRTOL 304 368 # define HAVE_STRTOUL … … 319 383 # define O_NONBLOCK FNONBIO 320 384 # include <sys_socket.h> 321 # include <time.h>322 385 # include "palmFunctions.h" 323 386 # elif defined(SYMBIAN) … … 325 388 # define WITH_NONAMESPACES 326 389 # define HAVE_STRTOD /* use STRTOD since sscanf doesn't seem to work */ 390 # include <e32def.h> 327 391 # include <sys/ioctl.h> 328 392 # elif defined(VXWORKS) 393 # ifdef _WRS_KERNEL 394 # define _POSIX_THREADS 1 395 # endif 329 396 # define HAVE_STRRCHR 330 397 # define HAVE_STRTOD … … 332 399 # define HAVE_STRTOL 333 400 # define HAVE_STRTOUL 334 # define HAVE_RAND_R 335 # define HAVE_PGMTIME_R 336 # define HAVE_PLOCALTIME_R 401 # define HAVE_GMTIME 402 # define HAVE_LOCALTIME 337 403 # define HAVE_MKTIME 338 404 # elif defined(OS390) … … 348 414 # define HAVE_LOCALTIME_R 349 415 # define HAVE_WCTOMB 350 # define HAVE_MB 416 # define HAVE_MBTOWC 417 # elif defined(AS400) 418 # define HAVE_STRRCHR 419 # define HAVE_STRTOD 420 # define HAVE_SSCANF 421 # define HAVE_STRTOL 422 # define HAVE_STRTOUL 423 # define HAVE_SYS_TIMEB_H 424 # define HAVE_FTIME 425 # define HAVE_RAND_R 426 # define HAVE_GMTIME_R 427 # define HAVE_LOCALTIME_R 428 # define HAVE_WCTOMB 429 # define HAVE_MBTOWC 430 # elif defined(__QNX__) || defined(QNX) 431 /* QNX does not have a working version of strtof */ 432 # undef HAVE_STRTOF 433 # define HAVE_STRRCHR 434 # define HAVE_STRTOD 435 # define HAVE_SSCANF 436 # define HAVE_STRTOL 437 # define HAVE_STRTOUL 438 # define HAVE_SYS_TIMEB_H 439 # define HAVE_FTIME 440 # define HAVE_RAND_R 441 # define HAVE_GETHOSTBYNAME_R 442 # define HAVE_GMTIME_R 443 # define HAVE_LOCALTIME_R 444 # define HAVE_WCTOMB 445 # define HAVE_MBTOWC 446 # define LONG64 long 447 # define ULONG64 unsigned LONG64 448 # define SOAP_LONG_FORMAT "%ld" 449 # define SOAP_ULONG_FORMAT "%lu" 351 450 # else 352 451 /* Default asumptions on supported functions */ … … 367 466 #endif 368 467 369 #if defined(TRU64) 370 # define SOAP_LONG_FORMAT "%ld" 371 # define SOAP_ULONG_FORMAT "%lu" 372 #elif defined(WIN32) 373 # define SOAP_LONG_FORMAT "%I64d" 374 # define SOAP_ULONG_FORMAT "%I64u" 375 #endif 376 377 #ifndef SOAP_LONG_FORMAT 378 # define SOAP_LONG_FORMAT "%lld" /* printf format for 64 bit ints */ 379 #endif 380 381 #ifndef SOAP_ULONG_FORMAT 382 # define SOAP_ULONG_FORMAT "%llu" /* printf format for unsigned 64 bit ints */ 383 #endif 384 385 #ifndef SOAP_MALLOC /* use libc malloc */ 386 # define SOAP_MALLOC(n) malloc(n) 387 #endif 388 389 #ifndef SOAP_FREE /* use libc free */ 390 # define SOAP_FREE(p) free(p) 391 #endif 392 393 #include <stdlib.h> 394 395 #ifndef PALM 396 # include <stdio.h> 397 # include <string.h> 398 #endif 399 400 #include <ctype.h> 401 #include <limits.h> 468 #ifdef WITH_C_LOCALE 469 # include <xlocale.h> 470 #else 471 # undef HAVE_STRTOF_L 472 # undef HAVE_STRTOD_L 473 # undef HAVE_SSCANF_L 474 # undef HAVE_SPRINTF_L 475 #endif 476 477 #ifndef WITH_NOSTDLIB 478 # include <stdlib.h> 479 # ifndef PALM 480 # include <stdio.h> 481 # include <string.h> 482 # endif 483 # include <ctype.h> 484 # include <limits.h> 485 #endif 402 486 403 487 #if defined(__cplusplus) && !defined(WITH_LEAN) 404 488 # include <string> 405 489 # include <iostream> 406 using namespace std; 407 #endif 490 #endif 491 492 #ifdef WITH_NOHTTP 493 # ifndef WITH_NOIO 494 # define WITH_NOIO 495 # undef WITH_COOKIES 496 # endif 497 #endif 498 499 /* Suggestion when SOAP_FD_EXCEEDED error occurs: 500 Some systems allow increasing FD_SETSIZE before including sys/types.h: 501 #define FD_SETSIZE (2048) 502 */ 408 503 409 504 #ifndef UNDER_CE 410 505 # ifndef PALM 411 # i nclude <errno.h>412 # ifndef MAC_CARBON506 # ifndef WITH_NOIO 507 # include <errno.h> 413 508 # include <sys/types.h> 414 509 # endif … … 429 524 #endif 430 525 431 #ifndef MAC_CARBON526 #ifndef WITH_NOIO 432 527 # ifndef WIN32 433 528 # ifndef PALM … … 435 530 # ifdef VXWORKS 436 531 # include <sockLib.h> 437 # endif 438 # ifndef VXWORKS 532 # include <selectLib.h> 533 # ifndef _WRS_KERNEL 534 # include <strings.h> 535 # endif 536 # else 439 537 # ifndef SYMBIAN 440 538 # include <strings.h> … … 446 544 # endif 447 545 # ifdef VXWORKS 448 # include <sys/times.h> 546 # ifdef _WRS_KERNEL 547 # include <sys/times.h> 548 # endif 449 549 # else 450 550 # include <sys/time.h> … … 461 561 #endif 462 562 463 #ifdef WITH_FASTCGI 464 # include <fcgi_stdio.h> 465 #endif 466 467 #ifdef WITH_OPENSSL 468 # define OPENSSL_NO_KRB5 469 # include <openssl/ssl.h> 470 # include <openssl/err.h> 471 # include <openssl/rand.h> 472 # ifndef ALLOW_OLD_VERSIONS 473 # if (OPENSSL_VERSION_NUMBER < 0x00905100L) 474 # error "Must use OpenSSL 0.9.6 or later" 475 # endif 476 # endif 477 #endif 478 479 #ifdef WITH_GZIP 480 # ifndef WITH_ZLIB 481 # define WITH_ZLIB 482 # endif 483 #endif 484 485 #ifdef WITH_CASEINSENSITIVETAGS 486 # define SOAP_STRCMP soap_tag_cmp /* case insensitve XML element/attribute names */ 563 #ifdef WIN32 564 # define SOAP_WINSOCKINT int 487 565 #else 488 # define SOAP_STRCMP strcmp /* case sensitive XML element/attribute names */ 489 #endif 490 491 #ifdef WITH_ZLIB 492 # include <zlib.h> 493 #endif 494 495 #ifndef PALM 496 # include <math.h> /* for isnan() */ 497 #endif 498 499 /* #define DEBUG */ /* Uncomment to debug sending (in file SENT.log) receiving (in file RECV.log) and messages (in file TEST.log) */ 500 501 #ifdef __cplusplus 502 extern "C" { 503 #endif 504 505 #define soap_get0(soap) (((soap)->bufidx>=(soap)->buflen && soap_recv(soap)) ? EOF : (unsigned char)(soap)->buf[(soap)->bufidx]) 506 #define soap_get1(soap) (((soap)->bufidx>=(soap)->buflen && soap_recv(soap)) ? EOF : (unsigned char)(soap)->buf[(soap)->bufidx++]) 507 #define soap_revget1(soap) ((soap)->bufidx--) 508 #define soap_unget(soap, c) ((soap)->ahead = c) 509 #define soap_register_plugin(soap, plugin) soap_register_plugin_arg(soap, plugin, NULL) 510 #define soap_imode(soap, n) ((soap)->mode = (soap)->imode = (n)) 511 #define soap_set_imode(soap, n) ((soap)->mode = (soap)->imode |= (n)) 512 #define soap_clr_imode(soap, n) ((soap)->mode = (soap)->imode &= ~(n)) 513 #define soap_omode(soap, n) ((soap)->mode = (soap)->omode = (n)) 514 #define soap_set_omode(soap, n) ((soap)->mode = (soap)->omode |= (n)) 515 #define soap_clr_omode(soap, n) ((soap)->mode = (soap)->omode &= ~(n)) 516 #define soap_destroy(soap) soap_delete((soap), NULL) 566 # define SOAP_WINSOCKINT size_t 567 #endif 517 568 518 569 #ifdef WIN32 … … 521 572 # include <fcntl.h> 522 573 # endif 523 # include <winsock.h>524 /* # include <winsock2.h> */ /* Alternative: use winsock2 (not available with eVC) */525 /* WR[ */526 574 # ifdef WITH_IPV6 575 # include <winsock2.h> /* Visual Studio 2005 users: you must install the Platform SDK (R2) */ 527 576 # include <ws2tcpip.h> 528 577 # include <wspiapi.h> 578 # define SOAP_GAI_STRERROR gai_strerrorA 579 # else 580 # include <winsock.h> /* Visual Studio 2005 users: you must install the Platform SDK (R2) */ 581 /* # include <winsock2.h> */ /* Alternative: use winsock2 (not available with eVC) */ 529 582 # endif 530 583 #else … … 534 587 # include <ioLib.h> 535 588 # endif 536 /* ]WR */ 537 # ifndef MAC_CARBON 589 # ifndef WITH_NOIO 538 590 # ifndef PALM 539 591 # include <netdb.h> … … 541 593 # include <unistd.h> 542 594 # include <fcntl.h> 595 # ifdef _AIX41 596 # include <sys/select.h> 597 # endif 543 598 # endif 544 599 # endif 545 600 #endif 546 601 547 #ifdef WIN32 548 # define SOAP_SOCKET SOCKET 602 #ifdef WITH_FASTCGI 603 # include <fcgi_stdio.h> 604 #endif 605 606 #ifdef WITH_OPENSSL 607 # define OPENSSL_NO_KRB5 608 # include <openssl/bio.h> 609 # include <openssl/err.h> 610 # include <openssl/rand.h> 611 # include <openssl/ssl.h> 612 # include <openssl/x509v3.h> 613 # ifndef ALLOW_OLD_VERSIONS 614 # if (OPENSSL_VERSION_NUMBER < 0x00905100L) 615 # error "Must use OpenSSL 0.9.6 or later" 616 # endif 617 # endif 618 #endif 619 620 #ifdef WITH_GZIP 621 # ifndef WITH_ZLIB 622 # define WITH_ZLIB 623 # endif 624 #endif 625 626 #ifdef WITH_CASEINSENSITIVETAGS 627 # define SOAP_STRCMP soap_tag_cmp /* case insensitve XML element/attribute names */ 549 628 #else 550 # define SOAP_SOCKET int 551 # define closesocket(n) close(n) 552 #endif 553 554 #define soap_valid_socket(n) ((n) >= 0) 555 #define SOAP_INVALID_SOCKET (-1) 629 # define SOAP_STRCMP strcmp /* case sensitive XML element/attribute names */ 630 #endif 631 632 #ifdef WITH_ZLIB 633 # include <zlib.h> 634 #endif 635 636 #ifndef WITH_NOSTDLIB 637 # ifndef PALM 638 # include <math.h> /* for isnan() */ 639 # endif 640 #endif 641 642 /* #define DEBUG */ /* Uncomment to debug sending (in file SENT.log) receiving (in file RECV.log) and messages (in file TEST.log) */ 643 644 #ifdef __cplusplus 645 extern "C" { 646 #endif 647 648 /* Portability: define SOAP_SOCKLEN_T */ 649 #if defined(_AIX) 650 # if defined(_AIX43) 651 # define SOAP_SOCKLEN_T socklen_t 652 # else 653 # define SOAP_SOCKLEN_T int 654 # endif 655 #elif defined(SOCKLEN_T) 656 # define SOAP_SOCKLEN_T SOCKLEN_T 657 #elif defined(__socklen_t_defined) || defined(_SOCKLEN_T) || defined(CYGWIN) || defined(FREEBSD) || defined(__FreeBSD__) || defined(__QNX__) || defined(QNX) 658 # define SOAP_SOCKLEN_T socklen_t 659 #elif defined(IRIX) || defined(WIN32) || defined(__APPLE__) || defined(HP_UX) || defined(SUN_OS) || defined(OPENSERVER) || defined(TRU64) || defined(VXWORKS) 660 # define SOAP_SOCKLEN_T int 661 #else 662 # define SOAP_SOCKLEN_T size_t 663 #endif 664 665 #ifndef SOAP_SOCKET 666 # ifdef WIN32 667 # define SOAP_SOCKET SOCKET 668 # define soap_closesocket(n) closesocket(n) 669 # else 670 # define SOAP_SOCKET int 671 # define soap_closesocket(n) close(n) 672 # endif 673 #endif 674 675 #define SOAP_INVALID_SOCKET ((SOAP_SOCKET)-1) 676 #define soap_valid_socket(n) ((n) != SOAP_INVALID_SOCKET) 677 678 #ifndef SOAP_GAI_STRERROR 679 # define SOAP_GAI_STRERROR gai_strerror 680 #endif 681 682 #ifndef FD_SETSIZE 683 # define FD_SETSIZE (1024) 684 #endif 556 685 557 686 #if defined(SYMBIAN) 558 687 # define LONG64 long 559 688 # define ULONG64 unsigned LONG64 560 #elif !defined(WIN32) 561 # define LONG64 long long 562 # define ULONG64 unsigned LONG64 689 #elif !defined(WIN32) || defined(CYGWIN) || defined(__GLIBC__) || defined(__GNU__) 690 # ifndef LONG64 691 # if defined(HAVE_STDINT_H) 692 # include <stdint.h> 693 # define LONG64 int64_t 694 # define ULONG64 uint64_t 695 # elif defined(__GLIBC__) 696 # include <bits/wordsize.h> 697 # if (__WORDSIZE == 64) 698 # define LONG64 int64_t 699 # define ULONG64 uint64_t 700 # ifndef SOAP_LONG_FORMAT 701 # define SOAP_LONG_FORMAT "%ld" 702 # endif 703 # ifndef SOAP_ULONG_FORMAT 704 # define SOAP_ULONG_FORMAT "%lu" 705 # endif 706 # else 707 # define LONG64 long long 708 # define ULONG64 unsigned LONG64 709 # endif 710 # else 711 # define LONG64 long long 712 # define ULONG64 unsigned LONG64 713 # endif 714 # endif 563 715 #elif defined(UNDER_CE) 564 716 # define LONG64 __int64 … … 569 721 #endif 570 722 571 #if defined(WIN32) 723 #ifndef SOAP_LONG_FORMAT 724 # define SOAP_LONG_FORMAT "%lld" /* printf format for 64 bit ints */ 725 #endif 726 727 #ifndef SOAP_ULONG_FORMAT 728 # define SOAP_ULONG_FORMAT "%llu" /* printf format for unsigned 64 bit ints */ 729 #endif 730 731 #if defined(WIN32) && !defined(CYGWIN) 572 732 # define soap_int32 __int32 573 733 #elif defined(SYMBIAN) … … 575 735 #elif defined(PALM) 576 736 # define soap_int32 Int32 737 #elif defined(_AIX) 738 # if defined(_AIX43) 739 # define soap_int32 int32_t 740 # else 741 # define soap_int32 signed int 742 # endif 577 743 #else 578 744 # define soap_int32 int32_t 579 745 #endif 580 746 581 /* UCS-4 requires 32 bits (0-7FFFFFFF, the sign bit is used by gSOAP to distinguish XML entities) */582 typedef soap_int32 soap_wchar;583 584 747 #ifdef WIN32 748 # define SOAP_ERANGE ERANGE 585 749 # define SOAP_EINTR WSAEINTR 586 750 # define SOAP_EAGAIN WSAEWOULDBLOCK 587 751 # define SOAP_EWOULDBLOCK WSAEWOULDBLOCK 588 752 # define SOAP_EINPROGRESS WSAEINPROGRESS 753 # define SOAP_EADDRINUSE WSAEADDRINUSE 589 754 #else 755 # define SOAP_ERANGE ERANGE 590 756 # define SOAP_EINTR EINTR 591 757 # define SOAP_EAGAIN EAGAIN 758 # define SOAP_EADDRINUSE EADDRINUSE 592 759 # ifdef SYMBIAN 593 760 # define SOAP_EWOULDBLOCK 9898 … … 602 769 # ifdef UNDER_CE 603 770 # define soap_errno GetLastError() 604 # define soap_socket_errno GetLastError() 771 # define soap_socket_errno(s) GetLastError() 772 # define soap_reset_errno SetLastError(0) 605 773 # else 606 774 # define soap_errno GetLastError() 607 # define soap_socket_errno WSAGetLastError() 775 # define soap_socket_errno(s) WSAGetLastError() 776 # define soap_reset_errno SetLastError(0) 608 777 # endif 609 778 #else 610 # define soap_errno errno 611 # define soap_socket_errno errno 779 # ifndef WITH_NOIO 780 # define soap_errno errno 781 # define soap_socket_errno(s) errno 782 # define soap_reset_errno (errno = 0) 783 # else 784 # define soap_errno 0 785 # define soap_socket_errno(s) 0 786 # define soap_reset_errno 787 # endif 612 788 #endif 613 789 614 790 #ifndef SOAP_BUFLEN 615 791 # ifndef WITH_LEAN 616 # define SOAP_BUFLEN (32768) /* buffer length for socket packets, also used by gethostbyname_rso don't make this too small */792 # define SOAP_BUFLEN (65536) /* buffer length for socket packets, also used by gethostbyname_r and UDP messages, so don't make this too small */ 617 793 # else 618 # define SOAP_BUFLEN (2048)794 # define SOAP_BUFLEN (2048) 619 795 # endif 620 796 #endif 621 797 #ifndef SOAP_LABLEN 622 # ifndef WITH_LEAN 623 # define SOAP_LABLEN (256) /* initial look-aside buffer length */ 624 # else 625 # define SOAP_LABLEN (64) 626 # endif 798 # define SOAP_LABLEN (256) /* initial look-aside buffer length */ 799 #endif 800 #ifndef SOAP_PTRBLK 801 # define SOAP_PTRBLK (32) /* block allocation for pointer hash table chains */ 627 802 #endif 628 803 #ifndef SOAP_PTRHASH 629 804 # ifndef WITH_LEAN 630 # define SOAP_PTRHASH (1024) /* size of pointer analysis hash table (must be power of 2) */805 # define SOAP_PTRHASH (1024) /* size of pointer analysis hash table (must be power of 2) */ 631 806 # else 632 # define SOAP_PTRHASH (16)807 # define SOAP_PTRHASH (32) 633 808 # endif 634 809 #endif 635 810 #ifndef SOAP_IDHASH 636 811 # ifndef WITH_LEAN 637 # define SOAP_IDHASH (1999) /* prime size of hash table for parsed id/ref */812 # define SOAP_IDHASH (1999) /* prime size of hash table for parsed id/ref */ 638 813 # else 639 # define SOAP_IDHASH (19 9)814 # define SOAP_IDHASH (19) /* 19, 199 */ 640 815 # endif 641 816 #endif 642 817 #ifndef SOAP_BLKLEN 643 # define SOAP_BLKLEN (256) /* size of blocks to collect long strings and XML attributes */ 818 # ifndef WITH_LEAN 819 # define SOAP_BLKLEN (256) /* size of blocks to collect long strings and XML attributes */ 820 # else 821 # define SOAP_BLKLEN (32) 822 # endif 644 823 #endif 645 824 #ifndef SOAP_TAGLEN 646 # define SOAP_TAGLEN (256) /* maximum length of XML element tag/attribute name + 1 */ 825 # ifndef WITH_LEAN 826 # define SOAP_TAGLEN (1024) /* maximum length of XML element tag/attribute name or host/path name + 1 */ 827 # else 828 # define SOAP_TAGLEN (64) 829 # endif 647 830 #endif 648 831 #ifndef SOAP_HDRLEN 649 832 # ifndef WITH_LEAN 650 # define SOAP_HDRLEN (8192) /* maximum length of HTTP header line (must be >4096 to read cookies) */833 # define SOAP_HDRLEN (8192) /* maximum length of HTTP header line (must be >4096 to read cookies) */ 651 834 # else 652 # define SOAP_HDRLEN (1024)835 # define SOAP_HDRLEN (1024) 653 836 # endif 654 837 #endif 655 838 #ifndef SOAP_MAXDIMS 656 # define SOAP_MAXDIMS (16) /* maximum array dimensions (array nestings) must be less than 64 to protect soap->tmpbuf */ 839 # ifndef WITH_LEAN 840 # define SOAP_MAXDIMS (16) /* maximum array dimensions (array nestings) must be less than 64 to protect soap->tmpbuf */ 841 # else 842 # define SOAP_MAXDIMS (4) 843 # endif 657 844 #endif 658 845 … … 669 856 670 857 #ifndef SOAP_MAXARRAYSIZE 671 # define SOAP_MAXARRAYSIZE (100000 ) /* "trusted" max size of inbound SOAP array for compound array allocation */858 # define SOAP_MAXARRAYSIZE (1000000) /* "trusted" max size of inbound SOAP array for compound array allocation */ 672 859 #endif 673 860 … … 691 878 692 879 #ifdef SUN_OS 693 # define soap_isnan(n) isnan(n) 880 # define HAVE_ISNAN 881 #endif 882 883 #ifdef __APPLE__ 884 # ifdef __cplusplus 885 # ifndef isnan 886 extern "C" int isnan(double); 887 # endif 888 # endif 889 # define HAVE_ISNAN 694 890 #endif 695 891 696 892 #if !defined(HAVE_ISNAN) && (defined(_MATH_H) || defined(_MATH_INCLUDED)) 697 893 # define HAVE_ISNAN 894 #endif 895 896 extern const struct soap_double_nan { unsigned int n1, n2; } soap_double_nan; 897 898 #ifdef VXWORKS 899 # ifndef FLT_MAX 900 # define FLT_MAX _ARCH_FLT_MAX 901 # endif 902 # ifndef DBL_MAX 903 # define DBL_MAX _ARCH_DBL_MAX 904 # endif 905 #endif 906 907 #ifndef FLT_NAN 908 # define FLT_NAN (*(float*)(void*)&soap_double_nan) 909 #endif 910 911 #ifndef FLT_PINFTY 912 # if defined(FLT_MAX) 913 # define FLT_PINFTY FLT_MAX 914 # elif defined(HUGE_VALF) 915 # define FLT_PINFTY (float)HUGE_VALF 916 # elif defined(HUGE_VAL) 917 # define FLT_PINFTY (float)HUGE_VAL 918 # elif defined(FLOAT_MAX) 919 # define FLT_PINFTY FLOAT_MAX 920 # else 921 # define FLT_PINFTY (3.40282347e+38F) 922 # endif 923 #endif 924 925 #ifndef FLT_NINFTY 926 # define FLT_NINFTY (-FLT_PINFTY) 927 #endif 928 929 #ifndef DBL_NAN 930 # define DBL_NAN (*(double*)(void*)&soap_double_nan) 931 #endif 932 933 #ifndef DBL_PINFTY 934 # if defined(DBL_MAX) 935 # define DBL_PINFTY DBL_MAX 936 # elif defined(HUGE_VALF) 937 # define DBL_PINFTY (double)HUGE_VALF 938 # elif defined(HUGE_VAL) 939 # define DBL_PINFTY (double)HUGE_VAL 940 # elif defined(DOUBLE_MAX) 941 # define DBL_PINFTY DOUBLE_MAX 942 # else 943 # define DBL_PINFTY (1.7976931348623157e+308) 944 # endif 945 #endif 946 947 #ifndef DBL_NINFTY 948 # define DBL_NINFTY (-DBL_PINFTY) 698 949 #endif 699 950 … … 702 953 # define soap_isnan(n) isnan(n) 703 954 # else 704 # define soap_isnan(_) (0) 705 # endif 706 #endif 707 708 extern const struct soap_double_nan { unsigned int n1, n2; } soap_double_nan; 709 710 #ifdef VXWORKS 711 # ifndef FLT_MAX 712 # define FLT_MAX _ARCH_FLT_MAX 713 # endif 714 # ifndef DBL_MAX 715 # define DBL_MAX _ARCH_DBL_MAX 716 # endif 717 #endif 718 719 #ifndef FLT_NAN 720 # ifdef HAVE_ISNAN 721 # define FLT_NAN (*(float*)&soap_double_nan) 722 # else 723 # define FLT_NAN (0.0) 724 # endif 725 #endif 726 727 #ifndef FLT_PINFTY 728 # ifdef FLT_MAX 729 # define FLT_PINFTY FLT_MAX 730 # else 731 # ifdef HUGE_VAL 732 # define FLT_PINFTY (float)HUGE_VAL 733 # else 734 # ifdef FLOAT_MAX 735 # define FLT_PINFTY FLOAT_MAX 736 # else 737 # define FLT_PINFTY (3.40282347e+38) 738 # endif 739 # endif 740 # endif 741 #endif 742 743 #ifndef FLT_NINFTY 744 # define FLT_NINFTY (-FLT_PINFTY) 745 #endif 746 747 #ifndef DBL_NAN 748 # ifdef HAVE_ISNAN 749 # define DBL_NAN (*(double*)&soap_double_nan) 750 # else 751 # define DBL_NAN (0.0) 752 # endif 753 #endif 754 755 #ifndef DBL_PINFTY 756 # ifdef DBL_MAX 757 # define DBL_PINFTY DBL_MAX 758 # else 759 # ifdef HUGE_VAL 760 # define DBL_PINFTY (double)HUGE_VAL 761 # else 762 # ifdef DOUBLE_MAX 763 # define DBL_PINFTY DOUBLE_MAX 764 # else 765 # define DBL_PINFTY (1.7976931348623157e+308) 766 # endif 767 # endif 768 # endif 769 #endif 770 771 #ifndef DBL_NINFTY 772 # define DBL_NINFTY (-DBL_PINFTY) 955 # define soap_isnan(n) (0) 956 # endif 773 957 #endif 774 958 … … 792 976 #define SOAP_MUSTUNDERSTAND 8 793 977 #define SOAP_NAMESPACE 9 794 /* #define SOAP_OBJ_MISMATCH 10 obsolete */ 795 #define SOAP_TAG_END 10 978 #define SOAP_USER_ERROR 10 796 979 #define SOAP_FATAL_ERROR 11 797 980 #define SOAP_FAULT 12 798 981 #define SOAP_NO_METHOD 13 799 #define SOAP_GET_METHOD 14 800 #define SOAP_EOM 15 801 #define SOAP_NULL 16 802 #define SOAP_MULTI_ID 17 803 #define SOAP_MISSING_ID 18 804 #define SOAP_HREF 19 805 #define SOAP_TCP_ERROR 20 806 #define SOAP_HTTP_ERROR 21 807 #define SOAP_SSL_ERROR 22 808 #define SOAP_ZLIB_ERROR 23 809 #define SOAP_DIME_ERROR 24 810 #define SOAP_DIME_HREF 25 811 #define SOAP_DIME_MISMATCH 26 812 #define SOAP_DIME_END 27 813 #define SOAP_MIME_ERROR 28 814 #define SOAP_VERSIONMISMATCH 29 815 #define SOAP_PLUGIN_ERROR 30 816 #define SOAP_DATAENCODINGUNKNOWN 31 817 #define SOAP_REQUIRED 32 818 #define SOAP_PROHIBITED 33 819 #define SOAP_OCCURS 34 820 #define SOAP_LENGTH 35 821 822 #define soap_xml_error_check(e) ((e) == SOAP_TAG_MISMATCH || (e) == SOAP_TAG_END || (e) == SOAP_SYNTAX_ERROR || (e) == SOAP_NAMESPACE || (e) == SOAP_MULTI_ID || (e) == SOAP_MISSING_ID || (e) == SOAP_REQUIRED || (e) == SOAP_PROHIBITED || (e) == SOAP_OCCURS || (e) == SOAP_LENGTH || (e) == SOAP_NULL || (e) == SOAP_HREF) 982 #define SOAP_NO_DATA 14 983 #define SOAP_GET_METHOD 15 984 #define SOAP_PUT_METHOD 16 985 #define SOAP_DEL_METHOD 17 986 #define SOAP_HEAD_METHOD 18 987 #define SOAP_HTTP_METHOD 19 988 #define SOAP_EOM 20 989 #define SOAP_MOE 21 990 #define SOAP_HDR 22 991 #define SOAP_NULL 23 992 #define SOAP_DUPLICATE_ID 24 993 #define SOAP_MISSING_ID 25 994 #define SOAP_HREF 26 995 #define SOAP_UDP_ERROR 27 996 #define SOAP_TCP_ERROR 28 997 #define SOAP_HTTP_ERROR 29 998 #define SOAP_SSL_ERROR 30 999 #define SOAP_ZLIB_ERROR 31 1000 #define SOAP_DIME_ERROR 32 1001 #define SOAP_DIME_HREF 33 1002 #define SOAP_DIME_MISMATCH 34 1003 #define SOAP_DIME_END 35 1004 #define SOAP_MIME_ERROR 36 1005 #define SOAP_MIME_HREF 37 1006 #define SOAP_MIME_END 38 1007 #define SOAP_VERSIONMISMATCH 39 1008 #define SOAP_PLUGIN_ERROR 40 1009 #define SOAP_DATAENCODINGUNKNOWN 41 1010 #define SOAP_REQUIRED 42 1011 #define SOAP_PROHIBITED 43 1012 #define SOAP_OCCURS 44 1013 #define SOAP_LENGTH 45 1014 #define SOAP_FD_EXCEEDED 46 1015 1016 #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) 823 1017 #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) 824 1018 #define soap_tcp_error_check(e) ((e) == SOAP_EOF || (e) == SOAP_TCP_ERROR) 825 1019 #define soap_ssl_error_check(e) ((e) == SOAP_SSL_ERROR) 826 1020 #define soap_zlib_error_check(e) ((e) == SOAP_ZLIB_ERROR) 827 #define soap_ mime_error_check(e) ((e) == SOAP_MIME_ERROR)828 #define soap_dime_error_check(e) ((e) == SOAP_DIME_ERROR || (e) == SOAP_DIME_MISMATCH) 829 #define soap_http_error_check(e) ((e) == SOAP_HTTP_ERROR || (e) == SOAP_GET_METHOD || ((e) >= 100 && (e) < 600)) 830 831 /* gSOAP HTTP response status codes 100 to 600 are reserved*/832 833 /* Special gSOAP HTTP response status codes*/1021 #define soap_http_error_check(e) ((e) == SOAP_HTTP_ERROR || ((e) >= SOAP_GET_METHOD && (e) <= SOAP_HTTP_METHOD)|| (e) == SOAP_NO_DATA || ((e) >= 100 && (e) < 600)) 1022 1023 /* gSOAP HTTP response status codes 100 to 599 are reserved */ 1024 1025 /* Codes 600 to 999 are user definable */ 1026 1027 /* Exceptional gSOAP HTTP response status codes >= 1000 */ 834 1028 835 1029 #define SOAP_STOP 1000 /* No HTTP response */ 836 #define SOAP_HTML 1001 /* Custom HTML response */ 837 #define SOAP_FILE 1002 /* Custom file-based response */ 838 839 /* gSOAP HTTP request status codes */ 840 841 #define SOAP_POST 1003 842 #define SOAP_GET 1104 1030 #define SOAP_FORM 1001 /* Form request/response */ 1031 #define SOAP_HTML 1002 /* Custom HTML response */ 1032 #define SOAP_FILE 1003 /* Custom file-based response */ 1033 1034 /* gSOAP HTTP method codes */ 1035 1036 #define SOAP_POST 2000 1037 #define SOAP_GET 2001 843 1038 844 1039 /* gSOAP DIME */ … … 868 1063 #define SOAP_IO_CHUNK 0x00000003 /* use HTTP chunked transfer AND buffer packets */ 869 1064 870 #define SOAP_IO_LENGTH 0x00000004 871 #define SOAP_IO_KEEPALIVE 0x00000008 872 873 #define SOAP_ENC_LATIN 0x00800010 /* iso-8859-1 encoding */ 874 #define SOAP_ENC_XML 0x00000020 /* plain XML encoding, no HTTP header */ 875 #define SOAP_ENC_DIME 0x00000040 876 #define SOAP_ENC_MIME 0x00000080 877 #define SOAP_ENC_ZLIB 0x00000100 878 #define SOAP_ENC_SSL 0x00000200 879 880 #define SOAP_XML_STRICT 0x00001000 /* strict validation */ 881 #define SOAP_XML_CANONICAL 0x00002000 /* C14N canonical XML */ 882 #define SOAP_XML_TREE 0x00004000 883 #define SOAP_XML_GRAPH 0x00008000 884 #define SOAP_XML_NIL 0x00010000 885 #define SOAP_XML_DOM 0x00020000 886 #define SOAP_XML_SEC 0x00040000 /* reserved for WS security */ 887 888 #define SOAP_C_NOIOB 0x00100000 889 #define SOAP_C_UTFSTRING 0x00200000 890 #define SOAP_C_MBSTRING 0x00400000 1065 #define SOAP_IO_UDP 0x00000004 /* TCP or UDP */ 1066 1067 #define SOAP_IO_LENGTH 0x00000008 /* calc message length (internal) */ 1068 #define SOAP_IO_KEEPALIVE 0x00000010 /* keep connection alive */ 1069 1070 #define SOAP_ENC_LATIN 0x00000020 /* accept iso-8859-1 encoding */ 1071 #define SOAP_ENC_XML 0x00000040 /* plain XML encoding, no HTTP header */ 1072 #define SOAP_ENC_DIME 0x00000080 1073 #define SOAP_ENC_MIME 0x00000100 1074 #define SOAP_ENC_MTOM 0x00000200 1075 #define SOAP_ENC_ZLIB 0x00000400 1076 #define SOAP_ENC_SSL 0x00000800 1077 1078 #define SOAP_ENC 0x00000FFF /* IO and ENC mask */ 1079 1080 #define SOAP_XML_STRICT 0x00001000 /* apply strict validation */ 1081 #define SOAP_XML_INDENT 0x00002000 /* emit indented XML */ 1082 #define SOAP_XML_CANONICAL 0x00004000 /* EXC C14N canonical XML */ 1083 #define SOAP_XML_TREE 0x00008000 /* emit XML tree (no id/ref) */ 1084 #define SOAP_XML_GRAPH 0x00010000 1085 #define SOAP_XML_NIL 0x00020000 1086 #define SOAP_XML_DOM 0x00040000 1087 #define SOAP_XML_SEC 0x00080000 /* reserved for WS security */ 1088 1089 #define SOAP_C_NOIOB 0x00100000 /* don't fault on array index out of bounds (just ignore) */ 1090 #define SOAP_C_UTFSTRING 0x00200000 /* (de)serialize strings with UTF8 content */ 1091 #define SOAP_C_MBSTRING 0x00400000 /* (de)serialize strings with multi-byte content */ 1092 #define SOAP_C_NILSTRING 0x00800000 /* serialize empty strings as nil (omitted) */ 891 1093 892 1094 #define SOAP_DOM_TREE 0x01000000 893 1095 #define SOAP_DOM_NODE 0x02000000 1096 #define SOAP_DOM_ASIS 0x04000000 1097 1098 #define SOAP_MIME_POSTCHECK 0x10000000 /* MIME flag (internal) */ 894 1099 895 1100 #define SOAP_IO_DEFAULT SOAP_IO_FLUSH … … 900 1105 #define SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION 0x01 /* client requires server to authenticate */ 901 1106 #define SOAP_SSL_REQUIRE_CLIENT_AUTHENTICATION 0x02 /* server requires client to authenticate */ 902 903 #define SOAP_SSL_DEFAULT SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION 904 905 /* */ 1107 #define SOAP_SSL_SKIP_HOST_CHECK 0x04 /* client does not check the common name of the host in certificate */ 1108 #define SOAP_SSL_ALLOW_EXPIRED_CERTIFICATE 0x08 /* client does not check the expiration date of the host certificate */ 1109 #define SOAP_SSL_RSA 0x10 /* use RSA */ 1110 #define SOAP_SSLv3 0x20 /* SSL v3 only */ 1111 #define SOAP_TLSv1 0x40 /* TLS v1 only */ 1112 #define SOAP_SSLv3_TLSv1 0x00 /* SSL v3 and TLS v1 support by default */ 1113 1114 #define SOAP_SSL_DEFAULT (SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION | SOAP_SSLv3_TLSv1) 1115 1116 /* state */ 1117 1118 #define SOAP_NONE 0 1119 #define SOAP_INIT 1 1120 #define SOAP_COPY 2 1121 1122 #define soap_check_state(soap) (!(soap) || ((soap)->state != SOAP_INIT && (soap)->state != SOAP_COPY)) 1123 1124 /* part */ 906 1125 907 1126 #define SOAP_BEGIN 0 … … 909 1128 #define SOAP_IN_HEADER 3 910 1129 #define SOAP_END_HEADER 4 911 #define SOAP_IN_BODY 5 912 #define SOAP_END_BODY 6 913 #define SOAP_END_ENVELOPE 7 914 #define SOAP_END 8 1130 #define SOAP_NO_BODY 5 1131 #define SOAP_IN_BODY 6 1132 #define SOAP_END_BODY 7 1133 #define SOAP_END_ENVELOPE 8 1134 #define SOAP_END 9 1135 #define SOAP_BEGIN_SECURITY 10 1136 #define SOAP_IN_SECURITY 11 1137 #define SOAP_END_SECURITY 12 915 1138 916 1139 /* DEBUG macros */ … … 921 1144 # define SOAP_DEBUG 922 1145 # endif 923 # endif 1146 # ifndef SOAP_MEM_DEBUG 1147 # define SOAP_MEM_DEBUG 1148 # endif 1149 # endif 1150 #endif 1151 1152 #ifdef SOAP_MEM_DEBUG 1153 # ifndef SOAP_MALLOC 1154 # define SOAP_MALLOC(soap, size) soap_track_malloc(soap, __FILE__, __LINE__, size) 1155 # endif 1156 # ifndef SOAP_FREE 1157 # define SOAP_FREE(soap, ptr) soap_track_free(soap, __FILE__, __LINE__, ptr) 1158 # endif 1159 #endif 1160 1161 #ifndef SOAP_MALLOC /* use libc malloc */ 1162 # define SOAP_MALLOC(soap, size) malloc(size) 1163 #endif 1164 1165 #ifndef SOAP_FREE /* use libc free */ 1166 # define SOAP_FREE(soap, ptr) free(ptr) 924 1167 #endif 925 1168 … … 932 1175 { if (soap)\ 933 1176 { if (!soap->fdebug[SOAP_INDEX_##DBGFILE])\ 934 soap_open_logfile( soap, SOAP_INDEX_##DBGFILE);\1177 soap_open_logfile((struct soap*)soap, SOAP_INDEX_##DBGFILE);\ 935 1178 if (soap->fdebug[SOAP_INDEX_##DBGFILE])\ 936 1179 { FILE *fdebug = soap->fdebug[SOAP_INDEX_##DBGFILE];\ … … 945 1188 { if (soap)\ 946 1189 { if (!soap->fdebug[SOAP_INDEX_##DBGFILE])\ 947 soap_open_logfile( soap, SOAP_INDEX_##DBGFILE);\1190 soap_open_logfile((struct soap*)soap, SOAP_INDEX_##DBGFILE);\ 948 1191 if (soap->fdebug[SOAP_INDEX_##DBGFILE])\ 949 1192 { fwrite((MSG), 1, (LEN), soap->fdebug[SOAP_INDEX_##DBGFILE]);\ … … 953 1196 } 954 1197 # endif 1198 # ifndef DBGFUN 1199 # define DBGFUN(FNAME) DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): %s()\n", __FILE__, __LINE__, FNAME)) 1200 # define DBGFUN1(FNAME, FMT, ARG) DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): %s("FMT")\n", __FILE__, __LINE__, FNAME, (ARG))) 1201 # define DBGFUN2(FNAME, FMT1, ARG1, FMT2, ARG2) DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): %s("FMT1", "FMT2")\n", __FILE__, __LINE__, FNAME, (ARG1), (ARG2))) 1202 # 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))) 1203 # endif 1204 # ifndef DBGHEX 1205 # define DBGHEX(DBGFILE, MSG, LEN) \ 1206 { if (soap)\ 1207 { if (!soap->fdebug[SOAP_INDEX_##DBGFILE])\ 1208 soap_open_logfile(soap, SOAP_INDEX_##DBGFILE);\ 1209 if (soap->fdebug[SOAP_INDEX_##DBGFILE])\ 1210 { int i; char *s;\ 1211 for (s = (char*)(MSG), i = (LEN); i; i--)\ 1212 fprintf(soap->fdebug[SOAP_INDEX_##DBGFILE], "%2.2X ", (int)*s++&0xFF);\ 1213 fflush(soap->fdebug[SOAP_INDEX_##DBGFILE]);\ 1214 }\ 1215 }\ 1216 } 1217 # endif 955 1218 #else 956 1219 # define DBGLOG(DBGFILE, CMD) 957 1220 # define DBGMSG(DBGFILE, MSG, LEN) 958 #endif 959 1221 # define DBGFUN(FNAME) 1222 # define DBGFUN1(FNAME, FMT, ARG) 1223 # define DBGFUN2(FNAME, FMT1, ARG1, FMT2, ARG2) 1224 # define DBGFUN3(FNAME, FMT1, ARG1, FMT2, ARG2, FMT3, ARG3) 1225 # define DBGHEX(DBGFILE, MSG, LEN) 1226 #endif 1227 1228 /* UCS-4 requires 32 bits (0-7FFFFFFF, the sign bit is used by gSOAP to distinguish XML entities) */ 1229 typedef soap_int32 soap_wchar; 1230 1231 /* namespace table row */ 960 1232 struct Namespace 961 1233 { const char *id; … … 965 1237 }; 966 1238 1239 /* namespace stack */ 967 1240 struct soap_nlist 968 1241 { struct soap_nlist *next; 969 unsigned int level; 1242 unsigned int level; /* nesting depth level */ 970 1243 short index; /* corresponding entry in ns mapping table */ 971 1244 char *ns; /* only set when parsed ns URI is not in the ns mapping table */ … … 973 1246 }; 974 1247 1248 /* block stack for nested block allocations */ 975 1249 struct soap_blist 976 1250 { struct soap_blist *next; … … 979 1253 }; 980 1254 1255 /* array layout */ 981 1256 struct soap_array 982 1257 { void *__ptr; … … 995 1270 }; 996 1271 1272 /* block allocation for pointer serialization management */ 1273 struct soap_pblk 1274 { struct soap_pblk *next; 1275 struct soap_plist plist[SOAP_PTRBLK]; 1276 }; 1277 1278 #ifdef SOAP_MEM_DEBUG 1279 /* malloc/free tracking for debugging */ 1280 struct soap_mlist 1281 { struct soap_mlist *next; 1282 const void *ptr; 1283 const char *file; 1284 int line; 1285 short live; 1286 }; 1287 #endif 1288 997 1289 /* class allocation list */ 998 1290 struct soap_clist … … 1001 1293 int type; 1002 1294 int size; 1003 void (*fdelete)(struct soap_clist*); 1004 }; 1005 1295 int (*fdelete)(struct soap_clist*); 1296 }; 1297 1298 /* attributes */ 1006 1299 struct soap_attribute 1007 1300 { struct soap_attribute *next; … … 1013 1306 }; 1014 1307 1308 #ifndef WITH_LEAN 1015 1309 struct soap_cookie 1016 1310 { struct soap_cookie *next; … … 1019 1313 char *domain; 1020 1314 char *path; 1021 long expire; /* client-side: local time to expire; server-side: seconds to expire */ 1315 time_t expire; /* client-side: local time to expire */ 1316 long maxage; /* server-side: seconds to expire */ 1022 1317 unsigned int version; 1023 1318 short secure; 1024 1319 short session; /* server-side */ 1025 short env; /* server-side: got cookie from client */ 1026 short modified; /* server-side: client cookie was modified */ 1027 }; 1320 short env; /* server-side: got cookie from client and should not be (re)send */ 1321 short modified; /* server-side: client cookie was modified and should be send */ 1322 }; 1323 #endif 1028 1324 1029 1325 #ifdef __cplusplus 1030 1326 SOAP_FMAC1 struct soap_multipart* SOAP_FMAC2 soap_next_multipart(struct soap_multipart*); 1327 1031 1328 class soap_multipart_iterator 1032 1329 { public: … … 1047 1344 #endif 1048 1345 1346 #ifndef WITH_LEANER 1049 1347 struct soap_dime 1050 1348 { size_t count; … … 1066 1364 #endif 1067 1365 }; 1068 1366 #endif 1367 1368 #ifndef WITH_LEANER 1069 1369 struct soap_mime 1070 1370 { char *boundary; /* MIME boundary */ 1071 1371 const char *start; /* MIME start ID */ 1072 struct soap_multipart *list; /* list of DIME attachments received */1372 struct soap_multipart *list; /* list of MIME attachments received */ 1073 1373 struct soap_multipart *first, *last; /* temporary in/out queue */ 1074 1374 #ifdef __cplusplus … … 1079 1379 #endif 1080 1380 }; 1081 1381 #endif 1382 1383 #ifndef WITH_LEANER 1082 1384 /* RFC2045 MIME content transfer encodings */ 1083 1385 enum soap_mime_encoding … … 1091 1393 SOAP_MIME_X_TOKEN 1092 1394 }; 1093 1395 #endif 1396 1397 #ifndef WITH_LEANER 1094 1398 /* DIME/MIME multipart list */ 1095 1399 struct soap_multipart … … 1097 1401 char *ptr; /* points to raw data content */ 1098 1402 size_t size; /* size of data content */ 1099 const char *id; /* DIME/MIME content ID */1403 const char *id; /* DIME/MIME content ID or form data name */ 1100 1404 const char *type; /* DIME/MIME type (MIME type format) */ 1101 1405 const char *options; /* DIME options */ … … 1107 1411 #endif 1108 1412 }; 1109 1413 #endif 1414 1415 #ifndef WITH_LEANER 1416 /* attachment DIME and MTOM XOP forwarding */ 1417 struct soap_xlist 1418 { struct soap_xlist *next; 1419 unsigned char **ptr; 1420 int *size; 1421 char *id; 1422 char **type; 1423 char **options; 1424 }; 1425 #endif 1426 1427 /******************************************************************************/ 1428 1429 #ifndef WITH_LEANER 1430 #ifdef __cplusplus 1431 class soap_dom_attribute_iterator 1432 { public: 1433 struct soap_dom_attribute *att; 1434 const char *nstr; 1435 const char *name; 1436 bool operator==(const soap_dom_attribute_iterator&) const; 1437 bool operator!=(const soap_dom_attribute_iterator&) const; 1438 struct soap_dom_attribute &operator*() const; 1439 soap_dom_attribute_iterator &operator++(); 1440 soap_dom_attribute_iterator(); 1441 soap_dom_attribute_iterator(struct soap_dom_attribute*); 1442 ~soap_dom_attribute_iterator(); 1443 }; 1444 #endif 1445 #endif 1446 1447 #ifndef WITH_LEANER 1110 1448 struct soap_dom_attribute 1111 1449 { struct soap_dom_attribute *next; … … 1116 1454 struct soap *soap; 1117 1455 #ifdef __cplusplus 1118 struct soap_dom_attribute &set(const char *nstr, const char *name); // set namespace and name 1119 struct soap_dom_attribute &set(const char *data); // set data 1456 typedef soap_dom_attribute_iterator iterator; 1457 struct soap_dom_attribute &set(const char *nstr, const char *name); /* set namespace and name */ 1458 struct soap_dom_attribute &set(const char *data); /* set data */ 1459 soap_dom_attribute_iterator begin(); 1460 soap_dom_attribute_iterator end(); 1461 soap_dom_attribute_iterator find(const char *nstr, const char *name); 1120 1462 void unlink(); 1121 1463 soap_dom_attribute(); … … 1125 1467 #endif 1126 1468 }; 1127 1469 #endif 1470 1471 #ifndef WITH_LEANER 1128 1472 #ifdef __cplusplus 1129 class soap_dom_ iterator1473 class soap_dom_element_iterator 1130 1474 { public: 1131 1475 struct soap_dom_element *elt; … … 1133 1477 const char *name; 1134 1478 int type; 1135 bool operator==(const soap_dom_ iterator&) const;1136 bool operator!=(const soap_dom_ iterator&) const;1479 bool operator==(const soap_dom_element_iterator&) const; 1480 bool operator!=(const soap_dom_element_iterator&) const; 1137 1481 struct soap_dom_element &operator*() const; 1138 soap_dom_iterator &operator++(); 1139 soap_dom_iterator(); 1140 soap_dom_iterator(struct soap_dom_element*); 1141 ~soap_dom_iterator(); 1142 }; 1143 #endif 1144 1482 soap_dom_element_iterator &operator++(); 1483 soap_dom_element_iterator(); 1484 soap_dom_element_iterator(struct soap_dom_element*); 1485 ~soap_dom_element_iterator(); 1486 }; 1487 #endif 1488 #endif 1489 1490 #ifndef WITH_LEANER 1145 1491 struct soap_dom_element 1146 1492 { struct soap_dom_element *next; /* next sibling */ 1147 1493 struct soap_dom_element *prnt; /* parent */ 1148 struct soap_dom_element *elts; /* first child element*/1149 struct soap_dom_attribute *atts; /* first child attribute*/1494 struct soap_dom_element *elts; /* list of child elements */ 1495 struct soap_dom_attribute *atts; /* list of attributes */ 1150 1496 const char *nstr; /* namespace string */ 1151 1497 char *name; /* element tag name */ … … 1154 1500 int type; /* optional: serialized C/C++ data type */ 1155 1501 void *node; /* optional: pointer to serialized C/C++ data */ 1156 struct soap *soap; 1502 char *head; /* leading whitespace to start tag */ 1503 char *tail; /* leading whitespace to end tag */ 1504 struct soap *soap; /* soap context that manages this node */ 1157 1505 #ifdef __cplusplus 1158 typedef soap_dom_ iterator iterator;1506 typedef soap_dom_element_iterator iterator; 1159 1507 struct soap_dom_element &set(const char *nstr, const char *name); 1160 1508 struct soap_dom_element &set(const char *data); … … 1164 1512 struct soap_dom_element &add(struct soap_dom_attribute*); 1165 1513 struct soap_dom_element &add(struct soap_dom_attribute&); 1166 soap_dom_ iterator begin();1167 soap_dom_ iterator end();1168 soap_dom_ iterator find(const char *nstr, const char *name);1169 soap_dom_ iterator find(int type);1514 soap_dom_element_iterator begin(); 1515 soap_dom_element_iterator end(); 1516 soap_dom_element_iterator find(const char *nstr, const char *name); 1517 soap_dom_element_iterator find(int type); 1170 1518 void unlink(); 1171 1519 soap_dom_element(); … … 1177 1525 #endif 1178 1526 }; 1527 SOAP_FMAC1 struct soap_dom_element * SOAP_FMAC2 soap_dom_next_element(struct soap_dom_element *elt); 1528 SOAP_FMAC1 struct soap_dom_attribute * SOAP_FMAC2 soap_dom_next_attribute(struct soap_dom_attribute *att); 1529 #endif 1179 1530 1180 1531 #if defined(__cplusplus) && !defined(WITH_LEAN) 1181 1532 } 1182 extern ostream &operator<<(ostream&, const struct soap_dom_element&);1183 extern istream &operator>>(istream&, struct soap_dom_element&);1533 extern std::ostream &operator<<(std::ostream&, const struct soap_dom_element&); 1534 extern std::istream &operator>>(std::istream&, struct soap_dom_element&); 1184 1535 extern "C" { 1185 1536 #endif 1186 1537 1187 struct soap 1188 { short version; /* 1 = SOAP1.1 and 2 = SOAP1.2 (set automatically from namespace URI in nsmap table) */ 1189 short copy; /* 1 = copy of another soap struct */ 1538 /******************************************************************************/ 1539 1540 #ifdef WIN32 1541 # ifdef SOAP_STD_EXPORTS 1542 # define SOAP_STD_API __declspec(dllexport) 1543 # else 1544 # define SOAP_STD_API 1545 # endif 1546 #else 1547 # define SOAP_STD_API 1548 #endif 1549 1550 struct SOAP_STD_API soap 1551 { short state; /* 0 = uninitialized, 1 = initialized, 2 = copy of another soap struct */ 1552 short version; /* 1 = SOAP1.1 and 2 = SOAP1.2 (set automatically from namespace URI in nsmap table) */ 1190 1553 soap_mode mode; 1191 1554 soap_mode imode; 1192 1555 soap_mode omode; 1193 const char *float_format; /* points touser-definable format string for floats (<1024 chars) */1194 const char *double_format; /* points touser-definable format string for doubles (<1024 chars) */1195 const char *dime_id_format; /* points touser-definable format string for integer DIME id (<SOAP_TAGLEN chars) */1196 const char *http_version; /* default = "1.0" */1556 const char *float_format; /* user-definable format string for floats (<1024 chars) */ 1557 const char *double_format; /* user-definable format string for doubles (<1024 chars) */ 1558 const char *dime_id_format; /* user-definable format string for integer DIME id (<SOAP_TAGLEN chars) */ 1559 const char *http_version; /* HTTP version used "1.0" or "1.1" */ 1197 1560 const char *http_content; /* optional custom response content type (with SOAP_FILE) */ 1198 1561 const char *encodingStyle; /* default = NULL which means that SOAP encoding is used */ 1199 const char *actor; 1562 const char *actor; /* SOAP-ENV:actor or role attribute value */ 1563 const char *lang; /* xml:lang attribute value of SOAP-ENV:Text */ 1200 1564 int recv_timeout; /* when > 0, gives socket recv timeout in seconds, < 0 in usec */ 1201 1565 int send_timeout; /* when > 0, gives socket send timeout in seconds, < 0 in usec */ … … 1206 1570 int bind_flags; /* bind() SOL_SOCKET sockopt flags, e.g. set to SO_REUSEADDR to enable reuse */ 1207 1571 int accept_flags; /* accept() SOL_SOCKET sockopt flags */ 1572 unsigned short linger_time; /* linger time for SO_LINGER option */ 1208 1573 const struct Namespace *namespaces; /* Pointer to global namespace mapping table */ 1209 1574 struct Namespace *local_namespaces; /* Local namespace mapping table */ … … 1211 1576 struct soap_blist *blist; /* block allocation stack */ 1212 1577 struct soap_clist *clist; /* class instance allocation list */ 1213 void *alist; /* memory allocation list */1578 void *alist; /* memory allocation (malloc) list */ 1214 1579 struct soap_ilist *iht[SOAP_IDHASH]; 1215 1580 struct soap_plist *pht[SOAP_PTRHASH]; 1581 struct soap_pblk *pblk; /* plist block allocation */ 1582 short pidx; /* plist block allocation */ 1216 1583 struct SOAP_ENV__Header *header; 1217 1584 struct SOAP_ENV__Fault *fault; 1585 int idnum; 1218 1586 void *user; /* to pass user-defined data */ 1219 1587 struct soap_plugin *plugins; /* linked list of plug-in data */ … … 1222 1590 int (*fpost)(struct soap*, const char*, const char*, int, const char*, const char*, size_t); 1223 1591 int (*fget)(struct soap*); 1592 int (*fput)(struct soap*); 1593 int (*fdel)(struct soap*); 1594 int (*fhead)(struct soap*); 1595 int (*fform)(struct soap*); 1224 1596 int (*fposthdr)(struct soap*, const char*, const char*); 1225 1597 int (*fresponse)(struct soap*, int, size_t); 1226 1598 int (*fparse)(struct soap*); 1227 1599 int (*fparsehdr)(struct soap*, const char*, const char*); 1600 int (*fheader)(struct soap*); 1228 1601 int (*fresolve)(struct soap*, const char*, struct in_addr* inaddr); 1229 1602 int (*fconnect)(struct soap*, const char*, const char*, int); … … 1231 1604 int (*fclosesocket)(struct soap*, SOAP_SOCKET); 1232 1605 int (*fshutdownsocket)(struct soap*, SOAP_SOCKET, int); 1233 int(*fopen)(struct soap*, const char*, const char*, int);1234 int (*faccept)(struct soap*, int, struct sockaddr*, int *n);1606 SOAP_SOCKET (*fopen)(struct soap*, const char*, const char*, int); 1607 SOAP_SOCKET (*faccept)(struct soap*, SOAP_SOCKET, struct sockaddr*, int *n); 1235 1608 int (*fclose)(struct soap*); 1236 1609 int (*fsend)(struct soap*, const char*, size_t); 1237 1610 size_t (*frecv)(struct soap*, char*, size_t); 1238 1611 int (*fpoll)(struct soap*); 1612 void (*fseterror)(struct soap*, const char **c, const char **s); 1613 int (*fignore)(struct soap*, const char*); 1614 int (*fserveloop)(struct soap*); 1615 void *(*fplugin)(struct soap*, const char*); 1616 void *(*fmalloc)(struct soap*, size_t); 1617 #ifndef WITH_LEANER 1239 1618 int (*fprepareinit)(struct soap*); 1240 1619 int (*fpreparesend)(struct soap*, const char*, size_t); 1241 1620 int (*fpreparerecv)(struct soap*, const char*, size_t); 1242 int (*fignore)(struct soap*, const char*); 1243 int (*fserveloop)(struct soap*); 1244 void *(*fplugin)(struct soap*, const char*); 1621 int (*fpreparefinal)(struct soap*); 1245 1622 void *(*fdimereadopen)(struct soap*, void*, const char*, const char*, const char*); 1246 1623 void *(*fdimewriteopen)(struct soap*, const char*, const char*, const char*); … … 1249 1626 size_t (*fdimeread)(struct soap*, void*, char*, size_t); 1250 1627 int (*fdimewrite)(struct soap*, void*, const char*, size_t); 1251 int master; 1252 int socket; 1628 void *(*fmimereadopen)(struct soap*, void*, const char*, const char*, const char*); 1629 void *(*fmimewriteopen)(struct soap*, void*, const char*, const char*, const char*, enum soap_mime_encoding); 1630 void (*fmimereadclose)(struct soap*, void*); 1631 void (*fmimewriteclose)(struct soap*, void*); 1632 size_t (*fmimeread)(struct soap*, void*, char*, size_t); 1633 int (*fmimewrite)(struct soap*, void*, const char*, size_t); 1634 #endif 1635 SOAP_SOCKET master; 1636 SOAP_SOCKET socket; 1253 1637 #if defined(__cplusplus) && !defined(WITH_LEAN) 1254 ostream *os;1255 istream *is;1638 std::ostream *os; 1639 std::istream *is; 1256 1640 #else 1257 void *os; /* preserve alignment*/1258 void *is; /* preserve alignment*/1641 void *os; /* preserve struct size */ 1642 void *is; /* preserve struct size */ 1259 1643 #endif 1260 1644 #ifndef UNDER_CE … … 1264 1648 FILE *sendfd; 1265 1649 FILE *recvfd; 1266 char errorstr[256]; 1267 wchar_t werrorstr[256]; 1268 #endif 1269 size_t bufidx; 1270 size_t buflen; 1271 soap_wchar ahead; 1272 short cdata; 1273 short body; 1274 unsigned int level; 1650 #endif 1651 size_t bufidx; /* index in soap.buf[] */ 1652 size_t buflen; /* length of soap.buf[] content */ 1653 soap_wchar ahead; /* parser lookahead */ 1654 short cdata; /* CDATA parser state */ 1655 short body; /* parsed XML element has a body or not */ 1656 unsigned int level; /* XML nesting level */ 1275 1657 size_t count; /* message length counter */ 1276 1658 size_t length; /* message length as set by HTTP header */ … … 1279 1661 size_t labidx; /* look-aside buffer index to available part */ 1280 1662 char buf[SOAP_BUFLEN];/* send and receive buffer */ 1281 char tmpbuf[1024]; /* output buffer for HTTP headers, simpleType values, attribute names, and DIME>=1024 bytes */1282 char msgbuf[1024]; /* output buffer for (error) messages <=1024 bytes */1663 char msgbuf[1024]; /* in/out buffer for HTTP/MIME headers >=1024 bytes */ 1664 char tmpbuf[1024]; /* in/out buffer for HTTP/MIME headers, simpleType values, element and attribute tag names, and DIME must be >=1024 bytes */ 1283 1665 char tag[SOAP_TAGLEN]; 1284 1666 char id[SOAP_TAGLEN]; … … 1289 1671 char arrayOffset[SOAP_TAGLEN]; 1290 1672 short other; 1291 short root;1292 1673 short position; 1293 1674 int positions[SOAP_MAXDIMS]; 1675 short root; 1294 1676 struct soap_attribute *attributes; /* attribute list */ 1295 short encoding; 1296 short mustUnderstand; 1297 short null; 1298 short ns; 1299 short part; 1677 short encoding; /* when set, output encodingStyle */ 1678 short mustUnderstand; /* a mustUnderstand element was parsed or is output */ 1679 short null; /* parsed XML is xsi:nil */ 1680 short ns; /* when not set, output full xmlns bindings */ 1681 short part; /* parsing state */ 1300 1682 short alloced; 1301 1683 short peeked; 1302 short keep_alive;1303 1684 size_t chunksize; 1304 1685 size_t chunkbuflen; … … 1309 1690 char *authrealm; /* HTTP authentication realm */ 1310 1691 char *prolog; /* XML declaration prolog */ 1311 int port; 1312 unsigned int max_keep_alive; 1692 unsigned long ip; /* IP number */ 1693 int port; /* port number */ 1694 short keep_alive; /* connection should be kept open */ 1695 short tcp_keep_alive; /* enable SO_KEEPALIVE */ 1696 unsigned int tcp_keep_idle; /* set TCP_KEEPIDLE */ 1697 unsigned int tcp_keep_intvl; /* set TCP_KEEPINTVL */ 1698 unsigned int tcp_keep_cnt; /* set TCP_KEEPCNT */ 1699 unsigned int max_keep_alive; /* maximum keep-alive session (default=100) */ 1700 const char *proxy_http_version;/* HTTP version of proxy "1.0" or "1.1" */ 1313 1701 const char *proxy_host; /* Proxy Server host name */ 1314 1702 int proxy_port; /* Proxy Server port (default = 8080) */ 1315 1703 const char *proxy_userid; /* Proxy Authorization user name */ 1316 1704 const char *proxy_passwd; /* Proxy Authorization password */ 1705 const char *proxy_from; /* X-Forwarding-For header returned by proxy */ 1317 1706 int status; /* -1 when request, else error code to be returned by server */ 1318 1707 int error; 1319 1708 int errmode; 1320 1709 int errnum; 1321 unsigned long idnum; 1322 unsigned long ip;1710 #ifndef WITH_LEANER 1711 struct soap_dom_element *dom; 1323 1712 struct soap_dime dime; 1324 1713 struct soap_mime mime; 1325 struct soap_dom_element *dom; 1714 struct soap_xlist *xlist; 1715 #endif 1326 1716 #if !defined(WITH_LEAN) || defined(SOAP_DEBUG) 1327 1717 const char *logfile[SOAP_MAXLOGS]; 1328 1718 FILE *fdebug[SOAP_MAXLOGS]; 1719 struct soap_mlist *mht[SOAP_PTRHASH]; 1329 1720 #endif 1330 1721 #ifndef WITH_LEAN 1722 const char *c14ninclude; 1723 const char *c14nexclude; 1331 1724 struct soap_cookie *cookies; 1332 1725 const char *cookie_domain; … … 1334 1727 int cookie_max; 1335 1728 #endif 1729 #ifndef WITH_NOIO 1730 int ipv6_multicast_if; /* always include this to keep the soap struct size the same in v4 and v6 */ 1731 char* ipv4_multicast_if; /* always include this to keep the soap struct size the same in v4 and v6 */ 1732 int ipv4_multicast_ttl; /* multicast scope */ 1733 #ifdef WITH_IPV6 1734 struct sockaddr_storage peer; /* IPv6: set by soap_accept and by UDP recv */ 1735 #else 1736 struct sockaddr_in peer; /* IPv4: set by soap_connect/soap_accept and by UDP recv */ 1737 #endif 1738 #endif 1739 size_t peerlen; 1336 1740 #ifdef WITH_OPENSSL 1337 1741 int (*fsslauth)(struct soap*); … … 1340 1744 SSL *ssl; 1341 1745 SSL_CTX *ctx; 1342 short require_server_auth; 1343 short require_client_auth; 1344 short rsa; /* when set, use RSA instead of DH */ 1746 SSL_SESSION *session; 1747 #else 1748 void *fsslauth; /* dummy members, to preserve struct size */ 1749 void *fsslverify; 1750 void *bio; 1751 void *ssl; 1752 void *ctx; 1753 void *session; 1754 #endif 1755 unsigned short ssl_flags; 1345 1756 const char *keyfile; 1346 1757 const char *password; … … 1348 1759 const char *cafile; 1349 1760 const char *capath; 1761 const char *crlfile; 1350 1762 const char *randfile; 1351 SSL_SESSION *session;1352 1763 char session_host[SOAP_TAGLEN]; 1353 1764 int session_port; 1765 #ifdef WITH_C_LOCALE 1766 locale_t c_locale; /* set to C locale by default */ 1767 #else 1768 void *c_locale; 1354 1769 #endif 1355 1770 #ifdef WITH_ZLIB 1771 z_stream *d_stream; /* decompression stream */ 1772 uLong z_crc; /* internal gzip crc */ 1773 #else 1774 void *d_stream; /* dummy members, to preserve struct size */ 1775 soap_int32 z_crc; 1776 #endif 1356 1777 short zlib_state; /* SOAP_ZLIB_NONE, SOAP_ZLIB_DEFLATE, or SOAP_ZLIB_INFLATE */ 1357 1778 short zlib_in; /* SOAP_ZLIB_NONE, SOAP_ZLIB_DEFLATE, or SOAP_ZLIB_GZIP */ 1358 1779 short zlib_out; /* SOAP_ZLIB_NONE, SOAP_ZLIB_DEFLATE, or SOAP_ZLIB_GZIP */ 1359 z_stream d_stream; /* decompression stream */ 1360 char z_buf[SOAP_BUFLEN]; /* buffer */ 1780 char *z_buf; /* buffer */ 1361 1781 size_t z_buflen; 1362 1782 unsigned short z_level; /* compression level to be used (0=none, 1=fast to 9=best) */ 1363 uLong z_crc; /* internal gzip crc */1364 1783 float z_ratio_in; /* detected compression ratio compressed_length/length of inbound message */ 1365 1784 float z_ratio_out; /* detected compression ratio compressed_length/length of outbound message */ 1366 #endif1367 /* WR[ */1368 1785 #ifdef WMW_RPM_IO 1369 1786 void *rpmreqid; 1370 #endif /* WMW_RPM_IO */ 1371 /* ]WR */ 1787 #endif 1788 #ifdef __cplusplus 1789 soap(); 1790 soap(soap_mode); 1791 soap(soap_mode, soap_mode); 1792 soap(struct soap&); 1793 virtual ~soap(); 1794 #else 1795 void (*dummy)(); 1796 #endif 1372 1797 }; 1373 1798 … … 1383 1808 void *ptr; 1384 1809 unsigned int level; 1385 void (*fcopy)(struct soap*, int, int, void*, const void*, size_t); 1810 size_t len; 1811 void (*fcopy)(struct soap*, int, int, void*, size_t, const void*, size_t); 1386 1812 }; 1387 1813 … … 1411 1837 #endif 1412 1838 1839 #ifndef WITH_LEAN 1840 # define soap_get0(soap) (((soap)->bufidx>=(soap)->buflen && soap_recv(soap)) ? EOF : (unsigned char)(soap)->buf[(soap)->bufidx]) 1841 # define soap_get1(soap) (((soap)->bufidx>=(soap)->buflen && soap_recv(soap)) ? EOF : (unsigned char)(soap)->buf[(soap)->bufidx++]) 1842 #else 1843 soap_wchar soap_get0(struct soap*); 1844 soap_wchar soap_get1(struct soap*); 1845 #endif 1846 1847 #define soap_revget1(soap) ((soap)->bufidx--) 1848 #define soap_unget(soap, c) ((soap)->ahead = c) 1849 #define soap_register_plugin(soap, plugin) soap_register_plugin_arg(soap, plugin, NULL) 1850 #define soap_imode(soap, n) ((soap)->mode = (soap)->imode = (n)) 1851 #define soap_set_imode(soap, n) ((soap)->imode |= (n)) 1852 #define soap_clr_imode(soap, n) ((soap)->imode &= ~(n)) 1853 #define soap_omode(soap, n) ((soap)->mode = (soap)->omode = (n)) 1854 #define soap_set_omode(soap, n) ((soap)->omode |= (n)) 1855 #define soap_clr_omode(soap, n) ((soap)->omode &= ~(n)) 1856 #define soap_set_mode(soap, n) ((soap)->imode |= (n), (soap)->omode |= (n)) 1857 #define soap_clr_mode(soap, n) ((soap)->imode &= ~(n), (soap)->omode &= ~(n)) 1858 #define soap_destroy(soap) soap_delete((soap), NULL) 1859 1413 1860 #ifdef HAVE_STRRCHR 1414 1861 # define soap_strrchr(s, t) strrchr(s, t) … … 1429 1876 #endif 1430 1877 1878 #if defined(WITH_OPENSSL) 1879 # define soap_random soap_rand() 1880 SOAP_FMAC1 int SOAP_FMAC2 soap_rand(void); 1881 #elif defined(HAVE_RANDOM) 1882 # define soap_random (int)random() 1883 #else 1884 # define soap_random rand() 1885 #endif 1886 1887 #ifdef WITH_NOIDREF 1888 # define soap_embedded(s, p, t) (0) 1889 # define soap_id_lookup(s, i, p, t, n, k) (p) 1890 # define soap_id_forward(s, h, p, len, st, tt, n, k, fc) (p) 1891 # define soap_reference(s, a, t) (1) 1892 # define soap_array_reference(s, p, a, n, t) (1) 1893 # define soap_embed(s, p, a, n, t, pp) (0) 1894 # define soap_embedded_id(s, i, p, t) (i) 1895 # define soap_is_embedded(s, p) (0) 1896 # define soap_is_single(s, p) (1) 1897 # define soap_lookup_type(s, i) (0) 1898 # define soap_getindependent(s) (0) 1899 # define soap_putindependent(s) (0) 1900 # define soap_getelement(s, n) (n) 1901 # define soap_putelement(s, p, t, i, n) (0) 1902 # define soap_markelement(s, p, n) (0) 1903 #endif 1904 1905 SOAP_FMAC1 void SOAP_FMAC2 soap_header(struct soap*); 1431 1906 SOAP_FMAC1 void SOAP_FMAC2 soap_fault(struct soap*); 1432 1907 SOAP_FMAC1 const char** SOAP_FMAC2 soap_faultcode(struct soap*); 1908 SOAP_FMAC1 const char** SOAP_FMAC2 soap_faultsubcode(struct soap*); 1433 1909 SOAP_FMAC1 const char** SOAP_FMAC2 soap_faultstring(struct soap*); 1434 1910 SOAP_FMAC1 const char** SOAP_FMAC2 soap_faultdetail(struct soap*); … … 1440 1916 SOAP_FMAC1 int SOAP_FMAC2 soap_getfault(struct soap*); 1441 1917 1918 SOAP_FMAC1 void SOAP_FMAC2 soap_ssl_init(); 1442 1919 SOAP_FMAC1 int SOAP_FMAC2 soap_poll(struct soap*); 1443 1920 SOAP_FMAC1 int SOAP_FMAC2 soap_connect_command(struct soap*, int, const char*, const char*); 1444 1921 SOAP_FMAC1 int SOAP_FMAC2 soap_connect(struct soap*, const char*, const char*); 1445 SOAP_FMAC1 intSOAP_FMAC2 soap_bind(struct soap*, const char*, int, int);1446 SOAP_FMAC1 intSOAP_FMAC2 soap_accept(struct soap*);1922 SOAP_FMAC1 SOAP_SOCKET SOAP_FMAC2 soap_bind(struct soap*, const char*, int, int); 1923 SOAP_FMAC1 SOAP_SOCKET SOAP_FMAC2 soap_accept(struct soap*); 1447 1924 SOAP_FMAC1 int SOAP_FMAC2 soap_ssl_accept(struct soap*); 1925 SOAP_FMAC1 const char * SOAP_FMAC2 soap_ssl_error(struct soap*, int); 1448 1926 1449 1927 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*); … … 1465 1943 SOAP_FMAC1 void SOAP_FMAC2 soap_set_fault(struct soap*); 1466 1944 SOAP_FMAC1 int SOAP_FMAC2 soap_sender_fault(struct soap*, const char*, const char*); 1945 SOAP_FMAC1 int SOAP_FMAC2 soap_sender_fault_subcode(struct soap*, const char*, const char*, const char*); 1467 1946 SOAP_FMAC1 int SOAP_FMAC2 soap_receiver_fault(struct soap*, const char*, const char*); 1947 SOAP_FMAC1 int SOAP_FMAC2 soap_receiver_fault_subcode(struct soap*, const char*, const char*, const char*); 1468 1948 SOAP_FMAC1 int SOAP_FMAC2 soap_set_sender_error(struct soap*, const char*, const char*, int); 1469 1949 SOAP_FMAC1 int SOAP_FMAC2 soap_set_receiver_error(struct soap*, const char*, const char*, int); … … 1484 1964 SOAP_FMAC1 unsigned char* SOAP_FMAC2 soap_gethex(struct soap*, int*); 1485 1965 1486 1487 SOAP_FMAC1 struct soap_ilist* SOAP_FMAC2 soap_lookup(struct soap*, const char*); 1488 SOAP_FMAC1 struct soap_ilist* SOAP_FMAC2 soap_enter(struct soap*, const char*); 1489 SOAP_FMAC1 int SOAP_FMAC2 soap_resolve(struct soap*); 1490 1966 #ifndef WITH_LEANER 1967 SOAP_FMAC1 int SOAP_FMAC2 soap_xop_forward(struct soap*, unsigned char**, int*, char**, char**, char**); 1968 SOAP_FMAC1 int SOAP_FMAC2 soap_dime_forward(struct soap*, unsigned char**, int*, char**, char**, char**); 1969 #endif 1970 1971 #ifndef WITH_NOIDREF 1491 1972 SOAP_FMAC1 int SOAP_FMAC2 soap_pointer_lookup_id(struct soap*, void *p, int t, struct soap_plist**); 1492 1973 SOAP_FMAC1 int SOAP_FMAC2 soap_pointer_lookup(struct soap*, const void *p, int t, struct soap_plist**); 1493 1974 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**); 1494 1975 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**); 1495 1496 1976 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); 1497 1498 SOAP_FMAC1 void SOAP_FMAC2 soap_begin_count(struct soap*); 1499 SOAP_FMAC1 int SOAP_FMAC2 soap_begin_send(struct soap*); 1500 SOAP_FMAC1 int SOAP_FMAC2 soap_end_send(struct soap*); 1501 1977 SOAP_FMAC1 struct soap_ilist* SOAP_FMAC2 soap_lookup(struct soap*, const char*); 1978 SOAP_FMAC1 struct soap_ilist* SOAP_FMAC2 soap_enter(struct soap*, const char*); 1979 SOAP_FMAC1 int SOAP_FMAC2 soap_resolve(struct soap*); 1502 1980 SOAP_FMAC1 void SOAP_FMAC2 soap_embedded(struct soap*, const void *p, int t); 1503 1981 SOAP_FMAC1 int SOAP_FMAC2 soap_reference(struct soap*, const void *p, int t); … … 1507 1985 SOAP_FMAC1 int SOAP_FMAC2 soap_is_single(struct soap*, struct soap_plist*); 1508 1986 SOAP_FMAC1 void SOAP_FMAC2 soap_set_embedded(struct soap*, struct soap_plist*); 1509 1510 SOAP_FMAC1 const struct soap_code_map* SOAP_FMAC2 soap_code(const struct soap_code_map*, const char *str); 1511 SOAP_FMAC1 long SOAP_FMAC2 soap_int_code(const struct soap_code_map*, const char *str, long other); 1512 SOAP_FMAC1 const char* SOAP_FMAC2 soap_str_code(const struct soap_code_map*, long code); 1987 #endif 1988 1989 SOAP_FMAC1 int SOAP_FMAC2 soap_begin_count(struct soap*); 1990 SOAP_FMAC1 int SOAP_FMAC2 soap_end_count(struct soap*); 1991 SOAP_FMAC1 int SOAP_FMAC2 soap_begin_send(struct soap*); 1992 SOAP_FMAC1 int SOAP_FMAC2 soap_end_send(struct soap*); 1993 1994 SOAP_FMAC1 const struct soap_code_map* SOAP_FMAC2 soap_code(const struct soap_code_map*, const char*); 1995 SOAP_FMAC1 long SOAP_FMAC2 soap_code_int(const struct soap_code_map*, const char*, long); 1996 SOAP_FMAC1 const char* SOAP_FMAC2 soap_code_str(const struct soap_code_map*, long); 1997 SOAP_FMAC1 long SOAP_FMAC2 soap_code_bits(const struct soap_code_map*, const char*); 1998 SOAP_FMAC1 const char* SOAP_FMAC2 soap_code_list(struct soap*, const struct soap_code_map*, long); 1513 1999 1514 2000 SOAP_FMAC1 int SOAP_FMAC2 soap_getline(struct soap*, char*, int); … … 1518 2004 SOAP_FMAC1 void* SOAP_FMAC2 soap_malloc(struct soap*, size_t); 1519 2005 SOAP_FMAC1 void SOAP_FMAC2 soap_dealloc(struct soap*, void*); 1520 SOAP_FMAC1 struct soap_clist * SOAP_FMAC2 soap_link(struct soap*, void*, int, int, void(*fdelete)(struct soap_clist*));2006 SOAP_FMAC1 struct soap_clist * SOAP_FMAC2 soap_link(struct soap*, void*, int, int, int (*fdelete)(struct soap_clist*)); 1521 2007 SOAP_FMAC1 void SOAP_FMAC2 soap_unlink(struct soap*, const void*); 1522 SOAP_FMAC1 void SOAP_FMAC2 soap_free(struct soap*); 1523 2008 SOAP_FMAC1 void SOAP_FMAC2 soap_free_temp(struct soap*); 2009 SOAP_FMAC1 void SOAP_FMAC2 soap_del(struct soap*); 2010 2011 SOAP_FMAC1 void* SOAP_FMAC2 soap_track_malloc(struct soap*, const char*, int, size_t); 2012 SOAP_FMAC1 void SOAP_FMAC2 soap_track_free(struct soap*, const char*, int, void*); 2013 2014 #ifndef WITH_NOIDREF 1524 2015 SOAP_FMAC1 int SOAP_FMAC2 soap_lookup_type(struct soap*, const char *id); 1525 1526 2016 SOAP_FMAC1 void* SOAP_FMAC2 soap_id_lookup(struct soap*, const char *id, void **p, int t, size_t n, unsigned int k); 1527 SOAP_FMAC1 void* SOAP_FMAC2 soap_id_forward(struct soap*, const char *id, void *p, int st, int tt, size_t n, unsigned int k, void(*fcopy)(struct soap*, int, int, void*, const void*, size_t)); 2017 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)); 2018 #endif 1528 2019 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*)); 1529 SOAP_FMAC1 void SOAP_FMAC2 soap_fcopy(struct soap *soap, int st, int tt, void *p, const void *q, size_t n);2020 SOAP_FMAC1 void SOAP_FMAC2 soap_fcopy(struct soap *soap, int st, int tt, void *p, size_t, const void *q, size_t n); 1530 2021 1531 2022 SOAP_FMAC1 int SOAP_FMAC2 soap_size(const int *, int); … … 1544 2035 1545 2036 SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_new(void); 1546 SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_new1(int); 1547 SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_new2(int, int); 1548 SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_copy(struct soap*); 1549 SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_copy_context(struct soap*,struct soap*); 2037 SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_new1(soap_mode); 2038 SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_new2(soap_mode, soap_mode); 2039 SOAP_FMAC1 void SOAP_FMAC2 soap_free(struct soap*); 2040 SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_copy(const struct soap*); 2041 SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_copy_context(struct soap*, const struct soap*); 2042 SOAP_FMAC1 void SOAP_FMAC2 soap_copy_stream(struct soap*, struct soap*); 1550 2043 SOAP_FMAC1 void SOAP_FMAC2 soap_init(struct soap*); 1551 SOAP_FMAC1 void SOAP_FMAC2 soap_init1(struct soap*, int);1552 SOAP_FMAC1 void SOAP_FMAC2 soap_init2(struct soap*, int, int);2044 SOAP_FMAC1 void SOAP_FMAC2 soap_init1(struct soap*, soap_mode); 2045 SOAP_FMAC1 void SOAP_FMAC2 soap_init2(struct soap*, soap_mode, soap_mode); 1553 2046 SOAP_FMAC1 void SOAP_FMAC2 soap_done(struct soap*); 1554 2047 SOAP_FMAC1 void SOAP_FMAC2 soap_cleanup(struct soap*); … … 1566 2059 1567 2060 SOAP_FMAC1 const char* SOAP_FMAC2 soap_value(struct soap*); 1568 1569 SOAP_FMAC1 soap_wchar SOAP_FMAC2 soap_advance(struct soap*);1570 SOAP_FMAC1 soap_wchar SOAP_FMAC2 soap_skip(struct soap*);1571 2061 1572 2062 SOAP_FMAC1 int SOAP_FMAC2 soap_match_tag(struct soap*, const char*, const char *); … … 1581 2071 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); 1582 2072 SOAP_FMAC1 int SOAP_FMAC2 soap_element_result(struct soap*, const char *tag); 2073 SOAP_FMAC1 void SOAP_FMAC2 soap_check_result(struct soap*, const char *tag); 1583 2074 SOAP_FMAC1 int SOAP_FMAC2 soap_element_end_out(struct soap*, const char *tag); 1584 2075 SOAP_FMAC1 int SOAP_FMAC2 soap_element_start_end_out(struct soap*, const char *tag); … … 1586 2077 SOAP_FMAC1 int SOAP_FMAC2 soap_attribute(struct soap*, const char*, const char*); 1587 2078 1588 SOAP_FMAC1 int SOAP_FMAC2 soap_element_begin_in(struct soap*, const char *tag, int nillable );2079 SOAP_FMAC1 int SOAP_FMAC2 soap_element_begin_in(struct soap*, const char *tag, int nillable, const char *type); 1589 2080 1590 2081 SOAP_FMAC1 int SOAP_FMAC2 soap_element_end_in(struct soap*, const char *tag); … … 1596 2087 1597 2088 SOAP_FMAC1 char* SOAP_FMAC2 soap_strdup(struct soap*, const char*); 2089 SOAP_FMAC1 wchar_t* SOAP_FMAC2 soap_wstrdup(struct soap*, const wchar_t*); 2090 SOAP_FMAC1 const char * SOAP_FMAC2 soap_strsearch(const char *big, const char *little); 1598 2091 1599 2092 SOAP_FMAC1 int SOAP_FMAC2 soap_string_out(struct soap*, const char *s, int flag); 1600 2093 SOAP_FMAC1 char* SOAP_FMAC2 soap_string_in(struct soap*, int, long, long); 2094 2095 #ifndef WITH_LEANER 1601 2096 SOAP_FMAC1 int SOAP_FMAC2 soap_wstring_out(struct soap*, const wchar_t *s, int flag); 1602 2097 SOAP_FMAC1 wchar_t* SOAP_FMAC2 soap_wstring_in(struct soap*, int, long, long); 1603 1604 SOAP_FMAC1 int SOAP_FMAC2 soap_match_namespace(struct soap*, const char *, const char*, int n1, int n2); 1605 1606 SOAP_FMAC1 int SOAP_FMAC2 soap_set_namespaces(struct soap*, struct Namespace*); 2098 #endif 2099 2100 SOAP_FMAC1 int SOAP_FMAC2 soap_match_namespace(struct soap*, const char *, const char*, size_t n1, size_t n2); 2101 2102 SOAP_FMAC1 int SOAP_FMAC2 soap_set_namespaces(struct soap*, const struct Namespace*); 2103 SOAP_FMAC1 void SOAP_FMAC2 soap_set_local_namespaces(struct soap*); 1607 2104 1608 2105 SOAP_FMAC1 void SOAP_FMAC2 soap_pop_namespace(struct soap*); 1609 2106 SOAP_FMAC1 int SOAP_FMAC2 soap_push_namespace(struct soap*, const char *,const char *); 1610 1611 SOAP_FMAC1 int SOAP_FMAC2 soap_new_block(struct soap*); 1612 SOAP_FMAC1 void* SOAP_FMAC2 soap_push_block(struct soap*, size_t); 1613 SOAP_FMAC1 void SOAP_FMAC2 soap_pop_block(struct soap*); 1614 SOAP_FMAC1 size_t SOAP_FMAC2 soap_size_block(struct soap*, size_t); 1615 SOAP_FMAC1 char* SOAP_FMAC2 soap_first_block(struct soap*); 1616 SOAP_FMAC1 char* SOAP_FMAC2 soap_next_block(struct soap*); 1617 SOAP_FMAC1 size_t SOAP_FMAC2 soap_block_size(struct soap*); 1618 SOAP_FMAC1 char* SOAP_FMAC2 soap_save_block(struct soap*, char*, int); 1619 SOAP_FMAC1 void SOAP_FMAC2 soap_end_block(struct soap*); 2107 SOAP_FMAC1 const char* SOAP_FMAC2 soap_current_namespace(struct soap *soap, const char *tag); 2108 2109 SOAP_FMAC1 struct soap_nlist* SOAP_FMAC2 soap_lookup_ns(struct soap *soap, const char *tag, size_t n); 2110 2111 SOAP_FMAC1 int SOAP_FMAC2 soap_store_lab(struct soap*, const char*, size_t); 2112 SOAP_FMAC1 int SOAP_FMAC2 soap_append_lab(struct soap*, const char*, size_t); 2113 2114 SOAP_FMAC1 struct soap_blist* SOAP_FMAC2 soap_new_block(struct soap*); 2115 SOAP_FMAC1 void* SOAP_FMAC2 soap_push_block(struct soap*, struct soap_blist*, size_t); 2116 SOAP_FMAC1 void SOAP_FMAC2 soap_pop_block(struct soap*, struct soap_blist*); 2117 SOAP_FMAC1 size_t SOAP_FMAC2 soap_size_block(struct soap*, struct soap_blist*, size_t); 2118 SOAP_FMAC1 char* SOAP_FMAC2 soap_first_block(struct soap*, struct soap_blist*); 2119 SOAP_FMAC1 char* SOAP_FMAC2 soap_next_block(struct soap*, struct soap_blist*); 2120 SOAP_FMAC1 size_t SOAP_FMAC2 soap_block_size(struct soap*, struct soap_blist*); 2121 SOAP_FMAC1 char* SOAP_FMAC2 soap_save_block(struct soap*, struct soap_blist*, char*, int); 2122 SOAP_FMAC1 void SOAP_FMAC2 soap_end_block(struct soap*, struct soap_blist*); 1620 2123 1621 2124 SOAP_FMAC1 int SOAP_FMAC2 soap_envelope_begin_out(struct soap*); … … 1635 2138 SOAP_FMAC1 int SOAP_FMAC2 soap_response(struct soap*, int); 1636 2139 2140 SOAP_FMAC1 int SOAP_FMAC2 soap_send_empty_response(struct soap*, int status); 2141 SOAP_FMAC1 int SOAP_FMAC2 soap_recv_empty_response(struct soap*); 2142 1637 2143 SOAP_FMAC1 int SOAP_FMAC2 soap_send_fault(struct soap*); 1638 1639 2144 SOAP_FMAC1 int SOAP_FMAC2 soap_recv_fault(struct soap*); 1640 2145 2146 #ifndef WITH_NOSTDLIB 1641 2147 SOAP_FMAC1 void SOAP_FMAC2 soap_print_fault(struct soap*, FILE*); 1642 2148 SOAP_FMAC1 void SOAP_FMAC2 soap_print_fault_location(struct soap*, FILE*); 2149 # ifndef WITH_LEAN 2150 # ifdef __cplusplus 2151 SOAP_FMAC1 void SOAP_FMAC2 soap_stream_fault(struct soap*, std::ostream&); 2152 # endif 2153 SOAP_FMAC1 char* SOAP_FMAC2 soap_sprint_fault(struct soap*, char*, size_t); 2154 # endif 2155 #endif 1643 2156 1644 2157 SOAP_FMAC1 int SOAP_FMAC2 soap_s2byte(struct soap*, const char*, char*); … … 1654 2167 SOAP_FMAC1 int SOAP_FMAC2 soap_s2unsignedLong(struct soap*, const char*, unsigned long*); 1655 2168 SOAP_FMAC1 int SOAP_FMAC2 soap_s2ULONG64(struct soap*, const char*, ULONG64*); 1656 SOAP_FMAC1 int SOAP_FMAC2 soap_s2dateTime(struct soap*, const char*, time_t*);1657 2169 SOAP_FMAC1 int SOAP_FMAC2 soap_s2string(struct soap*, const char*, char**); 1658 2170 SOAP_FMAC1 int SOAP_FMAC2 soap_s2QName(struct soap*, const char*, char**); 1659 2171 1660 SOAP_FMAC1 char* SOAP_FMAC2 soap_s2base64(struct soap*, const unsigned char*, char*, size_t); 2172 #ifndef WITH_LEAN 2173 SOAP_FMAC1 int SOAP_FMAC2 soap_s2wchar(struct soap*, const char*, wchar_t**); 2174 SOAP_FMAC1 int SOAP_FMAC2 soap_s2dateTime(struct soap*, const char*, time_t*); 2175 SOAP_FMAC1 char* SOAP_FMAC2 soap_s2base64(struct soap*, const unsigned char*, char*, int); 2176 SOAP_FMAC1 char* SOAP_FMAC2 soap_s2hex(struct soap*, const unsigned char*, char*, int); 2177 #endif 1661 2178 1662 2179 SOAP_FMAC1 const char* SOAP_FMAC2 soap_byte2s(struct soap*, char); … … 1672 2189 SOAP_FMAC1 const char* SOAP_FMAC2 soap_unsignedLong2s(struct soap*, unsigned long); 1673 2190 SOAP_FMAC1 const char* SOAP_FMAC2 soap_ULONG642s(struct soap*, ULONG64); 2191 SOAP_FMAC1 const char* SOAP_FMAC2 soap_QName2s(struct soap*, const char*); 2192 2193 #ifndef WITH_LEAN 2194 SOAP_FMAC1 const char* SOAP_FMAC2 soap_wchar2s(struct soap*, const wchar_t*); 1674 2195 SOAP_FMAC1 const char* SOAP_FMAC2 soap_dateTime2s(struct soap*, time_t); 1675 SOAP_FMAC1 const char* SOAP_FMAC2 soap_QName2s(struct soap*, const char*); 1676 1677 SOAP_FMAC1 const char* SOAP_FMAC2 soap_base642s(struct soap*, const char*, char*, size_t, size_t*); 2196 SOAP_FMAC1 const char* SOAP_FMAC2 soap_base642s(struct soap*, const char*, char*, size_t, int*); 2197 SOAP_FMAC1 const char* SOAP_FMAC2 soap_hex2s(struct soap*, const char*, char*, size_t, int*); 2198 #endif 2199 1678 2200 1679 2201 SOAP_FMAC1 int* SOAP_FMAC2 soap_inint(struct soap*, const char *tag, int *p, const char *, int); … … 1689 2211 SOAP_FMAC1 unsigned long* SOAP_FMAC2 soap_inunsignedLong(struct soap*, const char *tag, unsigned long *p, const char *, int); 1690 2212 SOAP_FMAC1 ULONG64* SOAP_FMAC2 soap_inULONG64(struct soap*, const char *tag, ULONG64 *p, const char *, int); 2213 SOAP_FMAC1 char** SOAP_FMAC2 soap_instring(struct soap*, const char *tag, char **p, const char *, int, int, long, long); 2214 SOAP_FMAC1 char** SOAP_FMAC2 soap_inliteral(struct soap*, const char *tag, char **p); 2215 2216 #ifndef WITH_LEAN 1691 2217 SOAP_FMAC1 time_t* SOAP_FMAC2 soap_indateTime(struct soap*, const char *tag, time_t *p, const char *, int); 1692 SOAP_FMAC1 char** SOAP_FMAC2 soap_instring(struct soap*, const char *tag, char **p, const char *, int, int, long, long); 2218 SOAP_FMAC1 time_t SOAP_FMAC2 soap_timegm(struct tm*); 2219 #endif 2220 2221 #ifndef WITH_LEANER 1693 2222 SOAP_FMAC1 wchar_t** SOAP_FMAC2 soap_inwstring(struct soap*, const char *tag, wchar_t **p, const char *, int, long, long); 1694 SOAP_FMAC1 char** SOAP_FMAC2 soap_inliteral(struct soap*, const char *tag, char **p);1695 2223 SOAP_FMAC1 wchar_t** SOAP_FMAC2 soap_inwliteral(struct soap*, const char *tag, wchar_t **p); 2224 #endif 1696 2225 1697 2226 SOAP_FMAC1 int SOAP_FMAC2 soap_outbyte(struct soap*, const char *tag, int id, const char *p, const char *, int); … … 1707 2236 SOAP_FMAC1 int SOAP_FMAC2 soap_outunsignedLong(struct soap*, const char *tag, int id, const unsigned long *p, const char *, int); 1708 2237 SOAP_FMAC1 int SOAP_FMAC2 soap_outULONG64(struct soap*, const char *tag, int id, const ULONG64 *p, const char *, int); 2238 SOAP_FMAC1 int SOAP_FMAC2 soap_outstring(struct soap*, const char *tag, int id, char *const*p, const char *, int); 2239 SOAP_FMAC1 int SOAP_FMAC2 soap_outliteral(struct soap*, const char *tag, char *const*p, const char *type); 2240 2241 #ifndef WITH_LEAN 1709 2242 SOAP_FMAC1 int SOAP_FMAC2 soap_outdateTime(struct soap*, const char *tag, int id, const time_t *p, const char *, int); 1710 SOAP_FMAC1 int SOAP_FMAC2 soap_outstring(struct soap*, const char *tag, int id, char *const*p, const char *, int); 2243 #endif 2244 2245 #ifndef WITH_LEANER 1711 2246 SOAP_FMAC1 int SOAP_FMAC2 soap_outwstring(struct soap*, const char *tag, int id, wchar_t *const*p, const char *, int); 1712 SOAP_FMAC1 int SOAP_FMAC2 soap_out literal(struct soap*, const char *tag, char *const*p);1713 SOAP_FMAC1 int SOAP_FMAC2 soap_outwliteral(struct soap*, const char *tag, wchar_t *const*p); 2247 SOAP_FMAC1 int SOAP_FMAC2 soap_outwliteral(struct soap*, const char *tag, wchar_t *const*p, const char *type); 2248 #endif 1714 2249 1715 2250 #ifndef WITH_LEANER 1716 SOAP_FMAC1 int SOAP_FMAC2 soap_ element_dime(struct soap *, const char*, int, const void*, const struct soap_array*, const char*, const char*, const char*, int, const char*, int);2251 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); 1717 2252 SOAP_FMAC1 int SOAP_FMAC2 soap_move(struct soap*, long); 1718 2253 SOAP_FMAC1 size_t SOAP_FMAC2 soap_tell(struct soap*); … … 1732 2267 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); 1733 2268 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); 2269 SOAP_FMAC1 void SOAP_FMAC2 soap_post_check_mime_attachments(struct soap *soap); 2270 SOAP_FMAC1 int SOAP_FMAC2 soap_check_mime_attachments(struct soap *soap); 2271 SOAP_FMAC1 struct soap_multipart* SOAP_FMAC2 soap_get_mime_attachment(struct soap *soap, void *handle); 1734 2272 SOAP_FMAC1 struct soap_multipart* SOAP_FMAC2 soap_next_multipart(struct soap_multipart*); 2273 SOAP_FMAC1 int SOAP_FMAC2 soap_match_cid(struct soap*, const char*, const char*); 1735 2274 #endif 1736 2275 … … 1743 2282 1744 2283 #ifdef WITH_COOKIES 2284 SOAP_FMAC1 void SOAP_FMAC2 soap_getcookies(struct soap *soap, const char *val); 1745 2285 SOAP_FMAC1 size_t SOAP_FMAC2 soap_encode_cookie(const char*, char*, size_t); 1746 2286 SOAP_FMAC1 extern struct soap_cookie* SOAP_FMAC2 soap_set_cookie(struct soap*, const char*, const char*, const char*, const char*); 1747 2287 SOAP_FMAC1 extern struct soap_cookie* SOAP_FMAC2 soap_cookie(struct soap*, const char*, const char*, const char*); 1748 2288 SOAP_FMAC1 extern char* SOAP_FMAC2 soap_cookie_value(struct soap*, const char*, const char*, const char*); 1749 SOAP_FMAC1 extern long SOAP_FMAC2 soap_cookie_expire(struct soap*, const char*, const char*, const char*); 2289 SOAP_FMAC1 extern char* SOAP_FMAC2 soap_env_cookie_value(struct soap*, const char*, const char*, const char*); 2290 SOAP_FMAC1 extern time_t SOAP_FMAC2 soap_cookie_expire(struct soap*, const char*, const char*, const char*); 1750 2291 SOAP_FMAC1 extern int SOAP_FMAC2 soap_set_cookie_expire(struct soap*, const char*, long, const char*, const char*); 1751 2292 SOAP_FMAC1 extern int SOAP_FMAC2 soap_set_cookie_session(struct soap*, const char*, const char*, const char*); … … 1753 2294 SOAP_FMAC1 extern void SOAP_FMAC2 soap_clr_cookie(struct soap*, const char*, const char*, const char*); 1754 2295 SOAP_FMAC1 extern int SOAP_FMAC2 soap_getenv_cookies(struct soap*); 1755 SOAP_FMAC1 extern struct soap_cookie* SOAP_FMAC2 soap_copy_cookies(struct soap* );2296 SOAP_FMAC1 extern struct soap_cookie* SOAP_FMAC2 soap_copy_cookies(struct soap*, const struct soap*); 1756 2297 SOAP_FMAC1 extern void SOAP_FMAC2 soap_free_cookies(struct soap*); 1757 2298 #endif 1758 2299 1759 2300 #ifdef __cplusplus 1760 } 1761 #endif 1762 1763 #endif 1764 2301 } /* extern "C" */ 2302 #endif 2303 2304 #endif
Note:
See TracChangeset
for help on using the changeset viewer.
