~ubuntu-branches/ubuntu/trusty/gsoap/trusty-proposed

« back to all changes in this revision

Viewing changes to .pc/gsoap-pad.patch/gsoap/VisualStudio2005/wsdl2h/wsdl2h/stdsoap2.h

  • Committer: Package Import Robot
  • Author(s): Mattias Ellert
  • Date: 2013-10-17 21:57:58 UTC
  • Revision ID: package-import@ubuntu.com-20131017215758-mvs6w5g1haig2hpn
Tags: 2.8.12-2
Pad non-ipv6 struct soap to match ipv6 version (Closes: #712685)

Show diffs side-by-side

added added

removed removed

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