/*
- +----------------------------------------------------------------------+
- | PECL :: http |
- +----------------------------------------------------------------------+
- | This source file is subject to version 3.0 of the PHP license, that |
- | is bundled with this package in the file LICENSE, and is available |
- | through the world-wide-web at http://www.php.net/license/3_0.txt. |
- | If you did not receive a copy of the PHP license and are unable to |
- | obtain it through the world-wide-web, please send a note to |
- | license@php.net so we can mail you a copy immediately. |
- +----------------------------------------------------------------------+
- | Copyright (c) 2004-2005 Michael Wallner <mike@php.net> |
- +----------------------------------------------------------------------+
+ +--------------------------------------------------------------------+
+ | 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-2005, Michael Wallner <mike@php.net> |
+ +--------------------------------------------------------------------+
*/
/* $Id$ */
#ifdef HTTP_HAVE_CURL
#ifdef ZEND_ENGINE_2
-#ifdef PHP_WIN32
-# include <winsock2.h>
-#endif
-
-#include <curl/curl.h>
-
-#include "php_http_request_api.h"
#include "php_http_request_pool_api.h"
-#include "phpstr/phpstr.h"
typedef struct {
zend_object zo;
- CURL *ch;
+ http_request *request;
http_request_pool *pool;
- phpstr response;
- phpstr request;
phpstr history;
} http_request_object;
extern PHP_MINIT_FUNCTION(http_request_object);
-#define http_request_object_new _http_request_object_new
+#define http_request_object_new(ce) _http_request_object_new((ce) TSRMLS_CC)
extern zend_object_value _http_request_object_new(zend_class_entry *ce TSRMLS_DC);
-#define http_request_object_free _http_request_object_free
+#define http_request_object_new_ex(ce, ch, ptr) _http_request_object_new_ex((ce), (ch), (ptr) TSRMLS_CC)
+extern zend_object_value _http_request_object_new_ex(zend_class_entry *ce, CURL *ch, http_request_object **ptr TSRMLS_DC);
+#define http_request_object_clone(zv) _http_request_object_clone_obj((zv) TSRMLS_CC)
+extern zend_object_value _http_request_object_clone_obj(zval *zobject TSRMLS_DC);
+#define http_request_object_free(o) _http_request_object_free((o) TSRMLS_CC)
extern void _http_request_object_free(zend_object *object TSRMLS_DC);
-#define http_request_object_requesthandler(req, this, body) _http_request_object_requesthandler((req), (this), (body) TSRMLS_CC)
-extern STATUS _http_request_object_requesthandler(http_request_object *obj, zval *this_ptr, http_request_body *body TSRMLS_DC);
+#define http_request_object_requesthandler(req, this) _http_request_object_requesthandler((req), (this) TSRMLS_CC)
+extern STATUS _http_request_object_requesthandler(http_request_object *obj, zval *this_ptr TSRMLS_DC);
#define http_request_object_responsehandler(req, this) _http_request_object_responsehandler((req), (this) TSRMLS_CC)
extern STATUS _http_request_object_responsehandler(http_request_object *obj, zval *this_ptr TSRMLS_DC);