a3394406e4db10f5b42463cd4bff1c0e2de76862
[m6w6/ext-http] / php_http_url_api.h
1 /*
2 +--------------------------------------------------------------------+
3 | PECL :: http |
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-2005, Michael Wallner <mike@php.net> |
10 +--------------------------------------------------------------------+
11 */
12
13 /* $Id$ */
14
15 #ifndef PHP_HTTP_URL_API_H
16 #define PHP_HTTP_URL_API_H
17
18 #include "php_http_std_defs.h"
19
20 #define http_absolute_uri(url) http_absolute_url(url)
21 #define http_absolute_uri_ex(url, url_len, proto, proto_len, host, host_len, port) _http_absolute_url_ex((url), (url_len), (proto), (proto_len), (host), (host_len), (port) TSRMLS_CC)
22 #define http_absolute_url(url) http_absolute_url_ex((url), strlen(url), NULL, 0, NULL, 0, 0)
23 #define http_absolute_url_ex(url, url_len, proto, proto_len, host, host_len, port) _http_absolute_url_ex((url), (url_len), (proto), (proto_len), (host), (host_len), (port) TSRMLS_CC)
24 PHP_HTTP_API char *_http_absolute_url_ex(const char *url, size_t url_len, const char *proto, size_t proto_len, const char *host, size_t host_len, unsigned port TSRMLS_DC);
25
26 #define http_urlencode_hash(h, q) _http_urlencode_hash_ex((h), 1, NULL, 0, (q), NULL TSRMLS_CC)
27 #define http_urlencode_hash_ex(h, o, p, pl, q, ql) _http_urlencode_hash_ex((h), (o), (p), (pl), (q), (ql) TSRMLS_CC)
28 PHP_HTTP_API STATUS _http_urlencode_hash_ex(HashTable *hash, zend_bool override_argsep, char *pre_encoded_data, size_t pre_encoded_len, char **encoded_data, size_t *encoded_len TSRMLS_DC);
29
30 #define http_urlencode_hash_implementation(ht, formstr, argsep) \
31 http_urlencode_hash_implementation_ex((ht), (formstr), (argsep), NULL, 0, NULL, 0, NULL, 0, NULL)
32 #define http_urlencode_hash_implementation_ex(ht, formstr, argsep, np, npl, kp, kpl, ks, ksl, type) \
33 _http_urlencode_hash_implementation_ex((ht), (formstr), (argsep), (np), (npl), (kp), (kpl), (ks), (ksl), (type) TSRMLS_CC)
34 PHP_HTTP_API STATUS _http_urlencode_hash_implementation_ex(
35 HashTable *ht, phpstr *formstr, char *arg_sep,
36 const char *num_prefix, int num_prefix_len,
37 const char *key_prefix, int key_prefix_len,
38 const char *key_suffix, int key_suffix_len,
39 zval *type TSRMLS_DC);
40
41
42 #endif
43
44 /*
45 * Local variables:
46 * tab-width: 4
47 * c-basic-offset: 4
48 * End:
49 * vim600: noet sw=4 ts=4 fdm=marker
50 * vim<600: noet sw=4 ts=4
51 */
52