From: Michael Wallner Date: Sat, 29 Apr 2006 14:19:06 +0000 (+0000) Subject: - fix aliases and exports X-Git-Tag: RELEASE_1_0_0~33 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=5e06e2629f8cbe71bc2985bf7ca4f149bb08d482;p=m6w6%2Fext-http - fix aliases and exports --- diff --git a/http_request_object.c b/http_request_object.c index 4377dcc..207ec6c 100644 --- a/http_request_object.c +++ b/http_request_object.c @@ -190,6 +190,13 @@ HTTP_BEGIN_ARGS(postFields, 2) HTTP_ARG_VAL(info, 1) HTTP_END_ARGS; +HTTP_BEGIN_ARGS(putData, 2) + HTTP_ARG_VAL(url, 0) + HTTP_ARG_VAL(data, 0) + HTTP_ARG_VAL(options, 0) + HTTP_ARG_VAL(info, 1) +HTTP_END_ARGS; + HTTP_BEGIN_ARGS(putFile, 2) HTTP_ARG_VAL(url, 0) HTTP_ARG_VAL(file, 0) @@ -220,6 +227,11 @@ HTTP_BEGIN_ARGS(methodExists, 1) HTTP_ARG_VAL(method, 0) HTTP_END_ARGS; +HTTP_BEGIN_ARGS(encodeBody, 2) + HTTP_ARG_VAL(fields, 0) + HTTP_ARG_VAL(files, 0) +HTTP_END_ARGS; + #define OBJ_PROP_CE http_request_object_ce zend_class_entry *http_request_object_ce; zend_function_entry http_request_object_fe[] = { @@ -291,6 +303,7 @@ zend_function_entry http_request_object_fe[] = { HTTP_REQUEST_ALIAS(head, http_head) HTTP_REQUEST_ALIAS(postData, http_post_data) HTTP_REQUEST_ALIAS(postFields, http_post_fields) + HTTP_REQUEST_ALIAS(putData, http_put_data) HTTP_REQUEST_ALIAS(putFile, http_put_file) HTTP_REQUEST_ALIAS(putStream, http_put_stream) @@ -298,6 +311,8 @@ zend_function_entry http_request_object_fe[] = { HTTP_REQUEST_ALIAS(methodUnregister, http_request_method_unregister) HTTP_REQUEST_ALIAS(methodName, http_request_method_name) HTTP_REQUEST_ALIAS(methodExists, http_request_method_exists) + + HTTP_REQUEST_ALIAS(encodeBody, http_request_body_encode) EMPTY_FUNCTION_ENTRY }; diff --git a/http_response_object.c b/http_response_object.c index 9fb4771..f7ba0b2 100644 --- a/http_response_object.c +++ b/http_response_object.c @@ -130,6 +130,7 @@ HTTP_END_ARGS; HTTP_EMPTY_ARGS(getRequestHeaders); HTTP_EMPTY_ARGS(getRequestBody); +HTTP_EMPTY_ARGS(getRequestBodyStream); #define http_grab_response_headers _http_grab_response_headers static void _http_grab_response_headers(void *data, void *arg TSRMLS_DC); @@ -186,6 +187,7 @@ zend_function_entry http_response_object_fe[] = { HTTP_RESPONSE_ALIAS(status, http_send_status) HTTP_RESPONSE_ALIAS(getRequestHeaders, http_get_request_headers) HTTP_RESPONSE_ALIAS(getRequestBody, http_get_request_body) + HTTP_RESPONSE_ALIAS(getRequestBodyStream, http_get_request_body_stream) EMPTY_FUNCTION_ENTRY }; diff --git a/http_util_object.c b/http_util_object.c index 1bcf8a7..d5c503b 100644 --- a/http_util_object.c +++ b/http_util_object.c @@ -85,6 +85,10 @@ HTTP_BEGIN_ARGS(parseCookie, 1) HTTP_ARG_VAL(cookie_string, 0) HTTP_END_ARGS; +HTTP_BEGIN_ARGS(parseParams, 1) + HTTP_ARG_VAL(param_string, 0) +HTTP_END_ARGS; + HTTP_BEGIN_ARGS(chunkedDecode, 1) HTTP_ARG_VAL(encoded_string, 0) HTTP_END_ARGS; @@ -116,6 +120,7 @@ zend_function_entry http_util_object_fe[] = { HTTP_UTIL_ALIAS(parseMessage, http_parse_message) HTTP_UTIL_ALIAS(parseHeaders, http_parse_headers) HTTP_UTIL_ALIAS(parseCookie, http_parse_cookie) + HTTP_UTIL_ALIAS(parseParams, http_parse_params) HTTP_UTIL_ALIAS(chunkedDecode, http_chunked_decode) #ifdef HTTP_HAVE_ZLIB HTTP_UTIL_ALIAS(deflate, http_deflate) diff --git a/php_http_request_body_api.h b/php_http_request_body_api.h index 2a9559f..739168f 100644 --- a/php_http_request_body_api.h +++ b/php_http_request_body_api.h @@ -22,11 +22,11 @@ #define HTTP_REQUEST_BODY_CURLPOST 2 #define HTTP_REQUEST_BODY_UPLOADFILE 3 typedef struct _http_request_body_t { + void *data; + size_t size; uint type:3; uint free:1; uint priv:28; - void *data; - size_t size; } http_request_body; diff --git a/php_http_request_object.h b/php_http_request_object.h index 0326f01..7a7a2fb 100644 --- a/php_http_request_object.h +++ b/php_http_request_object.h @@ -94,18 +94,6 @@ PHP_METHOD(HttpRequest, getRawRequestMessage); PHP_METHOD(HttpRequest, getHistory); PHP_METHOD(HttpRequest, clearHistory); -PHP_METHOD(HttpRequest, get); -PHP_METHOD(HttpRequest, head); -PHP_METHOD(HttpRequest, postData); -PHP_METHOD(HttpRequest, postFields); -PHP_METHOD(HttpRequest, putFile); -PHP_METHOD(HttpRequest, putStream); - -PHP_METHOD(HttpRequest, methodRegister); -PHP_METHOD(HttpRequest, methodUnregister); -PHP_METHOD(HttpRequest, methodName); -PHP_METHOD(HttpRequest, methodExists); - #endif #endif #endif diff --git a/php_http_response_object.h b/php_http_response_object.h index f5bff6b..60c4257 100644 --- a/php_http_response_object.h +++ b/php_http_response_object.h @@ -51,10 +51,6 @@ PHP_METHOD(HttpResponse, setStream); PHP_METHOD(HttpResponse, getStream); PHP_METHOD(HttpResponse, send); PHP_METHOD(HttpResponse, capture); -PHP_METHOD(HttpResponse, redirect); -PHP_METHOD(HttpResponse, status); -PHP_METHOD(HttpResponse, getRequestHeaders); -PHP_METHOD(HttpResponse, getRequestBody); #endif #endif