winegstreamer: Keep a IMFMediaSource pointer in the media stream.
[wine.git] / include / sqltypes.h
blob70315c271c40e7a278e4b52f31805937d9ea1e9a
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 #if defined(WINE_UNICODE_NATIVE)
32 typedef wchar_t SQLWCHAR;
33 #elif __cpp_unicode_literals >= 200710
34 typedef char16_t SQLWCHAR;
35 #else
36 typedef unsigned short SQLWCHAR;
37 #endif
38 #ifndef UNICODE
39 typedef SQLCHAR SQLTCHAR;
40 #else
41 typedef SQLWCHAR SQLTCHAR;
42 #endif
44 #if (ODBCVER >= 0x0300)
45 typedef unsigned char SQLDATE;
46 typedef unsigned char SQLDECIMAL;
47 typedef double SQLDOUBLE;
48 typedef double SQLFLOAT;
49 #endif
51 typedef int SQLINTEGER;
53 #if (ODBCVER >= 0x0300)
54 typedef unsigned char SQLNUMERIC;
55 #endif
57 typedef void * SQLPOINTER;
59 #if (ODBCVER >= 0x0300)
60 typedef float SQLREAL;
61 #endif
63 typedef signed short int SQLSMALLINT;
64 typedef unsigned short SQLUSMALLINT;
66 #if (ODBCVER >= 0x0300)
67 typedef unsigned char SQLTIME;
68 typedef unsigned char SQLTIMESTAMP;
69 typedef unsigned char SQLVARCHAR;
70 #endif
72 typedef SQLSMALLINT SQLRETURN;
74 #if (ODBCVER >= 0x0300)
75 typedef void *SQLHANDLE;
76 typedef SQLHANDLE SQLHENV;
77 typedef SQLHANDLE SQLHDBC;
78 typedef SQLHANDLE SQLHSTMT;
79 typedef SQLHANDLE SQLHDESC;
80 #else
81 typedef void *SQLHENV;
82 typedef void *SQLHDBC;
83 typedef void *SQLHSTMT;
84 #endif
86 typedef signed char SCHAR;
87 typedef SCHAR SQLSCHAR;
88 typedef int SDWORD;
89 typedef signed short int SWORD;
90 typedef unsigned int UDWORD;
91 typedef unsigned short int UWORD;
92 typedef UDWORD SQLUINTEGER;
93 typedef signed long SLONG;
94 typedef signed short SSHORT;
95 typedef double SDOUBLE;
96 typedef double LDOUBLE;
97 typedef float SFLOAT;
98 typedef void* PTR;
99 typedef signed short RETCODE;
100 typedef void* SQLHWND;
102 #ifdef _WIN64
103 typedef INT64 SQLLEN;
104 typedef UINT64 SQLULEN;
105 typedef UINT64 SQLSETPOSIROW;
106 #else
107 #define SQLLEN SQLINTEGER
108 #define SQLULEN SQLUINTEGER
109 #define SQLSETPOSIROW SQLUSMALLINT
110 #endif
112 typedef SQLHANDLE HENV;
113 typedef SQLHANDLE HDBC;
114 typedef SQLHANDLE HSTMT;
116 #ifndef __SQLDATE
117 #define __SQLDATE
118 typedef struct tagDATE_STRUCT
120 SQLSMALLINT year;
121 SQLUSMALLINT month;
122 SQLUSMALLINT day;
123 } DATE_STRUCT;
125 #if (ODBCVER >= 0x0300)
126 typedef DATE_STRUCT SQL_DATE_STRUCT;
127 #endif
129 typedef struct tagTIME_STRUCT
131 SQLUSMALLINT hour;
132 SQLUSMALLINT minute;
133 SQLUSMALLINT second;
134 } TIME_STRUCT;
136 #if (ODBCVER >= 0x0300)
137 typedef TIME_STRUCT SQL_TIME_STRUCT;
138 #endif
140 typedef struct tagTIMESTAMP_STRUCT
142 SQLSMALLINT year;
143 SQLUSMALLINT month;
144 SQLUSMALLINT day;
145 SQLUSMALLINT hour;
146 SQLUSMALLINT minute;
147 SQLUSMALLINT second;
148 SQLUINTEGER fraction;
149 } TIMESTAMP_STRUCT;
151 #if (ODBCVER >= 0x0300)
152 typedef TIMESTAMP_STRUCT SQL_TIMESTAMP_STRUCT;
153 #endif
156 #if (ODBCVER >= 0x0300)
157 typedef enum
159 SQL_IS_YEAR = 1,
160 SQL_IS_MONTH = 2,
161 SQL_IS_DAY = 3,
162 SQL_IS_HOUR = 4,
163 SQL_IS_MINUTE = 5,
164 SQL_IS_SECOND = 6,
165 SQL_IS_YEAR_TO_MONTH = 7,
166 SQL_IS_DAY_TO_HOUR = 8,
167 SQL_IS_DAY_TO_MINUTE = 9,
168 SQL_IS_DAY_TO_SECOND = 10,
169 SQL_IS_HOUR_TO_MINUTE = 11,
170 SQL_IS_HOUR_TO_SECOND = 12,
171 SQL_IS_MINUTE_TO_SECOND = 13
172 } SQLINTERVAL;
174 #endif
176 #if (ODBCVER >= 0x0300)
177 typedef struct tagSQL_YEAR_MONTH
179 SQLUINTEGER year;
180 SQLUINTEGER month;
181 } SQL_YEAR_MONTH_STRUCT;
183 typedef struct tagSQL_DAY_SECOND
185 SQLUINTEGER day;
186 SQLUINTEGER hour;
187 SQLUINTEGER minute;
188 SQLUINTEGER second;
189 SQLUINTEGER fraction;
190 } SQL_DAY_SECOND_STRUCT;
192 typedef struct tagSQL_INTERVAL_STRUCT
194 SQLINTERVAL interval_type;
195 SQLSMALLINT interval_sign;
196 union {
197 SQL_YEAR_MONTH_STRUCT year_month;
198 SQL_DAY_SECOND_STRUCT day_second;
199 } intval;
201 } SQL_INTERVAL_STRUCT;
203 #endif
205 #endif
207 #if (ODBCVER >= 0x0300)
208 #define ODBCINT64 __int64
209 #define UODBCINT64 unsigned __int64
210 #ifdef ODBCINT64
211 typedef ODBCINT64 SQLBIGINT;
212 typedef unsigned ODBCINT64 SQLUBIGINT;
213 #endif
214 #endif
216 #if (ODBCVER >= 0x0300)
217 #define SQL_MAX_NUMERIC_LEN 16
218 typedef struct tagSQL_NUMERIC_STRUCT
220 SQLCHAR precision;
221 SQLSCHAR scale;
222 SQLCHAR sign; /* 1=pos 0=neg */
223 SQLCHAR val[SQL_MAX_NUMERIC_LEN];
224 } SQL_NUMERIC_STRUCT;
225 #endif
227 #if (ODBCVER >= 0x0350)
228 #ifdef GUID_DEFINED
229 typedef GUID SQLGUID;
230 #else
231 typedef struct tagSQLGUID
233 DWORD Data1;
234 WORD Data2;
235 WORD Data3;
236 BYTE Data4[ 8 ];
237 } SQLGUID;
238 #endif
239 #endif
242 typedef SQLULEN BOOKMARK;
244 #ifdef __cplusplus
246 #endif
248 #endif