xref: /PHP-5.5/ext/odbc/php_birdstep.h (revision 73c1be26)
1 /*
2    +----------------------------------------------------------------------+
3    | PHP Version 5                                                        |
4    +----------------------------------------------------------------------+
5    | Copyright (c) 1997-2015 The PHP Group                                |
6    +----------------------------------------------------------------------+
7    | This source file is subject to version 3.01 of the PHP license,      |
8    | that is bundled with this package in the file LICENSE, and is        |
9    | available through the world-wide-web at the following url:           |
10    | http://www.php.net/license/3_01.txt                                  |
11    | If you did not receive a copy of the PHP license and are unable to   |
12    | obtain it through the world-wide-web, please send a note to          |
13    | license@php.net so we can mail you a copy immediately.               |
14    +----------------------------------------------------------------------+
15    | Authors: Nikolay P. Romanyuk <mag@redcom.ru>                         |
16    +----------------------------------------------------------------------+
17 */
18 
19 /* $Id$ */
20 
21 #ifndef PHP_BIRDSTEP_H
22 #define PHP_BIRDSTEP_H
23 
24 #if defined(HAVE_BIRDSTEP) && !HAVE_UODBC
25 #define UNIX
26 #include <sql.h>
27 #include <sqlext.h>
28 
29 typedef struct VConn {
30 	HDBC    hdbc;
31 	long    index;
32 } VConn;
33 
34 typedef struct {
35 	char name[32];
36 	char *value;
37 	long vallen;
38 	SDWORD valtype;
39 } VResVal;
40 
41 typedef struct Vresult {
42 	HSTMT   hstmt;
43 	VConn   *conn;
44 	long    index;
45 	VResVal *values;
46 	long    numcols;
47 	int     fetched;
48 } Vresult;
49 
50 typedef struct {
51 	long num_links;
52 	long max_links;
53 	int le_link,le_result;
54 } birdstep_module;
55 
56 extern zend_module_entry birdstep_module_entry;
57 #define birdstep_module_ptr &birdstep_module_entry
58 
59 /* birdstep.c functions */
60 PHP_MINIT_FUNCTION(birdstep);
61 PHP_RINIT_FUNCTION(birdstep);
62 PHP_MINFO_FUNCTION(birdstep);
63 PHP_MSHUTDOWN_FUNCTION(birdstep);
64 
65 PHP_FUNCTION(birdstep_connect);
66 PHP_FUNCTION(birdstep_close);
67 PHP_FUNCTION(birdstep_exec);
68 PHP_FUNCTION(birdstep_fetch);
69 PHP_FUNCTION(birdstep_result);
70 PHP_FUNCTION(birdstep_freeresult);
71 PHP_FUNCTION(birdstep_autocommit);
72 PHP_FUNCTION(birdstep_off_autocommit);
73 PHP_FUNCTION(birdstep_commit);
74 PHP_FUNCTION(birdstep_rollback);
75 PHP_FUNCTION(birdstep_fieldnum);
76 PHP_FUNCTION(birdstep_fieldname);
77 
78 extern birdstep_module php_birdstep_module;
79 
80 #else
81 
82 #define birdstep_module_ptr NULL
83 
84 #endif /* HAVE_BIRDSTEP */
85 #endif /* PHP_BIRDSTEP_H */
86 
87 /*
88  * Local variables:
89  * tab-width: 4
90  * c-basic-offset: 4
91  * End:
92  */
93