- fix aliases and exports
authorMichael Wallner <mike@php.net>
Sat, 29 Apr 2006 14:19:06 +0000 (14:19 +0000)
committerMichael Wallner <mike@php.net>
Sat, 29 Apr 2006 14:19:06 +0000 (14:19 +0000)
http_request_object.c
http_response_object.c
http_util_object.c
php_http_request_body_api.h
php_http_request_object.h
php_http_response_object.h

index 4377dcc1e37f0888064b9d62a79a90f3b2185bac..207ec6c3da02fd4923196b263cead20f22b3824b 100644 (file)
@@ -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
 };
index 9fb4771d8b2726850f2a7c3274b4d40e9f4e51a1..f7ba0b2f18aaab8a476093b68dd33b572ab2e284 100644 (file)
@@ -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
 };
index 1bcf8a7e2458bc833c6896897ba696764a9f620b..d5c503b094e95a330ad8f1f94331ede5360f871f 100644 (file)
@@ -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)
index 2a9559f3ee6d3d31e55f05f5914747bceee3e3f8..739168f52c0e15629c804575b35a207cf0275338 100644 (file)
 #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;
 
 
index 0326f011dc1b803d6a5fc3e9985a6ea7ace856b2..7a7a2fbd69f793a2e6ecf89efe704bbfe081d8f2 100644 (file)
@@ -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
index f5bff6b772f67595214e278634f46604495017c8..60c425790c67049a059747cd82e6dcd22a3aa0e4 100644 (file)
@@ -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