dmstyle: Declare some functions static.
[wine/multimedia.git] / include / sqltypes.h
blob6f1d25fbb3d563f695141ae256023c9c4d240f45
1 /*
2 * Copyright (C) 1999 Xiang Li
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #ifndef __SQLTYPES_H
20 #define __SQLTYPES_H
22 #ifndef ODBCVER
23 #define ODBCVER 0x0351
24 #endif
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
30 typedef unsigned char SQLCHAR;
31 #ifdef WINE_UNICODE_NATIVE
32 typedef wchar_t SQLWCHAR;
33 #else
34 typedef unsigned short SQLWCHAR;
35 #endif
36 #ifndef UNICODE
37 typedef SQLCHAR SQLTCHAR;
38 #else
39 typedef SQLWCHAR SQLTCHAR;
40 #endif
42 #if (ODBCVER >= 0x0300)
43 typedef unsigned char SQLDATE;
44 typedef unsigned char SQLDECIMAL;
45 typedef double SQLDOUBLE;
46 typedef double SQLFLOAT;
47 #endif
49 typedef long SQLINTEGER;
51 #if (ODBCVER >= 0x0300)
52 typedef unsigned char SQLNUMERIC;
53 #endif
55 typedef void * SQLPOINTER;
57 #if (ODBCVER >= 0x0300)
58 typedef float SQLREAL;
59 #endif
61 typedef signed short int SQLSMALLINT;
62 typedef unsigned short SQLUSMALLINT;
64 #if (ODBCVER >= 0x0300)
65 typedef unsigned char SQLTIME;
66 typedef unsigned char SQLTIMESTAMP;
67 typedef unsigned char SQLVARCHAR;
68 #endif
70 typedef SQLSMALLINT SQLRETURN;
72 /* typedef void * SQLHANDLE; */
74 typedef SQLINTEGER SQLHANDLE;
75 #if (ODBCVER >= 0x0300)
77 typedef SQLHANDLE SQLHENV;
78 typedef SQLHANDLE SQLHDBC;
79 typedef SQLHANDLE SQLHSTMT;
80 typedef SQLHANDLE SQLHDESC;
82 #else
83 typedef SQLINTEGER SQLHENV;
84 typedef SQLINTEGER SQLHDBC;
85 typedef SQLINTEGER SQLHSTMT;
86 #endif
88 typedef signed char SCHAR;
89 typedef SCHAR SQLSCHAR;
90 typedef long int SDWORD;
91 typedef signed short int SWORD;
92 typedef unsigned long int UDWORD;
93 typedef unsigned short int UWORD;
94 typedef UDWORD SQLUINTEGER;
95 typedef signed long SLONG;
96 typedef signed short SSHORT;
97 typedef double SDOUBLE;
98 typedef double LDOUBLE;
99 typedef float SFLOAT;
100 typedef void* PTR;
101 typedef signed short RETCODE;
102 typedef void* SQLHWND;
104 typedef SQLHANDLE HENV;
105 typedef SQLHANDLE HDBC;
106 typedef SQLHANDLE HSTMT;
108 #ifndef __SQLDATE
109 #define __SQLDATE
110 typedef struct tagDATE_STRUCT
112 SQLSMALLINT year;
113 SQLUSMALLINT month;
114 SQLUSMALLINT day;
115 } DATE_STRUCT;
117 #if (ODBCVER >= 0x0300)
118 typedef DATE_STRUCT SQL_DATE_STRUCT;
119 #endif
121 typedef struct tagTIME_STRUCT
123 SQLUSMALLINT hour;
124 SQLUSMALLINT minute;
125 SQLUSMALLINT second;
126 } TIME_STRUCT;
128 #if (ODBCVER >= 0x0300)
129 typedef TIME_STRUCT SQL_TIME_STRUCT;
130 #endif
132 typedef struct tagTIMESTAMP_STRUCT
134 SQLSMALLINT year;
135 SQLUSMALLINT month;
136 SQLUSMALLINT day;
137 SQLUSMALLINT hour;
138 SQLUSMALLINT minute;
139 SQLUSMALLINT second;
140 SQLUINTEGER fraction;
141 } TIMESTAMP_STRUCT;
143 #if (ODBCVER >= 0x0300)
144 typedef TIMESTAMP_STRUCT SQL_TIMESTAMP_STRUCT;
145 #endif
148 #if (ODBCVER >= 0x0300)
149 typedef enum
151 SQL_IS_YEAR = 1,
152 SQL_IS_MONTH = 2,
153 SQL_IS_DAY = 3,
154 SQL_IS_HOUR = 4,
155 SQL_IS_MINUTE = 5,
156 SQL_IS_SECOND = 6,
157 SQL_IS_YEAR_TO_MONTH = 7,
158 SQL_IS_DAY_TO_HOUR = 8,
159 SQL_IS_DAY_TO_MINUTE = 9,
160 SQL_IS_DAY_TO_SECOND = 10,
161 SQL_IS_HOUR_TO_MINUTE = 11,
162 SQL_IS_HOUR_TO_SECOND = 12,
163 SQL_IS_MINUTE_TO_SECOND = 13
164 } SQLINTERVAL;
166 #endif
168 #if (ODBCVER >= 0x0300)
169 typedef struct tagSQL_YEAR_MONTH
171 SQLUINTEGER year;
172 SQLUINTEGER month;
173 } SQL_YEAR_MONTH_STRUCT;
175 typedef struct tagSQL_DAY_SECOND
177 SQLUINTEGER day;
178 SQLUINTEGER hour;
179 SQLUINTEGER minute;
180 SQLUINTEGER second;
181 SQLUINTEGER fraction;
182 } SQL_DAY_SECOND_STRUCT;
184 typedef struct tagSQL_INTERVAL_STRUCT
186 SQLINTERVAL interval_type;
187 SQLSMALLINT interval_sign;
188 union {
189 SQL_YEAR_MONTH_STRUCT year_month;
190 SQL_DAY_SECOND_STRUCT day_second;
191 } intval;
193 } SQL_INTERVAL_STRUCT;
195 #endif
197 #endif
199 #if (ODBCVER >= 0x0300)
200 #define ODBCINT64 long
201 #ifdef ODBCINT64
202 typedef ODBCINT64 SQLBIGINT;
203 typedef unsigned ODBCINT64 SQLUBIGINT;
204 #endif
205 #endif
207 #if (ODBCVER >= 0x0300)
208 #define SQL_MAX_NUMERIC_LEN 16
209 typedef struct tagSQL_NUMERIC_STRUCT
211 SQLCHAR precision;
212 SQLSCHAR scale;
213 SQLCHAR sign; /* 1=pos 0=neg */
214 SQLCHAR val[SQL_MAX_NUMERIC_LEN];
215 } SQL_NUMERIC_STRUCT;
216 #endif
218 #if (ODBCVER >= 0x0350)
219 #ifdef GUID_DEFINED
220 typedef GUID SQLGUID;
221 #else
222 typedef struct tagSQLGUID
224 DWORD Data1;
225 WORD Data2;
226 WORD Data3;
227 BYTE Data4[ 8 ];
228 } SQLGUID;
229 #endif
230 #endif
233 typedef unsigned long int BOOKMARK;
235 #define SQL_WCHAR (-8)
236 #define SQL_C_WCHAR SQL_WCHAR
238 #ifdef __cplusplus
240 #endif
242 #endif