forked from laruence/yar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathyar_response.h
55 lines (48 loc) · 2.21 KB
/
yar_response.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/*
+----------------------------------------------------------------------+
| Yar - Light, concurrent RPC framework |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2011 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |
| http://www.php.net/license/3_01.txt |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| [email protected] so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Author: Xinchen Hui <[email protected]> |
| Zhenyu Zhang <[email protected]> |
+----------------------------------------------------------------------+
*/
/* $Id$ */
#ifndef PHP_YAR_RESPONSE_H
#define PHP_YAR_RESPONSE_H
#define YAR_RESPONSE_REPLACE 0
#define YAR_RESPONSE_APPEND 1
#define YAR_RESPONSE_PREPEND 2
typedef struct _yar_response {
long id;
int status;
char *out;
size_t out_len;
zval *err;
zval *retval;
} yar_response_t;
yar_response_t * php_yar_response_instance(TSRMLS_D);
int php_yar_response_bind_request(yar_response_t *response, struct _yar_request *request TSRMLS_DC);
void php_yar_response_alter_body(yar_response_t *response, char *body, uint len, int method TSRMLS_DC);
void php_yar_response_set_error(yar_response_t *response, int type, char *message, uint len TSRMLS_DC);
void php_yar_response_set_exception(yar_response_t *response, zval *ex TSRMLS_DC);
void php_yar_response_set_retval(yar_response_t *response, zval *retval TSRMLS_DC);
void php_yar_response_dtor(yar_response_t *response TSRMLS_DC);
#endif /* PHP_YAR_RESPONSE_H */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: noet sw=4 ts=4 fdm=marker
* vim<600: noet sw=4 ts=4
*/