remodel file adding to accept paths, streams and plain data as upload files
[m6w6/ext-http] / php_http_request_factory.c
index 32574f9c896dc139a43ca3706a9885ec3f5ea8df..b1655f6b8fd7c44113b3a099f28695a3af529ed1 100644 (file)
@@ -1,9 +1,18 @@
+/*
+    +--------------------------------------------------------------------+
+    | PECL :: http                                                       |
+    +--------------------------------------------------------------------+
+    | Redistribution and use in source and binary forms, with or without |
+    | modification, are permitted provided that the conditions mentioned |
+    | in the accompanying LICENSE file are met.                          |
+    +--------------------------------------------------------------------+
+    | Copyright (c) 2004-2011, Michael Wallner <mike@php.net>            |
+    +--------------------------------------------------------------------+
+*/
+
+#include "php_http_api.h"
 
-#include "php_http.h"
-
-#include <ext/standard/php_string.h>
 #include <ext/spl/spl_observer.h>
-#include <Zend/zend_interfaces.h>
 
 /*
  * array of name => php_http_request_factory_driver_t*
@@ -50,13 +59,19 @@ PHP_HTTP_BEGIN_ARGS(__construct, 1)
        PHP_HTTP_ARG_VAL(options, 0)
 PHP_HTTP_END_ARGS;
 PHP_HTTP_BEGIN_ARGS(createRequest, 0)
-       PHP_HTTP_ARG_VAL(persistentHandle, 0)
+       PHP_HTTP_ARG_VAL(url, 0)
+       PHP_HTTP_ARG_VAL(method, 0)
+       PHP_HTTP_ARG_VAL(options, 0)
 PHP_HTTP_END_ARGS;
 PHP_HTTP_BEGIN_ARGS(createPool, 0)
-       PHP_HTTP_ARG_VAL(persistentHandle, 0)
+       PHP_HTTP_ARG_OBJ(http\\Request, request1, 1)
+       PHP_HTTP_ARG_OBJ(http\\Request, request2, 1)
+       PHP_HTTP_ARG_OBJ(http\\Request, requestN, 1)
 PHP_HTTP_END_ARGS;
 PHP_HTTP_BEGIN_ARGS(createDataShare, 0)
-       PHP_HTTP_ARG_VAL(persistentHandle, 0)
+       PHP_HTTP_ARG_OBJ(http\\Request, request1, 1)
+       PHP_HTTP_ARG_OBJ(http\\Request, request2, 1)
+       PHP_HTTP_ARG_OBJ(http\\Request, requestN, 1)
 PHP_HTTP_END_ARGS;
 PHP_HTTP_EMPTY_ARGS(getGlobalDataShareInstance);
 PHP_HTTP_EMPTY_ARGS(getDriver);
@@ -401,3 +416,13 @@ PHP_MSHUTDOWN_FUNCTION(http_request_factory)
        return SUCCESS;
 }
 
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: noet sw=4 ts=4 fdm=marker
+ * vim<600: noet sw=4 ts=4
+ */
+