]> granicus.if.org Git - postgresql/blob - src/interfaces/odbc/environ.h
6d50fa6b48f89fe9dc97aeedb53e14c630189302
[postgresql] / src / interfaces / odbc / environ.h
1 /* File:                        environ.h
2  *
3  * Description:         See "environ.c"
4  *
5  * Comments:            See "notice.txt" for copyright and license information.
6  *
7  */
8
9 #ifndef __ENVIRON_H__
10 #define __ENVIRON_H__
11
12 #include "psqlodbc.h"
13
14 #ifndef WIN32
15 #include "iodbc.h"
16 #include "isql.h"
17 #include "isqlext.h"
18 #else
19 #include <windows.h>
20 #include <sql.h>
21 #include <sqlext.h>
22 #endif
23
24 #define ENV_ALLOC_ERROR 1
25
26 /**********             Environment Handle      *************/
27 struct EnvironmentClass_
28 {
29         char       *errormsg;
30         int                     errornumber;
31 };
32
33 /*      Environment prototypes */
34 EnvironmentClass *EN_Constructor(void);
35 char            EN_Destructor(EnvironmentClass *self);
36 char            EN_get_error(EnvironmentClass *self, int *number, char **message);
37 char            EN_add_connection(EnvironmentClass *self, ConnectionClass *conn);
38 char            EN_remove_connection(EnvironmentClass *self, ConnectionClass *conn);
39 void            EN_log_error(char *func, char *desc, EnvironmentClass *self);
40
41 #endif