03bdd5b98641c7c178b06e7798540fef27b1fbad
[m6w6/ext-pq] / src / php_pqcopy.h
1 /*
2 +--------------------------------------------------------------------+
3 | PECL :: pq |
4 +--------------------------------------------------------------------+
5 | Redistribution and use in source and binary forms, with or without |
6 | modification, are permitted provided that the conditions mentioned |
7 | in the accompanying LICENSE file are met. |
8 +--------------------------------------------------------------------+
9 | Copyright (c) 2013, Michael Wallner <mike@php.net> |
10 +--------------------------------------------------------------------+
11 */
12
13
14 #ifndef PHP_PQCOPY_H
15 #define PHP_PQCOPY_H
16
17 #include "php_pqconn.h"
18
19 typedef enum php_pqcopy_direction {
20 PHP_PQCOPY_FROM_STDIN,
21 PHP_PQCOPY_TO_STDOUT
22 } php_pqcopy_direction_t;
23
24 typedef enum php_pqcopy_status {
25 PHP_PQCOPY_FAIL,
26 PHP_PQCOPY_CONT,
27 PHP_PQCOPY_DONE
28 } php_pqcopy_status_t;
29
30 typedef struct php_pqcopy {
31 php_pqcopy_direction_t direction;
32 char *expression;
33 char *options;
34 php_pqconn_object_t *conn;
35 } php_pqcopy_t;
36
37 typedef struct php_pqcopy_object {
38 zend_object zo;
39 zend_object_value zv;
40 HashTable *prophandler;
41 php_pqcopy_t *intern;
42 } php_pqcopy_object_t;
43
44 zend_class_entry *php_pqcopy_class_entry;
45 zend_object_value php_pqcopy_create_object_ex(zend_class_entry *ce, php_pqcopy_t *intern, php_pqcopy_object_t **ptr TSRMLS_DC);
46
47 PHP_MINIT_FUNCTION(pqcopy);
48 PHP_MSHUTDOWN_FUNCTION(pqcopy);
49
50 #endif
51
52 /*
53 * Local variables:
54 * tab-width: 4
55 * c-basic-offset: 4
56 * End:
57 * vim600: noet sw=4 ts=4 fdm=marker
58 * vim<600: noet sw=4 ts=4
59 */