1 // Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // e32\include\e32hal.h |
|
15 // |
|
16 // |
|
17 |
|
18 #ifndef __E32HAL_H__ |
|
19 #define __E32HAL_H__ |
|
20 #include <e32cmn.h> |
|
21 |
|
22 /** |
|
23 @publishedPartner |
|
24 @deprecated No replacement. |
|
25 */ |
|
26 const TInt KMaxRomDevices=8; |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 /** |
|
32 @publishedPartner |
|
33 @released |
|
34 |
|
35 Defines the calibration settings that can be restored by |
|
36 the digitiser's implementation of DDigitiser::RestoreXYInputCalibration. |
|
37 |
|
38 See the digitiser template port in: |
|
39 @code |
|
40 ...\template\template_variant\specific\xyin.cpp |
|
41 @endcode |
|
42 |
|
43 @see DDigitiser::RestoreXYInputCalibration() |
|
44 */ |
|
45 enum TDigitizerCalibrationType |
|
46 { |
|
47 EFactory, /**< Restore to factory settings. */ |
|
48 ESaved /**< Restore to saved settings. */ |
|
49 }; |
|
50 |
|
51 |
|
52 |
|
53 |
|
54 /** |
|
55 @publishedPartner |
|
56 @released |
|
57 |
|
58 Defines the screen coordinates of the point touched during calibration. |
|
59 |
|
60 An object of this type is passed, via a TPckgBuf, to the HAL handler |
|
61 that deals with the HAL group function-id pair: |
|
62 - EHalGroupDigitiser, EDigitiserHalSetXYInputCalibration |
|
63 - EHalGroupDigitiser, EDigitiserHalCalibrationPoints |
|
64 - EHalGroupDigitiser, EDigitiserHalRestoreXYInputCalibration |
|
65 |
|
66 @see EDigitiserHalSetXYInputCalibration |
|
67 @see EDigitiserHalCalibrationPoints |
|
68 @see EDigitiserHalRestoreXYInputCalibration |
|
69 @see TDigitiserHalFunction |
|
70 @see EHalGroupDigitiser |
|
71 @see TPckgBuf |
|
72 */ |
|
73 class TDigitizerCalibration |
|
74 { |
|
75 public: |
|
76 TPoint iTl; /**< Top left point.*/ |
|
77 TPoint iBl; /**< Bottom left point. */ |
|
78 TPoint iTr; /**< Top right point.*/ |
|
79 TPoint iBr; /**< Bottom right point.*/ |
|
80 }; |
|
81 |
|
82 |
|
83 |
|
84 |
|
85 /** |
|
86 @publishedPartner |
|
87 @released |
|
88 |
|
89 An enum that identifies the full set of keyboard types. |
|
90 |
|
91 A variable of this type is defined and used in the TKeyboardInfoV01 struct. |
|
92 |
|
93 @see TKeyboardInfoV01::iKeyboardType. |
|
94 */ |
|
95 enum TKeyboard |
|
96 { |
|
97 EKeyboard_Keypad=1, /**< Keypad type*/ |
|
98 EKeyboard_Full=2, /**< Full keyboard type*/ |
|
99 }; |
|
100 |
|
101 |
|
102 |
|
103 |
|
104 /** |
|
105 @publishedPartner |
|
106 @released |
|
107 |
|
108 Encapsulates information about the keyboard. |
|
109 |
|
110 NOTE that the information represented here is not used by Symbian OS, |
|
111 and exists to maintain binary compatibilty with older versions. |
|
112 |
|
113 However, keyboard drivers that implement the HAL handler for |
|
114 the EHalGroupKeyboard group still need to return a default object |
|
115 of this type. |
|
116 See the template port. |
|
117 |
|
118 An object of this type is passed, via a TPckgBuf, to the HAL handler |
|
119 that deals with the HAL group function-id pair: |
|
120 - EHalGroupKeyboard, EKeyboardHalKeyboardInfo; |
|
121 |
|
122 @see EKeyboardHalKeyboardInfo |
|
123 @see TKeyboardHalFunction |
|
124 @see EHalGroupKeyboard |
|
125 @see TPckgBuf |
|
126 */ |
|
127 class TKeyboardInfoV01 |
|
128 { |
|
129 public: |
|
130 /** |
|
131 The number of device keys. |
|
132 |
|
133 NOTE that the information represented by this variable is not |
|
134 used by Symbian OS, and exists to maintain binary compatibility |
|
135 with older versions. |
|
136 */ |
|
137 TInt iDeviceKeys; |
|
138 |
|
139 |
|
140 /** |
|
141 The number of application keys. |
|
142 |
|
143 NOTE that the information represented by this variable is not |
|
144 used by Symbian OS, and exists to maintain binary compatibility |
|
145 with older versions. |
|
146 */ |
|
147 TInt iAppsKeys; |
|
148 |
|
149 |
|
150 /** |
|
151 Defines the type of keyboard available as enumerated by |
|
152 the TKeyboard enum. |
|
153 |
|
154 NOTE that the information represented by this variable is not |
|
155 used by Symbian OS, and exists to maintain binary compatibility |
|
156 with older versions. |
|
157 |
|
158 @see TKeyboard |
|
159 */ |
|
160 TKeyboard iKeyboardType; |
|
161 }; |
|
162 |
|
163 |
|
164 |
|
165 |
|
166 /** |
|
167 @publishedPartner |
|
168 @released |
|
169 |
|
170 Package buffer for a TKeyboardInfoV01 object. |
|
171 |
|
172 @see TKeyboardInfoV01 |
|
173 */ |
|
174 typedef TPckgBuf<TKeyboardInfoV01> TKeyboardInfoV01Buf; |
|
175 |
|
176 |
|
177 |
|
178 |
|
179 /** |
|
180 @publishedPartner |
|
181 @released |
|
182 |
|
183 Encapsulates information about the digitiser. |
|
184 |
|
185 An object of this type is passed, via a TPckgBuf, to the HAL handler |
|
186 that deals with the HAL group function-id pair: |
|
187 - EHalGroupDigitiser, EDigitiserHalXYInfo; |
|
188 |
|
189 @see EDigitiserHalXYInfo |
|
190 @see TDigitiserHalFunction |
|
191 @see EHalGroupDigitiser |
|
192 @see TPckgBuf |
|
193 */ |
|
194 class TDigitiserInfoV01 |
|
195 { |
|
196 public: |
|
197 TPoint iOffsetToDisplay;/**< The offset in pixels from the digitiser usable area to the display area. */ |
|
198 TSize iDigitiserSize; /**< The width/height of the display in pixels as used by digitiser.*/ |
|
199 }; |
|
200 |
|
201 |
|
202 /** |
|
203 @publishedPartner |
|
204 @prototype |
|
205 |
|
206 Encapsulates extra information required by 3 dimensional pointing devices. |
|
207 */ |
|
208 class TDigitiserInfoV02 : public TDigitiserInfoV01 |
|
209 { |
|
210 TInt iZRange; /**< The maximum distance to screen a pointing device will be detected (settable).*/ |
|
211 TUint8 iThetaSupported; /**< A Boolean value that indicates if Theta polar angle detection (tilt) is supported.*/ |
|
212 TUint8 iPhiSupported; /**< A Boolean value that indicates if Phi polar angle detection (tilt) is supported.*/ |
|
213 TUint8 iAlphaSupported; /**< A Boolean value that indicates if rotation of the pointing device along its main axis is supported.*/ |
|
214 TUint8 iPressureSupported; /**< A Boolean value that indicates if pressure applied on screen is supported.*/ |
|
215 }; |
|
216 |
|
217 |
|
218 /** |
|
219 @publishedPartner |
|
220 @released |
|
221 |
|
222 Package buffer for a TDigitiserInfoV01 object. |
|
223 |
|
224 @see TDigitiserInfoV01 |
|
225 */ |
|
226 typedef TPckgBuf<TDigitiserInfoV01> TDigitiserInfoV01Buf; |
|
227 |
|
228 /** |
|
229 @publishedPartner |
|
230 @prototype |
|
231 |
|
232 Package buffer for a TDigitiserInfoV02 object. |
|
233 |
|
234 @see TDigitiserInfoV02 |
|
235 */ |
|
236 typedef TPckgBuf<TDigitiserInfoV02> TDigitiserInfoV02Buf; |
|
237 |
|
238 /** |
|
239 @publishedPartner |
|
240 @released |
|
241 |
|
242 Encapsulates information about the mouse display characteristics. |
|
243 |
|
244 An object of this type is passed, via a TPckgBuf, to the HAL handler |
|
245 that deals with the HAL group function-id pair: |
|
246 - EHalGroupMouse, EMouseHalMouseInfo; |
|
247 |
|
248 @see EMouseHalMouseInfo |
|
249 @see TMouseHalFunction |
|
250 @see EHalGroupMouse |
|
251 @see TPckgBuf |
|
252 */ |
|
253 class TMouseInfoV01 |
|
254 { |
|
255 public: |
|
256 TInt iMouseButtons; /**< The number of mouse buttons.*/ |
|
257 TPoint iOffsetToDisplay; /**< The offset in pixels from the mouse usable area to the display area.*/ |
|
258 TSize iMouseAreaSize; /**< The width/height of the display in pixels as used by the mouse. */ |
|
259 }; |
|
260 |
|
261 |
|
262 |
|
263 |
|
264 /** |
|
265 @publishedPartner |
|
266 @released |
|
267 |
|
268 Package buffer for a TMouseInfoV01 object. |
|
269 |
|
270 @see TMouseInfoV01 |
|
271 */ |
|
272 typedef TPckgBuf<TMouseInfoV01> TMouseInfoV01Buf; |
|
273 |
|
274 |
|
275 |
|
276 /** |
|
277 @publishedPartner |
|
278 @released |
|
279 |
|
280 Encapsulates Variant specific information. |
|
281 |
|
282 An object of this type is passed, via a TPckgBuf, to the HAL handler |
|
283 that deals with the HAL group function-id pair: |
|
284 - EHalGroupVariant, EVariantHalVariantInfo; |
|
285 |
|
286 @see EVariantHalVariantInfo |
|
287 @see TVariantHalFunction |
|
288 @see EHalGroupVariant |
|
289 @see TPckgBuf |
|
290 */ |
|
291 class TVariantInfoV01 |
|
292 { |
|
293 public: |
|
294 /** |
|
295 The ROM version. |
|
296 */ |
|
297 TVersion iRomVersion; |
|
298 |
|
299 /** |
|
300 The Id that uniquely identifies the device. |
|
301 */ |
|
302 SInt64 iMachineUniqueId; |
|
303 |
|
304 /** |
|
305 The bits that represent the LED capabilities. |
|
306 |
|
307 NB capabilities in this context does not mean security capabilities. |
|
308 */ |
|
309 TUint iLedCapabilities; |
|
310 |
|
311 /** |
|
312 The processor clock speed. |
|
313 */ |
|
314 TInt iProcessorClockInKHz; |
|
315 |
|
316 /** |
|
317 The speed factor. |
|
318 */ |
|
319 TInt iSpeedFactor; |
|
320 }; |
|
321 |
|
322 |
|
323 |
|
324 |
|
325 /** |
|
326 @publishedPartner |
|
327 @released |
|
328 |
|
329 Package buffer for a TVariantInfoV01 object. |
|
330 |
|
331 @see TVariantInfoV01 |
|
332 */ |
|
333 typedef TPckgBuf<TVariantInfoV01> TVariantInfoV01Buf; |
|
334 |
|
335 |
|
336 |
|
337 |
|
338 /** |
|
339 @publishedPartner |
|
340 @deprecated Use HAL::Get() from the HAL library instead with attributes ESystemStartupReason. |
|
341 |
|
342 The reason that the device last reset |
|
343 |
|
344 Note that not all reasons can occur on all devices. |
|
345 */ |
|
346 enum TMachineStartupType |
|
347 { |
|
348 EStartupCold,EStartupColdReset,EStartupNewOs, |
|
349 EStartupPowerFail,EStartupWarmReset,EStartupKernelFault, |
|
350 EStartupSafeReset |
|
351 }; |
|
352 |
|
353 |
|
354 |
|
355 |
|
356 /** |
|
357 @publishedPartner |
|
358 @deprecated Use HAL::Get() from the HAL library instead with attributes EPen or EMouse. |
|
359 |
|
360 The XY input method supported |
|
361 */ |
|
362 enum TXYInputType |
|
363 { |
|
364 EXYInputNone, |
|
365 EXYInputPointer, |
|
366 EXYInputMouse, |
|
367 EXYInputDeltaMouse |
|
368 }; |
|
369 |
|
370 |
|
371 |
|
372 /** |
|
373 @publishedPartner |
|
374 @deprecated Use HAL::Get() from the HAL library instead. |
|
375 |
|
376 Miscellaneous machine info. |
|
377 */ |
|
378 class TMachineInfoV1 |
|
379 { |
|
380 public: |
|
381 TVersion iRomVersion; |
|
382 TXYInputType iXYInputType; |
|
383 TBool iKeyboardPresent; |
|
384 TBool iBacklightPresent; |
|
385 TSize iDisplaySizeInPixels; |
|
386 TSize iXYInputSizeInPixels; |
|
387 TSize iPhysicalScreenSize; |
|
388 TPoint iOffsetToDisplayInPixels; |
|
389 TInt iKeyboardId; |
|
390 TInt iDisplayId; |
|
391 SInt64 iMachineUniqueId; |
|
392 TUint iLedCapabilities; |
|
393 TInt iProcessorClockInKHz; |
|
394 TInt iSpeedFactor; |
|
395 TInt iMaximumDisplayColors; |
|
396 }; |
|
397 /** |
|
398 @publishedPartner |
|
399 @deprecated |
|
400 */ |
|
401 typedef TPckgBuf<TMachineInfoV1> TMachineInfoV1Buf; |
|
402 |
|
403 |
|
404 |
|
405 |
|
406 /** |
|
407 @publishedPartner |
|
408 @deprecated Use HAL::Get() from the HAL library instead with attributes ELanguageIndex or EKeyboardIndex. |
|
409 |
|
410 Miscellaneous locale info. |
|
411 */ |
|
412 class TMachineInfoV2 : public TMachineInfoV1 |
|
413 { |
|
414 public: |
|
415 TInt iLanguageIndex; |
|
416 TInt iKeyboardIndex; |
|
417 }; |
|
418 /** |
|
419 @publishedPartner |
|
420 @deprecated |
|
421 */ |
|
422 typedef TPckgBuf<TMachineInfoV2> TMachineInfoV2Buf; |
|
423 |
|
424 |
|
425 |
|
426 |
|
427 /** |
|
428 @publishedPartner |
|
429 @deprecated Use HAL::Get() from the HAL library instead with attributes EMemoryRAM, EMemoryRAMFree or EMemoryROM. |
|
430 |
|
431 Miscellaneous memory info. |
|
432 */ |
|
433 class TMemoryInfoV1 |
|
434 { |
|
435 public: |
|
436 TInt iTotalRamInBytes; |
|
437 TInt iTotalRomInBytes; |
|
438 TInt iMaxFreeRamInBytes; |
|
439 TInt iFreeRamInBytes; |
|
440 TInt iInternalDiskRamInBytes; |
|
441 TBool iRomIsReprogrammable; |
|
442 }; |
|
443 /** |
|
444 @publishedPartner |
|
445 @deprecated |
|
446 */ |
|
447 typedef TPckgBuf<TMemoryInfoV1> TMemoryInfoV1Buf; |
|
448 |
|
449 |
|
450 |
|
451 |
|
452 /** |
|
453 @publishedPartner |
|
454 @deprecated No replacement. |
|
455 |
|
456 Miscellaneous ROM info. |
|
457 */ |
|
458 class TRomInfoEntryV1 |
|
459 { |
|
460 public: |
|
461 enum TRomTypeV1 |
|
462 { |
|
463 ERomTypeRom=0, |
|
464 ERomTypeFlash=1 |
|
465 }; |
|
466 TInt iSize; // size of ROM in bytes, 0=no ROM present |
|
467 TInt iWidth; // bus width in bits |
|
468 TInt iSpeed; // number of wait states |
|
469 TRomTypeV1 iType; // 0=ROM, 1=FLASH |
|
470 }; |
|
471 |
|
472 |
|
473 |
|
474 |
|
475 /** |
|
476 @publishedPartner |
|
477 @deprecated No replacement. |
|
478 |
|
479 Miscellaneous ROM info. |
|
480 */ |
|
481 class TRomInfoV1 |
|
482 { |
|
483 public: |
|
484 TRomInfoEntryV1 iEntry[KMaxRomDevices]; |
|
485 }; |
|
486 /** |
|
487 @publishedPartner |
|
488 @deprecated |
|
489 */ |
|
490 typedef TPckgBuf<TRomInfoV1> TRomInfoV1Buf; |
|
491 |
|
492 /** |
|
493 @publishedPartner |
|
494 @released |
|
495 */ |
|
496 const TUint KRuggedFileSystem=0x01; |
|
497 |
|
498 /** |
|
499 @publishedPartner |
|
500 @released |
|
501 */ |
|
502 class TDriveInfoV1 |
|
503 { |
|
504 public: |
|
505 TInt iTotalSupportedDrives; |
|
506 TInfoName iDriveName[KMaxLocalDrives]; |
|
507 TInt iTotalSockets; |
|
508 TInfoName iSocketName[KMaxPBusSockets]; |
|
509 TInt iRuggedFileSystem; |
|
510 TUint iRegisteredDriveBitmask; |
|
511 }; |
|
512 /** |
|
513 @publishedPartner |
|
514 @released |
|
515 */ |
|
516 typedef TPckgBuf<TDriveInfoV1> TDriveInfoV1Buf; |
|
517 |
|
518 #if defined(_UNICODE) && !defined(__KERNEL_MODE__) |
|
519 /** |
|
520 @publishedPartner |
|
521 @released |
|
522 */ |
|
523 class TDriveInfoV18 |
|
524 { |
|
525 public: |
|
526 TInt iTotalSupportedDrives; |
|
527 TBuf8<KMaxInfoName> iDriveName[KMaxLocalDrives]; //TInfoName |
|
528 TInt iTotalSockets; |
|
529 TBuf8<KMaxInfoName> iSocketName[KMaxPBusSockets]; //TInfoName |
|
530 TInt iRuggedFileSystem; |
|
531 TUint iRegisteredDriveBitmask; |
|
532 }; |
|
533 /** |
|
534 @publishedPartner |
|
535 @released |
|
536 */ |
|
537 typedef TPckgBuf<TDriveInfoV18> TDriveInfoV1Buf8; |
|
538 #else |
|
539 typedef TDriveInfoV1 TDriveInfoV18; |
|
540 typedef TDriveInfoV1Buf TDriveInfoV1Buf8; |
|
541 #endif |
|
542 |
|
543 /** |
|
544 @publishedPartner |
|
545 @released |
|
546 */ |
|
547 class TExcInfo |
|
548 { |
|
549 public: |
|
550 TAny *iCodeAddress; |
|
551 TAny *iDataAddress; |
|
552 TInt iExtraData; |
|
553 }; |
|
554 |
|
555 #ifndef __KERNEL_MODE__ |
|
556 #include <e32std.h> |
|
557 |
|
558 |
|
559 |
|
560 |
|
561 /** |
|
562 @publishedPartner |
|
563 @released |
|
564 |
|
565 A set of user side utility functions for acessing hardware related |
|
566 information. |
|
567 |
|
568 Four of these functions are DEPRECATED and should NOT be used; some of |
|
569 these functions have replacements, but others do not; see the description of |
|
570 the individual functions. |
|
571 |
|
572 The following functions are not deprecated, but are only used by Symbian |
|
573 OS as part of its internal implementation: |
|
574 - UserHal::FaultReason() |
|
575 - UserHal::ExceptionId() |
|
576 - UserHal::ExceptionInfo() |
|
577 - UserHal::PageSizeInBytes() |
|
578 - UserHal::TickPeriod() |
|
579 - UserHal::DriveInfo() |
|
580 - UserHal::SwitchOff() |
|
581 - UserHal::SetXYInputCalibration() |
|
582 - UserHal::CalibrationPoints() |
|
583 - UserHal::SaveXYInputCalibration() |
|
584 - UserHal::RestoreXYInputCalibration() |
|
585 */ |
|
586 class UserHal |
|
587 { |
|
588 public: |
|
589 // kernel group |
|
590 IMPORT_C static TInt MemoryInfo(TDes8& anInfo); |
|
591 IMPORT_C static TInt RomInfo(TDes8& anInfo); |
|
592 IMPORT_C static TInt StartupReason(TMachineStartupType& aReason); |
|
593 IMPORT_C static TInt FaultReason(TInt &aReason); |
|
594 IMPORT_C static TInt ExceptionId(TInt &anId); |
|
595 IMPORT_C static TInt ExceptionInfo(TExcInfo &aInfo); |
|
596 IMPORT_C static TInt PageSizeInBytes(TInt& aSize); |
|
597 |
|
598 // variant group |
|
599 IMPORT_C static TInt MachineInfo(TDes8& anInfo); |
|
600 IMPORT_C static TInt TickPeriod(TTimeIntervalMicroSeconds32& aPeriod); |
|
601 |
|
602 // media group |
|
603 IMPORT_C static TInt DriveInfo(TDes8& anInfo); |
|
604 |
|
605 // power group |
|
606 IMPORT_C static TInt SwitchOff(); |
|
607 |
|
608 // digitiser group |
|
609 IMPORT_C static TInt SetXYInputCalibration(const TDigitizerCalibration& aCalibration); |
|
610 IMPORT_C static TInt CalibrationPoints(TDigitizerCalibration& aCalibration); |
|
611 IMPORT_C static TInt SaveXYInputCalibration(); |
|
612 IMPORT_C static TInt RestoreXYInputCalibration(TDigitizerCalibrationType aType); |
|
613 }; |
|
614 #endif |
|
615 #endif |
|