Guest User

stdsoap2.h for symbian

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