- 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 4377dcc..207ec6c 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 9fb4771..f7ba0b2 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 1bcf8a7..d5c503b 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 2a9559f..739168f 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 0326f01..7a7a2fb 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 f5bff6b..60c4257 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