fix leaks; all tests pass
[m6w6/ext-http] / php_http_client.h
index 5067f6c5832415cf905d704c6f99e5ef1308220f..792581a4da017906ffa05b5e550069b39a0b2157 100644 (file)
 typedef enum php_http_client_setopt_opt {
        PHP_HTTP_CLIENT_OPT_ENABLE_PIPELINING,
        PHP_HTTP_CLIENT_OPT_USE_EVENTS,
+       PHP_HTTP_CLIENT_OPT_CONFIGURATION,
 } php_http_client_setopt_opt_t;
 
 typedef enum php_http_client_getopt_opt {
-       PHP_HTTP_CLIENT_OPT_PROGRESS_INFO,              /* php_http_client_progress_state_t** */
-       PHP_HTTP_CLIENT_OPT_TRANSFER_INFO,              /* HashTable* */
+       PHP_HTTP_CLIENT_OPT_PROGRESS_INFO,              /* php_http_client_enqueue_t*, php_http_client_progress_state_t** */
+       PHP_HTTP_CLIENT_OPT_TRANSFER_INFO,              /* php_http_client_enqueue_t*, HashTable* */
+       PHP_HTTP_CLIENT_OPT_AVAILABLE_OPTIONS,          /* NULL, HashTable* */
+       PHP_HTTP_CLIENT_OPT_AVAILABLE_CONFIGURATION,/* NULL, HashTable */
 } php_http_client_getopt_opt_t;
 
 typedef struct php_http_client_enqueue {
@@ -85,7 +88,7 @@ typedef struct php_http_client_progress_state {
        unsigned finished:1;
 } php_http_client_progress_state_t;
 
-typedef ZEND_RESULT_CODE (*php_http_client_response_callback_t)(void *arg, struct php_http_client *client, php_http_client_enqueue_t *e, php_http_message_t **request, php_http_message_t **response);
+typedef ZEND_RESULT_CODE (*php_http_client_response_callback_t)(void *arg, struct php_http_client *client, php_http_client_enqueue_t *e, php_http_message_t **response);
 typedef void (*php_http_client_progress_callback_t)(void *arg, struct php_http_client *client, php_http_client_enqueue_t *e, php_http_client_progress_state_t *state);
 
 typedef struct php_http_client {
@@ -112,6 +115,8 @@ PHP_HTTP_API zend_class_entry *php_http_client_class_entry;
 
 typedef struct php_http_client_object {
        php_http_client_t *client;
+       php_http_object_method_t *update;
+       php_http_object_method_t notify;
        long iterator;
        zend_object zo;
 } php_http_client_object_t;