ext-uv/php_uv.h

47 lines
915 B
C
Raw Normal View History

2012-05-22 19:43:11 +02:00
#ifndef PHP_UV_H
#define PHP_UV_H
#define PHP_UV_EXTNAME "uv"
#define PHP_UV_EXTVER "0.1"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "php.h"
#include "uv.h"
2012-05-22 19:43:11 +02:00
#include "ext/spl/spl_exceptions.h"
#include "zend_interfaces.h"
/* Define the entry point symbol
* Zend will use when loading this module
*/
extern zend_module_entry uv_module_entry;
#define phpext_uv_ptr &uv_module_entry;
extern zend_class_entry *uv_class_entry;
2012-05-25 01:07:12 +02:00
/* TODO: fix lator */
typedef struct {
struct sockaddr_in addr;
uv_connect_t connect;
2012-05-24 16:29:54 +02:00
uv_tcp_t *socket;
2012-05-26 15:25:15 +02:00
int resource_id;
zval *listen_cb;
zval *read_cb;
zval *write_cb;
2012-05-26 15:54:43 +02:00
zval *close_cb;
2012-05-26 15:25:15 +02:00
/* TODO: remove lator */
2012-05-23 13:41:04 +02:00
zend_fcall_info fci_connect;
zend_fcall_info_cache fcc_connect;
2012-05-23 19:31:16 +02:00
zend_fcall_info fci_listen;
zend_fcall_info_cache fcc_listen;
} php_uv_t;
#define PHP_UV_RESOURCE_NAME "uv"
2012-05-24 06:07:52 +02:00
#define PHP_UV_CONNECT_RESOURCE_NAME "uv_connect"
2012-05-22 19:43:11 +02:00
#endif /* PHP_UV_H */