blob: fbb7d56ae0a6bd669333108df271fa2ac610a0fd
1 | /* ***** BEGIN LICENSE BLOCK ***** |
2 | * Source last modified: $Id: helix_types.h,v 1.1.1.1.2.1 2005/05/04 18:20:57 hubbe Exp $ |
3 | * |
4 | * REALNETWORKS CONFIDENTIAL--NOT FOR DISTRIBUTION IN SOURCE CODE FORM |
5 | * Portions Copyright (c) 1995-2005 RealNetworks, Inc. |
6 | * All Rights Reserved. |
7 | * |
8 | * The contents of this file, and the files included with this file, |
9 | * are subject to the current version of the Real Format Source Code |
10 | * Porting and Optimization License, available at |
11 | * https://helixcommunity.org/2005/license/realformatsource (unless |
12 | * RealNetworks otherwise expressly agrees in writing that you are |
13 | * subject to a different license). You may also obtain the license |
14 | * terms directly from RealNetworks. You may not use this file except |
15 | * in compliance with the Real Format Source Code Porting and |
16 | * Optimization License. There are no redistribution rights for the |
17 | * source code of this file. Please see the Real Format Source Code |
18 | * Porting and Optimization License for the rights, obligations and |
19 | * limitations governing use of the contents of the file. |
20 | * |
21 | * RealNetworks is the developer of the Original Code and owns the |
22 | * copyrights in the portions it created. |
23 | * |
24 | * This file, and the files included with this file, is distributed and |
25 | * made available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, |
26 | * EITHER EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS ALL |
27 | * SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF |
28 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT |
29 | * OR NON-INFRINGEMENT. |
30 | * |
31 | * Technology Compatibility Kit Test Suite(s) Location: |
32 | * https://rarvcode-tck.helixcommunity.org |
33 | * |
34 | * Contributor(s): |
35 | * |
36 | * ***** END LICENSE BLOCK ***** */ |
37 | |
38 | #ifndef HELIX_TYPES_H |
39 | #define HELIX_TYPES_H |
40 | //#include <core/dsp.h> |
41 | #include "string.h" |
42 | #ifdef __cplusplus |
43 | extern "C" { |
44 | #endif /* #ifdef __cplusplus */ |
45 | |
46 | /* |
47 | * INT8 Type definition |
48 | * |
49 | * INT8 is a signed 8-bit type |
50 | */ |
51 | #ifndef INT8 |
52 | |
53 | #if defined(_SYMBIAN) |
54 | typedef TInt8 INT8; |
55 | #else /* #if defined(_SYMBIAN) */ |
56 | typedef char INT8; |
57 | #endif /* #if defined(_SYMBIAN) */ |
58 | |
59 | #endif /* #ifndef INT8 */ |
60 | |
61 | |
62 | /* |
63 | * CHAR - signed 8-bit value |
64 | */ |
65 | typedef INT8 CHAR; |
66 | |
67 | |
68 | /* |
69 | * UINT8 Type definition |
70 | * |
71 | * UINT8 is an unsigned 8-bit type |
72 | */ |
73 | #ifndef UINT8 |
74 | |
75 | #if defined(_SYMBIAN) |
76 | typedef TUint8 UINT8; |
77 | #else /* #if defined(_SYMBIAN) */ |
78 | typedef unsigned char UINT8; |
79 | #endif /* #if defined(_SYMBIAN) */ |
80 | |
81 | #endif /* #ifndef UINT8 */ |
82 | |
83 | /* |
84 | * BYTE Type definition |
85 | * |
86 | * BYTE is another name for a UINT8 |
87 | */ |
88 | typedef UINT8 BYTE; |
89 | |
90 | /* |
91 | * UCHAR Unsigned 8 bit value. |
92 | * |
93 | */ |
94 | typedef UINT8 UCHAR; |
95 | |
96 | /* |
97 | * INT16 Type definition |
98 | * |
99 | * INT16 is a signed 16-bit type |
100 | */ |
101 | #ifndef INT16 |
102 | |
103 | #if defined(_SYMBIAN) |
104 | typedef TInt16 INT16; |
105 | #else /* #if defined(_SYMBIAN) */ |
106 | typedef short int INT16; |
107 | #endif /* #if defined(_SYMBIAN) */ |
108 | |
109 | #endif /* #ifndef INT16 */ |
110 | |
111 | /* |
112 | * UINT16 Type definition |
113 | * |
114 | * UINT16 is an unsigned 16-bit type |
115 | */ |
116 | #ifndef UINT16 |
117 | |
118 | #if defined(_SYMBIAN) |
119 | typedef TUint16 UINT16; |
120 | #else /* #if defined(_SYMBIAN) */ |
121 | typedef unsigned short int UINT16; |
122 | #endif /* #if defined(_SYMBIAN) */ |
123 | |
124 | #endif /* #ifndef UINT16 */ |
125 | |
126 | /* |
127 | * INT32 Type definition |
128 | * |
129 | * INT32 is a signed 32-bit type |
130 | */ |
131 | #ifndef INT32 |
132 | |
133 | #if defined(_SYMBIAN) |
134 | typedef TInt32 INT32; |
135 | #elif defined(_UNIX) && defined(_LONG_IS_64) |
136 | typedef int INT32; |
137 | #elif defined(_VXWORKS) |
138 | typedef int INT32; |
139 | #else |
140 | typedef int INT32; |
141 | #endif |
142 | |
143 | #endif /* #ifndef INT32 */ |
144 | |
145 | /* |
146 | * LONG32 Type definition |
147 | * |
148 | * LONG32 is another name for a INT32 |
149 | */ |
150 | typedef INT32 LONG32; |
151 | |
152 | /* |
153 | * UINT32 Type definition |
154 | * |
155 | * UINT32 is an unsigned 32-bit type |
156 | */ |
157 | #ifndef UINT32 |
158 | |
159 | #if defined(_SYMBIAN) |
160 | typedef TUint32 UINT32; |
161 | #elif defined(_UNIX) && defined(_LONG_IS_64) |
162 | typedef unsigned int UINT32; |
163 | #elif defined(_VXWORKS) |
164 | typedef unsigned int UINT32; |
165 | #else |
166 | typedef unsigned long UINT32; |
167 | #endif |
168 | |
169 | #endif /* #ifndef UINT32 */ |
170 | |
171 | /* |
172 | * UFIXED32 Type definition |
173 | * |
174 | * UFIXED32 is another name for a UINT32 |
175 | */ |
176 | typedef UINT32 UFIXED32; |
177 | |
178 | /* |
179 | * ULONG32 Type definition |
180 | * |
181 | * ULONG32 is another name for a UINT32 |
182 | */ |
183 | typedef UINT32 ULONG32; |
184 | |
185 | /* |
186 | * HX_MOFTAG Type definition |
187 | * |
188 | * HX_MOFTAG is of type UINT32 |
189 | */ |
190 | typedef UINT32 HX_MOFTAG; |
191 | |
192 | /* |
193 | * HXBOOL Type definition |
194 | * |
195 | * HXBOOL is a boolean type |
196 | */ |
197 | #ifndef HXBOOL |
198 | |
199 | #if defined(_SYMBIAN) |
200 | typedef TBool HXBOOL; |
201 | #else /* #if defined(_SYMBIAN) */ |
202 | typedef int HXBOOL; |
203 | #endif /* #if defined(_SYMBIAN) */ |
204 | |
205 | #endif /* #ifndef HXBOOL */ |
206 | |
207 | /* |
208 | * BOOL Type definition |
209 | * |
210 | * BOOL is another name for a HXBOOL |
211 | */ |
212 | typedef HXBOOL BOOL; |
213 | |
214 | /* |
215 | * TRUE and FALSE definitions |
216 | */ |
217 | #ifdef TRUE |
218 | #undef TRUE |
219 | #endif |
220 | |
221 | #ifndef TRUE |
222 | #define TRUE 1 |
223 | #endif |
224 | |
225 | #ifdef FALSE |
226 | #undef FALSE |
227 | #endif |
228 | |
229 | #ifndef FALSE |
230 | #define FALSE 0 |
231 | #endif |
232 | |
233 | /* |
234 | * HX_BITFIELD Type definition |
235 | * |
236 | * HX_BITFIELD is a bitfield type. It would |
237 | * be used in conjunction with a field width |
238 | * parameter like this: |
239 | * |
240 | * HX_BITFIELD foo:2; |
241 | */ |
242 | #ifndef HX_BITFIELD |
243 | |
244 | typedef unsigned char HX_BITFIELD; |
245 | |
246 | #endif |
247 | |
248 | /* |
249 | * HXFLOAT Type definition |
250 | * |
251 | * HXFLOAT is a single-precision floating-point type |
252 | */ |
253 | #ifndef HXFLOAT |
254 | |
255 | typedef float HXFLOAT; |
256 | |
257 | #endif /* #ifndef HXFLOAT */ |
258 | |
259 | /* |
260 | * HXDOUBLE Type definition |
261 | * |
262 | * HXDOUBLE is a double-precision floating-point type |
263 | */ |
264 | #ifndef HXDOUBLE |
265 | |
266 | typedef double HXDOUBLE; |
267 | |
268 | #endif /* #ifndef HXDOUBLE */ |
269 | |
270 | /* |
271 | * HXNULL definition |
272 | */ |
273 | #ifndef HXNULL |
274 | #define HXNULL ((void *)0) |
275 | #endif |
276 | |
277 | /* |
278 | * Helix DATE type. |
279 | */ |
280 | |
281 | #define HX_YEAR_OFFSET 1900 |
282 | |
283 | typedef struct system_time { |
284 | UINT16 second; /* 0-59 */ |
285 | UINT16 minute; /* 0-59 */ |
286 | UINT16 hour; /* 0-23 */ |
287 | UINT16 dayofweek; /* 0-6 (Sunday = 0) */ |
288 | UINT16 dayofmonth;/* 1-31 */ |
289 | UINT16 dayofyear; /* 1-366 (January 1 = 1) */ |
290 | UINT16 month; /* 1-12 (January = 1) */ |
291 | UINT16 year; /* year - 1900 or (year - HX_YEAR_OFFSET) */ |
292 | INT16 gmtDelta; /* Greenwich Mean Time Delta in +/- hours */ |
293 | } HX_DATETIME; |
294 | |
295 | HX_DATETIME HX_GET_DATETIME(void); |
296 | |
297 | #define HXEXPORT_PTR * |
298 | #define HXEXPORT |
299 | #define ENTRYPOINT(func) func |
300 | |
301 | #ifdef __cplusplus |
302 | } |
303 | #endif /* #ifdef __cplusplus */ |
304 | |
305 | #endif /* #ifndef HELIX_TYPES_H */ |
306 |