mlumish | b892a27 | 2014-12-09 16:28:23 -0800 | [diff] [blame^] | 1 | #ifndef NET_GRPC_PHP_GRPC_CALL_H_ |
| 2 | #define NET_GRPC_PHP_GRPC_CALL_H_ |
| 3 | |
| 4 | #ifdef HAVE_CONFIG_H |
| 5 | #include "config.h" |
| 6 | #endif |
| 7 | |
| 8 | #include "php.h" |
| 9 | #include "php_ini.h" |
| 10 | #include "ext/standard/info.h" |
| 11 | #include "php_grpc.h" |
| 12 | |
| 13 | #include "grpc/grpc.h" |
| 14 | |
| 15 | /* Class entry for the Call PHP class */ |
| 16 | zend_class_entry *grpc_ce_call; |
| 17 | |
| 18 | /* Wrapper struct for grpc_call that can be associated with a PHP object */ |
| 19 | typedef struct wrapped_grpc_call { |
| 20 | zend_object std; |
| 21 | |
| 22 | grpc_call *wrapped; |
| 23 | } wrapped_grpc_call; |
| 24 | |
| 25 | /* Initializes the Call PHP class */ |
| 26 | void grpc_init_call(TSRMLS_D); |
| 27 | |
| 28 | /* Creates a Call object that wraps the given grpc_call struct */ |
| 29 | zval *grpc_php_wrap_call(grpc_call *wrapped); |
| 30 | |
| 31 | /* Creates and returns a PHP associative array of metadata from a C array of |
| 32 | * call metadata */ |
| 33 | zval *grpc_call_create_metadata_array(int count, grpc_metadata *elements); |
| 34 | |
| 35 | #endif /* NET_GRPC_PHP_GRPC_CHANNEL_H_ */ |