98355baade8bdc4b2a1b18d2ecea8e780c8eb214
[plcapi.git] / php / xmlrpc / php_xmlrpc.h
1 /*
2   This file is part of, or distributed with, libXMLRPC - a C library for 
3   xml-encoded function calls.
4
5   Author: Dan Libby (dan@libby.com)
6   Epinions.com may be contacted at feedback@epinions-inc.com
7 */
8
9 /*  
10   Copyright 2001 Epinions, Inc. 
11
12   Subject to the following 3 conditions, Epinions, Inc.  permits you, free 
13   of charge, to (a) use, copy, distribute, modify, perform and display this 
14   software and associated documentation files (the "Software"), and (b) 
15   permit others to whom the Software is furnished to do so as well.  
16
17   1) The above copyright notice and this permission notice shall be included 
18   without modification in all copies or substantial portions of the 
19   Software.  
20
21   2) THE SOFTWARE IS PROVIDED "AS IS", WITHOUT ANY WARRANTY OR CONDITION OF 
22   ANY KIND, EXPRESS, IMPLIED OR STATUTORY, INCLUDING WITHOUT LIMITATION ANY 
23   IMPLIED WARRANTIES OF ACCURACY, MERCHANTABILITY, FITNESS FOR A PARTICULAR 
24   PURPOSE OR NONINFRINGEMENT.  
25
26   3) IN NO EVENT SHALL EPINIONS, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, 
27   SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES OR LOST PROFITS ARISING OUT 
28   OF OR IN CONNECTION WITH THE SOFTWARE (HOWEVER ARISING, INCLUDING 
29   NEGLIGENCE), EVEN IF EPINIONS, INC.  IS AWARE OF THE POSSIBILITY OF SUCH 
30   DAMAGES.    
31
32 */
33
34 /* auto-generated portions of this file are also subject to the php license */
35
36 /*
37    +----------------------------------------------------------------------+
38    | PHP Version 5                                                        |
39    +----------------------------------------------------------------------+
40    | Copyright (c) 1997-2004 The PHP Group                                |
41    +----------------------------------------------------------------------+
42    | This source file is subject to version 3.0 of the PHP license,       |
43    | that is bundled with this package in the file LICENSE, and is        |
44    | available through the world-wide-web at the following url:           |
45    | http://www.php.net/license/3_0.txt.                                  |
46    | If you did not receive a copy of the PHP license and are unable to   |
47    | obtain it through the world-wide-web, please send a note to          |
48    | license@php.net so we can mail you a copy immediately.               |
49    +----------------------------------------------------------------------+
50    | Author: Dan Libby                                                    |
51    +----------------------------------------------------------------------+
52  */
53
54 /* $Id$ */
55
56 #ifndef _PHP_XMLRPC_H
57 #define _PHP_XMLRPC_H
58
59 /* You should tweak config.m4 so this symbol (or some else suitable)
60    gets defined.
61 */
62 #if 1 /* HAVE_XMLRPC */
63
64 extern zend_module_entry xmlrpc_module_entry;
65 #define phpext_xmlrpc_ptr &xmlrpc_module_entry
66
67 #ifdef PHP_WIN32
68 #define PHP_XMLRPC_API __declspec(dllexport)
69 #else
70 #define PHP_XMLRPC_API
71 #endif
72
73 PHP_MINIT_FUNCTION(xmlrpc);
74 PHP_MSHUTDOWN_FUNCTION(xmlrpc);
75 PHP_RINIT_FUNCTION(xmlrpc);
76 PHP_RSHUTDOWN_FUNCTION(xmlrpc);
77 PHP_MINFO_FUNCTION(xmlrpc);
78
79 PHP_FUNCTION(xmlrpc_encode);
80 PHP_FUNCTION(xmlrpc_decode);
81 PHP_FUNCTION(xmlrpc_decode_request);
82 PHP_FUNCTION(xmlrpc_encode_request);
83 PHP_FUNCTION(xmlrpc_get_type);
84 PHP_FUNCTION(xmlrpc_set_type);
85 PHP_FUNCTION(xmlrpc_is_fault);
86 PHP_FUNCTION(xmlrpc_server_create);
87 PHP_FUNCTION(xmlrpc_server_destroy);
88 PHP_FUNCTION(xmlrpc_server_register_method);
89 PHP_FUNCTION(xmlrpc_server_call_method);
90 PHP_FUNCTION(xmlrpc_parse_method_descriptions);
91 PHP_FUNCTION(xmlrpc_server_add_introspection_data);
92 PHP_FUNCTION(xmlrpc_server_register_introspection_callback);
93
94 /* Fill in this structure and use entries in it
95    for thread safety instead of using true globals.
96 */
97 ZEND_BEGIN_MODULE_GLOBALS(xmlrpc)
98         long allow_null;
99 ZEND_END_MODULE_GLOBALS(xmlrpc)
100
101 /* In every function that needs to use variables in zend_xmlrpc_globals,
102    do call XMLRPCLS_FETCH(); after declaring other variables used by
103    that function, and always refer to them as XMLRPCG(variable).
104    You are encouraged to rename these macros something shorter, see
105    examples in any other php module directory.
106 */
107
108 #ifdef ZTS
109 #define XMLRPCG(v) TSRMG(xmlrpc_globals_id, zend_xmlrpc_globals *, v)
110 #define XMLRPCLS_FETCH() zend_xmlrpc_globals *xmlrpc_globals = ts_resource(xmlrpc_globals_id)
111 #else
112 #define XMLRPCG(v) (xmlrpc_globals.v)
113 #define XMLRPCLS_FETCH()
114 #endif
115
116 ZEND_EXTERN_MODULE_GLOBALS(xmlrpc)
117
118 #else
119
120 #define phpext_xmlrpc_ptr NULL
121
122 #endif
123
124 #endif  /* _PHP_XMLRPC_H */
125
126
127 /*
128  * Local variables:
129  * tab-width: 4
130  * c-basic-offset: 4
131  * End:
132  */