X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=php_http_object.h;h=20de8c8e62263098663341790ed464b035a6d80d;hp=975d1503743c37d6011c21371d1481da9cf97ca1;hb=1544c4a7fadfb04f46ab1e3ca99628fd9e9cfbbb;hpb=61c5a47e7530b142df6b67332e60a339998c2492 diff --git a/php_http_object.h b/php_http_object.h index 975d150..20de8c8 100644 --- a/php_http_object.h +++ b/php_http_object.h @@ -6,36 +6,36 @@ | modification, are permitted provided that the conditions mentioned | | in the accompanying LICENSE file are met. | +--------------------------------------------------------------------+ - | Copyright (c) 2004-2011, Michael Wallner | + | Copyright (c) 2004-2014, Michael Wallner | +--------------------------------------------------------------------+ */ #ifndef PHP_HTTP_OBJECT_H #define PHP_HTTP_OBJECT_H -typedef zend_object_value (*php_http_new_t)(zend_class_entry *ce, void *, void ** TSRMLS_DC); - -extern STATUS php_http_new(zend_object_value *ov, zend_class_entry *ce, php_http_new_t create, zend_class_entry *parent_ce, void *intern_ptr, void **obj_ptr TSRMLS_DC); - typedef struct php_http_object { + void *intern; zend_object zo; } php_http_object_t; -extern zend_class_entry *php_http_object_class_entry; -extern zend_function_entry php_http_object_method_entry[]; +zend_object *php_http_object_new(zend_class_entry *ce); +php_http_object_t *php_http_object_new_ex(zend_class_entry *ce, void *nothing); + +typedef void *(*php_http_new_t)(zend_class_entry *ce, void *); -extern PHP_MINIT_FUNCTION(http_object); +ZEND_RESULT_CODE php_http_new(void **obj_ptr, zend_class_entry *ce, php_http_new_t create, zend_class_entry *parent_ce, void *intern_ptr); -extern zend_object_value php_http_object_new(zend_class_entry *ce TSRMLS_DC); -extern zend_object_value php_http_object_new_ex(zend_class_entry *ce, void *nothing, php_http_object_t **ptr TSRMLS_DC); +PHP_MINIT_FUNCTION(http_object); -PHP_HTTP_API zend_error_handling_t php_http_object_get_error_handling(zval *object TSRMLS_DC); +typedef struct php_http_method { + zend_fcall_info fci; + zend_fcall_info_cache fcc; +} php_http_object_method_t; -PHP_METHOD(HttpObject, setErrorHandling); -PHP_METHOD(HttpObject, getErrorHandling); -PHP_METHOD(HttpObject, setDefaultErrorHandling); -PHP_METHOD(HttpObject, getDefaultErrorHandling); -PHP_METHOD(HttpObject, triggerError); +php_http_object_method_t *php_http_object_method_init(php_http_object_method_t *cb, zval *zobject, const char *method_str, size_t method_len); +ZEND_RESULT_CODE php_http_object_method_call(php_http_object_method_t *cb, zval *zobject, zval *retval, int argc, zval *args); +void php_http_object_method_dtor(php_http_object_method_t *cb); +void php_http_object_method_free(php_http_object_method_t **cb); #endif