+typedef struct php_http_env_response php_http_env_response_t;
+
+typedef struct php_http_env_response_ops {
+ ZEND_RESULT_CODE (*init)(php_http_env_response_t *r, void *arg);
+ void (*dtor)(php_http_env_response_t *r);
+ long (*get_status)(php_http_env_response_t *r);
+ ZEND_RESULT_CODE (*set_status)(php_http_env_response_t *r, long http_code);
+ ZEND_RESULT_CODE (*set_protocol_version)(php_http_env_response_t *r, php_http_version_t *v);
+ ZEND_RESULT_CODE (*set_header)(php_http_env_response_t *r, const char *fmt, ...);
+ ZEND_RESULT_CODE (*add_header)(php_http_env_response_t *r, const char *fmt, ...);
+ ZEND_RESULT_CODE (*del_header)(php_http_env_response_t *r, const char *header_str, size_t header_len);
+ ZEND_RESULT_CODE (*write)(php_http_env_response_t *r, const char *data_str, size_t data_len);
+ ZEND_RESULT_CODE (*flush)(php_http_env_response_t *r);
+ ZEND_RESULT_CODE (*finish)(php_http_env_response_t *r);
+} php_http_env_response_ops_t;
+
+PHP_HTTP_API php_http_env_response_ops_t *php_http_env_response_get_sapi_ops(void);
+PHP_HTTP_API php_http_env_response_ops_t *php_http_env_response_get_stream_ops(void);
+
+struct php_http_env_response {
+ void *ctx;
+ php_http_env_response_ops_t *ops;
+
+ php_http_cookie_list_t *cookies;