prepare v2.2.3
[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 PHP_PQ_OBJ_DECL(php_pqcopy_t *)
39 } php_pqcopy_object_t;
40
41 extern zend_class_entry *php_pqcopy_class_entry;
42 extern php_pqcopy_object_t *php_pqcopy_create_object_ex(zend_class_entry *ce, php_pqcopy_t *intern);
43
44 extern PHP_MINIT_FUNCTION(pqcopy);
45 extern PHP_MSHUTDOWN_FUNCTION(pqcopy);
46
47 #endif
48
49 /*
50 * Local variables:
51 * tab-width: 4
52 * c-basic-offset: 4
53 * End:
54 * vim600: noet sw=4 ts=4 fdm=marker
55 * vim<600: noet sw=4 ts=4
56 */