summaryrefslogtreecommitdiff
path: root/ext/curl/php_curl.h
diff options
context:
space:
mode:
Diffstat (limited to 'ext/curl/php_curl.h')
-rw-r--r--ext/curl/php_curl.h49
1 files changed, 39 insertions, 10 deletions
diff --git a/ext/curl/php_curl.h b/ext/curl/php_curl.h
index 58ee10aa2b..326318e75a 100644
--- a/ext/curl/php_curl.h
+++ b/ext/curl/php_curl.h
@@ -21,6 +21,9 @@
#ifndef _PHP_CURL_H
#define _PHP_CURL_H
+#include "php.h"
+#include "ext/standard/php_smart_str.h"
+
#ifdef COMPILE_DL_CURL
#undef HAVE_CURL
#define HAVE_CURL 1
@@ -30,6 +33,7 @@
#include <curl/curl.h>
+
extern zend_module_entry curl_module_entry;
#define curl_module_ptr &curl_module_entry
@@ -42,22 +46,47 @@ PHP_FUNCTION(curl_version);
PHP_FUNCTION(curl_init);
PHP_FUNCTION(curl_setopt);
PHP_FUNCTION(curl_exec);
-#if LIBCURL_VERSION_NUM >= 0x070401
PHP_FUNCTION(curl_getinfo);
-#endif
PHP_FUNCTION(curl_error);
PHP_FUNCTION(curl_errno);
PHP_FUNCTION(curl_close);
typedef struct {
- int return_transfer;
- int output_file;
- int php_stdout;
- int cerrno;
- char error[CURL_ERROR_SIZE+1];
- FILE *tmp_fp;
- CURL *cp;
- zend_llist to_free;
+ zval *func;
+ smart_str buf;
+ int method;
+} php_curl_write;
+
+typedef struct {
+ zval *func;
+ long fd;
+ int method;
+} php_curl_read;
+
+typedef struct {
+ zval *write_header;
+ zval *passwd;
+} php_curl_handlers;
+
+struct _php_curl_error {
+ char str[CURL_ERROR_SIZE + 1];
+ int no;
+};
+
+struct _php_curl_free {
+ zend_llist str;
+ zend_llist post;
+ zend_llist slist;
+};
+
+typedef struct {
+ CURL *cp;
+ php_curl_write *write;
+ php_curl_read *read;
+ php_curl_handlers *handlers;
+ struct _php_curl_error err;
+ struct _php_curl_free to_free;
+ long id;
} php_curl;