~ubuntu-branches/ubuntu/hardy/php5/hardy-updates

« back to all changes in this revision

Viewing changes to ext/soap/php_soap.h

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-10-09 03:14:32 UTC
  • Revision ID: james.westby@ubuntu.com-20051009031432-kspik3lobxstafv9
Tags: upstream-5.0.5
ImportĀ upstreamĀ versionĀ 5.0.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
  +----------------------------------------------------------------------+
 
3
  | PHP Version 5                                                        |
 
4
  +----------------------------------------------------------------------+
 
5
  | Copyright (c) 1997-2004 The PHP Group                                |
 
6
  +----------------------------------------------------------------------+
 
7
  | This source file is subject to version 3.0 of the PHP license,       |
 
8
  | that is bundled with this package in the file LICENSE, and is        |
 
9
  | available through the world-wide-web at the following url:           |
 
10
  | http://www.php.net/license/3_0.txt.                                  |
 
11
  | If you did not receive a copy of the PHP license and are unable to   |
 
12
  | obtain it through the world-wide-web, please send a note to          |
 
13
  | license@php.net so we can mail you a copy immediately.               |
 
14
  +----------------------------------------------------------------------+
 
15
  | Authors: Brad Lafountain <rodif_bl@yahoo.com>                        |
 
16
  |          Shane Caraveo <shane@caraveo.com>                           |
 
17
  |          Dmitry Stogov <dmitry@zend.com>                             |
 
18
  +----------------------------------------------------------------------+
 
19
*/
 
20
/* $Id: php_soap.h,v 1.33.2.3 2005/02/02 10:34:21 dmitry Exp $ */
 
21
 
 
22
#ifndef PHP_SOAP_H
 
23
#define PHP_SOAP_H
 
24
 
 
25
#include "php.h"
 
26
#include "php_globals.h"
 
27
#include "ext/standard/info.h"
 
28
#include "ext/standard/php_standard.h"
 
29
#include "ext/session/php_session.h"
 
30
#include "ext/standard/php_smart_str.h"
 
31
#include "php_ini.h"
 
32
#include "SAPI.h"
 
33
#include <libxml/parser.h>
 
34
#include <libxml/xpath.h>
 
35
 
 
36
#ifdef HAVE_PHP_DOMXML
 
37
# include "ext/domxml/php_domxml.h"
 
38
#endif
 
39
 
 
40
#ifndef PHP_HAVE_STREAMS
 
41
# error You lose - must be compiled against PHP 4.3.0 or later
 
42
#endif
 
43
 
 
44
#ifndef PHP_WIN32
 
45
# define TRUE 1
 
46
# define FALSE 0
 
47
# define stricmp strcasecmp
 
48
#endif
 
49
 
 
50
extern int le_url;
 
51
 
 
52
typedef struct _encodeType encodeType, *encodeTypePtr;
 
53
typedef struct _encode encode, *encodePtr;
 
54
 
 
55
typedef struct _sdl sdl, *sdlPtr;
 
56
typedef struct _sdlRestrictionInt sdlRestrictionInt, *sdlRestrictionIntPtr;
 
57
typedef struct _sdlRestrictionChar sdlRestrictionChar, *sdlRestrictionCharPtr;
 
58
typedef struct _sdlRestrictions sdlRestrictions, *sdlRestrictionsPtr;
 
59
typedef struct _sdlType sdlType, *sdlTypePtr;
 
60
typedef struct _sdlParam sdlParam, *sdlParamPtr;
 
61
typedef struct _sdlFunction sdlFunction, *sdlFunctionPtr;
 
62
typedef struct _sdlAttribute sdlAttribute, *sdlAttributePtr;
 
63
typedef struct _sdlBinding sdlBinding, *sdlBindingPtr;
 
64
typedef struct _sdlSoapBinding sdlSoapBinding, *sdlSoapBindingPtr;
 
65
typedef struct _sdlSoapBindingFunction sdlSoapBindingFunction, *sdlSoapBindingFunctionPtr;
 
66
typedef struct _sdlSoapBindingFunctionBody sdlSoapBindingFunctionBody, *sdlSoapBindingFunctionBodyPtr;
 
67
 
 
68
typedef struct _soapMapping soapMapping, *soapMappingPtr;
 
69
typedef struct _soapService soapService, *soapServicePtr;
 
70
 
 
71
#include "php_xml.h"
 
72
#include "php_encoding.h"
 
73
#include "php_sdl.h"
 
74
#include "php_schema.h"
 
75
#include "php_http.h"
 
76
#include "php_packet_soap.h"
 
77
 
 
78
struct _soapMapping {
 
79
        char *ns;
 
80
        char *ctype;
 
81
        int type;
 
82
 
 
83
        struct _map_functions {
 
84
                zval *to_xml_before;
 
85
                zval *to_xml;
 
86
                zval *to_xml_after;
 
87
                zval *to_zval_before;
 
88
                zval *to_zval;
 
89
                zval *to_zval_after;
 
90
        } map_functions;
 
91
 
 
92
        struct _map_class {
 
93
                int type;
 
94
                zend_class_entry *ce;
 
95
        } map_class;
 
96
};
 
97
 
 
98
struct _soapService {
 
99
        sdlPtr sdl;
 
100
 
 
101
        struct _soap_functions {
 
102
                HashTable *ft;
 
103
                int functions_all;
 
104
        } soap_functions;
 
105
 
 
106
        struct _soap_class {
 
107
                zend_class_entry *ce;
 
108
                zval **argv;
 
109
                int argc;
 
110
                int persistance;
 
111
        } soap_class;
 
112
 
 
113
        HashTable *mapping;
 
114
        int        version;
 
115
        int        type;
 
116
        char      *actor;
 
117
        char      *uri;
 
118
        xmlCharEncodingHandlerPtr encoding;
 
119
        HashTable *class_map;
 
120
};
 
121
 
 
122
#define SOAP_CLASS 1
 
123
#define SOAP_FUNCTIONS 2
 
124
#define SOAP_FUNCTIONS_ALL 999
 
125
 
 
126
#define SOAP_MAP_FUNCTION 1
 
127
#define SOAP_MAP_CLASS 2
 
128
 
 
129
#define SOAP_PERSISTENCE_SESSION 1
 
130
#define SOAP_PERSISTENCE_REQUEST 2
 
131
 
 
132
#define SOAP_1_1 1
 
133
#define SOAP_1_2 2
 
134
 
 
135
#define SOAP_ACTOR_NEXT             1
 
136
#define SOAP_ACTOR_NONE             2
 
137
#define SOAP_ACTOR_UNLIMATERECEIVER 3
 
138
 
 
139
#define SOAP_1_1_ACTOR_NEXT             "http://schemas.xmlsoap.org/soap/actor/next"
 
140
 
 
141
#define SOAP_1_2_ACTOR_NEXT             "http://www.w3.org/2003/05/soap-envelope/role/next"
 
142
#define SOAP_1_2_ACTOR_NONE             "http://www.w3.org/2003/05/soap-envelope/role/none"
 
143
#define SOAP_1_2_ACTOR_UNLIMATERECEIVER "http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver"
 
144
 
 
145
#define SOAP_COMPRESSION_ACCEPT  0x20
 
146
#define SOAP_COMPRESSION_GZIP    0x00
 
147
#define SOAP_COMPRESSION_DEFLATE 0x10
 
148
 
 
149
#define SOAP_AUTHENTICATION_BASIC   0
 
150
#define SOAP_AUTHENTICATION_DIGEST  1
 
151
 
 
152
ZEND_BEGIN_MODULE_GLOBALS(soap)
 
153
        HashTable  defEncNs;     /* mapping of default namespaces to prefixes */
 
154
        HashTable  defEnc;
 
155
        HashTable  defEncIndex;
 
156
        HashTable *overrides;
 
157
        int        cur_uniq_ns;
 
158
        int        soap_version;
 
159
        sdlPtr     sdl;
 
160
        zend_bool  use_soap_error_handler;
 
161
        char*      error_code;
 
162
        zval*      error_object;
 
163
        zend_bool  cache_enabled;
 
164
        char*      cache_dir;
 
165
        long       cache_ttl;
 
166
        xmlCharEncodingHandlerPtr encoding;
 
167
        HashTable *class_map;
 
168
ZEND_END_MODULE_GLOBALS(soap)
 
169
 
 
170
#ifdef PHP_WIN32
 
171
#define PHP_SOAP_API __declspec(dllexport)
 
172
#else
 
173
#define PHP_SOAP_API
 
174
#endif
 
175
#ifdef ZTS
 
176
#include "TSRM.h"
 
177
#endif
 
178
 
 
179
extern zend_module_entry soap_module_entry;
 
180
#define soap_module_ptr &soap_module_entry
 
181
#define phpext_soap_ptr soap_module_ptr
 
182
 
 
183
ZEND_EXTERN_MODULE_GLOBALS(soap)
 
184
 
 
185
#ifdef ZTS
 
186
# define SOAP_GLOBAL(v) TSRMG(soap_globals_id, zend_soap_globals *, v)
 
187
#else
 
188
# define SOAP_GLOBAL(v) (soap_globals.v)
 
189
#endif
 
190
 
 
191
extern zend_class_entry* soap_var_class_entry;
 
192
 
 
193
zval* add_soap_fault(zval *obj, char *fault_code, char *fault_string, char *fault_actor, zval *fault_detail TSRMLS_DC);
 
194
 
 
195
#define soap_error0(severity, format) \
 
196
        php_error(severity, "SOAP-ERROR: " format)
 
197
 
 
198
#define soap_error1(severity, format, param1) \
 
199
        php_error(severity, "SOAP-ERROR: " format, param1)
 
200
 
 
201
#define soap_error2(severity, format, param1, param2) \
 
202
        php_error(severity, "SOAP-ERROR: " format, param1, param2)
 
203
 
 
204
#define soap_error3(severity, format, param1, param2, param3) \
 
205
        php_error(severity, "SOAP-ERROR: " format, param1, param2, param3)
 
206
 
 
207
#endif