imported svn:keywords properties
[public/netxms.git] / src / server / dbdrv / oracle / oracledrv.h
1 /* $Id$ */
2 /** Oracle Database Driver
3 ** Copyright (C) 2007 Victor Kirhenshtein
4 **
5 ** This program is free software; you can redistribute it and/or modify
6 ** it under the terms of the GNU General Public License as published by
7 ** the Free Software Foundation; either version 2 of the License, or
8 ** (at your option) any later version.
9 **
10 ** This program is distributed in the hope that it will be useful,
11 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
12 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 ** GNU General Public License for more details.
14 **
15 ** You should have received a copy of the GNU General Public License
16 ** along with this program; if not, write to the Free Software
17 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 **
19 ** File: oracledrv.h
20 **
21 **/
22
23 #ifndef _oracledrv_h_
24 #define _oracledrv_h_
25
26 #ifdef _WIN32
27 #include <winsock2.h>
28 #include <windows.h>
29 #define EXPORT __declspec(dllexport)
30 #else
31 #define EXPORT
32 #endif /* _WIN32 */
33
34 #include <nms_common.h>
35 #include <nms_util.h>
36 #include <dbdrv.h>
37 #include <oci.h>
38
39 typedef struct
40 {
41 WCHAR *pData;
42 ub2 nLength;
43 ub2 nCode;
44 sb2 isNull;
45 } ORACLE_FETCH_BUFFER;
46
47 typedef struct
48 {
49 OCIEnv *handleEnv;
50 OCIServer *handleServer;
51 OCISvcCtx *handleService;
52 OCISession *handleSession;
53 OCIStmt *handleStmt;
54 OCIError *handleError;
55 MUTEX mutexQueryLock;
56 int nTransLevel;
57 TCHAR szLastError[DBDRV_MAX_ERROR_TEXT];
58 ORACLE_FETCH_BUFFER *pBuffers;
59 int nCols;
60 } ORACLE_CONN;
61
62 typedef struct
63 {
64 int nRows;
65 int nCols;
66 WCHAR **pData;
67 } ORACLE_RESULT;
68
69 #endif /* _oracledrv_h_ */