2 +--------------------------------------------------------------------+
4 +--------------------------------------------------------------------+
5 | Redistribution and use in source and binary forms, with or without |
6 | modification, are permitted provided that the conditions mentioned |
7 | in the accompanying LICENSE file are met. |
8 +--------------------------------------------------------------------+
9 | Copyright (c) 2004-2014, Michael Wallner <mike@php.net> |
10 +--------------------------------------------------------------------+
13 #ifndef PHP_HTTP_API_H
14 #define PHP_HTTP_API_H
21 #include "php_config.h"
26 #include "ext/raphf/php_raphf_api.h"
27 #include "ext/propro/php_propro_api.h"
28 #include "ext/standard/php_string.h"
29 #include "ext/spl/spl_iterators.h"
30 #include "ext/date/php_date.h"
32 #include "zend_interfaces.h"
33 #include "zend_exceptions.h"
37 # define PHP_HTTP_API __declspec(dllexport)
38 #elif defined(__GNUC__) && __GNUC__ >= 4
39 # define PHP_HTTP_API extern __attribute__ ((visibility("default")))
41 # define PHP_HTTP_API extern
44 #if (defined(HAVE_ICONV) || defined(PHP_HTTP_HAVE_EXT_ICONV)) && (PHP_HTTP_SHARED_DEPS || !defined(COMPILE_DL_ICONV))
45 # define PHP_HTTP_HAVE_ICONV
48 #if (defined(HAVE_HASH_EXT) || defined(PHP_HTTP_HAVE_EXT_HASH)) && (PHP_HTTP_SHARED_DEPS || !defined(COMPILE_DL_HASH)) && defined(PHP_HTTP_HAVE_PHP_HASH_H)
49 # define PHP_HTTP_HAVE_HASH
55 # define CURL_STATICLIB
56 # include <winsock2.h>
66 #if defined(HAVE_WCHAR_H) && defined(HAVE_WCTYPE_H) && defined(HAVE_ISWALNUM) && (defined(HAVE_MBRTOWC) || defined(HAVE_MBTOWC))
67 # define PHP_HTTP_HAVE_WCHAR 1
71 #define PHP_HTTP_IS_CTYPE(type, c) is##type((int) (unsigned char) (c))
72 #define PHP_HTTP_TO_CTYPE(type, c) to##type((int) (unsigned char) (c))
76 #include "php_http_buffer.h"
77 #include "php_http_misc.h"
78 #include "php_http_options.h"
81 #include "php_http_cookie.h"
82 #include "php_http_encoding.h"
83 #include "php_http_info.h"
84 #include "php_http_message.h"
85 #include "php_http_env.h"
86 #include "php_http_env_request.h"
87 #include "php_http_env_response.h"
88 #include "php_http_etag.h"
89 #include "php_http_exception.h"
90 #include "php_http_filter.h"
91 #include "php_http_header_parser.h"
92 #include "php_http_header.h"
93 #include "php_http_message_body.h"
94 #include "php_http_message_parser.h"
95 #include "php_http_negotiate.h"
96 #include "php_http_object.h"
97 #include "php_http_params.h"
98 #include "php_http_querystring.h"
99 #include "php_http_client.h"
100 #include "php_http_curl.h"
101 #include "php_http_client_request.h"
102 #include "php_http_client_response.h"
103 #include "php_http_client_curl.h"
104 #include "php_http_client_curl_event.h"
105 #include "php_http_client_curl_user.h"
106 #include "php_http_url.h"
107 #include "php_http_version.h"
109 ZEND_BEGIN_MODULE_GLOBALS(php_http
)
110 struct php_http_env_globals env
;
111 #ifdef PHP_HTTP_HAVE_CLIENT
113 #ifdef PHP_HTTP_HAVE_CURL
114 struct php_http_client_curl_globals curl
;
118 ZEND_END_MODULE_GLOBALS(php_http
)
120 ZEND_EXTERN_MODULE_GLOBALS(php_http
);
123 # include "TSRM/TSRM.h"
124 # define PHP_HTTP_G ((zend_php_http_globals *) (*((void ***) tsrm_get_ls_cache()))[TSRM_UNSHUFFLE_RSRC_ID(php_http_globals_id)])
125 # undef TSRMLS_FETCH_FROM_CTX
126 # define TSRMLS_FETCH_FROM_CTX(ctx) ERROR
128 # define PHP_HTTP_G (&php_http_globals)
135 extern void _dpf(int type
, const char *data
, size_t length
);
137 # define _dpf(t,s,l);
140 #endif /* PHP_HTTP_API_H */
148 * vim600: noet sw=4 ts=4 fdm=marker
149 * vim<600: noet sw=4 ts=4