fixed build
[m6w6/ext-http] / php_http_request_body_api.h
1 /*
2 +--------------------------------------------------------------------+
3 | PECL :: http |
4 +--------------------------------------------------------------------+
5 | Redistribution and use in source and binary forms, with or without |
6 | modification, are permitted provided that the conditions mentioned |
7 | in the accompanying LICENSE file are met. |
8 +--------------------------------------------------------------------+
9 | Copyright (c) 2004-2005, Michael Wallner <mike@php.net> |
10 +--------------------------------------------------------------------+
11 */
12
13 /* $Id$ */
14
15 #ifndef PHP_HTTP_REQUEST_BODY_API_H
16 #define PHP_HTTP_REQUEST_BODY_API_H
17
18 #ifdef HTTP_HAVE_CURL
19
20 #define HTTP_REQUEST_BODY_CSTRING 1
21 #define HTTP_REQUEST_BODY_CURLPOST 2
22 #define HTTP_REQUEST_BODY_UPLOADFILE 3
23 typedef struct {
24 int type;
25 void *data;
26 size_t size;
27 } http_request_body;
28
29
30 PHP_HTTP_API http_request_body *_http_request_body_new(ZEND_FILE_LINE_D ZEND_FILE_LINE_ORIG_DC TSRMLS_DC);
31 #define http_request_body_new() _http_request_body_new(ZEND_FILE_LINE_C ZEND_FILE_LINE_EMPTY_CC TSRMLS_CC)
32
33 #define http_request_body_fill(b, fields, files) _http_request_body_fill((b), (fields), (files) TSRMLS_CC)
34 PHP_HTTP_API STATUS _http_request_body_fill(http_request_body *body, HashTable *fields, HashTable *files TSRMLS_DC);
35
36 #define http_request_body_dtor(b) _http_request_body_dtor((b) TSRMLS_CC)
37 PHP_HTTP_API void _http_request_body_dtor(http_request_body *body TSRMLS_DC);
38
39 #define http_request_body_free(b) _http_request_body_free((b) TSRMLS_CC)
40 PHP_HTTP_API void _http_request_body_free(http_request_body **body TSRMLS_DC);
41
42 #endif
43 #endif
44
45 /*
46 * Local variables:
47 * tab-width: 4
48 * c-basic-offset: 4
49 * End:
50 * vim600: noet sw=4 ts=4 fdm=marker
51 * vim<600: noet sw=4 ts=4
52 */
53