1 // Copyright (c) 1994-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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // e32\include\e32const.h
18 #ifndef __E32CONST_H__
19 #define __E32CONST_H__
30 The default width value used when appending and justifying data
33 @see TDes16::AppendJustify()
34 @see TDes16::Justify()
35 @see TDes8::AppendJustify()
38 const TInt KDefaultJustifyWidth=(-1);
46 Defines the number of TUids that form a TUidType.
51 const TInt KMaxCheckedUid=3;
58 Defines the number of 32-bit debug trace mask words.
61 const TInt KNumTraceMaskWords = 8;
68 Defines the maximum length for the text form of a UID name.
73 const TInt KMaxUidName=10;
82 Defines the maximum length of a module name.
84 const TInt KMaxModuleVersionName=10;
93 Defines the maximum length of the name of a reference counted object.
97 const TInt KMaxName=0x80;
106 Defines the maximum length of the name of a reference counted kernel-side object.
108 const TInt KMaxKernelName=0x50;
117 Defines the maximum size of a process name.
119 const TInt KMaxProcessName=(KMaxKernelName-KMaxUidName-KMaxModuleVersionName-4);
128 Defines the maximum size of a library name.
130 const TInt KMaxLibraryName=(KMaxKernelName-KMaxUidName-KMaxModuleVersionName);
139 Defines the maximum length of a TInfoName object.
141 const TInt KMaxInfoName=0x10;
150 Defines the maximum length of the full name of a reference counted object.
154 const TInt KMaxFullName=(KMaxName<<1);
163 The maximum length for a password buffer.
167 const TInt KMaxPassword=0x10;
176 The maximum length of a category name.
178 @see TExitCategoryName
180 const TInt KMaxExitCategoryName=0x10;
189 The maximum length of the full text name for a day of the week.
193 const TInt KMaxDayName=0x20;
202 The maximum length of the abbreviated text name for a day of the week.
206 const TInt KMaxDayNameAbb=0x08;
215 Defines the maximum size of arrays or data structures required
216 to hold the names of the days of the week.
218 const TInt KMaxDays=7;
227 The maximum length of the full text name for a month.
231 const TInt KMaxMonthName=0x20;
240 The maximum length of the abbreviated text name for a month.
244 const TInt KMaxMonthNameAbb=0x08;
253 Defines the maximum size of arrays or data structures required
254 to hold the names of the months of the year.
256 const TInt KMaxMonths=12;
265 The maximum length of the text for a date suffix.
269 const TInt KMaxSuffix=0x04;
278 Defines the maximum size of arrays and data structures required
279 to hold date suffix strings.
281 const TInt KMaxSuffixes=31;
290 The maximum length of the text for AM and PM.
294 const TInt KMaxAmPmName=0x04;
303 Defines the maximum size of arrays and data structures required
304 to hold am/pm strings.
306 const TInt KMaxAmPms=2;
315 Defines the maximum number of date separator characters in a date string.
317 const TInt KMaxDateSeparators=4;
326 Defines the maximum number of time separator characters in a time string.
328 const TInt KMaxTimeSeparators=4;
337 Defines the maximum size of data structures to hold the translate tables
338 for Western European alphabetic conversions.
340 const TInt KMaxTranslateTable=0x100;
349 The maximum length of the text for a currency symbol.
353 const TInt KMaxCurrencySymbol=0x08;
362 The maximum length of the short date format specification text.
364 @see TShortDateFormatSpec
366 const TInt KMaxShortDateFormatSpec=40;
375 The maximum length of the short date format specification text.
377 @see TLongDateFormatSpec
379 const TInt KMaxLongDateFormatSpec=80;
388 The maximum length of the time string formatting commands.
392 const TInt KMaxTimeFormatSpec=60;
401 Defines the maximum length of a filename.
403 const TInt KMaxFileName=0x100;
412 The maximum length of the character representation of version information.
414 @see TVersion::Name()
416 const TInt KMaxVersionName=0x10;
425 Defines the maximum length of a path.
429 const TInt KMaxPath=0x100;
438 Defines the maximum length of a TDeviceInfo object.
442 const TInt KMaxDeviceInfo=0x80;
451 The maximum size of the password required to unlock a media drive.
453 const TInt KMaxMediaPassword=16;
462 Defines the minimum size of a new heap.
464 Functions that require a new heap to be allocated will either panic,
465 or will reset the required heap size to this value if a smaller heap
469 @see RThread::Create()
471 const TInt KMinHeapSize=0x100;
480 Not used by Symbian OS.
482 const TInt KDstHome=0x01;
491 Not used by Symbian OS.
493 const TInt KDstEuropean=0x02;
502 Not used by Symbian OS.
504 const TInt KDstNorthern=0x04;
513 Not used by Symbian OS.
515 const TInt KDstSouthern=0x08;
524 A default stack size that can be used when creating threads.
526 const TInt KDefaultStackSize=0x2000;
535 Indicates an undefined character, used internally when formatting text.
537 const TUint KNoChar=0xffffffffu;
546 Defines an index value that is interpreted by the TKey class,
547 and derived classes, as having a specific meaning.
552 const TInt KIndexPtr=(-1);
561 A flag used by the kernel to mark a handle as not being closable.
563 const TInt KHandleNoClose=0x00008000;
572 A flag used by the kernel to mark a handle as being local.
574 const TInt KHandleFlagLocal=0x40000000;
583 A flag used by the Kernel to indicate the current process.
585 const TInt KCurrentProcessHandle=0xffff0000|KHandleNoClose;
594 A flag used by the Kernel to indicate the current thread.
596 const TInt KCurrentThreadHandle=0xffff0001|KHandleNoClose;
605 Defines a handle number value of zero.
609 const TInt KNullHandle=0;
618 Defines a default unit. Not generally used by Symbian OS.
620 const TInt KDefaultUnit=0x00;
629 The device unit that must be passed in a call
630 to RBusLogicalChannel::DoCreate(), if units are not permitted.
632 @see RBusLogicalChannel
634 const TInt KNullUnit=0xffffffff;
643 The maximum unit number that can be passed in a call
644 to RBusLogicalChannel::DoCreate().
646 @see RBusLogicalChannel
648 const TInt KMaxUnits=0x20;
657 Defines the maximum number of message arguments that can be passed
658 across the user side/kernel side boundary.
660 const TInt KMaxMessageArguments=0x04;
669 The default width of the character representation of a real number, used by
670 the default constructor of a TRealFormat object and the formatting functions
674 @see TDes16::AppendFormat()
675 @see TDes8::AppendFormat()
677 const TInt KDefaultRealWidth=20;
686 The default value used by UserHeap::ChunkHeap() for defining increments to
687 the size of a chunk, when no explicit value specified by the caller.
689 @see UserHeap::ChunkHeap()
691 const TInt KMinHeapGrowBy=0x1000;
700 Not used by Symbian OS.
702 const TInt KMaxExponentConversion=99;
711 Defines a Null UID value.
715 const TInt KNullUidValue=0;
724 The timer granularity used by a CDeltaTimer object is
725 now the tick period and this constant is obsolete.
729 const TInt KDeltaTimerDefaultGranularity=100000;
738 The largest possible value for a TInt8.
740 const TInt KMaxTInt8=0x7f;
749 The smallest possible value for a TInt8.
751 const TInt KMinTInt8=(-128);
760 The largest possible value for a TUint8.
762 const TUint KMaxTUint8=0xffu;
771 The largest possible value for a TInt16.
773 const TInt KMaxTInt16=0x7fff;
782 The smallest possible value for a TInt16.
784 const TInt KMinTInt16=(-32768);
793 The largest possible value for a TUint16.
795 const TUint KMaxTUint16=0xffffu;
804 The largest possible value for a TInt32.
806 const TInt KMaxTInt32=0x7fffffff;
815 The smallest possible value for a TInt32.
817 const TInt KMinTInt32=(TInt)0x80000000;
826 The largest possible value for a TUint32.
828 const TUint KMaxTUint32=0xffffffffu;
837 The largest possible value for a TInt.
839 const TInt KMaxTInt=0x7fffffff;
848 The smallest possible value for a TInt.
850 const TInt KMinTInt=(TInt)0x80000000;
859 The largest possible value for a TUint.
861 const TUint KMaxTUint=0xffffffffu;
870 The largest possible value for a TInt64.
872 const TInt64 KMaxTInt64 = I64LIT(0x7fffffffffffffff);
881 The smallest possible value for a TInt64.
883 const TInt64 KMinTInt64 = UI64LIT(0x8000000000000000);
892 The largest possible value for a TUint64.
894 const TUint64 KMaxTUint64 = UI64LIT(0xffffffffffffffff);
903 Defines the character *, and represents any number of characters in any
904 part of a path component, filename or extension.
906 It is used in a TParse file specification.
910 const TUint KMatchAny='*';
919 Defines the character ?, and represents a single character in
920 a path component, filename or extension.
922 It is used in a TParse file specification.
926 const TUint KMatchOne='?';
935 Defines the maximum number of local drives.
937 const TInt KMaxLocalDrives=16;
946 Defines the maximum number of peripheral bus sockets.
948 const TInt KMaxPBusSockets=4;
957 Not used by Symbian OS.
959 const TInt KNoCallEntryPoint = 0x01;
968 The value to which CActive::iStatus is set by an active object's
969 service provider before the service provider initiates an asynchronous request.
973 const TInt KRequestPending=(-KMaxTInt);
978 // Drive capabilities
984 Defines the possible media types.
994 /** Solid-state media. */
1009 /** Rotating media. */
1020 Defines the state of a battery, if supported.
1022 enum TBatteryState {EBatNotSupported,EBatGood,EBatLow};
1031 Drive attribute - drive is local.
1033 const TUint KDriveAttLocal=0x01;
1042 Drive attribute - ROM drive.
1044 const TUint KDriveAttRom=0x02;
1053 Drive attribute - output from a process on one drive is redirected
1056 const TUint KDriveAttRedirected=0x04;
1065 Drive attribute - drive letter has been substituted (assigned a path).
1067 const TUint KDriveAttSubsted=0x08;
1076 Drive attribute - drive is internal (not removable).
1078 const TUint KDriveAttInternal=0x10;
1087 Drive attribute - drive is removable.
1089 const TUint KDriveAttRemovable=0x20;
1098 Drive attribute - drive is remote.
1100 const TUint KDriveAttRemote=0x40;
1111 const TUint KDriveAttTransaction=0x80;
1118 Drive attribute - drive is used for paging.
1120 const TUint KDriveAttPageable=0x100;
1128 Drive attribute - drive is logically removable (can be taken offline from Symbian OS).
1129 If not logically removable then physically removable e.g. a card can be take out.
1131 const TUint KDriveAttLogicallyRemovable=0x200;
1138 Drive attribute - drive is hidden.
1139 A drive which has its hidden attribute set would be excluded from the list of available drives.
1141 const TUint KDriveAttHidden=0x400;
1148 Drive attribute - It can be set in a search in order to instruct that all drives should be returned.
1150 const TUint KDriveAttAll=0x100000;
1158 Drive attribute - It can be set in combination with other drive attributes in order to exclude during a drive search, drives with
1159 these attributes set.
1161 const TUint KDriveAttExclude=0x40000;
1169 Drive attribute - It can be set in combination with other drive attributes in order to search and return exclusively drives with these attributes set.
1171 const TUint KDriveAttExclusive=0x80000;
1177 Used as a mask in order to extract the actual drive attributes.
1180 const TUint KDriveAttMatchedFlags=0xFFF;
1186 Used as a mask in order to extract the extra(ex KDriveAttAll ,KDriveAttExclude, KDriveAttExclusive ,0) drive attributes.
1188 const TUint KDriveAttMatchedAtt=0x0FFF0000;
1195 Media attribute - the media capacity can change over time.
1197 const TUint KMediaAttVariableSize=0x01;
1206 Media attribute - media is dual density.
1208 const TUint KMediaAttDualDensity=0x02;
1217 Media attribute - media is formattable.
1219 const TUint KMediaAttFormattable=0x04;
1228 Media attribute - media is write-protected.
1230 const TUint KMediaAttWriteProtected=0x08;
1239 Media attribute - media is lockable; this is provided for
1240 lockable multi-media cards
1242 const TUint KMediaAttLockable=0x10;
1251 Media attribute - media is locked; this is provided for
1252 lockable multi-media cards
1254 const TUint KMediaAttLocked=0x20;
1262 Media attribute - media has password.
1264 const TUint KMediaAttHasPassword=0x40;
1270 const TUint KMediaAttReadWhileWrite=0x80;
1276 Media attribute - media supports TBusLocalDrive::DeleteNotify()
1278 const TUint KMediaAttDeleteNotify=0x100;
1284 Media attribute - media supports paging
1286 const TUint KMediaAttPageable=0x200;
1294 Identifies a FAT file system
1296 const TUint KDriveFileSysFAT=0x01;
1305 Identifies a ROM file system.
1307 const TUint KDriveFileSysROM=0x02;
1316 Identifies an LFFS file system.
1318 const TUint KDriveFileSysLFFS=0x03;
1327 Identifies a read-only file system.
1329 const TUint KDriveFileSysROFS=0x04;
1338 Identifies a non-file system. That is a partition without any file system layer.
1340 const TUint KDriveFileNone=0x05;
1349 An enumerator with a single enumeration value that defines the Boolean value
1350 false in Symbian OS.
1356 Defines the value false that is passed to a TBool type.
1368 An enumerator with a single enumeration value that defines the Boolean value
1375 Defines the value true that is passed to a TBool type.
1387 Defines flags that can be used to indicate whether duplicates, for example in
1388 a list, are allowed.
1390 enum TAllowDuplicates {
1392 No duplicates allowed.
1409 An enumeration whose enumerators determine the number system to be used
1410 when converting numbers into a character format.
1414 @see TDes8::AppendNum()
1415 @see TDes8::AppendNumUC()
1417 @see TDes16::NumUC()
1418 @see TDes16::AppendNum()
1419 @see TDes16::AppendNumUC()
1423 Convert number into binary character representation.
1427 Convert number into octal character representation.
1431 Convert number into decimal character representation.
1435 Convert number into hexadecimal character representation.
1448 The mask for the dialect bits
1450 const TUint KDialectMask=0x03FF;
1460 Defines the date formats.
1464 US format (mm/dd/yyyy)
1469 European format (dd/mm/yyyy)
1474 Japanese format (yyyy/mm/dd)
1485 Defines the time formats as either 12 hour or 24 hour.
1499 Defines the clock display formats, as either analog or digital.
1513 Enumerates the units of measurement as either Imperial or Metric.
1527 Identifies a time as being am or pm.
1543 1. the currency symbol is located before or after the currency amount.
1545 2. the am/pm text is located before or after the time.
1550 The currency symbol is located before the currency amount.
1551 The am/pm text is located before the time.
1556 The currency symbol is located after the currency amount.
1557 The am/pm text is located after the time.
1569 Number Modes available to select.
1573 EDigitTypeUnknown = 0x0000,
1574 EDigitTypeWestern = 0x0030,
1575 EDigitTypeArabicIndic = 0x0660,
1576 EDigitTypeEasternArabicIndic = 0x6F0,
1577 EDigitTypeDevanagari = 0x0966,
1578 EDigitTypeBengali = 0x09E6,
1579 EDigitTypeGurmukhi = 0x0A66,
1580 EDigitTypeGujarati = 0x0AE6,
1581 EDigitTypeOriya = 0x0B66,
1582 EDigitTypeTamil = 0x0BE6,
1583 EDigitTypeTelugu = 0x0C66,
1584 EDigitTypeKannada = 0x0CE6,
1585 EDigitTypeMalayalam = 0x0D66,
1586 EDigitTypeThai = 0x0E50,
1587 EDigitTypeLao = 0x0ED0,
1588 EDigitTypeTibetan = 0x0F20,
1589 EDigitTypeMayanmar = 0x1040,
1590 EDigitTypeKhmer = 0x17E0,
1591 EDigitTypeAllTypes = 0xFFFF
1601 Defines the daylight saving zones.
1603 enum TDaylightSavingZone
1606 The home daylight saving zone. Its value is usually the same as that of the
1607 zone in which the home city is located, but may differ. In this case, the
1608 value for home overrides the value of the zone in which home is located.
1610 EDstHome=0x40000000,
1613 No daylight saving zone.
1618 The European daylight saving zone.
1623 The Northern hemisphere (non-European) daylight saving zone.
1628 Southern hemisphere daylight saving zone.
1639 Indicates how negative currency values are formatted.
1641 enum TNegativeCurrencyFormat // must match TLocale:: version, included here so ELOCL.DLL can see it
1643 E_NegC_LeadingMinusSign,
1644 E_NegC_InBrackets,// this one must be non-zero for binary compatibility with the old TBool TLocale::iCurrencyNegativeInBrackets which was exposed in the binary interface because it was accessed via *inline* functions
1645 E_NegC_InterveningMinusSignWithSpaces,
1646 E_NegC_InterveningMinusSignWithoutSpaces,
1647 E_NegC_TrailingMinusSign
1654 Indicates how the device universal time is maintained
1656 enum TDeviceTimeState // must match TLocale:: version
1658 /** Universal time is maintained by the device RTC and the user selection
1659 of the locale of the device indicating offset from GMT and daylight saving*/
1662 /** Universal time and offset from GMT is supplied by the mobile network
1663 and maintained by device RTC */
1664 ENITZNetworkTimeSync
1673 Defines the days of the week.
1675 The enumerator symbol names correspond with the days of the week,
1676 i.e. EMonday refers to Monday etc.
1696 Defines the months of the year.
1698 The enumerator symbol names correspond with the months of the year,
1699 i.e. EJanuary refers to January etc.
1724 Handle ownership flags.
1726 The flags indicate whether a handle being opened is owned by a process or
1729 Ownership by a process means that the handle instance can be used by all
1730 threads in the process to access the Kernel side object that the
1733 Ownership by a thread means that the handle instance can only be used by the
1734 thread that creates or opens the handle.
1736 An enumerator of this type is passed to all member functions of RHandleBase,
1737 and classes derived from RHandleBase, which open a handle.
1741 Ownership of the handle is to be vested in the process.
1746 Ownership of the handle is to be vested in the thread.
1754 const TInt KCreateProtectedObject = (TInt)0x80000000;
1764 Defines process priorities.
1766 The enumerator values are passed to RProcess::SetPriority().
1768 The priorities are listed in relative order stating with the lowest.
1770 enum TProcessPriority
1773 EPriorityBackground=250,
1774 EPriorityForeground=350,
1776 EPriorityWindowServer=650,
1777 EPriorityFileServer=750,
1778 EPriorityRealTimeServer=850,
1779 EPrioritySupervisor=950
1789 Defines thread priorities.
1791 The enumerator values are passed to RThread::SetPriority().
1793 The relative priorities are listed in order starting with the lowest.
1795 The absolute thread priorities are listed in order starting with the lowest.
1797 enum TThreadPriority
1799 EPriorityNull=(-30),
1800 EPriorityMuchLess=(-20),
1801 EPriorityLess=(-10),
1804 EPriorityMuchMore=20,
1805 EPriorityRealTime=30,
1806 EPriorityAbsoluteVeryLow=100,
1807 EPriorityAbsoluteLowNormal=150,
1808 EPriorityAbsoluteLow=200,
1809 EPriorityAbsoluteBackgroundNormal=250,
1810 EPriorityAbsoluteBackground=300,
1811 EPriorityAbsoluteForegroundNormal=350,
1812 EPriorityAbsoluteForeground=400,
1813 EPriorityAbsoluteHighNormal=450,
1814 EPriorityAbsoluteHigh=500,
1815 EPriorityAbsoluteRealTime1=810,
1816 EPriorityAbsoluteRealTime2=820,
1817 EPriorityAbsoluteRealTime3=830,
1818 EPriorityAbsoluteRealTime4=840,
1819 EPriorityAbsoluteRealTime5=850,
1820 EPriorityAbsoluteRealTime6=860,
1821 EPriorityAbsoluteRealTime7=870,
1822 EPriorityAbsoluteRealTime8=880
1832 const TText KProtectedServerNamePrefix = '!';
1840 A list of exception types which a thread's exception handler might deal with.
1841 An enumerator of this type is passed to User::IsExceptionHandled()
1842 and User::RaiseException().
1844 While an exception handler can deal with exceptions as listed in the exception
1845 constants set, a TExcType is simply a type of exception.
1846 For example, EExcIntegerDivideByZero and EExcIntegerOverflow are types
1847 of KExceptionInteger exception.
1851 EExcGeneral=0, ///<A miscellaneous exception.
1852 EExcIntegerDivideByZero=1, ///<An attempt was made to divide an integer by zero.
1853 EExcSingleStep=2, ///<Raised after executing an instruction, when CPU is in single-step mode.
1854 EExcBreakPoint=3, ///<A break point was hit.
1855 EExcIntegerOverflow=4, ///<An integer value overflowed.
1856 EExcBoundsCheck=5, ///<Access to an out of bounds array element was caught.
1857 EExcInvalidOpCode=6, ///<The CPU reached an invalid instruction.
1858 EExcDoubleFault=7, ///<A fault occurred while handling a previous exception or interrupt.
1859 EExcStackFault=8, ///<The thread ran out of stack space.
1860 EExcAccessViolation=9, ///<The thread attempted to access memory in an unauthorized area.
1861 EExcPrivInstruction=10, ///<Attempted to execute an instruction in wrong machine mode.
1862 EExcAlignment=11, ///<The thread tried to read or write non-aligned data.
1863 EExcPageFault=12, ///<Thread could not access the memory page requested.
1864 EExcFloatDenormal=13, ///<An operand in a floating point operation was denormal.
1865 EExcFloatDivideByZero=14, ///<An attempt was made to divide a floating point number by zero.
1866 EExcFloatInexactResult=15, ///<The result of a floating point operation could not be represented precisely.
1867 EExcFloatInvalidOperation=16, ///<The result of a floating point operation was an ill-defined quantity.
1868 EExcFloatOverflow=17, ///<The result of a floating point operation was too large to be represented.
1869 EExcFloatStackCheck=18, ///<The result of a floating point operation caused the stack to over or underflow.
1870 EExcFloatUnderflow=19, ///<The result of a floating point operation was too small to be represented.
1871 EExcAbort=20, ///<This exception is not raised by the Kernel, though it may be raised by a user thread on itself.
1872 EExcKill=21, ///<This exception is not raised by the Kernel, though it may be raised by a user thread on itself.
1873 EExcUserInterrupt=22, ///<May be used to indicate a general exception.
1874 EExcDataAbort=23, ///<The thread has tried to read data from an invalid address.
1875 EExcCodeAbort=24, ///<The thread has tried to fetch an instruction from an invalid address.
1876 EExcMaxNumber=25, ///<Do not use.
1877 EExcInvalidVector=26, ///<Do not use.
1886 Identifies how a thread or process has ended.
1888 While a thread or process is alive, its exit type is always EExitPending.
1890 Both RThread::ExitType() and RProcess::ExitType() return a TExitType.
1892 @see RThread::ExitType()
1893 @see RProcess::ExitType()
1895 @see RThread::Kill()
1896 @see RProcess::Kill()
1900 The thread or process has ended under normal conditions, i.e. as a result of either:
1901 1. The thread or process running to completion.
1902 2. User::Exit() being invoked.
1903 3. RThread::Kill() or RProcess::Kill() being invoked on the RThread or RProcess handle, respectively.
1908 The thread or process has ended as a result of a terminate,
1909 i.e. Terminate() has been called on the RThread or RProcess handle.
1914 The thread or process has been panicked.
1919 The thread or process is alive.
1931 An enumeration whose enumerators govern the alignment of data which is copied
1932 or formatted into a descriptor.
1934 @see TDes8::Justify()
1935 @see TDes8::AppendJustify()
1936 @see TDes16::Justify()
1937 @see TDes16::AppendJustify()
1941 Data is left aligned
1949 Data is right aligned
1961 A mask for the set of flags that govern the general format
1962 of the character representation of a real number.
1964 These are the flags with symbols starting KRealFormat...
1966 const TInt KRealFormatTypesMask=0x00000007;
1975 Defines the general format of the character representation of a real number.
1976 The TRealFormat::iType data member is set to one of these.
1978 The real number is converted to fixed format which has the general pattern:
1979 "nnn.ddd", where nnn is the integer portion and ddd is the decimal portion.
1980 A negative value is prefixed by a minus sign.
1982 The number of decimal places generated is defined by the value of
1983 TRealFormat::iPlaces. Trailing zeroes are generated as required.
1984 If necessary, the decimal portion is rounded to fit the specification.
1985 If this value is zero, no decimal point and no decimal portion is generated.
1987 Triad separation is available,
1988 defined by TRealFormat::iTriad and TRealFormat::iTriLen.
1990 Note that a zero value is converted either to the form "0.000..." with
1991 iPlaces '0' characters after the decimal point, if iPlaces is greater than
1992 zero, or to "0" if iPlaces is zero.
1996 const TInt KRealFormatFixed=1;
2005 Defines the general format of the character representation of a real number.
2006 The TRealFormat::iType data member is set to one of these.
2008 The real number is converted to scientific format with one non-zero digit
2009 before the decimal point and a number of digits after the decimal point.
2010 Hence the number has the general pattern:
2011 "n.dddE+ee" or "n.dddE-ee", or "n.dddE+eee" or "n.dddE-eee".
2013 The decimal portion is followed by the character 'E', a sign ('+' or '-')
2014 and the exponent as two digits, including leading zeroes, if necessary.
2015 If necessary, the decimal portion is rounded.
2017 A negative value is prefixed by a minus sign.
2019 If the flag KUseSigFigs is not set, TRealFormat::iPlaces defines the number
2020 of digits which follow the decimal point. If the flag KUseSigFigs is set,
2021 iPlaces defines the maximum number of significant digits to be generated.
2023 Note that, by default, exponents are limited to two digits.
2024 Those numbers that require three digits must have the flag
2025 KAllowThreeDigitExp set. If iPlaces is zero, the value is rounded to one digit
2026 of precision and no decimal point is included.
2028 Triad separation is not available.
2030 Note that a zero value is converted either to the form "0.000...E+00" with
2031 iPlaces '0' characters after the decimal point, if iPlaces is greater than
2032 zero, or to "0E+00" if iPlaces is zero.
2036 const TInt KRealFormatExponent=2;
2045 Defines the general format of the character representation of a real number.
2046 The TRealFormat::iType data member is set to one of these.
2048 The real number is converted either to fixed or scientific format.
2049 The format chosen is the one which can present the greater number of
2050 significant digits. Where both formats can present the same number of
2051 significant digits, fixed format is used.
2053 The number of decimal places generated depends only on the value of
2054 TRealFormat::iWidth; the value of the iPlaces member is ignored.
2056 Trailing zeroes in the decimal portion are discarded.
2058 Triad separation is not available.
2060 Note that a zero value is converted to "0".
2064 const TInt KRealFormatGeneral=3;
2073 Defines the general format of the character representation of a real number.
2074 The TRealFormat::iType data member is set to one of these.
2076 The same as KRealFormatFixed but the TRealFormat::iPlaces is interpreted as
2077 specifying the maximum number of significant digits.
2079 Trailing zeroes in the decimal portion are discarded.
2083 const TInt KRealFormatNoExponent=4;
2092 Defines the general format of the character representation of a real number.
2093 The TRealFormat::iType data member is set to one of these.
2095 The same as KRealFormatGeneral but TRealFormat::iPlaces is interpreted as
2096 specifying the maximum number of significant digits, and the number is
2097 displayed without an exponent whenever possible.
2099 Trailing zeroes in the decimal portion are discarded.
2103 const TInt KRealFormatCalculator=5;
2108 // Extra flags ORed in with the previous types
2115 A bitmask for all flags except those with symbols starting KRealFormat...
2117 const TInt KRealFormatTypeFlagsMask=0x7C000000;
2126 A flag that modifies the format of the character representation of a real
2129 It reduces the effective width by one character. This forces a large enough
2130 value for TRealFormat::iWidth to be chosen to guarantee that positive and
2131 negative numbers can be shown to the same precision.
2133 It applies when TRealFormat::iType is set to KRealFormatFixed
2134 or KRealFormatGeneral, and should be ORed into TRealFormat::iType after one of
2135 these types has been set.
2137 const TInt KExtraSpaceForSign=0x40000000;
2145 A flag that modifies the format of the character representation of a real
2148 It allows an exponent to be formatted whose magnitude is greater than 100.
2149 If this flag is not set, an attempt to format such a number fails.
2151 If set, three digit exponents are allowed. If not set, only two digit
2152 exponents are allowed.
2154 Applies when TRealFormat::iType is set to KRealFormatExponent
2155 or KRealFormatGeneral, and should be ORed into TRealFormat::iType after one of
2156 these types has been set.
2158 const TInt KAllowThreeDigitExp=0x20000000;
2167 A flag that modifies the format of the character representation of a real
2170 If set, the TRealFormat::iPlaces member is interpreted as the maximum number
2171 of significant digits to be generated.
2173 Applies when TRealFormat::iType is set to KRealFormatExponent, and should be
2174 ORed into TRealFormat::iType after this type has been set.
2176 const TInt KUseSigFigs=0x10000000;
2185 A flag that modifies the format of the character representation of a real
2188 It disables triad separation.
2190 Applies when TRealFormat::iType is set to KRealFormatFixed
2191 or KRealFormatNoExponent, and should be ORed into TRealFormat::iType after one of
2192 these types has been set.
2194 const TInt KDoNotUseTriads=0x08000000;
2203 A flag that modifies the format of the character representation of a real
2206 If set, this flag limits the precision to KPrecisionLimit digits.
2207 If not set, the precision defaults to KMaxPrecision digits.
2209 This flag should be ORed into TRealFormat::iType.
2211 const TInt KGeneralLimit=0x04000000;
2220 A value, which when passed to the new operator, indicates that the operation
2221 is to leave if insufficient memory available.
2223 enum TLeave {ELeave};
2232 Defines the way in which the first week in a year is determined.
2234 enum TFirstWeekRule {
2236 The first week in the year is always the week containing
2237 the first day of the year.
2241 If at least four days of the new year occur during the week
2242 containing the first day then this is the first week in the
2243 year. Otherwise the first week in the year is the following
2244 week. This is the default and complies with the
2245 international standard.
2249 The first week in the year is the first week of which all
2250 seven days occur within the new year.
2262 Timer lock specifications.
2264 They are used by CTimer::Lock() to define the fraction of a second in which
2265 to call its RunL() function.
2271 /** Timer tick is at 1/12 past the second. */
2274 /** Timer tick is at 2/12 past the second */
2277 /** Timer tick is at 3/12 past the second */
2280 /** Timer tick is at 4/12 past the second */
2283 /** Timer tick is at 5/12 past the second */
2286 /** Timer tick is at 6/12 past the second */
2289 /** Timer tick is at 7/12 past the second */
2292 /** Timer tick is at 8/12 past the second */
2295 /** Timer tick is at 9/12 past the second */
2298 /** Timer tick is at 10/12 past the second */
2301 /** Timer tick is at 11/12 past the second */
2304 /** Timer tick is on the second */
2315 Defines the possible environment changes which may be reported by
2316 a change notifier through the RChangeNotifier interface.
2318 Each enumerator corresponds to a distinct type of event.
2320 The changes are reported through a TRequestStatus object when a request to
2321 the change notifier completes. As each enumerator value represents
2322 a separate bit, any combination of events can be reported.
2324 @see RChangeNotifier
2331 The system locale has changed.
2333 Typically this event occurs as a result of a call to TLocale::Set().
2335 EChangesLocale=0x01,
2339 The system time has passed midnight.
2341 EChangesMidnightCrossover=0x02,
2347 This event is reported when any thread in the system dies.
2349 EChangesThreadDeath=0x04,
2353 The status of the power supply has changed.
2355 EChangesPowerStatus=0x08,
2359 The system time has changed.
2361 EChangesSystemTime=0x10,
2365 The free memory level has crossed a specified threshold value.
2367 EChangesFreeMemory=0x20,
2371 A memory allocation has failed due to insufficient free memory.
2373 EChangesOutOfMemory=0x40,
2377 The free memory level has fallen below the low-memory threshold
2378 @see UserSvr::SetMemoryThresholds()
2380 EChangesLowMemory=0x80,
2390 Defines a pointer to a thread function which takes a pointer of
2391 type TAny and returns a TInt.
2393 A function of this type is passed as parameter to RThread::Create()
2394 when creating a thread. Control passes to this function when the thread
2395 is first scheduled for execution.
2399 typedef TInt (*TThreadFunction)(TAny*);
2408 Defines a function that takes no arguments but returns a TInt.
2410 This is a type which is returned from a call to RLibrary::Lookup().
2414 typedef TInt (*TLibraryFunction)();
2423 Defines a function that takes a single argument of type TInt and returns a TInt.
2425 This is a type which is returned from a call to RLibrary::EntryPoint().
2429 typedef TInt (*TLibraryEntry)(TInt);
2437 Defines an exception handler function which takes a TExcType as an argument,
2440 A function of this type is an exception handler used by member functions
2441 of a thread handle, RThread.
2446 typedef void (*TExceptionHandler)(TExcType);
2451 // masking constants
2457 One of a set of flags that categorizes exceptions - associated with
2458 the abort exception only.
2460 @see RThread::SetExceptionHandler()
2461 @see RThread::ModifyExceptionMask()
2463 const TUint KExceptionAbort=0x01;
2472 One of a set of flags that categorizes exceptions - associated with
2473 the kill exception only.
2475 @see RThread::SetExceptionHandler()
2476 @see RThread::ModifyExceptionMask()
2478 const TUint KExceptionKill=0x02;
2487 One of a set of flags that categorizes exceptions - general
2488 and user exceptions.
2490 @see RThread::SetExceptionHandler()
2491 @see RThread::ModifyExceptionMask()
2493 const TUint KExceptionUserInterrupt=0x04;
2502 One of a set of flags that categorizes exceptions - exceptions caused
2503 by illegal floating point operations. This exception is not guaranteed
2504 to be raised when a hardware floating point implementation is in use.
2506 @see RThread::SetExceptionHandler()
2507 @see RThread::ModifyExceptionMask()
2509 const TUint KExceptionFpe=0x08;
2518 One of a set of flags that categorizes exceptions - exceptions associated
2519 with executing instructions; includes protection faults,
2520 illegal instruction codes, page faults etc
2522 @see RThread::SetExceptionHandler()
2523 @see RThread::ModifyExceptionMask()
2525 const TUint KExceptionFault=0x10;
2534 One of a set of flags that categorizes exceptions - exceptions caused
2535 by illegal operations on integer values.
2537 const TUint KExceptionInteger=0x20;
2546 One of a set of flags that categorizes exceptions - exceptions raised
2547 when debugging code.
2549 @see RThread::SetExceptionHandler()
2550 @see RThread::ModifyExceptionMask()
2552 const TUint KExceptionDebug=0x40;
2561 Aligns the specified value on the boundary defined by __Size.
2562 This is usually 4 for byte alignment or 2 for double-byte alignment.
2564 @param s The value to be aligned.
2566 #define __Align(s) ((((s)+__Size-1)/__Size)*__Size)
2575 Defines the type of environment data passed to a process
2576 when that process is created.
2578 The data can be either a handle or just binary data.
2580 enum TProcessParameterType
2589 // bitwise constants
2595 Constant that defines the specified bit value.
2597 const TUint32 KBit0= 0x00000001;
2606 Constant that defines the specified bit value.
2608 const TUint32 KBit1= 0x00000002;
2617 Constant that defines the specified bit value.
2619 const TUint32 KBit2= 0x00000004;
2628 Constant that defines the specified bit value.
2630 const TUint32 KBit3= 0x00000008;
2639 Constant that defines the specified bit value.
2641 const TUint32 KBit4= 0x00000010;
2650 Constant that defines the specified bit value.
2652 const TUint32 KBit5= 0x00000020;
2661 Constant that defines the specified bit value.
2663 const TUint32 KBit6= 0x00000040;
2672 Constant that defines the specified bit value.
2674 const TUint32 KBit7= 0x00000080;
2683 Constant that defines the specified bit value.
2685 const TUint32 KBit8= 0x00000100;
2694 Constant that defines the specified bit value.
2696 const TUint32 KBit9= 0x00000200;
2705 Constant that defines the specified bit value.
2707 const TUint32 KBit10=0x00000400;
2716 Constant that defines the specified bit value.
2718 const TUint32 KBit11=0x00000800;
2727 Constant that defines the specified bit value.
2729 const TUint32 KBit12=0x00001000;
2738 Constant that defines the specified bit value.
2740 const TUint32 KBit13=0x00002000;
2749 Constant that defines the specified bit value.
2751 const TUint32 KBit14=0x00004000;
2760 Constant that defines the specified bit value.
2762 const TUint32 KBit15=0x00008000;
2771 Constant that defines the specified bit value.
2773 const TUint32 KBit16=0x00010000;
2782 Constant that defines the specified bit value.
2784 const TUint32 KBit17=0x00020000;
2793 Constant that defines the specified bit value.
2795 const TUint32 KBit18=0x00040000;
2804 Constant that defines the specified bit value.
2806 const TUint32 KBit19=0x00080000;
2815 Constant that defines the specified bit value.
2817 const TUint32 KBit20=0x00100000;
2826 Constant that defines the specified bit value.
2828 const TUint32 KBit21=0x00200000;
2837 Constant that defines the specified bit value.
2839 const TUint32 KBit22=0x00400000;
2848 Constant that defines the specified bit value.
2850 const TUint32 KBit23=0x00800000;
2859 Constant that defines the specified bit value.
2861 const TUint32 KBit24=0x01000000;
2870 Constant that defines the specified bit value.
2872 const TUint32 KBit25=0x02000000;
2881 Constant that defines the specified bit value.
2883 const TUint32 KBit26=0x04000000;
2892 Constant that defines the specified bit value.
2894 const TUint32 KBit27=0x08000000;
2903 Constant that defines the specified bit value.
2905 const TUint32 KBit28=0x10000000;
2914 Constant that defines the specified bit value.
2916 const TUint32 KBit29=0x20000000;
2925 Constant that defines the specified bit value.
2927 const TUint32 KBit30=0x40000000;
2936 Constant that defines the specified bit value.
2938 const TUint32 KBit31=0x80000000;
2947 Constant that defines the specified bit value.
2949 This is often used as a bit mask.
2951 const TUint32 KSet32=0xffffffff;
2961 Constant that defines the specified bit value.
2963 This is often used as a bit mask.
2965 const TUint32 KClear32=0x00000000;
2974 Constant that defines the specified value.
2976 const TInt KKilo=1024;
2985 Constant that defines the specified value.
2987 const TInt KMega=1024*1024;
2996 Client/Server Session types.
2998 enum TIpcSessionType
3001 The session is not sharable with other threads.
3003 EIpcSession_Unsharable=0,
3006 The session is sharable with other threads in the same process.
3008 EIpcSession_Sharable=1,
3011 The session is sharable with all other threads in the system.
3013 EIpcSession_GlobalSharable=2
3023 const TInt KNullDebugPort=-2;
3028 const TUint32 KModuleVersionWild=0xfffffffeu;
3032 const TUint32 KModuleVersionNull=0xffffffffu;
3037 A constant which represents a thread ID which will never be assigned to a thread.
3038 I.e. The following statement is always true; RThread::Id()!=KNullThreadId
3043 const TUint KNullThreadId = 0xffffffffu;
3048 A constant which represents a process ID which will never be assigned to a process.
3049 I.e. The following statement is always true; RProcess::Id()!=KNullProcessId
3054 const TUint KNullProcessId = 0xffffffffu;
3062 Hardware floating point types.
3064 enum TFloatingPointType
3066 /** No hardware floating point. */
3080 Hardware floating point execution modes.
3082 enum TFloatingPointMode
3085 Run in the fastest mode available - results of calculations may not be
3086 exactly as the IEEE standard in some cases. On ARM VFPv2 hardware this
3087 corresponds to RunFast mode.
3092 Perform all calculations as specified in the IEEE standard, but do not
3093 generate floating point exceptions. This is compatible with the Java
3094 floating point model. This is the default.
3096 EFpModeIEEENoExceptions=1
3106 Hardware floating point rounding modes.
3108 enum TFloatingPointRoundingMode
3111 Round to the nearest value. This is the default.
3113 EFpRoundToNearest=0,
3116 Round toward positive infinity.
3118 EFpRoundToPlusInfinity=1,
3121 Round toward negative infinity.
3123 EFpRoundToMinusInfinity=2,
3138 #include <e32capability.h>