More type casts. Modify CQL tree - bool is C++ reserved name.
[yaz-moved-to-github.git] / include / yaz / soap.h
1 /*
2  * Copyright (c) 2002-2003, Index Data.
3  * See the file LICENSE for details.
4  *
5  * $Id: soap.h,v 1.2 2003-02-14 18:49:23 adam Exp $
6  */
7
8 #ifndef YAZ_SOAP_H
9 #define YAZ_SOAP_H
10
11 #include <yaz/odr.h>
12
13 typedef struct {
14     char *fault_code;
15     char *fault_string;
16     char *details;
17 } Z_SOAP_Fault;
18
19 typedef struct {
20     int no;
21     char *ns;
22     void *p;
23 } Z_SOAP_Generic;
24
25 #define Z_SOAP_fault 1
26 #define Z_SOAP_generic 2
27 #define Z_SOAP_error 3
28 typedef struct {
29     int which;
30     union {
31         Z_SOAP_Fault   *fault;
32         Z_SOAP_Generic *generic;
33         Z_SOAP_Fault   *soap_error;
34     } u;
35     const char *ns;
36 } Z_SOAP;
37
38 typedef int (*Z_SOAP_fun)(ODR o, void * ptr, void **handler_data,
39                          void *client_data, const char *ns);
40 typedef struct {
41     char *ns;
42     void *client_data;
43     Z_SOAP_fun f;
44 } Z_SOAP_Handler;
45
46 YAZ_EXPORT int z_soap_codec(ODR o, Z_SOAP **pp, 
47                             char **content_buf, int *content_len,
48                             Z_SOAP_Handler *handlers);
49
50 #endif