1.1 --- a/epoc32/include/e32hal.h Wed Mar 31 12:27:01 2010 +0100
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,615 +0,0 @@
1.4 -// Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 -// All rights reserved.
1.6 -// This component and the accompanying materials are made available
1.7 -// 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
1.8 -// which accompanies this distribution, and is available
1.9 -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.10 -//
1.11 -// Initial Contributors:
1.12 -// Nokia Corporation - initial contribution.
1.13 -//
1.14 -// Contributors:
1.15 -//
1.16 -// Description:
1.17 -// e32\include\e32hal.h
1.18 -//
1.19 -//
1.20 -
1.21 -#ifndef __E32HAL_H__
1.22 -#define __E32HAL_H__
1.23 -#include <e32cmn.h>
1.24 -
1.25 -/**
1.26 -@publishedPartner
1.27 -@deprecated No replacement.
1.28 -*/
1.29 -const TInt KMaxRomDevices=8;
1.30 -
1.31 -
1.32 -
1.33 -
1.34 -/**
1.35 -@publishedPartner
1.36 -@released
1.37 -
1.38 -Defines the calibration settings that can be restored by
1.39 -the digitiser's implementation of DDigitiser::RestoreXYInputCalibration.
1.40 -
1.41 -See the digitiser template port in:
1.42 -@code
1.43 -...\template\template_variant\specific\xyin.cpp
1.44 -@endcode
1.45 -
1.46 -@see DDigitiser::RestoreXYInputCalibration()
1.47 -*/
1.48 -enum TDigitizerCalibrationType
1.49 - {
1.50 - EFactory, /**< Restore to factory settings. */
1.51 - ESaved /**< Restore to saved settings. */
1.52 - };
1.53 -
1.54 -
1.55 -
1.56 -
1.57 -/**
1.58 -@publishedPartner
1.59 -@released
1.60 -
1.61 -Defines the screen coordinates of the point touched during calibration.
1.62 -
1.63 -An object of this type is passed, via a TPckgBuf, to the HAL handler
1.64 -that deals with the HAL group function-id pair:
1.65 -- EHalGroupDigitiser, EDigitiserHalSetXYInputCalibration
1.66 -- EHalGroupDigitiser, EDigitiserHalCalibrationPoints
1.67 -- EHalGroupDigitiser, EDigitiserHalRestoreXYInputCalibration
1.68 -
1.69 -@see EDigitiserHalSetXYInputCalibration
1.70 -@see EDigitiserHalCalibrationPoints
1.71 -@see EDigitiserHalRestoreXYInputCalibration
1.72 -@see TDigitiserHalFunction
1.73 -@see EHalGroupDigitiser
1.74 -@see TPckgBuf
1.75 -*/
1.76 -class TDigitizerCalibration
1.77 - {
1.78 -public:
1.79 - TPoint iTl; /**< Top left point.*/
1.80 - TPoint iBl; /**< Bottom left point. */
1.81 - TPoint iTr; /**< Top right point.*/
1.82 - TPoint iBr; /**< Bottom right point.*/
1.83 - };
1.84 -
1.85 -
1.86 -
1.87 -
1.88 -/**
1.89 -@publishedPartner
1.90 -@released
1.91 -
1.92 -An enum that identifies the full set of keyboard types.
1.93 -
1.94 -A variable of this type is defined and used in the TKeyboardInfoV01 struct.
1.95 -
1.96 -@see TKeyboardInfoV01::iKeyboardType.
1.97 -*/
1.98 -enum TKeyboard
1.99 - {
1.100 - EKeyboard_Keypad=1, /**< Keypad type*/
1.101 - EKeyboard_Full=2, /**< Full keyboard type*/
1.102 - };
1.103 -
1.104 -
1.105 -
1.106 -
1.107 -/**
1.108 -@publishedPartner
1.109 -@released
1.110 -
1.111 -Encapsulates information about the keyboard.
1.112 -
1.113 -NOTE that the information represented here is not used by Symbian OS,
1.114 -and exists to maintain binary compatibilty with older versions.
1.115 -
1.116 -However, keyboard drivers that implement the HAL handler for
1.117 -the EHalGroupKeyboard group still need to return a default object
1.118 -of this type.
1.119 -See the template port.
1.120 -
1.121 -An object of this type is passed, via a TPckgBuf, to the HAL handler
1.122 -that deals with the HAL group function-id pair:
1.123 -- EHalGroupKeyboard, EKeyboardHalKeyboardInfo;
1.124 -
1.125 -@see EKeyboardHalKeyboardInfo
1.126 -@see TKeyboardHalFunction
1.127 -@see EHalGroupKeyboard
1.128 -@see TPckgBuf
1.129 -*/
1.130 -class TKeyboardInfoV01
1.131 - {
1.132 -public:
1.133 - /**
1.134 - The number of device keys.
1.135 -
1.136 - NOTE that the information represented by this variable is not
1.137 - used by Symbian OS, and exists to maintain binary compatibility
1.138 - with older versions.
1.139 - */
1.140 - TInt iDeviceKeys;
1.141 -
1.142 -
1.143 - /**
1.144 - The number of application keys.
1.145 -
1.146 - NOTE that the information represented by this variable is not
1.147 - used by Symbian OS, and exists to maintain binary compatibility
1.148 - with older versions.
1.149 - */
1.150 - TInt iAppsKeys;
1.151 -
1.152 -
1.153 - /**
1.154 - Defines the type of keyboard available as enumerated by
1.155 - the TKeyboard enum.
1.156 -
1.157 - NOTE that the information represented by this variable is not
1.158 - used by Symbian OS, and exists to maintain binary compatibility
1.159 - with older versions.
1.160 -
1.161 - @see TKeyboard
1.162 - */
1.163 - TKeyboard iKeyboardType;
1.164 - };
1.165 -
1.166 -
1.167 -
1.168 -
1.169 -/**
1.170 -@publishedPartner
1.171 -@released
1.172 -
1.173 -Package buffer for a TKeyboardInfoV01 object.
1.174 -
1.175 -@see TKeyboardInfoV01
1.176 -*/
1.177 -typedef TPckgBuf<TKeyboardInfoV01> TKeyboardInfoV01Buf;
1.178 -
1.179 -
1.180 -
1.181 -
1.182 -/**
1.183 -@publishedPartner
1.184 -@released
1.185 -
1.186 -Encapsulates information about the digitiser.
1.187 -
1.188 -An object of this type is passed, via a TPckgBuf, to the HAL handler
1.189 -that deals with the HAL group function-id pair:
1.190 -- EHalGroupDigitiser, EDigitiserHalXYInfo;
1.191 -
1.192 -@see EDigitiserHalXYInfo
1.193 -@see TDigitiserHalFunction
1.194 -@see EHalGroupDigitiser
1.195 -@see TPckgBuf
1.196 -*/
1.197 -class TDigitiserInfoV01
1.198 - {
1.199 -public:
1.200 - TPoint iOffsetToDisplay;/**< The offset in pixels from the digitiser usable area to the display area. */
1.201 - TSize iDigitiserSize; /**< The width/height of the display in pixels as used by digitiser.*/
1.202 - };
1.203 -
1.204 -
1.205 -/**
1.206 -@publishedPartner
1.207 -@prototype
1.208 -
1.209 -Encapsulates extra information required by 3 dimensional pointing devices.
1.210 -*/
1.211 -class TDigitiserInfoV02 : public TDigitiserInfoV01
1.212 - {
1.213 - TInt iZRange; /**< The maximum distance to screen a pointing device will be detected (settable).*/
1.214 - TUint8 iThetaSupported; /**< A Boolean value that indicates if Theta polar angle detection (tilt) is supported.*/
1.215 - TUint8 iPhiSupported; /**< A Boolean value that indicates if Phi polar angle detection (tilt) is supported.*/
1.216 - TUint8 iAlphaSupported; /**< A Boolean value that indicates if rotation of the pointing device along its main axis is supported.*/
1.217 - TUint8 iPressureSupported; /**< A Boolean value that indicates if pressure applied on screen is supported.*/
1.218 - };
1.219 -
1.220 -
1.221 -/**
1.222 -@publishedPartner
1.223 -@released
1.224 -
1.225 -Package buffer for a TDigitiserInfoV01 object.
1.226 -
1.227 -@see TDigitiserInfoV01
1.228 -*/
1.229 -typedef TPckgBuf<TDigitiserInfoV01> TDigitiserInfoV01Buf;
1.230 -
1.231 -/**
1.232 -@publishedPartner
1.233 -@prototype
1.234 -
1.235 -Package buffer for a TDigitiserInfoV02 object.
1.236 -
1.237 -@see TDigitiserInfoV02
1.238 -*/
1.239 -typedef TPckgBuf<TDigitiserInfoV02> TDigitiserInfoV02Buf;
1.240 -
1.241 -/**
1.242 -@publishedPartner
1.243 -@released
1.244 -
1.245 -Encapsulates information about the mouse display characteristics.
1.246 -
1.247 -An object of this type is passed, via a TPckgBuf, to the HAL handler
1.248 -that deals with the HAL group function-id pair:
1.249 -- EHalGroupMouse, EMouseHalMouseInfo;
1.250 -
1.251 -@see EMouseHalMouseInfo
1.252 -@see TMouseHalFunction
1.253 -@see EHalGroupMouse
1.254 -@see TPckgBuf
1.255 -*/
1.256 -class TMouseInfoV01
1.257 - {
1.258 -public:
1.259 - TInt iMouseButtons; /**< The number of mouse buttons.*/
1.260 - TPoint iOffsetToDisplay; /**< The offset in pixels from the mouse usable area to the display area.*/
1.261 - TSize iMouseAreaSize; /**< The width/height of the display in pixels as used by the mouse. */
1.262 - };
1.263 -
1.264 -
1.265 -
1.266 -
1.267 -/**
1.268 -@publishedPartner
1.269 -@released
1.270 -
1.271 -Package buffer for a TMouseInfoV01 object.
1.272 -
1.273 -@see TMouseInfoV01
1.274 -*/
1.275 -typedef TPckgBuf<TMouseInfoV01> TMouseInfoV01Buf;
1.276 -
1.277 -
1.278 -
1.279 -/**
1.280 -@publishedPartner
1.281 -@released
1.282 -
1.283 -Encapsulates Variant specific information.
1.284 -
1.285 -An object of this type is passed, via a TPckgBuf, to the HAL handler
1.286 -that deals with the HAL group function-id pair:
1.287 -- EHalGroupVariant, EVariantHalVariantInfo;
1.288 -
1.289 -@see EVariantHalVariantInfo
1.290 -@see TVariantHalFunction
1.291 -@see EHalGroupVariant
1.292 -@see TPckgBuf
1.293 -*/
1.294 -class TVariantInfoV01
1.295 - {
1.296 -public:
1.297 - /**
1.298 - The ROM version.
1.299 - */
1.300 - TVersion iRomVersion;
1.301 -
1.302 - /**
1.303 - The Id that uniquely identifies the device.
1.304 - */
1.305 - SInt64 iMachineUniqueId;
1.306 -
1.307 - /**
1.308 - The bits that represent the LED capabilities.
1.309 -
1.310 - NB capabilities in this context does not mean security capabilities.
1.311 - */
1.312 - TUint iLedCapabilities;
1.313 -
1.314 - /**
1.315 - The processor clock speed.
1.316 - */
1.317 - TInt iProcessorClockInKHz;
1.318 -
1.319 - /**
1.320 - The speed factor.
1.321 - */
1.322 - TInt iSpeedFactor;
1.323 - };
1.324 -
1.325 -
1.326 -
1.327 -
1.328 -/**
1.329 -@publishedPartner
1.330 -@released
1.331 -
1.332 -Package buffer for a TVariantInfoV01 object.
1.333 -
1.334 -@see TVariantInfoV01
1.335 -*/
1.336 -typedef TPckgBuf<TVariantInfoV01> TVariantInfoV01Buf;
1.337 -
1.338 -
1.339 -
1.340 -
1.341 -/**
1.342 -@publishedPartner
1.343 -@deprecated Use HAL::Get() from the HAL library instead with attributes ESystemStartupReason.
1.344 -
1.345 -The reason that the device last reset
1.346 -
1.347 -Note that not all reasons can occur on all devices.
1.348 -*/
1.349 -enum TMachineStartupType
1.350 - {
1.351 - EStartupCold,EStartupColdReset,EStartupNewOs,
1.352 - EStartupPowerFail,EStartupWarmReset,EStartupKernelFault,
1.353 - EStartupSafeReset
1.354 - };
1.355 -
1.356 -
1.357 -
1.358 -
1.359 -/**
1.360 -@publishedPartner
1.361 -@deprecated Use HAL::Get() from the HAL library instead with attributes EPen or EMouse.
1.362 -
1.363 -The XY input method supported
1.364 -*/
1.365 -enum TXYInputType
1.366 - {
1.367 - EXYInputNone,
1.368 - EXYInputPointer,
1.369 - EXYInputMouse,
1.370 - EXYInputDeltaMouse
1.371 - };
1.372 -
1.373 -
1.374 -
1.375 -/**
1.376 -@publishedPartner
1.377 -@deprecated Use HAL::Get() from the HAL library instead.
1.378 -
1.379 -Miscellaneous machine info.
1.380 -*/
1.381 -class TMachineInfoV1
1.382 - {
1.383 -public:
1.384 - TVersion iRomVersion;
1.385 - TXYInputType iXYInputType;
1.386 - TBool iKeyboardPresent;
1.387 - TBool iBacklightPresent;
1.388 - TSize iDisplaySizeInPixels;
1.389 - TSize iXYInputSizeInPixels;
1.390 - TSize iPhysicalScreenSize;
1.391 - TPoint iOffsetToDisplayInPixels;
1.392 - TInt iKeyboardId;
1.393 - TInt iDisplayId;
1.394 - SInt64 iMachineUniqueId;
1.395 - TUint iLedCapabilities;
1.396 - TInt iProcessorClockInKHz;
1.397 - TInt iSpeedFactor;
1.398 - TInt iMaximumDisplayColors;
1.399 - };
1.400 -/**
1.401 -@publishedPartner
1.402 -@deprecated
1.403 -*/
1.404 -typedef TPckgBuf<TMachineInfoV1> TMachineInfoV1Buf;
1.405 -
1.406 -
1.407 -
1.408 -
1.409 -/**
1.410 -@publishedPartner
1.411 -@deprecated Use HAL::Get() from the HAL library instead with attributes ELanguageIndex or EKeyboardIndex.
1.412 -
1.413 -Miscellaneous locale info.
1.414 -*/
1.415 -class TMachineInfoV2 : public TMachineInfoV1
1.416 - {
1.417 -public:
1.418 - TInt iLanguageIndex;
1.419 - TInt iKeyboardIndex;
1.420 - };
1.421 -/**
1.422 -@publishedPartner
1.423 -@deprecated
1.424 -*/
1.425 -typedef TPckgBuf<TMachineInfoV2> TMachineInfoV2Buf;
1.426 -
1.427 -
1.428 -
1.429 -
1.430 -/**
1.431 -@publishedPartner
1.432 -@deprecated Use HAL::Get() from the HAL library instead with attributes EMemoryRAM, EMemoryRAMFree or EMemoryROM.
1.433 -
1.434 -Miscellaneous memory info.
1.435 -*/
1.436 -class TMemoryInfoV1
1.437 - {
1.438 -public:
1.439 - TInt iTotalRamInBytes;
1.440 - TInt iTotalRomInBytes;
1.441 - TInt iMaxFreeRamInBytes;
1.442 - TInt iFreeRamInBytes;
1.443 - TInt iInternalDiskRamInBytes;
1.444 - TBool iRomIsReprogrammable;
1.445 - };
1.446 -/**
1.447 -@publishedPartner
1.448 -@deprecated
1.449 -*/
1.450 -typedef TPckgBuf<TMemoryInfoV1> TMemoryInfoV1Buf;
1.451 -
1.452 -
1.453 -
1.454 -
1.455 -/**
1.456 -@publishedPartner
1.457 -@deprecated No replacement.
1.458 -
1.459 -Miscellaneous ROM info.
1.460 -*/
1.461 -class TRomInfoEntryV1
1.462 - {
1.463 -public:
1.464 - enum TRomTypeV1
1.465 - {
1.466 - ERomTypeRom=0,
1.467 - ERomTypeFlash=1
1.468 - };
1.469 - TInt iSize; // size of ROM in bytes, 0=no ROM present
1.470 - TInt iWidth; // bus width in bits
1.471 - TInt iSpeed; // number of wait states
1.472 - TRomTypeV1 iType; // 0=ROM, 1=FLASH
1.473 - };
1.474 -
1.475 -
1.476 -
1.477 -
1.478 -/**
1.479 -@publishedPartner
1.480 -@deprecated No replacement.
1.481 -
1.482 -Miscellaneous ROM info.
1.483 -*/
1.484 -class TRomInfoV1
1.485 - {
1.486 -public:
1.487 - TRomInfoEntryV1 iEntry[KMaxRomDevices];
1.488 - };
1.489 -/**
1.490 -@publishedPartner
1.491 -@deprecated
1.492 -*/
1.493 -typedef TPckgBuf<TRomInfoV1> TRomInfoV1Buf;
1.494 -
1.495 -/**
1.496 -@publishedPartner
1.497 -@released
1.498 -*/
1.499 -const TUint KRuggedFileSystem=0x01;
1.500 -
1.501 -/**
1.502 -@publishedPartner
1.503 -@released
1.504 -*/
1.505 -class TDriveInfoV1
1.506 - {
1.507 -public:
1.508 - TInt iTotalSupportedDrives;
1.509 - TInfoName iDriveName[KMaxLocalDrives];
1.510 - TInt iTotalSockets;
1.511 - TInfoName iSocketName[KMaxPBusSockets];
1.512 - TInt iRuggedFileSystem;
1.513 - TUint iRegisteredDriveBitmask;
1.514 - };
1.515 -/**
1.516 -@publishedPartner
1.517 -@released
1.518 -*/
1.519 -typedef TPckgBuf<TDriveInfoV1> TDriveInfoV1Buf;
1.520 -
1.521 -#if defined(_UNICODE) && !defined(__KERNEL_MODE__)
1.522 -/**
1.523 -@publishedPartner
1.524 -@released
1.525 -*/
1.526 -class TDriveInfoV18
1.527 - {
1.528 -public:
1.529 - TInt iTotalSupportedDrives;
1.530 - TBuf8<KMaxInfoName> iDriveName[KMaxLocalDrives]; //TInfoName
1.531 - TInt iTotalSockets;
1.532 - TBuf8<KMaxInfoName> iSocketName[KMaxPBusSockets]; //TInfoName
1.533 - TInt iRuggedFileSystem;
1.534 - TUint iRegisteredDriveBitmask;
1.535 - };
1.536 -/**
1.537 -@publishedPartner
1.538 -@released
1.539 -*/
1.540 -typedef TPckgBuf<TDriveInfoV18> TDriveInfoV1Buf8;
1.541 -#else
1.542 -typedef TDriveInfoV1 TDriveInfoV18;
1.543 -typedef TDriveInfoV1Buf TDriveInfoV1Buf8;
1.544 -#endif
1.545 -
1.546 -/**
1.547 -@publishedPartner
1.548 -@released
1.549 -*/
1.550 -class TExcInfo
1.551 - {
1.552 -public:
1.553 - TAny *iCodeAddress;
1.554 - TAny *iDataAddress;
1.555 - TInt iExtraData;
1.556 - };
1.557 -
1.558 -#ifndef __KERNEL_MODE__
1.559 -#include <e32std.h>
1.560 -
1.561 -
1.562 -
1.563 -
1.564 -/**
1.565 -@publishedPartner
1.566 -@released
1.567 -
1.568 -A set of user side utility functions for acessing hardware related
1.569 -information.
1.570 -
1.571 -Four of these functions are DEPRECATED and should NOT be used; some of
1.572 -these functions have replacements, but others do not; see the description of
1.573 -the individual functions.
1.574 -
1.575 -The following functions are not deprecated, but are only used by Symbian
1.576 -OS as part of its internal implementation:
1.577 -- UserHal::FaultReason()
1.578 -- UserHal::ExceptionId()
1.579 -- UserHal::ExceptionInfo()
1.580 -- UserHal::PageSizeInBytes()
1.581 -- UserHal::TickPeriod()
1.582 -- UserHal::DriveInfo()
1.583 -- UserHal::SwitchOff()
1.584 -- UserHal::SetXYInputCalibration()
1.585 -- UserHal::CalibrationPoints()
1.586 -- UserHal::SaveXYInputCalibration()
1.587 -- UserHal::RestoreXYInputCalibration()
1.588 -*/
1.589 -class UserHal
1.590 - {
1.591 -public:
1.592 - // kernel group
1.593 - IMPORT_C static TInt MemoryInfo(TDes8& anInfo);
1.594 - IMPORT_C static TInt RomInfo(TDes8& anInfo);
1.595 - IMPORT_C static TInt StartupReason(TMachineStartupType& aReason);
1.596 - IMPORT_C static TInt FaultReason(TInt &aReason);
1.597 - IMPORT_C static TInt ExceptionId(TInt &anId);
1.598 - IMPORT_C static TInt ExceptionInfo(TExcInfo &aInfo);
1.599 - IMPORT_C static TInt PageSizeInBytes(TInt& aSize);
1.600 -
1.601 - // variant group
1.602 - IMPORT_C static TInt MachineInfo(TDes8& anInfo);
1.603 - IMPORT_C static TInt TickPeriod(TTimeIntervalMicroSeconds32& aPeriod);
1.604 -
1.605 - // media group
1.606 - IMPORT_C static TInt DriveInfo(TDes8& anInfo);
1.607 -
1.608 - // power group
1.609 - IMPORT_C static TInt SwitchOff();
1.610 -
1.611 - // digitiser group
1.612 - IMPORT_C static TInt SetXYInputCalibration(const TDigitizerCalibration& aCalibration);
1.613 - IMPORT_C static TInt CalibrationPoints(TDigitizerCalibration& aCalibration);
1.614 - IMPORT_C static TInt SaveXYInputCalibration();
1.615 - IMPORT_C static TInt RestoreXYInputCalibration(TDigitizerCalibrationType aType);
1.616 - };
1.617 -#endif
1.618 -#endif