X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=php_http_message_api.h;h=8e9084135792c197b393228cbc7bbf9ebf0a5070;hb=0dbc3c8eb4ec78fd58d6cc1c80e5189f5ae91094;hp=a8b7c216fb3f87bf587f3c376f5491a36da063c0;hpb=111fbe75d978a74c3aba074c942d8b2bd5f66223;p=m6w6%2Fext-http diff --git a/php_http_message_api.h b/php_http_message_api.h index a8b7c21..8e90841 100644 --- a/php_http_message_api.h +++ b/php_http_message_api.h @@ -6,7 +6,7 @@ | modification, are permitted provided that the conditions mentioned | | in the accompanying LICENSE file are met. | +--------------------------------------------------------------------+ - | Copyright (c) 2004-2005, Michael Wallner | + | Copyright (c) 2004-2006, Michael Wallner | +--------------------------------------------------------------------+ */ @@ -48,6 +48,9 @@ PHP_HTTP_API http_message *_http_message_init_ex(http_message *m, http_message_t #define http_message_set_type(m, t) _http_message_set_type((m), (t)) PHP_HTTP_API void _http_message_set_type(http_message *m, http_message_type t); +#define http_message_set_info(m, i) _http_message_set_info((m), (i)) +PHP_HTTP_API void _http_message_set_info(http_message *message, http_info *info); + #define http_message_header(m, h) _http_message_header_ex((m), (h), sizeof(h)) #define http_message_header_ex _http_message_header_ex static inline zval *_http_message_header_ex(http_message *msg, char *key_str, size_t key_len) @@ -59,6 +62,12 @@ static inline zval *_http_message_header_ex(http_message *msg, char *key_str, si return NULL; } +#define http_message_count(c, m) \ +{ \ + http_message *__tmp_msg = (m); \ + for (c = 0; __tmp_msg; __tmp_msg = __tmp_msg->parent, ++(c)); \ +} + #define http_message_parse(m, l) http_message_parse_ex(NULL, (m), (l)) #define http_message_parse_ex(h, m, l) _http_message_parse_ex((h), (m), (l) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC TSRMLS_CC) #define http_message_parse_rel(h, m, l) _http_message_parse_ex((h), (m), (l) ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC TSRMLS_CC)