Original Symbian headers
Selected EUSER, Window Server, networking, graphics and device declarations
Loading...
Searching...
No Matches
e32cmn.h
Go to the documentation of this file.
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 "Eclipse Public License v1.0"
5// which accompanies this distribution, and is available
6// at the URL "http://www.eclipse.org/legal/epl-v10.html".
7//
8// Initial Contributors:
9// Nokia Corporation - initial contribution.
10//
11// Contributors:
12//
13// Description:
14// e32\include\e32cmn.h
15//
16//
17
18#ifndef __E32CMN_H__
19#define __E32CMN_H__
20#include <e32const.h>
21
22extern "C" {
53IMPORT_C TInt memcompare(const TUint8* aLeft, TInt aLeftLen, const TUint8* aRight, TInt aRightLen);
54
56
57
86IMPORT_C TAny* wordmove(TAny* aTrg, const TAny* aSrc, unsigned int aLength);
87
88
89
103IMPORT_C TAny* memclr(TAny* aTrg, unsigned int aLength);
104}
105
106
107
108
109#ifndef __TOOLS__
110extern "C" {
124 IMPORT_C TAny* memset(TAny* aTrg, TInt aValue, unsigned int aLength);
125
126
127
128
141 IMPORT_C TAny* memcpy(TAny* aTrg, const TAny* aSrc, unsigned int aLength);
142
143
144
145
158 IMPORT_C TAny* memmove(TAny* aTrg, const TAny* aSrc, unsigned int aLength);
159}
160#else
161#include <string.h>
162#endif
163
164
165
166
180inline TInt Lim(TInt aVal,TUint aLimit)
181 {return(((TUint)aVal)<=aLimit);}
182
183
184
185
199inline TInt LimX(TInt aVal,TUint aLimit)
200 {return(((TUint)aVal)<aLimit);}
201
202
203
204
216template <class T>
217inline T Min(T aLeft,T aRight)
218 {return(aLeft<aRight ? aLeft : aRight);}
219
220
221
222
235template <class T>
236inline T Min(T aLeft,TUint aRight)
237 {return(aLeft<(TInt)aRight ? aLeft : (T)aRight);}
238
239
240
241
253template <class T>
254inline T Max(T aLeft,T aRight)
255 {return(aLeft<aRight ? aRight : aLeft);}
257
258
259
272template <class T>
273inline T Max(T aLeft,TUint aRight)
274 {return(aLeft<(TInt)aRight ? (TInt)aRight : aLeft);}
275
277
278
289template <class T>
290inline T Abs(T aVal)
291 {return(aVal<0 ? -aVal : aVal);}
292
293
294
295
308template <class T>
309inline TBool Rng(T aMin,T aVal,T aMax)
310 {return(aVal>=aMin && aVal<=aMax);}
311
312
313
314
326template <class T,class S>
327inline T* PtrAdd(T* aPtr,S aVal)
328 {return((T*)(((TUint8*)aPtr)+aVal));}
329
330
331
332
344template <class T,class S>
345inline T* PtrSub(T* aPtr,S aVal)
346 {return((T*)(((TUint8*)aPtr)-aVal));}
347
348
349
350
361template <class T>
362inline T Align2(T aValue)
363 {return((T)((((TUint)aValue)+sizeof(TUint16)-1)&~(sizeof(TUint16)-1)));}
364
365
366
367
378template <class T>
379inline T Align4(T aValue)
380 {return((T)((((TUint)aValue)+sizeof(TUint32)-1)&~(sizeof(TUint32)-1)));}
381
382
383
384
396template <class T>
397class TRefByValue
398 {
399public:
400 inline TRefByValue(T& aRef);
401 inline operator T&();
402private:
403 TRefByValue& operator=(TRefByValue aRef);
404private:
405 T &iRef;
406 };
407
408
409
410
411#if !defined (__KERNEL_MODE__)
412class TDesC16; // forward declaration for TChar member functions
413class TPtrC16; // forward declaration for TChar member functions
414#endif
416
417
418
439class TChar
440 {
441public:
442
443
471 enum TCategory
472 {
478 EAlphaGroup = 0x00,
480
486 ELetterOtherGroup = 0x10,
487
488
494 ELetterModifierGroup = 0x20,
495
496
502 EMarkGroup = 0x30,
503
504
510 ENumberGroup = 0x40,
512
519
520
527
528
535
536
543 EControlGroup = 0x80,
544
545
549 EMaxAssignedGroup = 0xE0,
551
555 EUnassignedGroup = 0xF0,
556
557
562
563
568
569
575
580
581
586
591
592
597
602
603
608
609
614
615
620
621
626
627
632
633
638
639
644
645
650
651
656
657
662
663
668
669
674
675
680
681
686
687
692
693
698
699
704
705
710
711
716
717
722
723
728
729
734
735
740
741
748
754
760
766 };
768
775 enum TBdCategory
776 {
780 ELeftToRight, // L Left-to-Right
781
782
786 ELeftToRightEmbedding, // LRE Left-to-Right Embedding
788
792 ELeftToRightOverride, // LRO Left-to-Right Override
794
798 ERightToLeft, // R Right-to-Left
800
804 ERightToLeftArabic, // AL Right-to-Left Arabic
805
810 ERightToLeftEmbedding, // RLE Right-to-Left Embedding
811
812
816 ERightToLeftOverride, // RLO Right-to-Left Override
817
818
822 EPopDirectionalFormat, // PDF Pop Directional Format
823
824
828 EEuropeanNumber, // EN European Number
829
830
834 EEuropeanNumberSeparator, // ES European Number Separator
835
836
840 EEuropeanNumberTerminator, // ET European Number Terminator
841
842
846 EArabicNumber, // AN Arabic Number
847
848
852 ECommonNumberSeparator, // CS Common Number Separator
853
854
858 ENonSpacingMark, // NSM Non-Spacing Mark
859
860
864 EBoundaryNeutral, // BN Boundary Neutral
865
866
870 EParagraphSeparator, // B Paragraph Separator
871
872
876 ESegmentSeparator, // S Segment Separator
877
878
882 EWhitespace, // WS Whitespace
883
884
888 EOtherNeutral // ON Other Neutrals
889 };
890
891
896 enum TCjkWidth
897 {
902
903
907 EHalfWidth, // other categories are as defined in the report
908
909
914
915
921 ENarrow,
927 EWide
928 };
930
937 {
942
943
948 };
949
950
958 enum
959 {
963 EFoldCase = 1,
964
965
969 EFoldAccents = 2,
970
971
975 EFoldDigits = 4,
977
982
983
987 EFoldKana = 16,
989
993 EFoldWidth = 32,
994
995
1000
1001
1005 EFoldAll = -1
1006 };
1007
1008
1017 {
1022
1023
1028
1029
1034
1035
1040
1041
1045 TUint iUpperCase;
1047
1051 TUint iTitleCase;
1052
1053
1057 TBool iMirrored;
1058
1059
1063 TInt iNumericValue;
1064 };
1065
1066 inline TChar();
1067 inline TChar(TUint aChar);
1068 inline TChar& operator-=(TUint aChar);
1069 inline TChar& operator+=(TUint aChar);
1070 inline TChar operator-(TUint aChar);
1071 inline TChar operator+(TUint aChar);
1072 inline operator TUint() const;
1073#ifndef __KERNEL_MODE__
1074 inline void Fold();
1075 inline void LowerCase();
1076 inline void UpperCase();
1077 inline TBool Eos() const;
1078 IMPORT_C TUint GetUpperCase() const;
1079 IMPORT_C TUint GetLowerCase() const;
1080 IMPORT_C TBool IsLower() const;
1081 IMPORT_C TBool IsUpper() const;
1082 IMPORT_C TBool IsAlpha() const;
1083 IMPORT_C TBool IsDigit() const;
1084 IMPORT_C TBool IsAlphaDigit() const;
1085 IMPORT_C TBool IsHexDigit() const;
1086 IMPORT_C TBool IsSpace() const;
1087 IMPORT_C TBool IsPunctuation() const;
1088 IMPORT_C TBool IsGraph() const;
1089 IMPORT_C TBool IsPrint() const;
1090 IMPORT_C TBool IsControl() const;
1091 inline void Fold(TInt aFlags);
1092 inline void TitleCase();
1093 IMPORT_C TUint GetTitleCase() const;
1094 IMPORT_C TBool IsTitle() const;
1095 IMPORT_C TBool IsAssigned() const;
1096 IMPORT_C void GetInfo(TCharInfo& aInfo) const;
1097 IMPORT_C TCategory GetCategory() const;
1098 IMPORT_C TBdCategory GetBdCategory() const;
1099 IMPORT_C TInt GetCombiningClass() const;
1100 IMPORT_C TBool IsMirrored() const;
1101 IMPORT_C TInt GetNumericValue() const;
1102 IMPORT_C TCjkWidth GetCjkWidth() const;
1103 IMPORT_C static TBool Compose(TUint& aResult,const TDesC16& aSource);
1104 IMPORT_C TBool Decompose(TPtrC16& aResult) const;
1105
1106 // surrogate specific ones
1107 inline static TBool IsSupplementary(TUint aChar);
1108 inline static TBool IsSurrogate(TText16 aInt16);
1109 inline static TBool IsHighSurrogate(TText16 aInt16);
1110 inline static TBool IsLowSurrogate(TText16 aInt16);
1111 inline static TUint JoinSurrogate(TText16 aHighSurrogate, TText16 aLowSurrogate);
1112 inline static TText16 GetHighSurrogate(TUint aChar);
1113 inline static TText16 GetLowSurrogate(TUint aChar);
1115protected:
1116 inline void SetChar(TUint aChar);
1117#endif
1118private:
1119 TUint iChar;
1120 __DECLARE_TEST;
1123#include <e32des8.h>
1124#ifndef __KERNEL_MODE__
1125#include <e32des16.h>
1126#endif
1131#if defined(_UNICODE) && !defined(__KERNEL_MODE__)
1132#define __Size (sizeof(TUint)/sizeof(TUint16))
1148typedef TDesC16 TDesC;
1168typedef TPtrC16 TPtrC;
1169
1170
1171
1172
1188typedef TDes16 TDes;
1189
1190
1191
1192
1208typedef TPtr16 TPtr;
1209
1210
1211
1212
1213#ifndef __KERNEL_MODE__
1229typedef HBufC16 HBufC;
1230
1231
1232
1233
1249typedef TDes16Overflow TDesOverflow;
1250
1251
1266typedef RBuf16 RBuf;
1267
1268#endif
1269#else
1270#define __Size (sizeof(TUint)/sizeof(TUint8))
1271
1272
1273
1274
1289typedef TDesC8 TDesC;
1290
1291
1292
1293
1308typedef TPtrC8 TPtrC;
1309
1310
1311
1312
1327typedef TDes8 TDes;
1328
1329
1330
1331
1346typedef TPtr8 TPtr;
1347#ifndef __KERNEL_MODE__
1348
1349
1350
1351
1367typedef HBufC8 HBufC;
1368
1369
1370
1371
1387typedef TDes8Overflow TDesOverflow;
1388
1389
1404typedef RBuf8 RBuf;
1405
1406#endif
1407#endif
1409
1410#if defined(_UNICODE) && !defined(__KERNEL_MODE__)
1411typedef TBufCBase16 TBufCBase;
1412#else
1413typedef TBufCBase8 TBufCBase;
1414#endif
1415
1447template <TInt S>
1448#if defined(_UNICODE) && !defined(__KERNEL_MODE__)
1449class TBufC : public TBufCBase16
1450#else
1451class TBufC : public TBufCBase8
1452#endif
1454public:
1455 inline TBufC();
1456 inline TBufC(const TText* aString);
1457 inline TBufC(const TDesC& aDes);
1458 inline TBufC<S>& operator=(const TText* aString);
1459 inline TBufC<S>& operator=(const TDesC& aDes);
1460 inline TPtr Des();
1461private:
1462 TText iBuf[__Align(S)];
1463 };
1464
1465
1466
1500template <TInt S>
1501#if defined(_UNICODE) && !defined(__KERNEL_MODE__)
1502class TBuf : public TBufBase16
1503#else
1504class TBuf : public TBufBase8
1505#endif
1506 {
1507public:
1508 inline TBuf();
1509 inline explicit TBuf(TInt aLength);
1510 inline TBuf(const TText* aString);
1511 inline TBuf(const TDesC& aDes);
1512 inline TBuf<S>& operator=(const TText* aString);
1513 inline TBuf<S>& operator=(const TDesC& aDes);
1514 inline TBuf<S>& operator=(const TBuf<S>& aBuf);
1515private:
1516 TText iBuf[__Align(S)];
1517 };
1518
1519
1520
1534
1548template <TInt S>
1549class TLitC
1550 {
1551public:
1555 enum {BufferSize=S-1};
1556 inline const TDesC* operator&() const;
1557 inline operator const TDesC&() const;
1558 inline const TDesC& operator()() const;
1559 inline operator const __TRefDesC() const;
1560public:
1561#if !defined(_UNICODE) || defined(__KERNEL_MODE__)
1562
1566 typedef TUint8 __TText;
1567#elif defined(__GCC32__)
1568
1572 typedef wchar_t __TText;
1573#elif defined(__VC32__)
1574
1578 typedef TUint16 __TText;
1579
1580#elif defined(__CW32__)
1585 typedef TUint16 __TText;
1586#elif !defined(__TText_defined)
1587#error no typedef for __TText
1588#endif
1589public:
1593 TUint iTypeLength;
1594
1598 __TText iBuf[__Align(S)];
1599 };
1600
1601
1612_LIT(KNullDesC,"");
1613
1614
1615
1622_LIT8(KNullDesC8,"");
1623#ifndef __KERNEL_MODE__
1624
1626
1633_LIT16(KNullDesC16,"");
1634#endif
1638
1650template <class T>
1651class TPckgC : public TPtrC8
1652 {
1653public:
1654 inline TPckgC(const T& aRef);
1655 inline const T& operator()() const;
1656private:
1657 TPckgC<T>& operator=(const TPckgC<T>& aRef);
1658 };
1659
1660
1661
1662
1675template <class T>
1676class TPckg : public TPtr8
1677 {
1678public:
1679 inline TPckg(const T& aRef);
1680 inline T& operator()();
1681private:
1682 TPckg<T>& operator=(const TPckg<T>& aRef);
1683 };
1684
1685
1686
1687
1702template <class T>
1703class TPckgBuf : public TAlignedBuf8<sizeof(T)>
1705public:
1706 inline TPckgBuf();
1707 inline TPckgBuf(const T& aRef);
1708 inline TPckgBuf& operator=(const TPckgBuf<T>& aRef);
1709 inline T& operator=(const T& aRef);
1710 inline T& operator()();
1711 inline const T& operator()() const;
1712 };
1713
1714
1715
1727typedef TBuf<KMaxName> TName;
1728
1741
1742
1743
1756
1757
1758
1770
1771
1772
1783typedef TBuf<KMaxPath> TPath;
1784
1785
1786
1787
1801
1802
1803
1804
1816
1817
1818
1819
1826#define KNullUid TUid::Null()
1827
1828
1829
1830
1837class TUid
1838 {
1839public:
1840#ifndef __KERNEL_MODE__
1841 IMPORT_C TBool operator==(const TUid& aUid) const;
1842 IMPORT_C TBool operator!=(const TUid& aUid) const;
1843 IMPORT_C TUidName Name() const;
1844#endif
1845 static inline TUid Uid(TInt aUid);
1846 static inline TUid Null();
1847public:
1851 TInt32 iUid;
1852 };
1853
1854
1855
1856
1867class TUidType
1868 {
1869public:
1870#ifndef __KERNEL_MODE__
1871 IMPORT_C TUidType();
1872 IMPORT_C TUidType(TUid aUid1);
1873 IMPORT_C TUidType(TUid aUid1,TUid aUid2);
1874 IMPORT_C TUidType(TUid aUid1,TUid aUid2,TUid aUid3);
1875 IMPORT_C TBool operator==(const TUidType& aUidType) const;
1876 IMPORT_C TBool operator!=(const TUidType& aUidType) const;
1877 IMPORT_C const TUid& operator[](TInt anIndex) const;
1878 IMPORT_C TUid MostDerived() const;
1879 IMPORT_C TBool IsPresent(TUid aUid) const;
1880 IMPORT_C TBool IsValid() const;
1881private:
1882#endif
1883 TUid iUid[KMaxCheckedUid];
1884 };
1885
1886
1887
1888
1916 {
1917public:
1918 inline TSecureId();
1919 inline TSecureId(TUint32 aId);
1920 inline operator TUint32() const;
1921 inline TSecureId(TUid aId);
1922 inline operator TUid() const;
1923public:
1924 TUint32 iId;
1925 };
1926
1927
1928
1929
1956class TVendorId
1957 {
1958public:
1959 inline TVendorId();
1960 inline TVendorId(TUint32 aId);
1961 inline operator TUint32() const;
1962 inline TVendorId(TUid aId);
1963 inline operator TUid() const;
1964public:
1965 TUint32 iId;
1968
1969
1974#if defined(__ARMCC__) && __ARMCC_VERSION >= 400000
1975#pragma push
1976#pragma diag_suppress 430
1977#endif
1978class SSecureId
1979 {
1980public:
1981 inline const TSecureId* operator&() const;
1982 inline operator const TSecureId&() const;
1983 inline operator TUint32() const;
1984 inline operator TUid() const;
1985public:
1986 TUint32 iId;
1987 };
1988#if defined(__ARMCC__) && __ARMCC_VERSION >= 400000
1989#pragma pop
1990#endif
1991
1992
1993
1998#if defined(__ARMCC__) && __ARMCC_VERSION >= 400000
1999#pragma push
2000#pragma diag_suppress 430
2001#endif
2004public:
2005 inline const TVendorId* operator&() const;
2006 inline operator const TVendorId&() const;
2007 inline operator TUint32() const;
2008 inline operator TUid() const;
2009public:
2010 TUint32 iId;
2011 };
2012#if defined(__ARMCC__) && __ARMCC_VERSION >= 400000
2013#pragma pop
2014#endif
2015
2016
2017
2025#define _LIT_SECURE_ID(name,value) const SSecureId name={value}
2026
2027
2028
2029
2037#define _LIT_VENDOR_ID(name,value) const SVendorId name={value}
2038
2039
2041
2062class TVersion
2063 {
2064public:
2065 IMPORT_C TVersion();
2066 IMPORT_C TVersion(TInt aMajor,TInt aMinor,TInt aBuild);
2067 IMPORT_C TVersionName Name() const;
2068public:
2072 TInt8 iMajor;
2073
2074
2078 TInt8 iMinor;
2079
2080
2084 TInt16 iBuild;
2085 };
2103class TRequestStatus
2104 {
2105public:
2106 inline TRequestStatus();
2107 inline TRequestStatus(TInt aVal);
2108 inline TInt operator=(TInt aVal);
2109 inline TBool operator==(TInt aVal) const;
2110 inline TBool operator!=(TInt aVal) const;
2111 inline TBool operator>=(TInt aVal) const;
2112 inline TBool operator<=(TInt aVal) const;
2113 inline TBool operator>(TInt aVal) const;
2114 inline TBool operator<(TInt aVal) const;
2115 inline TInt Int() const;
2116private:
2117 enum
2118 {
2119 EActive = 1, //bit0
2120 ERequestPending = 2, //bit1
2121 };
2122 TInt iStatus;
2123 TUint iFlags;
2124 friend class CActive;
2125 friend class CActiveScheduler;
2126 friend class CServer2;
2127 };
2128
2129
2130
2131
2132class TSize;
2143class TPoint
2144 {
2145public:
2146#ifndef __KERNEL_MODE__
2152 inline TPoint();
2153 inline TPoint(TInt aX,TInt aY);
2154 IMPORT_C TBool operator==(const TPoint& aPoint) const;
2155 IMPORT_C TBool operator!=(const TPoint& aPoint) const;
2156 IMPORT_C TPoint& operator-=(const TPoint& aPoint);
2157 IMPORT_C TPoint& operator+=(const TPoint& aPoint);
2158 IMPORT_C TPoint& operator-=(const TSize& aSize);
2159 IMPORT_C TPoint& operator+=(const TSize& aSize);
2160 IMPORT_C TPoint operator-(const TPoint& aPoint) const;
2161 IMPORT_C TPoint operator+(const TPoint& aPoint) const;
2162 IMPORT_C TPoint operator-(const TSize& aSize) const;
2163 IMPORT_C TPoint operator+(const TSize& aSize) const;
2164 IMPORT_C TPoint operator-() const;
2165 IMPORT_C void SetXY(TInt aX,TInt aY);
2166 IMPORT_C TSize AsSize() const;
2167#endif
2168public:
2172 TInt iX;
2176 TInt iY;
2177 };
2178
2179
2180
2181
2190class TPoint3D
2191 {
2192public:
2193#ifndef __KERNEL_MODE__
2195
2203 inline TPoint3D();
2207 inline TPoint3D(TInt aX,TInt aY,TInt aZ);
2211 inline TPoint3D(const TPoint& aPoint);
2212
2213 IMPORT_C TBool operator==(const TPoint3D& aPoint3D) const;
2214 IMPORT_C TBool operator!=(const TPoint3D& aPoint3D) const;
2216 IMPORT_C TPoint3D& operator-=(const TPoint3D& aPoint3D);
2217 IMPORT_C TPoint3D& operator-=(const TPoint& aPoint);
2218
2219 IMPORT_C TPoint3D& operator+=(const TPoint3D& aPoint3D);
2220 IMPORT_C TPoint3D& operator+=(const TPoint& aPoint);
2222 IMPORT_C TPoint3D operator-(const TPoint3D& aPoint3D) const;
2223 IMPORT_C TPoint3D operator-(const TPoint& aPoint) const;
2224
2225 IMPORT_C TPoint3D operator+(const TPoint3D& aPoint3D) const;
2226 IMPORT_C TPoint3D operator+(const TPoint& aPoint) const;
2230 IMPORT_C TPoint3D operator-() const;
2231
2235 IMPORT_C void SetXYZ(TInt aX,TInt aY,TInt aZ);
2236
2240 IMPORT_C void SetPoint(const TPoint& aPoint);
2241
2245 IMPORT_C TPoint AsPoint() const;
2246#endif
2247public:
2251 TInt iX;
2255 TInt iY;
2259 TInt iZ;
2260 };
2261
2262
2272class TAngle3D
2273 {
2274public:
2278 TInt iPhi;
2282 TInt iTheta;
2283 };
2285
2297public:
2298#ifndef __KERNEL_MODE__
2304 inline TSize();
2305 inline TSize(TInt aWidth,TInt aHeight);
2306 IMPORT_C TBool operator==(const TSize& aSize) const;
2307 IMPORT_C TBool operator!=(const TSize& aSize) const;
2308 IMPORT_C TSize& operator-=(const TSize& aSize);
2309 IMPORT_C TSize& operator-=(const TPoint& aPoint);
2310 IMPORT_C TSize& operator+=(const TSize& aSize);
2311 IMPORT_C TSize& operator+=(const TPoint& aPoint);
2312 IMPORT_C TSize operator-(const TSize& aSize) const;
2313 IMPORT_C TSize operator-(const TPoint& aPoint) const;
2314 IMPORT_C TSize operator+(const TSize& aSize) const;
2315 IMPORT_C TSize operator+(const TPoint& aPoint) const;
2316 IMPORT_C TSize operator-() const;
2317 IMPORT_C void SetSize(TInt aWidth,TInt aHeight);
2318 IMPORT_C TPoint AsPoint() const;
2319#endif
2320public:
2324 TInt iWidth;
2328 TInt iHeight;
2329 };
2330
2331
2333
2347class THandleInfo
2348 {
2349public:
2354
2363 TInt iNumProcesses;
2369 };
2370
2371
2373
2378 {
2379public:
2380 inline TFindHandle();
2381 inline TInt Handle() const;
2382#ifdef __KERNEL_MODE__
2383 inline TInt Index() const;
2384 inline TInt UniqueID() const;
2385 inline TUint64 ObjectID() const;
2386 inline void Set(TInt aIndex, TInt aUniqueId, TUint64 aObjectId);
2387#else
2388protected:
2389 inline void Reset();
2390#endif
2391private:
2392 TInt iHandle;
2393 TInt iSpare1;
2394 TInt iObjectIdLow;
2395 TInt iObjectIdHigh;
2396 };
2398
2399
2400class RThread;
2402class TFindSemaphore;
2417 {
2418public:
2425 enum TAttributes
2427 EReadAccess=0x1,
2428 EWriteAccess=0x2,
2431 };
2432public:
2433 inline RHandleBase();
2434 inline TInt Handle() const;
2435 inline void SetHandle(TInt aHandle);
2436 inline TInt SetReturnedHandle(TInt aHandleOrError);
2437 static void DoExtendedClose();
2438#ifndef __KERNEL_MODE__
2439 IMPORT_C void Close();
2440 IMPORT_C TName Name() const;
2441 IMPORT_C TFullName FullName() const;
2442 IMPORT_C void FullName(TDes& aName) const;
2443 IMPORT_C void SetHandleNC(TInt aHandle);
2444 IMPORT_C TInt Duplicate(const RThread& aSrc,TOwnerType aType=EOwnerProcess);
2445 IMPORT_C void HandleInfo(THandleInfo* anInfo);
2446 IMPORT_C TUint Attributes() const;
2447 IMPORT_C TInt BTraceId() const;
2448 IMPORT_C void NotifyDestruction(TRequestStatus& aStatus);
2449protected:
2450 inline RHandleBase(TInt aHandle);
2451 IMPORT_C TInt Open(const TFindHandleBase& aHandle,TOwnerType aType);
2452 static TInt SetReturnedHandle(TInt aHandleOrError,RHandleBase& aHandle);
2453 TInt OpenByName(const TDesC &aName,TOwnerType aOwnerType,TInt aObjectType);
2454#endif
2455private:
2456 static void DoExtendedCloseL();
2457protected:
2479class RSemaphore : public RHandleBase
2480 {
2481public:
2482#ifndef __KERNEL_MODE__
2483 inline TInt Open(const TFindSemaphore& aFind,TOwnerType aType=EOwnerProcess);
2484 IMPORT_C TInt CreateLocal(TInt aCount,TOwnerType aType=EOwnerProcess);
2485 IMPORT_C TInt CreateGlobal(const TDesC& aName,TInt aCount,TOwnerType aType=EOwnerProcess);
2486 IMPORT_C TInt OpenGlobal(const TDesC& aName,TOwnerType aType=EOwnerProcess);
2487 IMPORT_C TInt Open(RMessagePtr2 aMessage,TInt aParam,TOwnerType aType=EOwnerProcess);
2488 IMPORT_C TInt Open(TInt aArgumentIndex, TOwnerType aType=EOwnerProcess);
2489 IMPORT_C void Wait();
2490 IMPORT_C TInt Wait(TInt aTimeout); // timeout in microseconds
2491 IMPORT_C TInt Poll(); // acquire the semaphore if possible, but don't block
2492 IMPORT_C void Signal();
2493 IMPORT_C void Signal(TInt aCount);
2494#endif
2496
2497
2498
2499
2509class RFastLock : public RSemaphore
2510 {
2511public:
2512 inline RFastLock();
2513 IMPORT_C TInt CreateLocal(TOwnerType aType=EOwnerProcess);
2514 IMPORT_C void Wait();
2515 IMPORT_C TInt Wait(TInt aTimeout); // timeout in microseconds
2516 IMPORT_C TInt Poll(); // acquire the lock if possible, but don't block
2517 IMPORT_C void Signal();
2518private:
2519 TInt iCount;
2520 };
2521
2522
2523
2524
2535class RReadWriteLock
2536 {
2537public:
2546 };
2548 {
2551 };
2552
2553public:
2554 inline RReadWriteLock();
2555 IMPORT_C TInt CreateLocal(TReadWriteLockPriority aPriority = EWriterPriority);
2556 IMPORT_C void Close();
2557
2558 IMPORT_C void ReadLock();
2559 IMPORT_C void WriteLock();
2560 IMPORT_C TBool TryReadLock();
2561 IMPORT_C TBool TryWriteLock();
2562 IMPORT_C TBool TryUpgradeReadLock();
2563 IMPORT_C void DowngradeWriteLock();
2564 IMPORT_C void Unlock();
2565
2566private:
2567 RReadWriteLock(const RReadWriteLock& aLock);
2568 RReadWriteLock& operator=(const RReadWriteLock& aLock);
2569
2570 TInt UnlockWriter();
2571 TInt UnlockAlternate();
2572 TInt UnlockReader();
2573
2574private:
2575 volatile TUint64 iValues; // Bits 0-15: readers; bit 16: writer; bits 32-47: readersPending; bits 48-63: writersPending
2576 TReadWriteLockPriority iPriority;
2577 RSemaphore iReaderSem;
2578 RSemaphore iWriterSem;
2579 TUint32 iSpare[4]; // Reserved for future development
2580 };
2597public:
2598 IMPORT_C TInt Open(RMessagePtr2 aMessage,TInt aParam,TOwnerType aType=EOwnerProcess);
2599 IMPORT_C TInt Open(TInt aArgumentIndex, TOwnerType aType=EOwnerProcess);
2600protected:
2601 inline TInt DoCreate(const TDesC& aDevice, const TVersion& aVer, TInt aUnit, const TDesC* aDriver, const TDesC8* anInfo, TOwnerType aType=EOwnerProcess, TBool aProtected=EFalse);
2602 IMPORT_C void DoCancel(TUint aReqMask);
2603 IMPORT_C void DoRequest(TInt aReqNo,TRequestStatus& aStatus);
2604 IMPORT_C void DoRequest(TInt aReqNo,TRequestStatus& aStatus,TAny* a1);
2605 IMPORT_C void DoRequest(TInt aReqNo,TRequestStatus& aStatus,TAny* a1,TAny* a2);
2606 IMPORT_C TInt DoControl(TInt aFunction);
2607 IMPORT_C TInt DoControl(TInt aFunction,TAny* a1);
2608 IMPORT_C TInt DoControl(TInt aFunction,TAny* a1,TAny* a2);
2609 inline TInt DoSvControl(TInt aFunction) { return DoControl(aFunction); }
2610 inline TInt DoSvControl(TInt aFunction,TAny* a1) { return DoControl(aFunction, a1); }
2611 inline TInt DoSvControl(TInt aFunction,TAny* a1,TAny* a2) { return DoControl(aFunction, a1, a2); }
2612private:
2613 IMPORT_C TInt DoCreate(const TDesC& aDevice, const TVersion& aVer, TInt aUnit, const TDesC* aDriver, const TDesC8* aInfo, TInt aType);
2614private:
2615 // Padding for Binary Compatibility purposes
2616 TInt iPadding1;
2617 TInt iPadding2;
2618 };
2619
2620
2621
2622
2628// Put pure virtual functions into a separate base class so that vptr is at same
2629// place in both GCC98r2 and EABI builds.
2630class MAllocator
2631 {
2632public:
2633 virtual TAny* Alloc(TInt aSize)=0;
2634 virtual void Free(TAny* aPtr)=0;
2635 virtual TAny* ReAlloc(TAny* aPtr, TInt aSize, TInt aMode=0)=0;
2636 virtual TInt AllocLen(const TAny* aCell) const =0;
2637 virtual TInt Compress()=0;
2638 virtual void Reset()=0;
2639 virtual TInt AllocSize(TInt& aTotalAllocSize) const =0;
2640 virtual TInt Available(TInt& aBiggestBlock) const =0;
2641 virtual TInt DebugFunction(TInt aFunc, TAny* a1=NULL, TAny* a2=NULL)=0;
2642 virtual TInt Extension_(TUint aExtensionId, TAny*& a0, TAny* a1)=0;
2654class RAllocator : public MAllocator
2655 {
2656public:
2664 enum TAllocFail
2665 {
2679
2686
2690 ENone,
2691
2697 EFailNext,
2725
2732
2739 };
2740
2744 enum TDbgHeapType
2745 {
2749 EUser,
2750
2754 EKernel
2755 };
2756
2782 struct SCheckInfo {TBool iAll; TInt iCount; const TDesC8* iFileName; TInt iLineNum;};
2783#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
2784 struct SRAllocatorBurstFail {TInt iBurst; TInt iRate; TInt iUnused[2];};
2785#endif
2786 enum {EMaxHandles=32};
2787
2788public:
2789 inline RAllocator();
2790#ifndef __KERNEL_MODE__
2791 IMPORT_C TInt Open();
2792 IMPORT_C void Close();
2793 IMPORT_C TAny* AllocZ(TInt aSize);
2794 IMPORT_C TAny* AllocZL(TInt aSize);
2795 IMPORT_C TAny* AllocL(TInt aSize);
2796 IMPORT_C TAny* AllocLC(TInt aSize);
2797 IMPORT_C void FreeZ(TAny*& aCell);
2798 IMPORT_C TAny* ReAllocL(TAny* aCell, TInt aSize, TInt aMode=0);
2799 IMPORT_C TInt Count() const;
2800 IMPORT_C TInt Count(TInt& aFreeCount) const;
2801#endif
2802 UIMPORT_C void Check() const;
2803 UIMPORT_C void __DbgMarkStart();
2804 UIMPORT_C TUint32 __DbgMarkEnd(TInt aCount);
2805 UIMPORT_C TInt __DbgMarkCheck(TBool aCountAll, TInt aCount, const TDesC8& aFileName, TInt aLineNum);
2806 inline void __DbgMarkCheck(TBool aCountAll, TInt aCount, const TUint8* aFileName, TInt aLineNum);
2807 UIMPORT_C void __DbgSetAllocFail(TAllocFail aType, TInt aRate);
2808 UIMPORT_C TAllocFail __DbgGetAllocFail();
2809 UIMPORT_C void __DbgSetBurstAllocFail(TAllocFail aType, TUint aRate, TUint aBurst);
2810 UIMPORT_C TUint __DbgCheckFailure();
2811 UIMPORT_C TInt Size() const;
2812 UIMPORT_C TInt MaxLength() const;
2813 UIMPORT_C TUint8* Base() const;
2814 UIMPORT_C TInt Align(TInt a) const;
2815 UIMPORT_C TAny* Align(TAny* a) const;
2816
2817protected:
2818 UIMPORT_C virtual TInt Extension_(TUint aExtensionId, TAny*& a0, TAny* a1);
2819#ifndef __KERNEL_MODE__
2820 IMPORT_C virtual void DoClose();
2821#endif
2822
2823protected:
2824 TInt iAccessCount; // Value of the allocator's access count (ie. Number of times RAllocator::Open() has been called)
2825 TInt iHandleCount; // Number of handles in the iHandles array
2826 TInt* iHandles; // Array of handles to chunks used by the heap implementation
2827 TUint32 iFlags; // Flags describing attributes of the heap; see RAllocator::TFlags
2828 TInt iCellCount; // Internal debugger use only; use MAllocator::AllocSize() instead
2829 TInt iTotalAllocSize; // Internal debugger use only; use MAllocator::AllocSize() instead
2831
2832class UserHeap;
2833
2834// This #define is for tools such as MemSpy that need to work across different versions of
2835// Symbian and need to know whether they are working with the new or old heap
2836
2837#define __SYMBIAN_KERNEL_HYBRID_HEAP__
2838
2857class RHeap : public RAllocator
2858 {
2859public:
2860
2861 UIMPORT_C virtual TAny* Alloc(TInt aSize);
2862 UIMPORT_C virtual void Free(TAny* aPtr);
2863 UIMPORT_C virtual TAny* ReAlloc(TAny* aPtr, TInt aSize, TInt aMode=0);
2864 UIMPORT_C virtual TInt AllocLen(const TAny* aCell) const;
2865#ifndef __KERNEL_MODE__
2866 UIMPORT_C virtual TInt Compress();
2867 UIMPORT_C virtual void Reset();
2868 UIMPORT_C virtual TInt AllocSize(TInt& aTotalAllocSize) const;
2869 UIMPORT_C virtual TInt Available(TInt& aBiggestBlock) const;
2870#endif
2871 UIMPORT_C virtual TInt DebugFunction(TInt aFunc, TAny* a1=NULL, TAny* a2=NULL);
2872protected:
2873 UIMPORT_C virtual TInt Extension_(TUint aExtensionId, TAny*& a0, TAny* a1);
2874 inline RHeap() { }
2875
2876public:
2877
2883 struct SDebugCell
2884 {
2888 TInt nestingLevel;
2889
2893 TInt allocCount;
2894 };
2895
2899 struct SHeapCellInfo { RHeap* iHeap; TInt iTotalAlloc; TInt iTotalAllocSize; TInt iTotalFree; TInt iLevelAlloc; SDebugCell* iStranded; };
2900
2904 enum { EDebugHdrSize = sizeof(SDebugCell) };
2905
2909 enum { ECellAlignment = 8 };
2914 enum { EFreeCellSize = 4 };
2916#ifdef _DEBUG
2920 enum { EAllocCellSize = (4 + EDebugHdrSize) };
2921#else
2925 enum { EAllocCellSize = 4 };
2926#endif
2931 enum TDebugOp { EWalk = 128, EHybridHeap };
2946
2951
2955 typedef void (*TWalkFunc)(TAny*, TCellType, TAny*, TInt);
2956
2957protected:
2959 // These variables are present only for downwards binary compatibility. Most are unused,
2960 // but some must be present so that previously inline functions continue to work. These
2961 // old inline functions are now replaced with non inline versions so recompiling existing
2962 // code will automatically switch to the new versions and you should no longer access any
2963 // of the variables in here.
2965 // These variables should now all be considered private and should NOT be accessed directly!
2967 TInt iUnused1; // Present for binary compatibility reasons only
2968 TInt iMaxLength; // Use RAllocator::MaxLength() to get this information now
2969 TInt iUnused2; // Present for binary compatibility reasons only
2970 TInt iUnused3; // Present for binary compatibility reasons only
2971 // These next two variables must remain in this order for correct object destruction
2972 TInt iChunkHandle; // Do not use; consider undocumented
2973 RFastLock iLock; // Do not use; consider undocumented
2974 TUint8* iBase; // Use RAllocator::Base() to get this information now
2975 TUint8* iTop; // Do not use; consider undocumented
2976 TInt iAlign; // Use RAllocator::Align() to get this information now
2978 // These variables are temporary to prevent source breaks from req417-52840. They are deprecated in
2979 // favour of non hacky ways of determining this information but are required during the switchover to
2980 // this method
2981 TAllocFail iFailType; // Use RAllocator::__DbgGetAllocFail() to get this information now
2982 TInt iNestingLevel; // Do not use; consider undocumented
2983 TAny* iTestData; // Do not use; consider undocumented
2985 friend class UserHeap;
2987
2988class OnlyCreateWithNull;
2989
2991typedef void (OnlyCreateWithNull::* __NullPMF)();
2996public:
2997 inline OnlyCreateWithNull(__NullPMF /*aPointerToNull*/) {}
2998 };
2999
3013class RMessagePtr2
3014 {
3015public:
3016 inline RMessagePtr2();
3017 inline TBool IsNull() const;
3018 inline TInt Handle() const;
3019#ifndef __KERNEL_MODE__
3020 IMPORT_C void Complete(TInt aReason) const;
3021 IMPORT_C void Complete(RHandleBase aHandle) const;
3022 IMPORT_C TInt GetDesLength(TInt aParam) const;
3023 IMPORT_C TInt GetDesLengthL(TInt aParam) const;
3024 IMPORT_C TInt GetDesMaxLength(TInt aParam) const;
3025 IMPORT_C TInt GetDesMaxLengthL(TInt aParam) const;
3026 IMPORT_C void ReadL(TInt aParam,TDes8& aDes,TInt aOffset=0) const;
3027 IMPORT_C void ReadL(TInt aParam,TDes16 &aDes,TInt aOffset=0) const;
3028 IMPORT_C void WriteL(TInt aParam,const TDesC8& aDes,TInt aOffset=0) const;
3029 IMPORT_C void WriteL(TInt aParam,const TDesC16& aDes,TInt aOffset=0) const;
3030 IMPORT_C TInt Read(TInt aParam,TDes8& aDes,TInt aOffset=0) const;
3031 IMPORT_C TInt Read(TInt aParam,TDes16 &aDes,TInt aOffset=0) const;
3032 IMPORT_C TInt Write(TInt aParam,const TDesC8& aDes,TInt aOffset=0) const;
3033 IMPORT_C TInt Write(TInt aParam,const TDesC16& aDes,TInt aOffset=0) const;
3034 IMPORT_C void Panic(const TDesC& aCategory,TInt aReason) const;
3035 IMPORT_C void Kill(TInt aReason) const;
3036 IMPORT_C void Terminate(TInt aReason) const;
3037 IMPORT_C TInt SetProcessPriority(TProcessPriority aPriority) const;
3038 inline void SetProcessPriorityL(TProcessPriority aPriority) const;
3039 IMPORT_C TInt Client(RThread& aClient, TOwnerType aOwnerType=EOwnerProcess) const;
3040 inline void ClientL(RThread& aClient, TOwnerType aOwnerType=EOwnerProcess) const;
3041 IMPORT_C TUint ClientProcessFlags() const;
3042 IMPORT_C const TRequestStatus* ClientStatus() const;
3043 IMPORT_C TBool ClientIsRealtime() const;
3044
3078 IMPORT_C TSecureId SecureId() const;
3079
3112 IMPORT_C TVendorId VendorId() const;
3113
3131#ifndef __REMOVE_PLATSEC_DIAGNOSTIC_STRINGS__
3132 inline TBool HasCapability(TCapability aCapability, const char* aDiagnostic=0) const;
3133#else //__REMOVE_PLATSEC_DIAGNOSTIC_STRINGS__
3134 // Only available to NULL arguments
3135 inline TBool HasCapability(TCapability aCapability, OnlyCreateWithNull aDiagnostic=NULL) const;
3136#ifndef __REMOVE_PLATSEC_DIAGNOSTICS__
3137 // For things using KSuppressPlatSecDiagnostic
3138 inline TBool HasCapability(TCapability aCapability, OnlyCreateWithNull aDiagnostic, OnlyCreateWithNull aSuppress) const;
3139#endif // !__REMOVE_PLATSEC_DIAGNOSTICS__
3140#endif // !__REMOVE_PLATSEC_DIAGNOSTIC_STRINGS__
3141
3159#ifndef __REMOVE_PLATSEC_DIAGNOSTIC_STRINGS__
3160 inline void HasCapabilityL(TCapability aCapability, const char* aDiagnosticMessage=0) const;
3161#else //__REMOVE_PLATSEC_DIAGNOSTIC_STRINGS__
3162 // Only available to NULL arguments
3163 inline void HasCapabilityL(TCapability aCapability, OnlyCreateWithNull aDiagnosticMessage=NULL) const;
3164#ifndef __REMOVE_PLATSEC_DIAGNOSTICS__
3165 // For things using KSuppressPlatSecDiagnostic
3166 inline void HasCapabilityL(TCapability aCapability, OnlyCreateWithNull aDiagnostic, OnlyCreateWithNull aSuppress) const;
3167#endif // !__REMOVE_PLATSEC_DIAGNOSTICS__
3168#endif // !__REMOVE_PLATSEC_DIAGNOSTIC_STRINGS__
3169
3188#ifndef __REMOVE_PLATSEC_DIAGNOSTIC_STRINGS__
3189 inline TBool HasCapability(TCapability aCapability1, TCapability aCapability2, const char* aDiagnostic=0) const;
3190#else //__REMOVE_PLATSEC_DIAGNOSTIC_STRINGS__
3191 // Only available to NULL arguments
3192 inline TBool HasCapability(TCapability aCapability1, TCapability aCapability2, OnlyCreateWithNull aDiagnostic=NULL) const;
3193#ifndef __REMOVE_PLATSEC_DIAGNOSTICS__
3194 // For things using KSuppressPlatSecDiagnostic
3195 inline TBool HasCapability(TCapability aCapability1, TCapability aCapability2, OnlyCreateWithNull aDiagnostic, OnlyCreateWithNull aSuppress) const;
3196#endif // !__REMOVE_PLATSEC_DIAGNOSTICS__
3197#endif // !__REMOVE_PLATSEC_DIAGNOSTIC_STRINGS__
3198
3217#ifndef __REMOVE_PLATSEC_DIAGNOSTIC_STRINGS__
3218 inline void HasCapabilityL(TCapability aCapability1, TCapability aCapability2, const char* aDiagnosticMessage=0) const;
3219#else //__REMOVE_PLATSEC_DIAGNOSTIC_STRINGS__
3220 // Only available to NULL arguments
3221 inline void HasCapabilityL(TCapability aCapability1, TCapability aCapability2, OnlyCreateWithNull aDiagnosticMessage=NULL) const;
3222#ifndef __REMOVE_PLATSEC_DIAGNOSTICS__
3223 // For things using KSuppressPlatSecDiagnostic
3224 inline void HasCapabilityL(TCapability aCapability1, TCapability aCapability2, OnlyCreateWithNull aDiagnostic, OnlyCreateWithNull aSuppress) const;
3225#endif // !__REMOVE_PLATSEC_DIAGNOSTICS__
3226#endif // !__REMOVE_PLATSEC_DIAGNOSTIC_STRINGS__
3231 inline TUid Identity() const { return SecureId(); }
3232#endif
3234private:
3235 // Implementations of functions with diagnostics
3236 IMPORT_C TBool DoHasCapability(TCapability aCapability, const char* aDiagnostic) const;
3237 IMPORT_C TBool DoHasCapability(TCapability aCapability) const;
3238 IMPORT_C TBool DoHasCapability(TCapability aCapability, TCapability aCapability2, const char* aDiagnostic) const;
3239 IMPORT_C TBool DoHasCapability(TCapability aCapability, TCapability aCapability2) const;
3240
3241protected:
3242 TInt iHandle;
3243 };
3244inline TBool operator==(RMessagePtr2 aLeft,RMessagePtr2 aRight);
3245inline TBool operator!=(RMessagePtr2 aLeft,RMessagePtr2 aRight);
3246
3247class CSession2;
3248
3249#define __IPC_V2_PRESENT__
3250
3257class RMessage2 : public RMessagePtr2
3258 {
3259 friend class CServer2;
3260public:
3261
3265 enum TSessionMessages {
3269 EConnect=-1,
3270
3274 EDisConnect=-2
3275 };
3276public:
3277 inline RMessage2();
3278#ifndef __KERNEL_MODE__
3279 IMPORT_C explicit RMessage2(const RMessagePtr2& aPtr);
3280 void SetAuthorised() const;
3281 void ClearAuthorised() const;
3282 TBool Authorised() const;
3283#endif
3284 inline TInt Function() const;
3285 inline TInt Int0() const;
3286 inline TInt Int1() const;
3287 inline TInt Int2() const;
3288 inline TInt Int3() const;
3289 inline const TAny* Ptr0() const;
3290 inline const TAny* Ptr1() const;
3291 inline const TAny* Ptr2() const;
3292 inline const TAny* Ptr3() const;
3293 inline CSession2* Session() const;
3294protected:
3295
3299 TInt iFunction;
3300
3304 TInt iArgs[KMaxMessageArguments];
3305private:
3306 TInt iSpare1;
3307protected:
3311 const TAny* iSessionPtr;
3312private:
3313 mutable TInt iFlags;// Currently only used for *Authorised above
3314 TInt iSpare3; // Reserved for future use
3315
3316 friend class RMessage;
3317 };
3318
3319
3320
3321
3333typedef TBuf8<KMaxMediaPassword> TMediaPassword; // 128 bit
3334
3335
3336
3343const TUint KScFlagBufOffsetListInUse=0x00000001;
3344
3351const TUint KScFlagUseGuardPages=0x00000002;
3352
3360 {
3361public:
3363public:
3365 TInt iNumBuffers;
3367 TInt iBufferSizeInBytes;
3369 TInt iReserved1;
3371 TUint iFlags;
3372 };
3373
3374
3379const TInt KCapabilitySetMaxSize = (((TInt)ECapability_HardLimit + 7)>>3);
3380
3385const TInt KMaxSecurityPolicySize = KCapabilitySetMaxSize + 3*sizeof(TUint32);
3386
3387
3395class TCapabilitySet
3396 {
3397public:
3398 inline TCapabilitySet();
3399 inline TCapabilitySet(TCapability aCapability);
3400 IMPORT_C TCapabilitySet(TCapability aCapability1, TCapability aCapability2);
3401 IMPORT_C void SetEmpty();
3402 inline void Set(TCapability aCapability);
3403 inline void Set(TCapability aCapability1, TCapability aCapability2);
3404 IMPORT_C void SetAllSupported();
3405 IMPORT_C void AddCapability(TCapability aCapability);
3406 IMPORT_C void RemoveCapability(TCapability aCapability);
3407 IMPORT_C void Union(const TCapabilitySet& aCapabilities);
3408 IMPORT_C void Intersection(const TCapabilitySet& aCapabilities);
3409 IMPORT_C void Remove(const TCapabilitySet& aCapabilities);
3410 IMPORT_C TBool HasCapability(TCapability aCapability) const;
3411 IMPORT_C TBool HasCapabilities(const TCapabilitySet& aCapabilities) const;
3412
3417 IMPORT_C void SetDisabled();
3421 TBool NotEmpty() const;
3422
3423private:
3424 TUint32 iCaps[KCapabilitySetMaxSize / sizeof(TUint32)];
3425 };
3426
3427#ifndef __SECURITY_INFO_DEFINED__
3428#define __SECURITY_INFO_DEFINED__
3432struct SCapabilitySet
3433 {
3434 enum {ENCapW=2};
3435
3436 inline void AddCapability(TCapability aCap1) {((TCapabilitySet*)this)->AddCapability(aCap1);}
3437 inline void Remove(const SCapabilitySet& aCaps) {((TCapabilitySet*)this)->Remove(*((TCapabilitySet*)&aCaps));}
3438 inline TBool NotEmpty() const {return ((TCapabilitySet*)this)->NotEmpty();}
3439
3440 inline const TUint32& operator[] (TInt aIndex) const { return iCaps[aIndex]; }
3441 inline TUint32& operator[] (TInt aIndex) { return iCaps[aIndex]; }
3442
3443 TUint32 iCaps[ENCapW];
3444 };
3445
3451 TUint32 iSecureId;
3452 TUint32 iVendorId;
3453 SCapabilitySet iCaps; // Capabilities re. platform security
3455
3456#endif
3457
3461#ifdef __REFERENCE_ALL_SUPPORTED_CAPABILITIES__
3462
3463extern const SCapabilitySet AllSupportedCapabilities;
3465#endif //__REFERENCE_ALL_SUPPORTED_CAPABILITIES__
3470#ifdef __INCLUDE_ALL_SUPPORTED_CAPABILITIES__
3471
3475const SCapabilitySet AllSupportedCapabilities = {
3477 ECapability_Limit<32 ? (TUint32)((1u<<(ECapability_Limit&31))-1u) : 0xffffffffu
3478 ,
3479 ECapability_Limit>=32 ? (TUint32)((1u<<(ECapability_Limit&31))-1u) : 0u
3480 }
3481 };
3483#endif // __INCLUDE_ALL_SUPPORTED_CAPABILITIES__
3485#ifndef __KERNEL_MODE__
3490#else
3491class DProcess;
3492class DThread;
3493#endif
3501class TSecurityInfo
3502 {
3503public:
3504 inline TSecurityInfo();
3505#ifdef __KERNEL_MODE__
3506 IMPORT_C TSecurityInfo(DProcess* aProcess);
3507 IMPORT_C TSecurityInfo(DThread* aThread);
3508#else
3509 IMPORT_C TSecurityInfo(RProcess aProcess);
3510 IMPORT_C TSecurityInfo(RThread aThread);
3511 IMPORT_C TSecurityInfo(RMessagePtr2 aMesPtr);
3512 inline void Set(RProcess aProcess);
3513 inline void Set(RThread aThread);
3514 inline void Set(RMessagePtr2 aMsgPtr);
3515 TInt Set(RSessionBase aSession);
3516 inline void SetToCurrentInfo();
3517 IMPORT_C void SetToCreatorInfo();
3518#endif //__KERNEL_MODE__
3519public:
3523 };
3524
3593class TSecurityPolicy
3594 {
3595public:
3596 enum TSecPolicyType
3598 EAlwaysFail=0,
3599 EAlwaysPass=1,
3600 };
3601
3602public:
3603 inline TSecurityPolicy();
3605 IMPORT_C TSecurityPolicy(TCapability aCap1, TCapability aCap2 = ECapability_None, TCapability aCap3 = ECapability_None);
3606 IMPORT_C TSecurityPolicy(TCapability aCap1, TCapability aCap2, TCapability aCap3, TCapability aCap4, TCapability aCap5 = ECapability_None, TCapability aCap6 = ECapability_None, TCapability aCap7 = ECapability_None);
3607 IMPORT_C TSecurityPolicy(TSecureId aSecureId, TCapability aCap1 = ECapability_None, TCapability aCap2 = ECapability_None, TCapability aCap3 = ECapability_None);
3608 IMPORT_C TSecurityPolicy(TVendorId aVendorId, TCapability aCap1 = ECapability_None, TCapability aCap2 = ECapability_None, TCapability aCap3 = ECapability_None);
3609 IMPORT_C TInt Set(const TDesC8& aDes);
3610 IMPORT_C TPtrC8 Package() const;
3611
3612#ifdef __KERNEL_MODE__
3613
3614#ifndef __REMOVE_PLATSEC_DIAGNOSTIC_STRINGS__
3615 inline TBool CheckPolicy(DProcess* aProcess, const char* aDiagnostic=0) const;
3616 inline TBool CheckPolicy(DThread* aThread, const char* aDiagnostic=0) const;
3617#else //__REMOVE_PLATSEC_DIAGNOSTIC_STRINGS__
3618 // Only available to NULL arguments
3619 inline TBool CheckPolicy(DProcess* aProcess, OnlyCreateWithNull aDiagnostic=NULL) const;
3620 inline TBool CheckPolicy(DThread* aThread, OnlyCreateWithNull aDiagnostic=NULL) const;
3621#endif // !__REMOVE_PLATSEC_DIAGNOSTIC_STRINGS__
3623#else // !__KERNEL_MODE__
3625#ifndef __REMOVE_PLATSEC_DIAGNOSTIC_STRINGS__
3626 inline TBool CheckPolicy(RProcess aProcess, const char* aDiagnostic=0) const;
3627 inline TBool CheckPolicy(RThread aThread, const char* aDiagnostic=0) const;
3628 inline TBool CheckPolicy(RMessagePtr2 aMsgPtr, const char* aDiagnostic=0) const;
3629 inline TBool CheckPolicy(RMessagePtr2 aMsgPtr, TSecurityInfo& aMissing, const char* aDiagnostic=0) const;
3630 inline TBool CheckPolicyCreator(const char* aDiagnostic=0) const;
3631#else //__REMOVE_PLATSEC_DIAGNOSTIC_STRINGS__
3632 // Only available to NULL arguments
3633 inline TBool CheckPolicy(RProcess aProcess, OnlyCreateWithNull aDiagnostic=NULL) const;
3634 inline TBool CheckPolicy(RThread aThread, OnlyCreateWithNull aDiagnostic=NULL) const;
3635 inline TBool CheckPolicy(RMessagePtr2 aMsgPtr, OnlyCreateWithNull aDiagnostic=NULL) const;
3636 inline TBool CheckPolicy(RMessagePtr2 aMsgPtr, TSecurityInfo& aMissing, OnlyCreateWithNull aDiagnostic=NULL) const;
3637 inline TBool CheckPolicyCreator(OnlyCreateWithNull aDiagnostic=NULL) const;
3638#ifndef __REMOVE_PLATSEC_DIAGNOSTICS__
3639 // For things using KSuppressPlatSecDiagnostic
3640 inline TBool CheckPolicy(RProcess aProcess, OnlyCreateWithNull aDiagnostic, OnlyCreateWithNull aSuppress) const;
3641 inline TBool CheckPolicy(RThread aThread, OnlyCreateWithNull aDiagnostic, OnlyCreateWithNull aSuppress) const;
3642 inline TBool CheckPolicy(RMessagePtr2 aMsgPtr, OnlyCreateWithNull aDiagnostic, OnlyCreateWithNull aSuppress) const;
3643 inline TBool CheckPolicy(RMessagePtr2 aMsgPtr, TSecurityInfo& aMissing, OnlyCreateWithNull aDiagnostic, OnlyCreateWithNull aSuppress) const;
3644 inline TBool CheckPolicyCreator(OnlyCreateWithNull aDiagnostic, OnlyCreateWithNull aSuppress) const;
3645#endif // !__REMOVE_PLATSEC_DIAGNOSTICS__
3646#endif // !__REMOVE_PLATSEC_DIAGNOSTIC_STRINGS__
3647 TInt CheckPolicy(RSessionBase aSession) const;
3649#endif //__KERNEL_MODE__
3650
3651 TBool Validate() const;
3653private:
3654#ifdef __KERNEL_MODE__
3655 IMPORT_C TBool DoCheckPolicy(DProcess* aProcess, const char* aDiagnostic) const;
3656 IMPORT_C TBool DoCheckPolicy(DProcess* aProcess) const;
3657 IMPORT_C TBool DoCheckPolicy(DThread* aThread, const char* aDiagnostic) const;
3658 IMPORT_C TBool DoCheckPolicy(DThread* aThread) const;
3659#else // !__KERNEL_MODE__
3660 IMPORT_C TBool DoCheckPolicy(RProcess aProcess, const char* aDiagnostic) const;
3661 IMPORT_C TBool DoCheckPolicy(RProcess aProcess) const;
3662 IMPORT_C TBool DoCheckPolicy(RThread aThread, const char* aDiagnostic) const;
3663 IMPORT_C TBool DoCheckPolicy(RThread aThread) const;
3664 IMPORT_C TBool DoCheckPolicy(RMessagePtr2 aMsgPtr, const char* aDiagnostic) const;
3665 IMPORT_C TBool DoCheckPolicy(RMessagePtr2 aMsgPtr) const;
3666 IMPORT_C TBool DoCheckPolicyCreator(const char* aDiagnostic) const;
3667 IMPORT_C TBool DoCheckPolicyCreator() const;
3668#ifndef __REMOVE_PLATSEC_DIAGNOSTICS__
3669 TBool DoCheckPolicy(RMessagePtr2 aMsgPtr, TSecurityInfo& aMissing, const char* aDiagnostic) const;
3670#endif //__REMOVE_PLATSEC_DIAGNOSTICS__
3671 TBool DoCheckPolicy(RMessagePtr2 aMsgPtr, TSecurityInfo& aMissing) const;
3672#endif //__KERNEL_MODE__
3673
3674public:
3683 ETypeS3=4,
3684 ETypeV3=5,
3691
3692 // other values may be added to indicate expanded policy objects (future extensions)
3693 };
3694protected:
3695 TBool CheckPolicy(const SSecurityInfo& aSecInfo, SSecurityInfo& aMissing) const;
3696private:
3697 void ConstructAndCheck3(TCapability aCap1, TCapability aCap2, TCapability aCap3);
3698private:
3699 TUint8 iType;
3700 TUint8 iCaps[3]; // missing capabilities are set to 0xff
3701 union
3702 {
3703 TUint32 iSecureId;
3704 TUint32 iVendorId;
3705 TUint8 iExtraCaps[4]; // missing capabilities are set to 0xff
3706 };
3707 friend class TCompiledSecurityPolicy;
3708 };
3709
3716
3717
3782 {
3783 inline const TSecurityPolicy* operator&() const;
3784 inline operator const TSecurityPolicy&() const;
3785 inline const TSecurityPolicy& operator()() const;
3786
3787#ifndef __KERNEL_MODE__
3788#ifndef __REMOVE_PLATSEC_DIAGNOSTIC_STRINGS__
3789 inline TBool CheckPolicy(RProcess aProcess, const char* aDiagnostic=0) const;
3790 inline TBool CheckPolicy(RThread aThread, const char* aDiagnostic=0) const;
3791 inline TBool CheckPolicy(RMessagePtr2 aMsgPtr, const char* aDiagnostic=0) const;
3792 inline TBool CheckPolicy(RMessagePtr2 aMsgPtr, TSecurityInfo& aMissing, const char* aDiagnostic=0) const;
3793 inline TBool CheckPolicyCreator(const char* aDiagnostic=0) const;
3794#else //__REMOVE_PLATSEC_DIAGNOSTIC_STRINGS__
3795 // Only available to NULL arguments
3796 inline TBool CheckPolicy(RProcess aProcess, OnlyCreateWithNull aDiagnostic=NULL) const;
3797 inline TBool CheckPolicy(RThread aThread, OnlyCreateWithNull aDiagnostic=NULL) const;
3798 inline TBool CheckPolicy(RMessagePtr2 aMsgPtr, OnlyCreateWithNull aDiagnostic=NULL) const;
3799 inline TBool CheckPolicy(RMessagePtr2 aMsgPtr, TSecurityInfo& aMissing, OnlyCreateWithNull aDiagnostic=NULL) const;
3800 inline TBool CheckPolicyCreator(OnlyCreateWithNull aDiagnostic=NULL) const;
3801#ifndef __REMOVE_PLATSEC_DIAGNOSTICS__
3802 // For things using KSuppressPlatSecDiagnostic
3803 inline TBool CheckPolicy(RProcess aProcess, OnlyCreateWithNull aDiagnostic, OnlyCreateWithNull aSuppress) const;
3804 inline TBool CheckPolicy(RThread aThread, OnlyCreateWithNull aDiagnostic, OnlyCreateWithNull aSuppress) const;
3805 inline TBool CheckPolicy(RMessagePtr2 aMsgPtr, OnlyCreateWithNull aDiagnostic, OnlyCreateWithNull aSuppress) const;
3806 inline TBool CheckPolicy(RMessagePtr2 aMsgPtr, TSecurityInfo& aMissing, OnlyCreateWithNull aDiagnostic, OnlyCreateWithNull aSuppress) const;
3807 inline TBool CheckPolicyCreator(OnlyCreateWithNull aDiagnostic, OnlyCreateWithNull aSuppress) const;
3808#endif // !__REMOVE_PLATSEC_DIAGNOSTICS__
3809#endif // !__REMOVE_PLATSEC_DIAGNOSTIC_STRINGS__
3810#endif // !__KERNEL_MODE__
3811
3812 TUint32 iA;
3813 TUint32 iB;
3814 };
3815
3816
3822
3833#define CAPABILITY_AS_TUINT8(cap) \
3834 ((TUint8)(int)( \
3835 (cap)==ECapability_None \
3836 ? (__invalid_capability_value(*)[1])(ECapability_None) \
3837 : (__invalid_capability_value(*)[((TUint)(cap+1)<=(TUint)ECapability_Limit)?1:2])(cap) \
3838 ))
3851#define FOUR_TUINT8(i1,i2,i3,i4) \
3852 ( \
3853 (TUint32)((i1) & 0xFF) | \
3854 (TUint32)((i2) & 0xFF) << 8 | \
3855 (TUint32)((i3) & 0xFF) << 16 | \
3856 (TUint32)((i4) & 0xFF) << 24 \
3857 )
3858
3859
3871#define _INIT_SECURITY_POLICY_FAIL \
3872 { \
3873 FOUR_TUINT8( \
3874 (TUint8)TSecurityPolicy::ETypeFail, \
3875 (TUint8)0xff, \
3876 (TUint8)0xff, \
3877 (TUint8)0xff \
3878 ), \
3879 (TUint32)0xffffffff \
3880 }
3881
3882
3895#define _LIT_SECURITY_POLICY_FAIL(n) const TStaticSecurityPolicy n = _INIT_SECURITY_POLICY_FAIL
3896
3897
3909#define _INIT_SECURITY_POLICY_PASS \
3910 { \
3911 FOUR_TUINT8( \
3912 (TUint8)TSecurityPolicy::ETypePass, \
3913 (TUint8)0xff, \
3914 (TUint8)0xff, \
3915 (TUint8)0xff \
3916 ), \
3917 (TUint32)0xffffffff \
3933#define _LIT_SECURITY_POLICY_PASS(n) const TStaticSecurityPolicy n = _INIT_SECURITY_POLICY_PASS
3934
3935
3959#define _INIT_SECURITY_POLICY_C7(c1,c2,c3,c4,c5,c6,c7) \
3960 { \
3961 FOUR_TUINT8( \
3962 (TUint8)TSecurityPolicy::ETypeC7, \
3963 CAPABILITY_AS_TUINT8(c1), \
3964 CAPABILITY_AS_TUINT8(c2), \
3965 CAPABILITY_AS_TUINT8(c3) \
3966 ), \
3967 FOUR_TUINT8( \
3968 CAPABILITY_AS_TUINT8(c4), \
3969 CAPABILITY_AS_TUINT8(c5), \
3970 CAPABILITY_AS_TUINT8(c6), \
3971 CAPABILITY_AS_TUINT8(c7) \
3972 ) \
3973 }
3974
3975
4000#define _LIT_SECURITY_POLICY_C7(n,c1,c2,c3,c4,c5,c6,c7) \
4001 const TStaticSecurityPolicy n = _INIT_SECURITY_POLICY_C7(c1,c2,c3,c4,c5,c6,c7)
4002
4003
4026#define _INIT_SECURITY_POLICY_C6(c1,c2,c3,c4,c5,c6) \
4027 _INIT_SECURITY_POLICY_C7(c1,c2,c3,c4,c5,c6,ECapability_None)
4053#define _LIT_SECURITY_POLICY_C6(n,c1,c2,c3,c4,c5,c6) \
4054 _LIT_SECURITY_POLICY_C7(n,c1,c2,c3,c4,c5,c6,ECapability_None)
4055
4056
4078#define _INIT_SECURITY_POLICY_C5(c1,c2,c3,c4,c5) \
4079 _INIT_SECURITY_POLICY_C7(c1,c2,c3,c4,c5,ECapability_None,ECapability_None)
4080
4081
4104#define _LIT_SECURITY_POLICY_C5(n,c1,c2,c3,c4,c5) \
4105 _LIT_SECURITY_POLICY_C7(n,c1,c2,c3,c4,c5,ECapability_None,ECapability_None)
4106
4107
4128#define _INIT_SECURITY_POLICY_C4(c1,c2,c3,c4) \
4129 _INIT_SECURITY_POLICY_C7(c1,c2,c3,c4,ECapability_None,ECapability_None,ECapability_None)
4130
4131
4153#define _LIT_SECURITY_POLICY_C4(n,c1,c2,c3,c4) \
4154 _LIT_SECURITY_POLICY_C7(n,c1,c2,c3,c4,ECapability_None,ECapability_None,ECapability_None)
4155
4156
4176#define _INIT_SECURITY_POLICY_C3(c1,c2,c3) \
4177 { \
4178 FOUR_TUINT8( \
4179 (TUint8)TSecurityPolicy::ETypeC3, \
4180 CAPABILITY_AS_TUINT8(c1), \
4181 CAPABILITY_AS_TUINT8(c2), \
4182 CAPABILITY_AS_TUINT8(c3) \
4183 ), \
4184 (TUint32)0xffffffff \
4185 }
4187
4208#define _LIT_SECURITY_POLICY_C3(n,c1,c2,c3) \
4209 const TStaticSecurityPolicy n = _INIT_SECURITY_POLICY_C3(c1,c2,c3)
4210
4211
4230#define _INIT_SECURITY_POLICY_C2(c1,c2) \
4231 _INIT_SECURITY_POLICY_C3(c1,c2,ECapability_None)
4232
4233
4253#define _LIT_SECURITY_POLICY_C2(n,c1,c2) \
4254 _LIT_SECURITY_POLICY_C3(n,c1,c2,ECapability_None)
4256
4275#define _INIT_SECURITY_POLICY_C1(c1) \
4276 _INIT_SECURITY_POLICY_C3(c1,ECapability_None,ECapability_None)
4277
4278
4297#define _LIT_SECURITY_POLICY_C1(n,c1) \
4298 _LIT_SECURITY_POLICY_C3(n,c1,ECapability_None,ECapability_None)
4299
4300
4321#define _INIT_SECURITY_POLICY_S3(sid,c1,c2,c3) \
4322 { \
4323 FOUR_TUINT8( \
4324 (TUint8)TSecurityPolicy::ETypeS3, \
4325 CAPABILITY_AS_TUINT8(c1), \
4326 CAPABILITY_AS_TUINT8(c2), \
4327 CAPABILITY_AS_TUINT8(c3) \
4328 ), \
4329 (TUint32)(sid) \
4330 }
4331
4332
4354#define _LIT_SECURITY_POLICY_S3(n,sid,c1,c2,c3) \
4355 const TStaticSecurityPolicy n = _INIT_SECURITY_POLICY_S3(sid,c1,c2,c3)
4356
4357
4377#define _INIT_SECURITY_POLICY_S2(sid,c1,c2) \
4378 _INIT_SECURITY_POLICY_S3(sid,c1,c2,ECapability_None)
4379
4380
4401#define _LIT_SECURITY_POLICY_S2(n,sid,c1,c2) \
4402 _LIT_SECURITY_POLICY_S3(n,sid,c1,c2,ECapability_None)
4403
4404
4423#define _INIT_SECURITY_POLICY_S1(sid,c1) \
4424 _INIT_SECURITY_POLICY_S3(sid,c1,ECapability_None,ECapability_None)
4425
4426
4446#define _LIT_SECURITY_POLICY_S1(n,sid,c1) \
4447 _LIT_SECURITY_POLICY_S3(n,sid,c1,ECapability_None,ECapability_None)
4448
4449
4463#define _INIT_SECURITY_POLICY_S0(sid) \
4464 _INIT_SECURITY_POLICY_S3(sid,ECapability_None,ECapability_None,ECapability_None)
4465
4466
4481#define _LIT_SECURITY_POLICY_S0(n,sid) \
4482 _LIT_SECURITY_POLICY_S3(n,sid,ECapability_None,ECapability_None,ECapability_None)
4483
4484
4505#define _INIT_SECURITY_POLICY_V3(vid,c1,c2,c3) \
4506 { \
4507 FOUR_TUINT8( \
4508 (TUint8)TSecurityPolicy::ETypeV3, \
4509 CAPABILITY_AS_TUINT8(c1), \
4510 CAPABILITY_AS_TUINT8(c2), \
4511 CAPABILITY_AS_TUINT8(c3) \
4512 ), \
4513 (TUint32)(vid) \
4514 }
4515
4516
4538#define _LIT_SECURITY_POLICY_V3(n,vid,c1,c2,c3) \
4539 const TStaticSecurityPolicy n = _INIT_SECURITY_POLICY_V3(vid,c1,c2,c3)
4541
4561#define _INIT_SECURITY_POLICY_V2(vid,c1,c2) \
4562 _INIT_SECURITY_POLICY_V3(vid,c1,c2,ECapability_None)
4564
4585#define _LIT_SECURITY_POLICY_V2(n,vid,c1,c2) \
4586 _LIT_SECURITY_POLICY_V3(n,vid,c1,c2,ECapability_None)
4587
4607#define _INIT_SECURITY_POLICY_V1(vid,c1) \
4608 _INIT_SECURITY_POLICY_V3(vid,c1,ECapability_None,ECapability_None)
4609
4610
4630#define _LIT_SECURITY_POLICY_V1(n,vid,c1) \
4631 _LIT_SECURITY_POLICY_V3(n,vid,c1,ECapability_None,ECapability_None)
4632
4633
4647#define _INIT_SECURITY_POLICY_V0(vid) \
4648 _INIT_SECURITY_POLICY_V3(vid,ECapability_None,ECapability_None,ECapability_None)
4649
4650
4665#define _LIT_SECURITY_POLICY_V0(n,vid) \
4666 _LIT_SECURITY_POLICY_V3(n,vid,ECapability_None,ECapability_None,ECapability_None)
4667
4668
4669
4670#ifdef __KERNEL_MODE__
4671class DThread;
4672class RMessageK;
4673#endif
4674class TPlatSecDiagnostic;
4675
4680class PlatSec
4681 {
4682#ifndef __KERNEL_MODE__
4683public:
4701 IMPORT_C static TBool IsCapabilityEnforced(TCapability aCapability);
4702
4709 enum TConfigSetting
4710 {
4716 };
4717
4728 IMPORT_C static TInt ConfigSetting(TConfigSetting aSetting);
4729
4730#endif // Not __KERNEL_MODE__
4731
4732 //
4733 // All methods below here are internalTechnology
4734 //
4735
4736#ifndef __REMOVE_PLATSEC_DIAGNOSTICS__
4737public:
4739 static inline TInt LoaderCapabilityViolation(const TDesC8& aImporterName, const TDesC8& aFileName, const SCapabilitySet& aMissingCaps);
4740#ifdef __KERNEL_MODE__
4742 static inline TInt CapabilityCheckFail(const DProcess* aViolatingProcess, TCapability aCapability, const char* aContextText);
4744 static inline TInt CapabilityCheckFail(const DThread* aViolatingThread, TCapability aCapability, const char* aContextText);
4746 static inline TInt SecureIdCheckFail(const DProcess* aViolatingProcess, TSecureId aSid, const char* aContextText);
4748 static inline TInt PolicyCheckFail(const DProcess* aProcess, const SSecurityInfo& aMissing, const char* aContextText);
4750 static inline TInt PolicyCheckFail(const DThread* aProcess, const SSecurityInfo& aMissing, const char* aContextText);
4752 static inline TInt ProcessIsolationFail(const char* aContextText);
4754 static inline TInt ProcessIsolationIPCFail(RMessageK* aMessage, const char* aContextText);
4755#else // !__KERNEL_MODE__
4757 static inline TInt LoaderCapabilityViolation(RProcess aLoadingProcess, const TDesC8& aFileName, const SCapabilitySet& aMissingCaps);
4759 static inline TInt CreatorCapabilityCheckFail(TCapability aCapability, const char* aContextText);
4761 static inline TInt CreatorCapabilityCheckFail(const TCapabilitySet& aMissingCaps, const char* aContextText);
4763 static inline TInt CapabilityCheckFail(TInt aHandle, TCapability aCapability, const char* aContextText);
4765 static inline TInt CapabilityCheckFail(TInt aHandle, const TCapabilitySet& aMissingCaps, const char* aContextText);
4767 static inline TInt PolicyCheckFail(TInt aHandle, const SSecurityInfo& aMissing, const char* aContextText);
4769 static inline TInt CapabilityCheckFail(RMessagePtr2 aMessage, TCapability aCapability, const char* aContextText);
4771 static inline TInt CapabilityCheckFail(RMessagePtr2 aMessage, const TCapabilitySet& aMissingCaps, const char* aContextText);
4773 static inline TInt PolicyCheckFail(RMessagePtr2 aMessage, const SSecurityInfo& aMissingCaps, const char* aContextText);
4775 static inline TInt PolicyCheckFail(RSessionBase aSession, const SSecurityInfo& aMissingCaps, const char* aContextText);
4777 static inline TInt CreatorPolicyCheckFail(const SSecurityInfo& aMissingCaps, const char* aContextText);
4779 static inline TInt CreatorCapabilityCheckFail(TCapability aCapability);
4781 static inline TInt CreatorCapabilityCheckFail(const TCapabilitySet& aMissingCaps);
4783 static inline TInt CapabilityCheckFail(TInt aHandle, TCapability aCapability);
4785 static inline TInt CapabilityCheckFail(TInt aHandle, const TCapabilitySet& aMissingCaps);
4787 static inline TInt PolicyCheckFail(TInt aHandle, const SSecurityInfo& aMissing);
4789 static inline TInt CapabilityCheckFail(RMessagePtr2 aMessage, TCapability aCapability);
4791 static inline TInt CapabilityCheckFail(RMessagePtr2 aMessage, const TCapabilitySet& aMissingCaps);
4793 static inline TInt PolicyCheckFail(RMessagePtr2 aMessage, const SSecurityInfo& aMissingCaps);
4795 static inline TInt CreatorPolicyCheckFail(const SSecurityInfo& aMissingCaps);
4796#endif //__KERNEL_MODE__
4797
4798private:
4799 UIMPORT_C static TInt EmitDiagnostic(TPlatSecDiagnostic& aDiagnostic, const char* aContextText);
4800#else //__REMOVE_PLATSEC_DIAGNOSTICS__
4801#ifndef __KERNEL_MODE__
4802private:
4803 IMPORT_C static TInt EmitDiagnostic(TPlatSecDiagnostic& aDiagnostic, const char* aContextText);
4804#endif // !__KERNEL_MODE__
4805#endif // !__REMOVE_PLATSEC_DIAGNOSTICS__
4806
4807public:
4809 UIMPORT_C static TInt EmitDiagnostic();
4810 };
4811
4812
4813#define KMaxSerialNumLength 64
4814typedef TBuf8<KMaxSerialNumLength> TMediaSerialNumber;
4815
4816
4826 {
4827public:
4831 TUint32 iCodeBase;
4832
4833
4837 TUint32 iCodeSize;
4839
4843 TUint32 iConstDataBase;
4844
4845
4850 TUint32 iConstDataSize;
4851
4852
4856 TUint32 iInitialisedDataBase;
4857
4858
4862 TUint32 iInitialisedDataSize;
4864
4868 TUint32 iUninitialisedDataBase;
4869
4870
4874 TUint32 iUninitialisedDataSize;
4875 };
4876
4877
4878
4879
4886typedef TProcessMemoryInfo TModuleMemoryInfo; // more accurate name - remove old one later
4887
4888
4889
4890
4891#ifndef __KERNEL_MODE__
4892class CBase;
4945template <class T>
4946class TArray
4948public:
4949 inline TArray(TInt (*aCount)(const CBase* aPtr),const TAny*(*anAt)(const CBase* aPtr,TInt anIndex),const CBase* aPtr);
4950 inline TInt Count() const;
4951 inline const T& operator[](TInt anIndex) const;
4952private:
4953 const CBase* iPtr;
4954 TInt (*iCount)(const CBase* aPtr);
4955 const TAny*(*iAt)(const CBase* aPtr,TInt anIndex);
4956 };
4957#endif
4958
4959
4960
4961
4973typedef TBool (*TGeneralIdentityRelation)(const TAny*, const TAny*);
4974
4975
4976
4977
4989typedef TInt (*TGeneralLinearOrder)(const TAny*, const TAny*);
4990
4991
4992
4993
5009template <class T>
5011 {
5012public:
5013 inline TIdentityRelation();
5014 inline TIdentityRelation( TBool (*anIdentity)(const T&, const T&) );
5015 inline operator TGeneralIdentityRelation() const;
5016private:
5017 inline static TBool EqualityOperatorCompare(const T& aLeft, const T& aRight);
5018private:
5019 TGeneralIdentityRelation iIdentity;
5020 };
5021
5022
5023
5037class DefaultIdentity
5038 {
5039public:
5040 IMPORT_C static TBool Integer(const TInt&, const TInt&);
5041 IMPORT_C static TBool Des8(const TDesC8&, const TDesC8&);
5042 IMPORT_C static TBool Des16(const TDesC16&, const TDesC16&);
5043 IMPORT_C static TBool IntegerPtr(TInt* const&, TInt* const&);
5044 IMPORT_C static TBool Des8Ptr(TDesC8* const&, TDesC8* const&);
5045 IMPORT_C static TBool Des16Ptr(TDesC16* const&, TDesC16* const&);
5046 };
5047
5048
5049
5050
5066template <class T>
5067class TLinearOrder
5068 {
5069public:
5070 inline TLinearOrder( TInt(*anOrder)(const T&, const T&) );
5071 inline operator TGeneralLinearOrder() const;
5072private:
5073 TGeneralLinearOrder iOrder;
5074 };
5075
5076
5077/*
5078@publishedAll
5079@released
5080
5081A set of values that tell array search functions which array element is to be
5082returned when there are duplicate elements in the array.
5083
5084These values are used by RArray, RPointerArray, RArray<TInt>,
5085and RArray<TUint> search functions.
5086
5087Examples of functions that take
5088these enum values are: RPointerArray::SpecificFindInOrderL(),
5089and RArray::SpecificFindInSignedKeyOrder().
5090
5091@see RArray
5092@see RPointerArray
5093@see RArray<TInt>
5094@see RArray<TUint>
5095*/
5096enum TArrayFindMode
5097 {
5107
5113
5119
5125
5126
5138 {
5139protected:
5140 IMPORT_C RPointerArrayBase();
5141 IMPORT_C RPointerArrayBase(TInt aGranularity);
5142 IMPORT_C RPointerArrayBase(TInt aMinGrowBy, TInt aFactor);
5143 IMPORT_C void Close();
5144 IMPORT_C TInt Count() const;
5145 inline void ZeroCount() {iCount=0;}
5146 inline TAny** Entries() {return iEntries;}
5147 IMPORT_C TAny*& At(TInt anIndex) const;
5148 IMPORT_C TInt Append(const TAny* anEntry);
5149 IMPORT_C TInt Insert(const TAny* anEntry, TInt aPos);
5150 IMPORT_C void Remove(TInt anIndex);
5151 IMPORT_C void Compress();
5152 IMPORT_C void Reset();
5153 IMPORT_C TInt Find(const TAny* anEntry) const;
5154 IMPORT_C TInt Find(const TAny* anEntry, TGeneralIdentityRelation anIdentity) const;
5155 IMPORT_C TInt FindReverse(const TAny* aEntry) const;
5156 IMPORT_C TInt FindReverse(const TAny* aEntry, TGeneralIdentityRelation aIdentity) const;
5157 IMPORT_C TInt FindIsqSigned(TInt anEntry) const;
5158 IMPORT_C TInt FindIsqUnsigned(TUint anEntry) const;
5159 IMPORT_C TInt FindIsq(const TAny* anEntry, TGeneralLinearOrder anOrder) const;
5160 IMPORT_C TInt FindIsqSigned(TInt anEntry, TInt aMode) const;
5161 IMPORT_C TInt FindIsqUnsigned(TUint anEntry, TInt aMode) const;
5162 IMPORT_C TInt FindIsq(const TAny* anEntry, TGeneralLinearOrder anOrder, TInt aMode) const;
5163 IMPORT_C TInt InsertIsqSigned(TInt anEntry, TBool aAllowRepeats);
5164 IMPORT_C TInt InsertIsqUnsigned(TUint anEntry, TBool aAllowRepeats);
5165 IMPORT_C TInt InsertIsq(const TAny* anEntry, TGeneralLinearOrder anOrder, TBool aAllowRepeats);
5166 IMPORT_C TInt BinarySearchSigned(TInt anEntry, TInt& anIndex) const;
5167 IMPORT_C TInt BinarySearchUnsigned(TUint anEntry, TInt& anIndex) const;
5168 IMPORT_C TInt BinarySearch(const TAny* anEntry, TInt& anIndex, TGeneralLinearOrder anOrder) const;
5169 IMPORT_C TInt BinarySearchSigned(TInt anEntry, TInt& anIndex, TInt aMode) const;
5170 IMPORT_C TInt BinarySearchUnsigned(TUint anEntry, TInt& anIndex, TInt aMode) const;
5171 IMPORT_C TInt BinarySearch(const TAny* anEntry, TInt& anIndex, TGeneralLinearOrder anOrder, TInt aMode) const;
5172#ifndef __KERNEL_MODE__
5173 IMPORT_C RPointerArrayBase(TAny** aEntries, TInt aCount);
5174 IMPORT_C void GranularCompress();
5175 IMPORT_C TInt DoReserve(TInt aCount);
5176 IMPORT_C void HeapSortSigned();
5177 IMPORT_C void HeapSortUnsigned();
5178 IMPORT_C void HeapSort(TGeneralLinearOrder anOrder);
5179 IMPORT_C static TInt GetCount(const CBase* aPtr);
5180 IMPORT_C static const TAny* GetElementPtr(const CBase* aPtr, TInt aIndex);
5181#endif
5182private:
5183 TInt Grow();
5184private:
5185 TInt iCount;
5186 TAny** iEntries;
5187 TInt iAllocated;
5188 TInt iGranularity; // positive means linear, negative means exponential growth
5189 TInt iSpare1;
5190 TInt iSpare2;
5191 };
5192
5193
5194
5195
5210template <class T>
5211class RPointerArray : private RPointerArrayBase
5212 {
5213public:
5215 inline explicit RPointerArray(TInt aGranularity);
5216 inline RPointerArray(TInt aMinGrowBy, TInt aFactor);
5217 inline void Close();
5218 inline TInt Count() const;
5219 inline T* const& operator[](TInt anIndex) const;
5220 inline T*& operator[](TInt anIndex);
5221 inline TInt Append(const T* anEntry);
5222 inline TInt Insert(const T* anEntry, TInt aPos);
5223 inline void Remove(TInt anIndex);
5224 inline void Compress();
5225 inline void Reset();
5226 void ResetAndDestroy();
5227 inline TInt Find(const T* anEntry) const;
5228 inline TInt Find(const T* anEntry, TIdentityRelation<T> anIdentity) const;
5229 template <class K>
5230 inline TInt Find(const K& aKey, TBool (*apfnCompare)(const K* k, const T& t)) const
5246 { return RPointerArrayBase::Find((T*)&aKey,*(TIdentityRelation<T>*)&apfnCompare); }
5247 inline TInt FindReverse(const T* anEntry) const;
5248 inline TInt FindReverse(const T* anEntry, TIdentityRelation<T> anIdentity) const;
5249 template <class K>
5250 inline TInt FindReverse(const K& aKey, TInt (*apfnMatch)(const K* k, const T& t)) const
5267 { return RPointerArrayBase::FindReverse((T*)&aKey,*(TIdentityRelation<T>*)&apfnMatch); }
5268 inline TInt FindInAddressOrder(const T* anEntry) const;
5269 inline TInt FindInOrder(const T* anEntry, TLinearOrder<T> anOrder) const;
5270 inline TInt FindInAddressOrder(const T* anEntry, TInt& anIndex) const;
5271 inline TInt FindInOrder(const T* anEntry, TInt& anIndex, TLinearOrder<T> anOrder) const;
5272 template <class K>
5273 inline TInt FindInOrder(const K& aKey, TInt (*apfnCompare)(const K* k, const T& t)) const
5290 { return RPointerArrayBase::FindIsq((T*)&aKey,*(TLinearOrder<T>*)&apfnCompare); }
5291 inline TInt SpecificFindInAddressOrder(const T* anEntry, TInt aMode) const;
5292 inline TInt SpecificFindInOrder(const T* anEntry, TLinearOrder<T> anOrder, TInt aMode) const;
5293 inline TInt SpecificFindInAddressOrder(const T* anEntry, TInt& anIndex, TInt aMode) const;
5294 inline TInt SpecificFindInOrder(const T* anEntry, TInt& anIndex, TLinearOrder<T> anOrder, TInt aMode) const;
5295 inline TInt InsertInAddressOrder(const T* anEntry);
5296 inline TInt InsertInOrder(const T* anEntry, TLinearOrder<T> anOrder);
5297 inline TInt InsertInAddressOrderAllowRepeats(const T* anEntry);
5298 inline TInt InsertInOrderAllowRepeats(const T* anEntry, TLinearOrder<T> anOrder);
5299#ifndef __KERNEL_MODE__
5300 inline void AppendL(const T* anEntry);
5301 inline void InsertL(const T* anEntry, TInt aPos);
5302 inline TInt FindL(const T* anEntry) const;
5303 inline TInt FindL(const T* anEntry, TIdentityRelation<T> anIdentity) const;
5304 inline TInt FindReverseL(const T* anEntry) const;
5305 inline TInt FindReverseL(const T* anEntry, TIdentityRelation<T> anIdentity) const;
5306 inline TInt FindInAddressOrderL(const T* anEntry) const;
5307 inline TInt FindInOrderL(const T* anEntry, TLinearOrder<T> anOrder) const;
5308 inline void FindInAddressOrderL(const T* anEntry, TInt& anIndex) const;
5309 inline void FindInOrderL(const T* anEntry, TInt& anIndex, TLinearOrder<T> anOrder) const;
5310 inline TInt SpecificFindInAddressOrderL(const T* anEntry, TInt aMode) const;
5311 inline TInt SpecificFindInOrderL(const T* anEntry, TLinearOrder<T> anOrder, TInt aMode) const;
5312 inline void SpecificFindInAddressOrderL(const T* anEntry, TInt& anIndex, TInt aMode) const;
5313 inline void SpecificFindInOrderL(const T* anEntry, TInt& anIndex, TLinearOrder<T> anOrder, TInt aMode) const;
5314 inline void InsertInAddressOrderL(const T* anEntry);
5315 inline void InsertInOrderL(const T* anEntry, TLinearOrder<T> anOrder);
5316 inline void InsertInAddressOrderAllowRepeatsL(const T* anEntry);
5317 inline void InsertInOrderAllowRepeatsL(const T* anEntry, TLinearOrder<T> anOrder);
5318
5319 inline RPointerArray(T** aEntries, TInt aCount);
5320 inline void GranularCompress();
5321 inline TInt Reserve(TInt aCount);
5322 inline void ReserveL(TInt aCount);
5323 inline void SortIntoAddressOrder();
5324 inline void Sort(TLinearOrder<T> anOrder);
5325 inline TArray<T*> Array() const;
5326#endif
5327 };
5328
5329
5330
5342TEMPLATE_SPECIALIZATION class RPointerArray<TAny> : private RPointerArrayBase
5343 {
5344public:
5345 inline RPointerArray();
5346 inline explicit RPointerArray(TInt aGranularity);
5347 inline RPointerArray(TInt aMinGrowBy, TInt aFactor);
5348 inline void Close();
5349 inline TInt Count() const;
5350 inline TAny* const& operator[](TInt anIndex) const;
5351 inline TAny*& operator[](TInt anIndex);
5352 inline TInt Append(const TAny* anEntry);
5353 inline TInt Insert(const TAny* anEntry, TInt aPos);
5354 inline void Remove(TInt anIndex);
5355 inline void Compress();
5356 inline void Reset();
5357 inline TInt Find(const TAny* anEntry) const;
5358 inline TInt FindReverse(const TAny* anEntry) const;
5359 inline TInt FindInAddressOrder(const TAny* anEntry) const;
5360 inline TInt FindInAddressOrder(const TAny* anEntry, TInt& anIndex) const;
5361 inline TInt SpecificFindInAddressOrder(const TAny* anEntry, TInt aMode) const;
5362 inline TInt SpecificFindInAddressOrder(const TAny* anEntry, TInt& anIndex, TInt aMode) const;
5363 inline TInt InsertInAddressOrder(const TAny* anEntry);
5364 inline TInt InsertInAddressOrderAllowRepeats(const TAny* anEntry);
5365#ifndef __KERNEL_MODE__
5366 inline void AppendL(const TAny* anEntry);
5367 inline void InsertL(const TAny* anEntry, TInt aPos);
5368 inline TInt FindL(const TAny* anEntry) const;
5369 inline TInt FindReverseL(const TAny* anEntry) const;
5370 inline TInt FindInAddressOrderL(const TAny* anEntry) const;
5371 inline void FindInAddressOrderL(const TAny* anEntry, TInt& anIndex) const;
5372 inline TInt SpecificFindInAddressOrderL(const TAny* anEntry, TInt aMode) const;
5373 inline void SpecificFindInAddressOrderL(const TAny* anEntry, TInt& anIndex, TInt aMode) const;
5374 inline void InsertInAddressOrderL(const TAny* anEntry);
5375 inline void InsertInAddressOrderAllowRepeatsL(const TAny* anEntry);
5376
5377 inline RPointerArray(TAny** aEntries, TInt aCount);
5378 inline void GranularCompress();
5379 inline void SortIntoAddressOrder();
5380 inline TArray<TAny*> Array() const;
5381#endif
5382 };
5383
5384
5385
5395class RArrayBase
5396 {
5397protected:
5398 IMPORT_C RArrayBase(TInt anEntrySize);
5399 IMPORT_C RArrayBase(TInt anEntrySize, TInt aGranularity);
5400 IMPORT_C RArrayBase(TInt anEntrySize, TInt aGranularity, TInt aKeyOffset);
5401 IMPORT_C RArrayBase(TInt anEntrySize, TInt aMinGrowBy, TInt aKeyOffset, TInt aFactor);
5402 IMPORT_C RArrayBase(TInt aEntrySize,TAny* aEntries, TInt aCount);
5403 IMPORT_C void Close();
5404 IMPORT_C void SetKeyOffset(TInt aKeyOffset);
5405 IMPORT_C TInt Count() const;
5406 IMPORT_C TAny* At(TInt anIndex) const;
5407 IMPORT_C TInt Append(const TAny* anEntry);
5408 IMPORT_C TInt Insert(const TAny* anEntry, TInt aPos);
5409 IMPORT_C void Remove(TInt anIndex);
5410 IMPORT_C void Compress();
5411 IMPORT_C void Reset();
5412 IMPORT_C TInt Find(const TAny* anEntry) const;
5413 IMPORT_C TInt Find(const TAny* anEntry, TGeneralIdentityRelation anIdentity) const;
5414 IMPORT_C TInt FindReverse(const TAny* aEntry) const;
5415 IMPORT_C TInt FindReverse(const TAny* aEntry, TGeneralIdentityRelation aIdentity) const;
5416 IMPORT_C TInt FindIsqSigned(const TAny* anEntry) const;
5417 IMPORT_C TInt FindIsqUnsigned(const TAny* anEntry) const;
5418 IMPORT_C TInt FindIsq(const TAny* anEntry, TGeneralLinearOrder anOrder) const;
5419 IMPORT_C TInt FindIsqSigned(const TAny* anEntry, TInt aMode) const;
5420 IMPORT_C TInt FindIsqUnsigned(const TAny* anEntry, TInt aMode) const;
5421 IMPORT_C TInt FindIsq(const TAny* anEntry, TGeneralLinearOrder anOrder, TInt aMode) const;
5422 IMPORT_C TInt InsertIsqSigned(const TAny* anEntry, TBool aAllowRepeats);
5423 IMPORT_C TInt InsertIsqUnsigned(const TAny* anEntry, TBool aAllowRepeats);
5424 IMPORT_C TInt InsertIsq(const TAny* anEntry, TGeneralLinearOrder anOrder, TBool aAllowRepeats);
5425 IMPORT_C TInt BinarySearchSigned(const TAny* anEntry, TInt& anIndex) const;
5426 IMPORT_C TInt BinarySearchUnsigned(const TAny* anEntry, TInt& anIndex) const;
5427 IMPORT_C TInt BinarySearch(const TAny* anEntry, TInt& anIndex, TGeneralLinearOrder anOrder) const;
5428 IMPORT_C TInt BinarySearchSigned(const TAny* anEntry, TInt& anIndex, TInt aMode) const;
5429 IMPORT_C TInt BinarySearchUnsigned(const TAny* anEntry, TInt& anIndex, TInt aMode) const;
5430 IMPORT_C TInt BinarySearch(const TAny* anEntry, TInt& anIndex, TGeneralLinearOrder anOrder, TInt aMode) const;
5431#ifndef __KERNEL_MODE__
5432 IMPORT_C void GranularCompress();
5433 IMPORT_C TInt DoReserve(TInt aCount);
5434 IMPORT_C void HeapSortSigned();
5435 IMPORT_C void HeapSortUnsigned();
5436 IMPORT_C void HeapSort(TGeneralLinearOrder anOrder);
5437 IMPORT_C static TInt GetCount(const CBase* aPtr);
5438 IMPORT_C static const TAny* GetElementPtr(const CBase* aPtr, TInt aIndex);
5439#endif
5440private:
5441 TInt Grow();
5442private:
5443 TInt iCount;
5444 TAny* iEntries;
5445 TInt iEntrySize;
5446 TInt iKeyOffset;
5447 TInt iAllocated;
5448 TInt iGranularity; // positive means linear, negative means exponential growth
5449 TInt iSpare1;
5450 TInt iSpare2;
5451 };
5452
5453
5454
5455
5493template <class T>
5494class RArray : private RArrayBase
5495 {
5496public:
5497 inline RArray();
5498 inline explicit RArray(TInt aGranularity);
5499 inline RArray(TInt aGranularity, TInt aKeyOffset);
5500 inline RArray(TInt aMinGrowBy, TInt aKeyOffset, TInt aFactor);
5501 inline RArray(TInt aEntrySize,T* aEntries, TInt aCount);
5502 inline void Close();
5503 inline void SetKeyOffset(TInt aKeyOffset);
5504 inline TInt Count() const;
5505 inline const T& operator[](TInt anIndex) const;
5506 inline T& operator[](TInt anIndex);
5507 inline TInt Append(const T& anEntry);
5508 inline TInt Insert(const T& anEntry, TInt aPos);
5509 inline void Remove(TInt anIndex);
5510 inline void Compress();
5511 inline void Reset();
5512 inline TInt Find(const T& anEntry) const;
5513 inline TInt Find(const T& anEntry, TIdentityRelation<T> anIdentity) const;
5514 template <class K>
5515 inline TInt Find(const K& aKey, TBool (*apfnCompare)(const K* k, const T& t)) const
5531 { return RArrayBase::Find((T*)&aKey,*(TIdentityRelation<T>*)&apfnCompare); }
5532 inline TInt FindReverse(const T& anEntry) const;
5533 inline TInt FindReverse(const T& anEntry, TIdentityRelation<T> anIdentity) const;
5534 template <class K>
5535 inline TInt FindReverse(const K& aKey, TInt (*apfnMatch)(const K* k, const T& t)) const
5551 { return RArrayBase::FindReverse((T*)&aKey,*(TIdentityRelation<T>*)&apfnMatch); }
5552 inline TInt FindInSignedKeyOrder(const T& anEntry) const;
5553 inline TInt FindInUnsignedKeyOrder(const T& anEntry) const;
5554 inline TInt FindInOrder(const T& anEntry, TLinearOrder<T> anOrder) const;
5555 inline TInt FindInSignedKeyOrder(const T& anEntry, TInt& anIndex) const;
5556 inline TInt FindInUnsignedKeyOrder(const T& anEntry, TInt& anIndex) const;
5557 inline TInt FindInOrder(const T& anEntry, TInt& anIndex, TLinearOrder<T> anOrder) const;
5558 template <class K>
5559 inline TInt FindInOrder(const K& aKey, TInt (*apfnCompare)(const K* k, const T& t)) const
5577 { return RArrayBase::FindIsq((T*)&aKey,*(TLinearOrder<T>*)&apfnCompare); }
5578 inline TInt SpecificFindInSignedKeyOrder(const T& anEntry, TInt aMode) const;
5579 inline TInt SpecificFindInUnsignedKeyOrder(const T& anEntry, TInt aMode) const;
5580 inline TInt SpecificFindInOrder(const T& anEntry, TLinearOrder<T> anOrder, TInt aMode) const;
5581 inline TInt SpecificFindInSignedKeyOrder(const T& anEntry, TInt& anIndex, TInt aMode) const;
5582 inline TInt SpecificFindInUnsignedKeyOrder(const T& anEntry, TInt& anIndex, TInt aMode) const;
5583 inline TInt SpecificFindInOrder(const T& anEntry, TInt& anIndex, TLinearOrder<T> anOrder, TInt aMode) const;
5584 inline TInt InsertInSignedKeyOrder(const T& anEntry);
5585 inline TInt InsertInUnsignedKeyOrder(const T& anEntry);
5586 inline TInt InsertInOrder(const T& anEntry, TLinearOrder<T> anOrder);
5587 inline TInt InsertInSignedKeyOrderAllowRepeats(const T& anEntry);
5588 inline TInt InsertInUnsignedKeyOrderAllowRepeats(const T& anEntry);
5589 inline TInt InsertInOrderAllowRepeats(const T& anEntry, TLinearOrder<T> anOrder);
5590#ifndef __KERNEL_MODE__
5591 inline void AppendL(const T& anEntry);
5592 inline void InsertL(const T& anEntry, TInt aPos);
5593 inline TInt FindL(const T& anEntry) const;
5594 inline TInt FindL(const T& anEntry, TIdentityRelation<T> anIdentity) const;
5595 inline TInt FindReverseL(const T& anEntry) const;
5596 inline TInt FindReverseL(const T& anEntry, TIdentityRelation<T> anIdentity) const;
5597 inline TInt FindInSignedKeyOrderL(const T& anEntry) const;
5598 inline TInt FindInUnsignedKeyOrderL(const T& anEntry) const;
5599 inline TInt FindInOrderL(const T& anEntry, TLinearOrder<T> anOrder) const;
5600 inline void FindInSignedKeyOrderL(const T& anEntry, TInt& anIndex) const;
5601 inline void FindInUnsignedKeyOrderL(const T& anEntry, TInt& anIndex) const;
5602 inline void FindInOrderL(const T& anEntry, TInt& anIndex, TLinearOrder<T> anOrder) const;
5603 inline TInt SpecificFindInSignedKeyOrderL(const T& anEntry, TInt aMode) const;
5604 inline TInt SpecificFindInUnsignedKeyOrderL(const T& anEntry, TInt aMode) const;
5605 inline TInt SpecificFindInOrderL(const T& anEntry, TLinearOrder<T> anOrder, TInt aMode) const;
5606 inline void SpecificFindInSignedKeyOrderL(const T& anEntry, TInt& anIndex, TInt aMode) const;
5607 inline void SpecificFindInUnsignedKeyOrderL(const T& anEntry, TInt& anIndex, TInt aMode) const;
5608 inline void SpecificFindInOrderL(const T& anEntry, TInt& anIndex, TLinearOrder<T> anOrder, TInt aMode) const;
5609 inline void InsertInSignedKeyOrderL(const T& anEntry);
5610 inline void InsertInUnsignedKeyOrderL(const T& anEntry);
5611 inline void InsertInOrderL(const T& anEntry, TLinearOrder<T> anOrder);
5612 inline void InsertInSignedKeyOrderAllowRepeatsL(const T& anEntry);
5613 inline void InsertInUnsignedKeyOrderAllowRepeatsL(const T& anEntry);
5614 inline void InsertInOrderAllowRepeatsL(const T& anEntry, TLinearOrder<T> anOrder);
5615
5616 inline void GranularCompress();
5617 inline TInt Reserve(TInt aCount);
5618 inline void ReserveL(TInt aCount);
5619 inline void SortSigned();
5620 inline void SortUnsigned();
5621 inline void Sort(TLinearOrder<T> anOrder);
5622 inline TArray<T> Array() const;
5623#endif
5624 };
5625
5626
5627
5628
5638TEMPLATE_SPECIALIZATION class RArray<TInt> : private RPointerArrayBase
5639 {
5640public:
5641 inline RArray();
5642 inline explicit RArray(TInt aGranularity);
5643 inline RArray(TInt aMinGrowBy, TInt aFactor);
5644 inline void Close();
5645 inline TInt Count() const;
5646 inline const TInt& operator[](TInt anIndex) const;
5647 inline TInt& operator[](TInt anIndex);
5648 inline TInt Append(TInt anEntry);
5649 inline TInt Insert(TInt anEntry, TInt aPos);
5650 inline void Remove(TInt anIndex);
5651 inline void Compress();
5652 inline void Reset();
5653 inline TInt Find(TInt anEntry) const;
5654 inline TInt FindReverse(TInt anEntry) const;
5655 inline TInt FindInOrder(TInt anEntry) const;
5656 inline TInt FindInOrder(TInt anEntry, TInt& anIndex) const;
5657 inline TInt SpecificFindInOrder(TInt anEntry, TInt aMode) const;
5658 inline TInt SpecificFindInOrder(TInt anEntry, TInt& anIndex, TInt aMode) const;
5659 inline TInt InsertInOrder(TInt anEntry);
5660 inline TInt InsertInOrderAllowRepeats(TInt anEntry);
5661#ifndef __KERNEL_MODE__
5662 inline void AppendL(TInt anEntry);
5663 inline void InsertL(TInt anEntry, TInt aPos);
5664 inline TInt FindL(TInt anEntry) const;
5665 inline TInt FindReverseL(TInt anEntry) const;
5666 inline TInt FindInOrderL(TInt anEntry) const;
5667 inline void FindInOrderL(TInt anEntry, TInt& anIndex) const;
5668 inline TInt SpecificFindInOrderL(TInt anEntry, TInt aMode) const;
5669 inline void SpecificFindInOrderL(TInt anEntry, TInt& anIndex, TInt aMode) const;
5670 inline void InsertInOrderL(TInt anEntry);
5671 inline void InsertInOrderAllowRepeatsL(TInt anEntry);
5672
5673 inline RArray(TInt* aEntries, TInt aCount);
5674 inline void GranularCompress();
5675 inline TInt Reserve(TInt aCount);
5676 inline void ReserveL(TInt aCount);
5677 inline void Sort();
5678 inline TArray<TInt> Array() const;
5679#endif
5680 };
5681
5682
5683
5684
5696TEMPLATE_SPECIALIZATION class RArray<TUint> : private RPointerArrayBase
5698public:
5699 inline RArray();
5700 inline explicit RArray(TInt aGranularity);
5701 inline RArray(TInt aMinGrowBy, TInt aFactor);
5702 inline void Close();
5703 inline TInt Count() const;
5704 inline const TUint& operator[](TInt anIndex) const;
5705 inline TUint& operator[](TInt anIndex);
5706 inline TInt Append(TUint anEntry);
5707 inline TInt Insert(TUint anEntry, TInt aPos);
5708 inline void Remove(TInt anIndex);
5709 inline void Compress();
5710 inline void Reset();
5711 inline TInt Find(TUint anEntry) const;
5712 inline TInt FindReverse(TUint anEntry) const;
5713 inline TInt FindInOrder(TUint anEntry) const;
5714 inline TInt FindInOrder(TUint anEntry, TInt& anIndex) const;
5715 inline TInt SpecificFindInOrder(TUint anEntry, TInt aMode) const;
5716 inline TInt SpecificFindInOrder(TUint anEntry, TInt& anIndex, TInt aMode) const;
5717 inline TInt InsertInOrder(TUint anEntry);
5718 inline TInt InsertInOrderAllowRepeats(TUint anEntry);
5719#ifndef __KERNEL_MODE__
5720 inline void AppendL(TUint anEntry);
5721 inline void InsertL(TUint anEntry, TInt aPos);
5722 inline TInt FindL(TUint anEntry) const;
5723 inline TInt FindReverseL(TUint anEntry) const;
5724 inline TInt FindInOrderL(TUint anEntry) const;
5725 inline void FindInOrderL(TUint anEntry, TInt& anIndex) const;
5726 inline TInt SpecificFindInOrderL(TUint anEntry, TInt aMode) const;
5727 inline void SpecificFindInOrderL(TUint anEntry, TInt& anIndex, TInt aMode) const;
5728 inline void InsertInOrderL(TUint anEntry);
5729 inline void InsertInOrderAllowRepeatsL(TUint anEntry);
5731 inline RArray(TUint* aEntries, TInt aCount);
5732 inline void GranularCompress();
5733 inline TInt Reserve(TInt aCount);
5734 inline void ReserveL(TInt aCount);
5735 inline void Sort();
5736 inline TArray<TUint> Array() const;
5737#endif
5740#ifndef __LEAVE_EQUALS_THROW__
5749public:
5750#ifndef __KERNEL_MODE__
5751 IMPORT_C TInt Trap(TInt& aResult);
5752 IMPORT_C static void UnTrap();
5753#endif
5754public:
5755 enum {EMaxState=0x10};
5756public:
5757 TInt iState[EMaxState];
5758 TTrap* iNext;
5759 TInt* iResult;
5761 };
5762
5763
5764
5796#define TRAP(_r,_s) {TTrap __t;if (__t.Trap(_r)==0){_s;TTrap::UnTrap();}}
5817#define TRAPD(_r,_s) TInt _r;{TTrap __t;if (__t.Trap(_r)==0){_s;TTrap::UnTrap();}}
5818
5855#define TRAP_IGNORE(_s) {TInt _ignore;TTrap __t;if (__t.Trap(_ignore)==0){_s;TTrap::UnTrap();}}
5858#else //__LEAVE_EQUALS_THROW__
5860#ifdef __WINS__
5862#define __WIN32SEHTRAP TWin32SEHTrap __trap; __trap.Trap();
5864#define __WIN32SEHUNTRAP __trap.UnTrap();
5865IMPORT_C void EmptyFunction();
5866#define __CALL_EMPTY_FUNCTION EmptyFunction();
5867#else // !__WINS__
5868#define __WIN32SEHTRAP
5869#define __WIN32SEHUNTRAP
5870#define __CALL_EMPTY_FUNCTION
5871#endif //__WINS__
5872
5900#define TRAP_INSTRUMENTATION_START
5901
5902
5903
5934#define TRAP_INSTRUMENTATION_NOLEAVE
5966#define TRAP_INSTRUMENTATION_LEAVE(aResult)
5967
5969
5998#define TRAP_INSTRUMENTATION_END
5999
6000
6001
6034/*__CALL_EMPTY_FUNCTION(call to a function with an empty body) was added as a
6035workaround to a compiler bug (mwccsym2 - winscw ) which caused an incorrect
6036trap handler to be invoked when multiple nested TRAP's were present and
6037User::Leave(..) was called. */
6039#define TRAP(_r, _s) \
6040 { \
6041 TInt& __rref = _r; \
6042 __rref = 0; \
6043 { TRAP_INSTRUMENTATION_START; } \
6044 try { \
6045 __WIN32SEHTRAP \
6046 TTrapHandler* ____t = User::MarkCleanupStack(); \
6047 _s; \
6048 User::UnMarkCleanupStack(____t); \
6049 { TRAP_INSTRUMENTATION_NOLEAVE; } \
6050 __WIN32SEHUNTRAP \
6051 } \
6052 catch (XLeaveException& l) \
6053 { \
6054 __rref = l.GetReason(); \
6055 { TRAP_INSTRUMENTATION_LEAVE(__rref); } \
6056 } \
6057 catch (...) \
6058 { \
6059 User::Invariant(); \
6060 } \
6061 __CALL_EMPTY_FUNCTION \
6062 { TRAP_INSTRUMENTATION_END; } \
6063 }
6064
6065
6086/*__CALL_EMPTY_FUNCTION(call to a function with an empty body) was added as a
6087workaround to a compiler bug (mwccsym2 - winscw ) which caused an incorrect
6088trap handler to be invoked when multiple nested TRAP's were present and
6089User::Leave(..) was called. */
6092#define TRAPD(_r, _s) \
6093 TInt _r; \
6094 { \
6095 _r = 0; \
6096 { TRAP_INSTRUMENTATION_START; } \
6097 try { \
6098 __WIN32SEHTRAP \
6099 TTrapHandler* ____t = User::MarkCleanupStack(); \
6100 _s; \
6101 User::UnMarkCleanupStack(____t); \
6102 { TRAP_INSTRUMENTATION_NOLEAVE; } \
6103 __WIN32SEHUNTRAP \
6104 } \
6105 catch (XLeaveException& l) \
6106 { \
6107 _r = l.GetReason(); \
6108 { TRAP_INSTRUMENTATION_LEAVE(_r); } \
6109 } \
6110 catch (...) \
6111 { \
6112 User::Invariant(); \
6113 } \
6114 __CALL_EMPTY_FUNCTION \
6115 { TRAP_INSTRUMENTATION_END; } \
6116 }
6117
6157/*__CALL_EMPTY_FUNCTION(call to a function with an empty body) was added as a
6158workaround to a compiler bug (mwccsym2 - winscw ) which caused an incorrect
6159trap handler to be invoked when multiple nested TRAP's were present and
6160User::Leave(..) was called. */
6162#define TRAP_IGNORE(_s) \
6163 { \
6164 { TRAP_INSTRUMENTATION_START; } \
6165 try { \
6166 __WIN32SEHTRAP \
6167 TTrapHandler* ____t = User::MarkCleanupStack(); \
6168 _s; \
6169 User::UnMarkCleanupStack(____t); \
6170 { TRAP_INSTRUMENTATION_NOLEAVE; } \
6171 __WIN32SEHUNTRAP \
6172 } \
6173 catch (XLeaveException& l) \
6174 { \
6175 l.GetReason(); \
6176 { TRAP_INSTRUMENTATION_LEAVE(l.Reason()); } \
6177 } \
6178 catch (...) \
6179 { \
6180 User::Invariant(); \
6181 } \
6182 __CALL_EMPTY_FUNCTION \
6183 { TRAP_INSTRUMENTATION_END; } \
6184 }
6185
6187#endif //__LEAVE_EQUALS_THROW__
6188
6189/* The macro __SYMBIAN_STDCPP_SUPPORT__ is defined when building a StdC++ target.
6190 * In this case, operator new and operator delete below should not be declared
6191 * to avoid clashing with StdC++ declarations.
6192 */
6193
6194#ifndef __SYMBIAN_STDCPP_SUPPORT__
6195
6196#ifndef __OPERATOR_NEW_DECLARED__
6198/* Some operator new and operator delete overloads may be declared in compiler
6199 * pre-include files.
6200 *
6201 * __OPERATOR_NEW_DECLARED__ is #defined if they are, so that we can avoid
6202 * re-declaring them here.
6203 */
6204
6205#define __OPERATOR_NEW_DECLARED__
6206
6211GLREF_C TAny* operator new(TUint aSize) __NO_THROW;
6212
6217GLREF_C TAny* operator new(TUint aSize,TUint anExtraSize) __NO_THROW;
6218
6223GLREF_C void operator delete(TAny* aPtr) __NO_THROW;
6224
6225#ifndef __OMIT_VEC_OPERATOR_NEW_DECL__
6230GLREF_C TAny* operator new[](TUint aSize) __NO_THROW;
6231
6236GLREF_C void operator delete[](TAny* aPtr) __NO_THROW;
6237#endif // !__OMIT_VEC_OPERATOR_NEW_DECL__
6238
6239#endif // !__OPERATOR_NEW_DECLARED__
6240
6241#endif // !__SYMBIAN_STDCPP_SUPPORT__
6242
6247inline TAny* operator new(TUint aSize, TAny* aBase) __NO_THROW;
6248
6253inline void operator delete(TAny* aPtr, TAny* aBase) __NO_THROW;
6254
6255#ifndef __PLACEMENT_VEC_NEW_INLINE
6260inline TAny* operator new[](TUint aSize, TAny* aBase) __NO_THROW;
6261
6266inline void operator delete[](TAny* aPtr, TAny* aBase) __NO_THROW;
6267
6268#endif // !__PLACEMENT_VEC_NEW_INLINE
6269
6270#if !defined(__BOOL_NO_TRUE_TRAP__)
6271
6276TBool operator==(TTrue,volatile const TBool);
6277
6282TBool operator==(volatile const TBool,TTrue);
6283
6288TBool operator!=(TTrue,volatile const TBool);
6289
6294TBool operator!=(volatile const TBool,TTrue);
6295#endif
6296
6297
6298
6299
6318class TIpcArgs
6319 {
6320public:
6327 enum TArgType
6328 {
6329 EUnspecified = 0,
6330 EHandle = 1,
6331 EFlagDes = 4,
6332 EFlagConst = 2,
6333 EFlag16Bit = 1,
6334 EDes8 = EFlagDes,
6338 };
6339
6340
6344 enum
6345 {
6346 KBitsPerType = 3,
6347 KPinArgShift = KBitsPerType*KMaxMessageArguments,
6348 KPinArg0 = 1<<(KPinArgShift+0),
6349 KPinArg1 = 1<<(KPinArgShift+1),
6350 KPinArg2 = 1<<(KPinArgShift+2),
6351 KPinArg3 = 1<<(KPinArgShift+3),
6352 KPinMask = 0xf<<KPinArgShift,
6353 };
6354
6355
6359 enum TNothing {
6371 ENothing
6372 };
6373public:
6381 inline TIpcArgs()
6382 :iFlags(0)
6383 {}
6384
6385
6393 template <class T0>
6394 inline explicit TIpcArgs(T0 a0)
6395 {
6396 Assign(iArgs[0],a0);
6397 iFlags=(Type(a0)<<(0*KBitsPerType));
6398 }
6399
6400
6410 template <class T0,class T1>
6411 inline TIpcArgs(T0 a0,T1 a1)
6412 {
6413 Assign(iArgs[0],a0);
6414 Assign(iArgs[1],a1);
6415 iFlags=(Type(a0)<<(0*KBitsPerType))|(Type(a1)<<(1*KBitsPerType));
6416 }
6417
6418
6430 template <class T0,class T1,class T2>
6431 inline TIpcArgs(T0 a0,T1 a1,T2 a2)
6432 {
6433 Assign(iArgs[0],a0);
6434 Assign(iArgs[1],a1);
6435 Assign(iArgs[2],a2);
6436 iFlags=(Type(a0)<<(0*KBitsPerType))|(Type(a1)<<(1*KBitsPerType))|(Type(a2)<<(2*KBitsPerType));
6437 }
6438
6439
6453 template <class T0,class T1,class T2,class T3>
6454 inline TIpcArgs(T0 a0,T1 a1,T2 a2,T3 a3)
6455 {
6456 Assign(iArgs[0],a0);
6457 Assign(iArgs[1],a1);
6458 Assign(iArgs[2],a2);
6459 Assign(iArgs[3],a3);
6460 iFlags=(Type(a0)<<(0*KBitsPerType))|(Type(a1)<<(1*KBitsPerType))|(Type(a2)<<(2*KBitsPerType))|(Type(a3)<<(3*KBitsPerType));
6461 }
6462 //
6463 inline void Set(TInt aIndex,TNothing);
6464 inline void Set(TInt aIndex,TInt aValue);
6465 inline void Set(TInt aIndex,const TAny* aValue);
6466 inline void Set(TInt aIndex,RHandleBase aValue);
6467 inline void Set(TInt aIndex,const TDesC8* aValue);
6468#ifndef __KERNEL_MODE__
6469 inline void Set(TInt aIndex,const TDesC16* aValue);
6470#endif
6471 inline void Set(TInt aIndex,TDes8* aValue);
6472#ifndef __KERNEL_MODE__
6473 inline void Set(TInt aIndex,TDes16* aValue);
6474#endif
6475
6476 inline TIpcArgs& PinArgs(TBool aPinArg0=ETrue, TBool aPinArg1=ETrue, TBool aPinArg2=ETrue, TBool aPinArg3=ETrue);
6477private:
6478 inline static TArgType Type(TNothing);
6479 inline static TArgType Type(TInt);
6480 inline static TArgType Type(const TAny*);
6481 inline static TArgType Type(RHandleBase aValue);
6482 inline static TArgType Type(const TDesC8*);
6483#ifndef __KERNEL_MODE__
6484 inline static TArgType Type(const TDesC16*);
6485#endif
6486 inline static TArgType Type(TDes8*);
6487#ifndef __KERNEL_MODE__
6488 inline static TArgType Type(TDes16*);
6489#endif
6490 //
6491 inline static void Assign(TInt&,TNothing);
6492 inline static void Assign(TInt& aArg,TInt aValue);
6493 inline static void Assign(TInt& aArg,const TAny* aValue);
6494 inline static void Assign(TInt& aArg,RHandleBase aValue);
6495 inline static void Assign(TInt& aArg,const TDesC8* aValue);
6496#ifndef __KERNEL_MODE__
6497 inline static void Assign(TInt& aArg,const TDesC16* aValue);
6498#endif
6499 inline static void Assign(TInt& aArg,TDes8* aValue);
6500#ifndef __KERNEL_MODE__
6501 inline static void Assign(TInt& aArg,TDes16* aValue);
6502#endif
6503public:
6504
6511 TInt iArgs[KMaxMessageArguments];
6512
6520 TInt iFlags;
6521 };
6522
6523// Structures for passing 64 bit integers and doubles across GCC/EABI boundaries
6524
6528struct SInt64
6529 {
6530public:
6531 inline SInt64();
6532 inline SInt64(Int64 a);
6533 inline SInt64& operator=(Int64 a);
6534 inline operator Int64() const;
6535public:
6536 TUint32 iData[2]; // little endian
6537 };
6538
6542struct SUint64
6543 {
6544public:
6545 inline SUint64();
6546 inline SUint64(Uint64 a);
6547 inline SUint64& operator=(Uint64 a);
6548 inline operator Uint64() const;
6549public:
6550 TUint32 iData[2]; // little endian
6551 };
6552
6556struct SDouble
6557 {
6558public:
6559 inline SDouble();
6560 inline SDouble(TReal a);
6561 inline SDouble& operator=(TReal a);
6562 inline operator TReal() const;
6563public:
6564 TUint32 iData[2]; // always little endian
6565 };
6566
6578class TThreadStackInfo
6579 {
6580public:
6584 TLinAddr iBase;
6585
6590 TLinAddr iLimit;
6591
6597 TLinAddr iExpandLimit;
6598 };
6599
6600
6601
6602
6603#ifdef __SUPPORT_CPP_EXCEPTIONS__
6611class XLeaveException
6612 {
6613public:
6614 inline XLeaveException() {}
6615 inline XLeaveException(TInt aReason) {iR = aReason;}
6616 inline TInt Reason() const {return iR;}
6617 IMPORT_C TInt GetReason() const;
6618private:
6619#if __ARMCC_VERSION >= 220000
6620 // From rvct 2.2 onwards we want the class impedimenta to be shared, so create a key function.
6621 // Unfortunately we can't make this the key function the dtor since this would make it impossible for existing 2.1
6622 // derived binaries to be 'BC' with 2.2 binaries (in the general case (which I wont attempt to describe coz its
6623 // too complex) so its best to be safe). As a clue: if 2.1 is used to compile with a key function its not possible
6624 // for catch handlers to work :-( (see the old code).
6625 virtual void ForceKeyFunction();
6626#endif
6627private:
6628#if __ARMCC_VERSION < 220000
6629 TAny* iVtable; // reserve space for vtable
6630#endif
6631 TInt iR;
6632 };
6633
6634// The standard header file <exception> defines the following guard macro for EDG and CW, VC++, GCC respectively.
6635// The guard below is ugly. It will surely come back and bite us unless we resolve the whole issue of standard headers
6636// when we move to supporting Standard C++.
6637
6638// The macro __SYMBIAN_STDCPP_SUPPORT__ is defined when building a StdC++ target.
6639// In this case, we include the StdC++ specification <exception> rather than declaring uncaught_exception.
6640
6641#ifdef __SYMBIAN_STDCPP_SUPPORT__
6642 #include <stdapis/stlportv5/exception>
6643#elif !defined(_EXCEPTION) && !defined(_EXCEPTION_) && !defined(__EXCEPTION__)
6644// Declare standard C++ functions relating to exceptions here
6645namespace std {
6646#if defined(__VC32__) || defined(__CW32__)
6647 bool uncaught_exception();
6648#else
6649 IMPORT_C bool uncaught_exception();
6650#endif
6651 void terminate(void);
6652 void unexpected(void);
6653 typedef void (*terminate_handler)();
6654 terminate_handler set_terminate(terminate_handler h) throw();
6655 typedef void (*unexpected_handler)();
6656 unexpected_handler set_unexpected(unexpected_handler h) throw();
6657}
6658
6659#endif
6660#endif //__SUPPORT_CPP_EXCEPTIONS__
6661
6662#ifdef __WINS__
6663
6664#ifndef __WIN32_SEH_TYPES_KNOWN__
6665class __UnknownWindowsType1;
6666class __UnknownWindowsType2;
6667#endif
6668
6669class TWin32SEHTrap;
6670
6675typedef TUint32 (TWin32SEHExceptionHandler)(__UnknownWindowsType1* aExceptionRecord, TWin32SEHTrap* aRegistrationRecord, __UnknownWindowsType2* aContext);
6676
6680class TWin32SEHTrap
6681 {
6682private:
6683 // Prevent copy/assign
6684 TWin32SEHTrap(TWin32SEHTrap const &);
6685 TWin32SEHTrap& operator=(TWin32SEHTrap const &);
6686
6687#ifdef __KERNEL_MODE__
6688//
6689// Kernel-side functions for nkern exception handler
6690//
6691public:
6693 static TWin32SEHTrap* IterateForFinal();
6694
6696 TWin32SEHExceptionHandler* ExceptionHandler();
6697
6698private:
6700#else // !__KERNEL_MODE__
6701//
6702// User-side functions for use in TRAP(...)
6703//
6704public:
6705 UIMPORT_C TWin32SEHTrap();
6706
6707public:
6709 UIMPORT_C void Trap();
6710
6712 UIMPORT_C void UnTrap();
6713
6714#ifndef __IN_SEH_CPP__
6715private:
6716#endif
6718 static TUint32 ExceptionHandler(__UnknownWindowsType1* aException, TWin32SEHTrap* aRegistrationRecord, __UnknownWindowsType2* aContext);
6719
6720#endif //__KERNEL_MODE__
6721
6722 //
6723 // NB: This is really an _EXCEPTION_REGISTRATION_RECORD
6724 //
6725 TWin32SEHTrap* iPrevExceptionRegistrationRecord;
6726 TWin32SEHExceptionHandler* iExceptionHandler;
6728private:
6729 TUint32 iPadding[254]; // discourage the compiler from putting this in reused function parameter space
6730 };
6731
6732#else // !__WINS__
6733
6734#ifdef __X86__
6738class TWin32SEHTrap
6739 {
6740public:
6741 UIMPORT_C TWin32SEHTrap();
6742 UIMPORT_C void Trap();
6743 UIMPORT_C void UnTrap();
6744 };
6745#endif //__X86__
6746#endif //__WINS__
6747
6752 {
6753 TUid iUids[KMaxCheckedUid];
6754 TProcessPriority iPriority;
6756 TUint32 iSpare1;
6757 TUint32 iSpare2;
6758 TUint32 iModuleVersion;
6759 TUint32 iFlags;
6760 };
6761
6762// forward declaration of shareable data buffers pool infomation
6763class TShPoolInfo;
6764
6765#include <e32cmn.inl>
6767#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
6768#include <e32cmn_private.h>
6769#endif
6770
6771#endif //__E32CMN_H__
6772
Controls the handling of asynchronous requests as represented by active objects.
Definition e32base.h:2923
The core class of the active object abstraction.
Definition e32base.h:1638
Container Base Class.
Definition e32base.h:60
Abstract base class for servers (version 2).
Definition e32base.h:2301
Represents a session (version 2) for a client thread on the server-side.
Definition e32base.h:2241
A set of common identity relations for frequently occurring types.
Definition e32cmn.h:5457
static IMPORT_C TBool Des16Ptr(TDesC16 *const &, TDesC16 *const &)
Compare two TDesC16 pointers for equality.
static IMPORT_C TBool Des8(const TDesC8 &, const TDesC8 &)
Compare two 8 bit descriptors for exact binary equality.
static IMPORT_C TBool Integer(const TInt &, const TInt &)
Compare two integers for equality.
static IMPORT_C TBool IntegerPtr(TInt *const &, TInt *const &)
Compare two TInt pointers for equality.
static IMPORT_C TBool Des8Ptr(TDesC8 *const &, TDesC8 *const &)
Compare two TDesC8 pointers for equality.
static IMPORT_C TBool Des16(const TDesC16 &, const TDesC16 &)
Compare two 16 bit descriptors for exact binary equality.
Base class for memory allocators.
Definition e32cmn.h:2795
virtual void Reset()=0
virtual TInt Extension_(TUint aExtensionId, TAny *&a0, TAny *a1)=0
virtual TInt AllocSize(TInt &aTotalAllocSize) const =0
virtual TInt Compress()=0
virtual TInt Available(TInt &aBiggestBlock) const =0
virtual TAny * Alloc(TInt aSize)=0
virtual TAny * ReAlloc(TAny *aPtr, TInt aSize, TInt aMode=0)=0
virtual TInt DebugFunction(TInt aFunc, TAny *a1=NULL, TAny *a2=NULL)=0
virtual void Free(TAny *aPtr)=0
virtual TInt AllocLen(const TAny *aCell) const =0
Class containing Platform Security related methods.
Definition e32cmn.h:4965
static TInt CreatorCapabilityCheckFail(TCapability aCapability, const char *aContextText)
static TInt CreatorPolicyCheckFail(const SSecurityInfo &aMissingCaps, const char *aContextText)
static TInt PolicyCheckFail(TInt aHandle, const SSecurityInfo &aMissing, const char *aContextText)
TConfigSetting
Definition e32cmn.h:4997
@ EPlatSecEnforceSysBin
Used to request the value of the PlatSecEnforceSysBin setting.
Definition e32cmn.h:5001
@ EPlatSecLocked
Used to request the value of the PlatSecLocked setting.
Definition e32cmn.h:5002
@ EPlatSecEnforcement
Used to request the value of the PlatSecEnforcement setting.
Definition e32cmn.h:4998
@ EPlatSecProcessIsolation
Used to request the value of the PlatSecProcessIsolation setting.
Definition e32cmn.h:5000
@ EPlatSecDiagnotics
Used to request the value of the PlatSecDiagnotics setting.
Definition e32cmn.h:4999
static TInt CapabilityCheckFail(TInt aHandle, TCapability aCapability, const char *aContextText)
static IMPORT_C TBool IsCapabilityEnforced(TCapability aCapability)
static UIMPORT_C TInt EmitDiagnostic()
static IMPORT_C TInt ConfigSetting(TConfigSetting aSetting)
static TInt LoaderCapabilityViolation(const TDesC8 &aImporterName, const TDesC8 &aFileName, const SCapabilitySet &aMissingCaps)
Base class for heaps.
Definition e32cmn.h:2821
UIMPORT_C TUint __DbgCheckFailure()
Returns the number of heap allocation failures the current debug allocator fail function has caused s...
IMPORT_C void Close()
Closes this shared heap.
UIMPORT_C TInt __DbgMarkCheck(TBool aCountAll, TInt aCount, const TDesC8 &aFileName, TInt aLineNum)
Checks the current number of allocated heap cells for this heap.
UIMPORT_C TInt MaxLength() const
IMPORT_C TAny * AllocZL(TInt aSize)
Allocates a cell of specified size from the heap, clears it to binary zeroes, and leaves if there is ...
UIMPORT_C TUint32 __DbgMarkEnd(TInt aCount)
Marks the end of heap cell checking at the current nested level for this heap.
TInt iAccessCount
Definition e32cmn.h:2990
UIMPORT_C void __DbgSetAllocFail(TAllocFail aType, TInt aRate)
Simulates a heap allocation failure for this heap.
IMPORT_C TAny * AllocL(TInt aSize)
Allocates a cell of specified size from the heap, and leaves if there is insufficient memory in the h...
@ EMaxHandles
Definition e32cmn.h:2952
UIMPORT_C void __DbgMarkStart()
Marks the start of heap cell checking for this heap.
UIMPORT_C void __DbgSetBurstAllocFail(TAllocFail aType, TUint aRate, TUint aBurst)
Simulates a burst of heap allocation failures for this heap.
IMPORT_C TInt Open()
Opens this heap for shared access.
TInt iTotalAllocSize
Definition e32cmn.h:2995
@ ESingleThreaded
Definition e32cmn.h:2947
@ ETraceAllocs
Definition e32cmn.h:2947
@ EMonitorMemory
Definition e32cmn.h:2947
TReAllocMode
Flags controlling reallocation.
Definition e32cmn.h:2933
@ ENeverMove
A reallocation of a cell must not change the start address of the cell.
Definition e32cmn.h:2938
@ EAllowMoveOnShrink
Allows the start address of the cell to change if the cell shrinks in size.
Definition e32cmn.h:2944
UIMPORT_C TInt Align(TInt a) const
IMPORT_C TInt Count() const
Gets the total number of cells allocated on the heap.
TAllocFail
A set of heap allocation failure flags.
Definition e32cmn.h:2831
@ EBurstTrueRandom
aBurst allocations from this heap fail at a random rate.
Definition e32cmn.h:2883
@ EDeterministic
Attempts to allocate from this heap fail at a rate aRate; for example, if aRate is 3,...
Definition e32cmn.h:2851
@ EBurstRandom
aBurst allocations from this heap fail at a random rate; however, the interval pattern between failur...
Definition e32cmn.h:2876
@ EReset
Cancels simulated heap allocation failure, and sets the nesting level for all allocated cells to zero...
Definition e32cmn.h:2869
@ ENone
Cancels simulated heap allocation failure.
Definition e32cmn.h:2856
@ ERandom
Attempts to allocate from this heap fail at a random rate; however, the interval pattern between fail...
Definition e32cmn.h:2837
@ EFailNext
An allocation from this heap will fail after the next aRate - 1 allocation attempts.
Definition e32cmn.h:2863
@ EBurstDeterministic
aBurst allocations from this heap fail at a rate aRate.
Definition e32cmn.h:2890
@ EBurstFailNext
aBurst allocations from this heap will fail after the next aRate - 1 allocation attempts have occurre...
Definition e32cmn.h:2897
@ ETrueRandom
Attempts to allocate from this heap fail at a random rate.
Definition e32cmn.h:2844
@ ECheckFailure
Use this to determine how many times the current debug failure mode has failed so far.
Definition e32cmn.h:2904
virtual UIMPORT_C TInt Extension_(TUint aExtensionId, TAny *&a0, TAny *a1)
UIMPORT_C TUint8 * Base() const
TInt iCellCount
Definition e32cmn.h:2994
UIMPORT_C TInt Size() const
UIMPORT_C TAllocFail __DbgGetAllocFail()
TInt iHandleCount
Definition e32cmn.h:2991
virtual IMPORT_C void DoClose()
TDbgHeapType
Heap debug checking type flag.
Definition e32cmn.h:2911
@ EUser
The heap is a user heap.
Definition e32cmn.h:2915
@ EKernel
The heap is the Kernel heap.
Definition e32cmn.h:2920
IMPORT_C void FreeZ(TAny *&aCell)
Frees the specified cell, returns it to the heap, and resets the pointer to NULL.
@ EGetMaxLength
Definition e32cmn.h:2926
@ EAlignInteger
Definition e32cmn.h:2926
@ ECopyDebugInfo
Definition e32cmn.h:2925
@ ESetBurstFail
Definition e32cmn.h:2925
IMPORT_C TAny * AllocZ(TInt aSize)
Allocates a cell of specified size from the heap, and clears it to binary zeroes.
TUint32 iFlags
Definition e32cmn.h:2993
UIMPORT_C void Check() const
Checks the validity of the heap.
TInt * iHandles
Definition e32cmn.h:2992
IMPORT_C TAny * AllocLC(TInt aSize)
Allocates a cell of specified size from the heap, and, if successful, places a pointer to the cell on...
IMPORT_C TAny * ReAllocL(TAny *aCell, TInt aSize, TInt aMode=0)
Increases or decreases the size of an existing cell, and leaves if there is insufficient memory in th...
Base class used in the derivation of RArray.
Definition e32cmn.h:5827
IMPORT_C TInt FindIsq(const TAny *anEntry, TGeneralLinearOrder anOrder) const
IMPORT_C void Close()
IMPORT_C TInt InsertIsqUnsigned(const TAny *anEntry, TBool aAllowRepeats)
IMPORT_C void Reset()
static IMPORT_C const TAny * GetElementPtr(const CBase *aPtr, TInt aIndex)
IMPORT_C TAny * At(TInt anIndex) const
IMPORT_C TInt Find(const TAny *anEntry) const
IMPORT_C TInt FindReverse(const TAny *aEntry) const
IMPORT_C TInt Count() const
IMPORT_C void Remove(TInt anIndex)
IMPORT_C TInt BinarySearchUnsigned(const TAny *anEntry, TInt &anIndex) const
IMPORT_C void HeapSortUnsigned()
IMPORT_C TInt FindIsqSigned(const TAny *anEntry) const
IMPORT_C TInt InsertIsqSigned(const TAny *anEntry, TBool aAllowRepeats)
IMPORT_C TInt Insert(const TAny *anEntry, TInt aPos)
IMPORT_C TInt Append(const TAny *anEntry)
static IMPORT_C TInt GetCount(const CBase *aPtr)
IMPORT_C TInt BinarySearch(const TAny *anEntry, TInt &anIndex, TGeneralLinearOrder anOrder) const
IMPORT_C void Compress()
IMPORT_C void HeapSortSigned()
IMPORT_C void GranularCompress()
IMPORT_C TInt BinarySearchSigned(const TAny *anEntry, TInt &anIndex) const
IMPORT_C void SetKeyOffset(TInt aKeyOffset)
IMPORT_C void HeapSort(TGeneralLinearOrder anOrder)
IMPORT_C TInt FindIsqUnsigned(const TAny *anEntry) const
IMPORT_C TInt DoReserve(TInt aCount)
IMPORT_C TInt InsertIsq(const TAny *anEntry, TGeneralLinearOrder anOrder, TBool aAllowRepeats)
A simple and efficient array of fixed length objects.
Definition e32cmn.h:5928
TInt FindInSignedKeyOrder(const T &anEntry) const
Finds the object in the array which matches the specified object using a binary search technique.
RArray()
Default C++ constructor.
void SortSigned()
Sorts the objects within the array; the sort order is assumed to be in signed integer order.
TInt FindInUnsignedKeyOrder(const T &anEntry) const
Finds the object in the array which matches the specified object using a binary search technique.
TInt InsertInOrder(const T &anEntry, TLinearOrder< T > anOrder)
Inserts an object of into the array in object order.
void InsertInOrderAllowRepeatsL(const T &anEntry, TLinearOrder< T > anOrder)
Inserts an object into the array in object order, allowing duplicates.
void Reset()
Empties the array, so that it is ready to be reused.
void InsertInSignedKeyOrderL(const T &anEntry)
Inserts an object into the array in ascending signed key order.
TInt SpecificFindInOrderL(const T &anEntry, TLinearOrder< T > anOrder, TInt aMode) const
Finds the object in the array which matches the specified object using a binary search technique and ...
void AppendL(const T &anEntry)
Apends an object onto the array.
TInt FindL(const T &anEntry) const
Finds the first object in the array which matches the specified object using a sequential search.
TInt InsertInSignedKeyOrderAllowRepeats(const T &anEntry)
Inserts an object into the array in ascending signed key order, allowing duplicates.
TInt SpecificFindInSignedKeyOrderL(const T &anEntry, TInt aMode) const
Finds the object in the array which matches the specified object using a binary search technique.
void SortUnsigned()
Sorts the objects within the array; the sort order is assumed to be in unsigned integer order.
void InsertInUnsignedKeyOrderAllowRepeatsL(const T &anEntry)
Inserts an object into the array in ascending unsigned key order, allowing duplicates.
TInt FindInUnsignedKeyOrderL(const T &anEntry) const
Finds the object in the array which matches the specified object using a binary search technique.
TInt FindInOrderL(const T &anEntry, TLinearOrder< T > anOrder) const
Finds the object in the array which matches the specified object using a binary search technique and ...
void Remove(TInt anIndex)
Removes the object at a specified position from the array.
void ReserveL(TInt aCount)
Reserves space for the specified number of elements.
TInt Insert(const T &anEntry, TInt aPos)
Inserts an object into the array at a specified position.
TInt InsertInUnsignedKeyOrder(const T &anEntry)
Inserts an object into the array in ascending unsigned key order.
void InsertInOrderL(const T &anEntry, TLinearOrder< T > anOrder)
Inserts an object of into the array in object order.
void GranularCompress()
Compresses the array down to a granular boundary.
void InsertL(const T &anEntry, TInt aPos)
Inserts an object into the array at a specified position.
TInt FindInSignedKeyOrderL(const T &anEntry) const
Finds the object in the array which matches the specified object using a binary search technique.
TInt SpecificFindInSignedKeyOrder(const T &anEntry, TInt aMode) const
Finds the object in the array which matches the specified object using a binary search technique.
TInt InsertInUnsignedKeyOrderAllowRepeats(const T &anEntry)
Inserts an object into the array in ascending unsigned key order, allowing duplicates.
void Compress()
Compresses the array down to a minimum.
TInt InsertInSignedKeyOrder(const T &anEntry)
Inserts an object into the array in ascending signed key order.
void SetKeyOffset(TInt aKeyOffset)
Sets the offset of the ordering key within each array entry.
TArray< T > Array() const
Constructs and returns a generic array.
TInt FindReverseL(const T &anEntry) const
Finds the last object in the array which matches the specified object using a sequential search.
void InsertInSignedKeyOrderAllowRepeatsL(const T &anEntry)
Inserts an object into the array in ascending signed key order, allowing duplicates.
void Close()
Closes the array and frees all memory allocated to the array.
TInt SpecificFindInOrder(const T &anEntry, TLinearOrder< T > anOrder, TInt aMode) const
Finds the object in the array which matches the specified object using a binary search technique and ...
TInt Count() const
Gets the number of objects in the array.
TInt SpecificFindInUnsignedKeyOrder(const T &anEntry, TInt aMode) const
Finds the object in the array which matches the specified object using a binary search technique.
void Sort(TLinearOrder< T > anOrder)
Sorts the objects within the array using the specified TLinearOrder.
TInt Find(const T &anEntry) const
Finds the first object in the array which matches the specified object using a sequential search.
const T & operator[](TInt anIndex) const
Gets a reference to an object located at a specified position within the array.
TInt FindInOrder(const T &anEntry, TLinearOrder< T > anOrder) const
Finds the object in the array which matches the specified object using a binary search technique and ...
TInt InsertInOrderAllowRepeats(const T &anEntry, TLinearOrder< T > anOrder)
Inserts an object into the array in object order, allowing duplicates.
TInt SpecificFindInUnsignedKeyOrderL(const T &anEntry, TInt aMode) const
Finds the object in the array which matches the specified object using a binary search technique.
void InsertInUnsignedKeyOrderL(const T &anEntry)
Inserts an object into the array in ascending unsigned key order, not allowing duplicate entries.
TInt FindReverse(const T &anEntry) const
Finds the last object in the array which matches the specified object using a sequential search.
TInt Append(const T &anEntry)
Apends an object onto the array.
TInt Reserve(TInt aCount)
Reserves space for the specified number of elements.
The user-side handle to a logical channel.
Definition e32cmn.h:2758
IMPORT_C void DoRequest(TInt aReqNo, TRequestStatus &aStatus)
Queues an asynchronous request for the device driver, taking no parameters.
TInt DoCreate(const TDesC &aDevice, const TVersion &aVer, TInt aUnit, const TDesC *aDriver, const TDesC8 *anInfo, TOwnerType aType=EOwnerProcess, TBool aProtected=EFalse)
Creates the logical channel.
TInt DoSvControl(TInt aFunction)
Definition e32cmn.h:2771
IMPORT_C TInt DoControl(TInt aFunction)
Makes a synchronous request to the device driver, taking no parameters.
IMPORT_C TInt Open(RMessagePtr2 aMessage, TInt aParam, TOwnerType aType=EOwnerProcess)
Opens a handle to a logical channel using a handle number sent by a client to a server.
IMPORT_C void DoCancel(TUint aReqMask)
Cancels one or more outstanding asynchronous requests.
A fast semaphore.
Definition e32cmn.h:2668
RFastLock()
Default constructor.
IMPORT_C TInt CreateLocal(TOwnerType aType=EOwnerProcess)
Creates a local fast semaphore, and opens this handle to the semaphore.
IMPORT_C void Signal()
Signals the semaphore once.
IMPORT_C void Wait()
Waits for a signal on the semaphore.
IMPORT_C TInt Poll()
A handle to an object.
Definition e32cmn.h:2569
void SetHandle(TInt aHandle)
Sets the handle-number of this handle to the specified value.
IMPORT_C TInt Open(const TFindHandleBase &aHandle, TOwnerType aType)
Opens a handle to a kernel side object found using a find-handle object.
IMPORT_C void HandleInfo(THandleInfo *anInfo)
Gets information about the handle.
IMPORT_C void NotifyDestruction(TRequestStatus &aStatus)
Internal technology API.
TInt Handle() const
Retrieves the handle-number of the object associated with this handle.
TInt OpenByName(const TDesC &aName, TOwnerType aOwnerType, TInt aObjectType)
Implementation for RXxxxx::Open/OpenGlocbal(const TDesC &aName,,TOwnerType aType) functions.
IMPORT_C TInt Duplicate(const RThread &aSrc, TOwnerType aType=EOwnerProcess)
Creates a valid handle to the kernel object for which the specified thread already has a handle.
TInt SetReturnedHandle(TInt aHandleOrError)
Sets the handle-number of this handle to the specified value.
IMPORT_C void SetHandleNC(TInt aHandle)
Sets the handle-number of this handle to the specified value, and marks it as not closable.
RHandleBase()
Default constructor.
IMPORT_C TInt BTraceId() const
Returns a unique object identifier for use with BTrace.
IMPORT_C TUint Attributes() const
static void DoExtendedClose()
IMPORT_C TFullName FullName() const
Gets the full name of the handle.
IMPORT_C void Close()
Closes the handle.
TAttributes
Read/Write attributes for the handle.
Definition e32cmn.h:2580
@ EDirectWriteAccess
Definition e32cmn.h:2584
@ EDirectReadAccess
Definition e32cmn.h:2583
TInt iHandle
Definition e32cmn.h:2612
IMPORT_C TName Name() const
Gets the name of the handle.
Represents the default implementation for a heap.
Definition e32cmn.h:3026
virtual UIMPORT_C void Reset()
Frees all allocated cells on this heap.
virtual UIMPORT_C TAny * ReAlloc(TAny *aPtr, TInt aSize, TInt aMode=0)
Increases or decreases the size of an existing cell in the heap.
TUint8 * iBase
Definition e32cmn.h:3156
@ ECellAlignment
Definition e32cmn.h:3081
TAllocFail iFailType
Definition e32cmn.h:3163
virtual UIMPORT_C TAny * Alloc(TInt aSize)
Allocates a cell of the specified size from the heap.
virtual UIMPORT_C TInt Extension_(TUint aExtensionId, TAny *&a0, TAny *a1)
TInt iUnused1
Definition e32cmn.h:3149
TDefaultShrinkRatios
Definition e32cmn.h:3130
@ EShrinkRatioDflt
Definition e32cmn.h:3130
@ EShrinkRatio1
Definition e32cmn.h:3130
TUint8 * iTop
Definition e32cmn.h:3157
virtual UIMPORT_C TInt DebugFunction(TInt aFunc, TAny *a1=NULL, TAny *a2=NULL)
TDebugHeapId
Definition e32cmn.h:3123
@ EUser
Definition e32cmn.h:3123
@ EKernel
Definition e32cmn.h:3123
virtual UIMPORT_C TInt Compress()
Compresses the heap.
void(* TWalkFunc)(TAny *, TCellType, TAny *, TInt)
Definition e32cmn.h:3137
TCellType
Definition e32cmn.h:3113
@ EBadFreeCellSize
Definition e32cmn.h:3115
@ EBadAllocatedCellAddress
Definition e32cmn.h:3114
@ EBadFreeCellAddress
Definition e32cmn.h:3115
@ EGoodFreeCell
Definition e32cmn.h:3114
@ EGoodAllocatedCell
Definition e32cmn.h:3114
@ EBadAllocatedCellSize
Definition e32cmn.h:3114
virtual UIMPORT_C void Free(TAny *aPtr)
Frees the specified cell and returns it to the heap.
RHeap()
Definition e32cmn.h:3042
@ EDebugHdrSize
Definition e32cmn.h:3076
TInt iChunkHandle
Definition e32cmn.h:3154
TInt iUnused2
Definition e32cmn.h:3151
TInt iMaxLength
Definition e32cmn.h:3150
virtual UIMPORT_C TInt Available(TInt &aBiggestBlock) const
Gets the total free space currently available on the heap and the space available in the largest free...
TInt iAlign
Definition e32cmn.h:3158
TAny * iTestData
Definition e32cmn.h:3165
@ EFreeCellSize
Definition e32cmn.h:3086
@ EAllocCellSize
Definition e32cmn.h:3097
virtual UIMPORT_C TInt AllocSize(TInt &aTotalAllocSize) const
Gets the number of cells allocated on this heap, and the total space allocated to them.
TDebugOp
Definition e32cmn.h:3105
@ EHybridHeap
Definition e32cmn.h:3105
@ EWalk
Definition e32cmn.h:3105
virtual UIMPORT_C TInt AllocLen(const TAny *aCell) const
Gets the length of the available space in the specified allocated cell.
TInt iUnused3
Definition e32cmn.h:3152
TInt iNestingLevel
Definition e32cmn.h:3164
RFastLock iLock
Definition e32cmn.h:3155
An object that encapsulates the details of a client request.
Definition e32cmn.h:3465
TInt Int2() const
Gets the third message argument as an integer value.
TInt Int1() const
Gets the second message argument as an integer value.
const TAny * Ptr2() const
Gets the third message argument as a pointer type.
friend class RMessage
Definition e32cmn.h:3525
void ClearAuthorised() const
Sets the authorised flag to a state of not authorised.
const TAny * Ptr1() const
Gets the second message argument as a pointer type.
TSessionMessages
Defines internal message types.
Definition e32cmn.h:3472
@ EConnect
A message type used internally that means connect.
Definition e32cmn.h:3476
@ EDisConnect
A message type used internally that means disconnect.
Definition e32cmn.h:3481
void SetAuthorised() const
Sets this message to an authorised state.
const TAny * Ptr3() const
Gets the fourth message argument as a pointer type.
TInt Function() const
Gets the the number of the function requested by the client.
TInt Int3() const
Gets the fourth message argument as an integer value.
TBool Authorised() const
Returns whether this message has been authorised by CPolicyServer.
TInt Int0() const
Gets the first message argument as an integer value.
TInt iFunction
The request type.
Definition e32cmn.h:3506
RMessage2()
Default constructor.
TInt iArgs[KMaxMessageArguments]
A copy of the message arguments.
Definition e32cmn.h:3511
const TAny * Ptr0() const
Gets the first message argument as a pointer type.
const TAny * iSessionPtr
Definition e32cmn.h:3520
CSession2 * Session() const
Gets a pointer to the session.
A handle to a message sent by the client to the server.
Definition e32cmn.h:3206
IMPORT_C TBool ClientIsRealtime() const
IMPORT_C TInt GetDesMaxLength(TInt aParam) const
Gets the maximum length of a descriptor argument in the client's process.
TBool HasCapability(TCapability aCapability, const char *aDiagnostic=0) const
IMPORT_C TInt Write(TInt aParam, const TDesC8 &aDes, TInt aOffset=0) const
Writes data from the specified source descriptor to the specified offset within the 8-bit descriptor ...
IMPORT_C TUint ClientProcessFlags() const
void ClientL(RThread &aClient, TOwnerType aOwnerType=EOwnerProcess) const
Opens a handle on the client thread.
IMPORT_C void ReadL(TInt aParam, TDes8 &aDes, TInt aOffset=0) const
Reads data from the specified offset within the 8-bit descriptor argument, into the specified target ...
IMPORT_C TInt GetDesMaxLengthL(TInt aParam) const
Gets the maximum length of a descriptor argument in the client's process, leaving on failure.
IMPORT_C TInt GetDesLength(TInt aParam) const
Gets the length of a descriptor argument in the client's process.
void SetProcessPriorityL(TProcessPriority aPriority) const
Sets the priority of the client's process.
TBool IsNull() const
Tests whether this message handle is empty.
RMessagePtr2()
Default constructor.
IMPORT_C void Kill(TInt aReason) const
Kills the client.
IMPORT_C void Terminate(TInt aReason) const
Terminates the client.
IMPORT_C void Complete(TInt aReason) const
Frees this message.
TUid Identity() const
Definition e32cmn.h:3436
IMPORT_C TInt GetDesLengthL(TInt aParam) const
Gets the length of a descriptor argument in the client's process, leaving on failure.
IMPORT_C const TRequestStatus * ClientStatus() const
Returns the pointer to the clients TRequestStatus associated with the message.
IMPORT_C TInt Read(TInt aParam, TDes8 &aDes, TInt aOffset=0) const
Reads data from the specified offset within the 8-bit descriptor argument, into the specified target ...
TInt Handle() const
Gets the message handle value.
IMPORT_C void WriteL(TInt aParam, const TDesC8 &aDes, TInt aOffset=0) const
Writes data from the specified source descriptor to the specified offset within the 8-bit descriptor ...
IMPORT_C TVendorId VendorId() const
IMPORT_C TSecureId SecureId() const
IMPORT_C void Panic(const TDesC &aCategory, TInt aReason) const
Panics the client.
void HasCapabilityL(TCapability aCapability, const char *aDiagnosticMessage=0) const
IMPORT_C TInt SetProcessPriority(TProcessPriority aPriority) const
Sets the priority of the client's process.
TInt iHandle
Definition e32cmn.h:3447
IMPORT_C TInt Client(RThread &aClient, TOwnerType aOwnerType=EOwnerProcess) const
Opens a handle on the client thread.
Base class used in the derivation of RPointerArray, RArray<TInt>, and RArray<TUint>.
Definition e32cmn.h:5563
IMPORT_C TInt FindIsq(const TAny *anEntry, TGeneralLinearOrder anOrder) const
IMPORT_C void Remove(TInt anIndex)
IMPORT_C TInt Count() const
IMPORT_C void Close()
IMPORT_C TInt BinarySearch(const TAny *anEntry, TInt &anIndex, TGeneralLinearOrder anOrder) const
IMPORT_C TInt DoReserve(TInt aCount)
IMPORT_C TInt InsertIsqSigned(TInt anEntry, TBool aAllowRepeats)
IMPORT_C TInt FindReverse(const TAny *aEntry) const
IMPORT_C TInt InsertIsqUnsigned(TUint anEntry, TBool aAllowRepeats)
IMPORT_C TAny *& At(TInt anIndex) const
IMPORT_C RPointerArrayBase()
IMPORT_C TInt InsertIsq(const TAny *anEntry, TGeneralLinearOrder anOrder, TBool aAllowRepeats)
TAny ** Entries()
Definition e32cmn.h:5571
IMPORT_C TInt FindIsqSigned(TInt anEntry) const
IMPORT_C TInt Append(const TAny *anEntry)
static IMPORT_C const TAny * GetElementPtr(const CBase *aPtr, TInt aIndex)
IMPORT_C void HeapSortUnsigned()
IMPORT_C TInt FindIsqUnsigned(TUint anEntry) const
IMPORT_C TInt Find(const TAny *anEntry) const
IMPORT_C void GranularCompress()
IMPORT_C void Reset()
IMPORT_C TInt Insert(const TAny *anEntry, TInt aPos)
IMPORT_C TInt BinarySearchUnsigned(TUint anEntry, TInt &anIndex) const
IMPORT_C void HeapSort(TGeneralLinearOrder anOrder)
IMPORT_C TInt BinarySearchSigned(TInt anEntry, TInt &anIndex) const
static IMPORT_C TInt GetCount(const CBase *aPtr)
IMPORT_C void Compress()
IMPORT_C void HeapSortSigned()
A simple and efficient array of pointers to objects.
Definition e32cmn.h:5639
T *& operator[](TInt anIndex)
Gets a reference to the object pointer located at the specified position within the array.
TInt FindInAddressOrderL(const T *anEntry) const
Finds the object pointer in the array that matches the specified object pointer, using a binary searc...
void InsertInOrderAllowRepeatsL(const T *anEntry, TLinearOrder< T > anOrder)
Inserts an object pointer into the array so that the object itself is in object order,...
TInt InsertInAddressOrderAllowRepeats(const T *anEntry)
Inserts an object pointer into the array in address order, allowing duplicates.
TInt FindL(const T *anEntry) const
Finds the first object pointer in the array which matches the specified object pointer,...
TInt InsertInAddressOrder(const T *anEntry)
Inserts an object pointer into the array in address order.
void Close()
Closes the array and frees all memory allocated to it.
TInt FindInOrderL(const T *anEntry, TLinearOrder< T > anOrder) const
Finds the object pointer in the array whose object matches the specified object, using a binary searc...
TInt SpecificFindInAddressOrder(const T *anEntry, TInt aMode) const
Finds the object pointer in the array that matches the specified object pointer, using a binary searc...
T *const & operator[](TInt anIndex) const
Gets a reference to the object pointer located at the specified position within the array.
void InsertInOrderL(const T *anEntry, TLinearOrder< T > anOrder)
Inserts an object pointer into the array so that the object itself is in object order.
TInt SpecificFindInOrderL(const T *anEntry, TLinearOrder< T > anOrder, TInt aMode) const
Finds the object pointer in the array whose object matches the specified object, using a binary searc...
TInt Count() const
Gets the number of object pointers in the array.
void Compress()
Compresses the array down to a minimum.
void InsertInAddressOrderAllowRepeatsL(const T *anEntry)
Inserts an object pointer into the array in address order, allowing duplicates.
void Sort(TLinearOrder< T > anOrder)
Sorts the object pointers within the array.
TInt FindReverse(const T *anEntry) const
Finds the last object pointer in the array which matches the specified object pointer,...
void InsertInAddressOrderL(const T *anEntry)
Inserts an object pointer into the array in address order.
void Remove(TInt anIndex)
Removes the object pointer at the specified position from the array.
TInt SpecificFindInAddressOrderL(const T *anEntry, TInt aMode) const
Finds the object pointer in the array that matches the specified object pointer, using a binary searc...
void SortIntoAddressOrder()
Sorts the object pointers within the array into address order.
TInt SpecificFindInOrder(const T *anEntry, TLinearOrder< T > anOrder, TInt aMode) const
Finds the object pointer in the array whose object matches the specified object, using a binary searc...
TInt Reserve(TInt aCount)
Reserves space for the specified number of elements.
TInt FindInOrder(const T *anEntry, TLinearOrder< T > anOrder) const
Finds the object pointer in the array whose object matches the specified object, using a binary searc...
RPointerArray()
Default C++ constructor.
void ReserveL(TInt aCount)
Reserves space for the specified number of elements.
TInt InsertInOrder(const T *anEntry, TLinearOrder< T > anOrder)
Inserts an object pointer into the array so that the object itself is in object order.
void AppendL(const T *anEntry)
Appends an object pointer onto the array.
void Reset()
Empties the array.
TInt InsertInOrderAllowRepeats(const T *anEntry, TLinearOrder< T > anOrder)
Inserts an object pointer into the array so that the object itself is in object order,...
TInt Append(const T *anEntry)
Appends an object pointer onto the array.
TInt Insert(const T *anEntry, TInt aPos)
Inserts an object pointer into the array at the specified position.
TInt FindInAddressOrder(const T *anEntry) const
Finds the object pointer in the array that matches the specified object pointer, using a binary searc...
void ResetAndDestroy()
Empties the array and deletes the referenced objects.
void InsertL(const T *anEntry, TInt aPos)
Inserts an object pointer into the array at the specified position.
void GranularCompress()
Compresses the array down to a granular boundary.
TArray< T * > Array() const
Constructs and returns a generic array.
TInt Find(const T *anEntry) const
Finds the first object pointer in the array which matches the specified object pointer,...
TInt FindReverseL(const T *anEntry) const
Finds the last object pointer in the array which matches the specified object pointer,...
A handle to a process.
Definition e32std.h:4335
A read-write lock.
Definition e32cmn.h:2696
IMPORT_C void Close()
Panic condition: EReadWriteLockStillPending if there are any outstanding clients or pending clients.
IMPORT_C TBool TryUpgradeReadLock()
TReadWriteLockClientCategoryLimit
Definition e32cmn.h:2708
@ EReadWriteLockClientCategoryLimit
Maximum number of clients in each category: read locked, read lock pending, write lock pending.
Definition e32cmn.h:2710
IMPORT_C void DowngradeWriteLock()
IMPORT_C void ReadLock()
Panic condition: EReadWriteLockTooManyClients if the resulting number of readers or pending readers e...
IMPORT_C TBool TryWriteLock()
Ask for a write lock without blocking.
IMPORT_C void WriteLock()
Panic condition: EReadWriteLockTooManyClients if the resulting number of pending writers exceeds ERea...
IMPORT_C void Unlock()
IMPORT_C TBool TryReadLock()
Panic condition: EReadWriteLockTooManyClients if the resulting number of readers exceeds EReadWriteLo...
@ EWriterPriority
Pending writers always get the lock before pending readers.
Definition e32cmn.h:2701
@ EAlternatePriority
Lock is given alternately to pending readers and writers.
Definition e32cmn.h:2703
@ EReaderPriority
Pending readers always get the lock before pending writers - beware writer starvation!
Definition e32cmn.h:2705
RReadWriteLock()
Default constructor.
IMPORT_C TInt CreateLocal(TReadWriteLockPriority aPriority=EWriterPriority)
A handle to a semaphore.
Definition e32cmn.h:2636
TInt Open(const TFindSemaphore &aFind, TOwnerType aType=EOwnerProcess)
Opens a handle to the global semaphore found using a TFindSemaphore object.
IMPORT_C TInt CreateGlobal(const TDesC &aName, TInt aCount, TOwnerType aType=EOwnerProcess)
Creates a global semaphore, setting its initial count, and opens this handle to the semaphore.
IMPORT_C void Signal()
Signals the semaphore once.
IMPORT_C TInt CreateLocal(TInt aCount, TOwnerType aType=EOwnerProcess)
Creates a semaphore, setting its initial count, and opens this handle to the semaphore.
IMPORT_C TInt OpenGlobal(const TDesC &aName, TOwnerType aType=EOwnerProcess)
Opens a handle to a global semaphore.
IMPORT_C void Wait()
Waits for a signal on the semaphore.
IMPORT_C TInt Poll()
Client-side handle to a session with a server.
Definition e32std.h:4611
A handle to a thread.
Definition e32std.h:4091
Structure for compile-time definition of a secure ID.
Definition e32cmn.h:2108
const TSecureId * operator&() const
TUint32 iId
Definition e32cmn.h:2115
Structure for compile-time definition of a vendor ID.
Definition e32cmn.h:2134
TUint32 iId
Definition e32cmn.h:2141
const TVendorId * operator&() const
Stores the angular spherical coordinates (Phi,Theta) of a three-dimensional point.
Definition e32cmn.h:2417
TInt iTheta
The Theta co-ordinate (angle between the Z-axis and the line that links the point and the origin).
Definition e32cmn.h:2426
TInt iPhi
The Phi co-ordinate (angle between X-axis and the line that links the projection of the point on the ...
Definition e32cmn.h:2422
Generic array.
Definition e32cmn.h:5358
const T & operator[](TInt anIndex) const
Gets a reference to the element located at the specified position.
TInt Count() const
Gets the number of elements currently held in the array for which this generic array has been constru...
A build-independent non-modifiable buffer descriptor.
Definition e32cmn.h:1523
TBufC< S > & operator=(const TText *aString)
Copies data into this descriptor, replacing any existing data.
TBufC()
Constructs an empty build independent non-modifiable buffer descriptor.
TPtr Des()
Creates and returns a build-independent modifiable pointer descriptor for the data represented by thi...
A build-independent modifiable buffer descriptor.
Definition e32cmn.h:1578
TBuf()
Creates a build-independent modifiable buffer descriptor which contains no data.
TBuf< S > & operator=(const TText *aString)
Class representing an arbitrary set of capabilities.
Definition e32cmn.h:3616
IMPORT_C void RemoveCapability(TCapability aCapability)
Remove a single capability from the set, if it is present.
IMPORT_C void SetDisabled()
IMPORT_C TBool HasCapabilities(const TCapabilitySet &aCapabilities) const
Test if all the capabilities in a given set are present in this set.
IMPORT_C TBool HasCapability(TCapability aCapability) const
Test if a single capability is present in the set.
IMPORT_C void Union(const TCapabilitySet &aCapabilities)
Perform a union of this capability set with another.
IMPORT_C void Remove(const TCapabilitySet &aCapabilities)
Remove a set of capabilities from this set.
TBool NotEmpty() const
IMPORT_C void AddCapability(TCapability aCapability)
Add a single capability to the set.
IMPORT_C void SetAllSupported()
Make this set consist of all capabilities supported by this OS version.
IMPORT_C void Intersection(const TCapabilitySet &aCapabilities)
Perform an intersection of this capability set with another.
TCapabilitySet()
Default constructor.
IMPORT_C void SetEmpty()
Make this set empty.
void Set(TCapability aCapability)
Make this set consist of a single capability.
Holds a character value and provides a number of utility functions to manipulate it and test its prop...
Definition e32cmn.h:480
TBool Eos() const
Tests whether the character is the C/C++ end-of-string character - 0.
IMPORT_C TCategory GetCategory() const
Gets this character's Unicode category.
void Fold()
Converts the character to a form which can be used in tolerant comparisons without control over the o...
TChar operator-(TUint aChar)
Gets the result of subtracting an unsigned integer value from this character object.
void UpperCase()
Converts the character to its uppercase form.
IMPORT_C TBdCategory GetBdCategory() const
Gets the bi-directional category of a character.
IMPORT_C TBool IsUpper() const
Tests whether the character is uppercase.
IMPORT_C TBool IsDigit() const
Tests whether the character is a standard decimal digit.
IMPORT_C TInt GetCombiningClass() const
Gets this character's combining class.
IMPORT_C TBool IsGraph() const
Tests whether the character is a graphic character.
static TText16 GetLowSurrogate(TUint aChar)
Retrieve the low surrogate of a supplementary character.
IMPORT_C void GetInfo(TCharInfo &aInfo) const
Gets this character;s standard category information.
IMPORT_C TBool IsAlpha() const
Tests whether the character is alphabetic.
IMPORT_C TBool IsControl() const
Tests whether the character is a control character.
static TUint JoinSurrogate(TText16 aHighSurrogate, TText16 aLowSurrogate)
Combine a high surrogate and a low surrogate into a supplementary character.
static TBool IsSupplementary(TUint aChar)
IMPORT_C TBool IsAssigned() const
Tests whether this character has an assigned meaning in the Unicode encoding.
static TBool IsHighSurrogate(TText16 aInt16)
IMPORT_C TBool IsAlphaDigit() const
Tests whether the character is alphabetic or a decimal digit.
IMPORT_C TUint GetTitleCase() const
Gets the character value after conversion to titlecase or the character's own value,...
IMPORT_C TBool IsSpace() const
Tests whether the character is a white space character.
IMPORT_C TUint GetLowerCase() const
Gets the character value after conversion to lowercase or the character's own value,...
IMPORT_C TBool Decompose(TPtrC16 &aResult) const
Maps this character to its maximal canonical decomposition.
static TBool IsSurrogate(TText16 aInt16)
TChar & operator+=(TUint aChar)
Adds an unsigned integer value to this character object.
IMPORT_C TCjkWidth GetCjkWidth() const
Gets the Chinese, Japanese, Korean (CJK) notional width.
void TitleCase()
Converts the character to its titlecase form.
TChar operator+(TUint aChar)
Gets the result of adding an unsigned integer value to this character object.
IMPORT_C TBool IsHexDigit() const
Tests whether the character is a hexadecimal digit (0-9, a-f, A-F).
IMPORT_C TBool IsTitle() const
Tests whether this character is in titlecase.
TChar()
Default constructor.
TBdCategory
The bi-directional Unicode character category.
Definition e32cmn.h:816
@ EPopDirectionalFormat
Pop Directional Format.
Definition e32cmn.h:862
@ EEuropeanNumberSeparator
European number separator.
Definition e32cmn.h:874
@ ERightToLeftEmbedding
Right to left embedding.
Definition e32cmn.h:850
@ EParagraphSeparator
Paragraph Separator.
Definition e32cmn.h:910
@ ECommonNumberSeparator
Common number separator.
Definition e32cmn.h:892
@ EEuropeanNumberTerminator
European number terminator.
Definition e32cmn.h:880
@ ELeftToRightOverride
Left-to-Right Override.
Definition e32cmn.h:832
@ ENonSpacingMark
Non Spacing Mark.
Definition e32cmn.h:898
@ EBoundaryNeutral
Boundary Neutral.
Definition e32cmn.h:904
@ ELeftToRightEmbedding
Left to right embedding.
Definition e32cmn.h:826
@ EWhitespace
Whitespace.
Definition e32cmn.h:922
@ ERightToLeftOverride
Right-to-Left Override.
Definition e32cmn.h:856
@ ELeftToRight
Left to right.
Definition e32cmn.h:820
@ EArabicNumber
Arabic number.
Definition e32cmn.h:886
@ EOtherNeutral
Other neutrals; all other characters: punctuation, symbols.
Definition e32cmn.h:928
@ ERightToLeftArabic
Right to left Arabic.
Definition e32cmn.h:844
@ EEuropeanNumber
European number.
Definition e32cmn.h:868
@ ESegmentSeparator
Segment separator.
Definition e32cmn.h:916
@ ERightToLeft
Right to left.
Definition e32cmn.h:838
TCjkWidth
Notional character width as known to East Asian (Chinese, Japanese, Korean (CJK)) coding systems.
Definition e32cmn.h:937
@ ENeutralWidth
Includes 'ambiguous width' defined in Unicode Technical Report 11: East Asian Width.
Definition e32cmn.h:941
@ EHalfWidth
Character which occupies a single cell.
Definition e32cmn.h:947
@ EFullWidth
Character which occupies 2 cells.
Definition e32cmn.h:953
@ ENarrow
Characters that are always narrow and have explicit full-width counterparts.
Definition e32cmn.h:961
@ EWide
Characters that are always wide.
Definition e32cmn.h:967
IMPORT_C TUint GetUpperCase() const
Gets the character value after conversion to uppercase or the character's own value,...
void LowerCase()
Converts the character to its lowercase form.
static IMPORT_C TBool Compose(TUint &aResult, const TDesC16 &aSource)
Composes a string of Unicode characters to produce a single character result.
TChar & operator-=(TUint aChar)
Subtracts an unsigned integer value from this character object.
IMPORT_C TBool IsMirrored() const
Tests whether this character has the mirrored property.
@ EFoldCase
Convert characters to their lower case form if any.
Definition e32cmn.h:1003
@ EFoldKana
Convert hiragana to katakana.
Definition e32cmn.h:1027
@ EFoldSpaces
Convert all spaces (ordinary, fixed-width, ideographic, etc.) to ' '.
Definition e32cmn.h:1021
@ EFoldStandard
Perform standard folding operations, i.e.those done by Fold() with no argument.
Definition e32cmn.h:1039
@ EFoldAccents
Strip accents.
Definition e32cmn.h:1009
@ EFoldWidth
Fold fullwidth and halfwidth variants to their standard forms.
Definition e32cmn.h:1033
@ EFoldDigits
Convert digits representing values 0..9 to characters '0'..'9'.
Definition e32cmn.h:1015
@ EFoldAll
Perform all possible folding operations.
Definition e32cmn.h:1045
TEncoding
Definition e32cmn.h:977
@ EShiftJIS
The shift-JIS encoding (used in Japan).
Definition e32cmn.h:987
@ EUnicode
The Unicode encoding.
Definition e32cmn.h:981
IMPORT_C TBool IsPrint() const
Tests whether the character is a printable character.
void SetChar(TUint aChar)
TCategory
General Unicode character category.
Definition e32cmn.h:512
@ EPunctuationGroup
Punctuation group.
Definition e32cmn.h:558
@ EPsCategory
Punctuation, Open.
Definition e32cmn.h:689
@ ELoCategory
Letter, Other.
Definition e32cmn.h:619
@ EPcCategory
Punctuation, Connector.
Definition e32cmn.h:677
@ EPfCategory
Punctuation, Final Quote.
Definition e32cmn.h:707
@ EAlphaGroup
Alphabetic letters.
Definition e32cmn.h:518
@ ESymbolGroup
Symbols group.
Definition e32cmn.h:566
@ EMaxGraphicCategory
The highest possible graphic character category.
Definition e32cmn.h:743
@ EMaxPrintableCategory
The highest possible printable character category.
Definition e32cmn.h:755
@ EMaxAssignedCategory
The highest possible category for assigned 16-bit characters; does not include surrogates,...
Definition e32cmn.h:787
@ ECnCategory
Other, Not Assigned.
Definition e32cmn.h:805
@ ESmCategory
Symbol, Math.
Definition e32cmn.h:719
@ EPdCategory
Punctuation, Dash.
Definition e32cmn.h:683
@ ENumberGroup
Numbers group.
Definition e32cmn.h:550
@ EZpCategory
Separator, Paragraph.
Definition e32cmn.h:767
@ EMaxLetterCategory
The highest possible (non-modifier) letter category.
Definition e32cmn.h:625
@ ELetterModifierGroup
Letter modifiers.
Definition e32cmn.h:534
@ EMcCategory
Mark, Combining.
Definition e32cmn.h:647
@ ESkCategory
Symbol, Modifier.
Definition e32cmn.h:731
@ ECcCategory
Other, Control.
Definition e32cmn.h:773
@ ELmCategory
Letter, Modifier.
Definition e32cmn.h:630
@ ENoCategory
Number, Other.
Definition e32cmn.h:671
@ EZsCategory
Separator, Space.
Definition e32cmn.h:749
@ ESeparatorGroup
Separators group.
Definition e32cmn.h:574
@ EMeCategory
Mark, Enclosing.
Definition e32cmn.h:653
@ EScCategory
Symbol, Currency.
Definition e32cmn.h:725
@ ENdCategory
Number, Decimal Digit.
Definition e32cmn.h:659
@ ECoCategory
Other, Private Use.
Definition e32cmn.h:799
@ ELetterOtherGroup
Other letters.
Definition e32cmn.h:526
@ EPeCategory
Punctuation, Close.
Definition e32cmn.h:695
@ ENlCategory
Number, Letter.
Definition e32cmn.h:665
@ EMarkGroup
Marks group.
Definition e32cmn.h:542
@ EMnCategory
Mark, Non-Spacing.
Definition e32cmn.h:641
@ EPiCategory
Punctuation, Initial Quote.
Definition e32cmn.h:701
@ ELlCategory
Letter, Lowercase.
Definition e32cmn.h:607
@ ELtCategory
Letter, Titlecase.
Definition e32cmn.h:613
@ EMaxAssignedGroup
The highest possible groups category.
Definition e32cmn.h:589
@ ELuCategory
Letter, Uppercase.
Definition e32cmn.h:601
@ ECsCategory
Other, Surrogate.
Definition e32cmn.h:793
@ ESoCategory
Symbol, Other.
Definition e32cmn.h:737
@ EZlCategory
Separator, Line.
Definition e32cmn.h:761
@ ECfCategory
Other, Format.
Definition e32cmn.h:779
@ EPoCategory
Punctuation, Other.
Definition e32cmn.h:713
@ EUnassignedGroup
Unassigned to any other group.
Definition e32cmn.h:595
@ EMaxLetterOrLetterModifierCategory
The highest possible letter category.
Definition e32cmn.h:636
@ EControlGroup
Control, format, private use, unassigned.
Definition e32cmn.h:583
static TBool IsLowSurrogate(TText16 aInt16)
static TText16 GetHighSurrogate(TUint aChar)
Retrieve the high surrogate of a supplementary character.
IMPORT_C TBool IsLower() const
Tests whether the character is lowercase.
IMPORT_C TBool IsPunctuation() const
Tests whether the character is a punctuation character.
IMPORT_C TInt GetNumericValue() const
Gets the integer numeric value of this character.
Base class for searching for global kernel objects.
Definition e32std.h:2947
void Reset()
Resets the find handle to its initial state.
TInt Handle() const
Gets the find-handle number associated with the Kernel object.
Finds all global semaphores whose full names match a specified pattern.
Definition e32std.h:2993
Information about a kernel object.
Definition e32cmn.h:2496
TInt iNumProcesses
The number of processes which have a handle on the kernel object.
Definition e32cmn.h:2511
TInt iNumOpenInThread
The number of times that the kernel object is open in the current thread.
Definition e32cmn.h:2506
TInt iNumThreads
The number of threads which have a handle on the kernel object.
Definition e32cmn.h:2516
TInt iNumOpenInProcess
The number of times that the kernel object is open in the current process.
Definition e32cmn.h:2501
A templated class which packages a function that determines whether two objects of a given class type...
Definition e32cmn.h:5428
TIdentityRelation()
Constructs the object to use the equality operator (==) defined for class T to determine whether two ...
A Version 2 client/server class that clients use to package the arguments to be sent to a server.
Definition e32cmn.h:6817
TIpcArgs & PinArgs(TBool aPinArg0=ETrue, TBool aPinArg1=ETrue, TBool aPinArg2=ETrue, TBool aPinArg3=ETrue)
Allows the client to specify whether each argument of the TIpcArgs object will be pinned before being...
TInt iArgs[KMaxMessageArguments]
The location where the message arguments are stored.
Definition e32cmn.h:7013
TArgType
Argument types; some of these may be ORed together to specify type, accessibility,...
Definition e32cmn.h:6828
@ EDes16
16 bit read/write descriptor.
Definition e32cmn.h:6835
@ EDesC16
16 bit read only descriptor.
Definition e32cmn.h:6837
@ EDesC8
8 bit read only descriptor.
Definition e32cmn.h:6836
@ EHandle
Handle type.
Definition e32cmn.h:6830
@ EDes8
8 bit read/write descriptor.
Definition e32cmn.h:6834
@ EFlag16Bit
16 bit rather than 8 bit.
Definition e32cmn.h:6833
@ EUnspecified
Type not specified.
Definition e32cmn.h:6829
@ EFlagConst
Read only type.
Definition e32cmn.h:6832
@ EFlagDes
Descriptor type.
Definition e32cmn.h:6831
@ KBitsPerType
Number of bits of type information used for each of the 4 arguments.
Definition e32cmn.h:6848
@ KPinMask
The bits used for the pinning attributes of each argument.
Definition e32cmn.h:6854
@ KPinArg1
Set to pin argument at index 1.
Definition e32cmn.h:6851
@ KPinArgShift
Bit number of the start of the pin flags.
Definition e32cmn.h:6849
@ KPinArg3
Set to pin argument at index 3.
Definition e32cmn.h:6853
@ KPinArg2
Set to pin argument at index 2.
Definition e32cmn.h:6852
@ KPinArg0
Set to pin argument at index 0.
Definition e32cmn.h:6850
TNothing
Indicates a Null argument.
Definition e32cmn.h:6861
@ ENothing
An enum value that can be used to indicate an empty or unused argument to a server.
Definition e32cmn.h:6873
TInt iFlags
The location where the flag bits describing the argument types are stored.
Definition e32cmn.h:7022
void Set(TInt aIndex, TNothing)
Sets an argument to default value and type.
TIpcArgs()
Default constructor.
Definition e32cmn.h:6883
A templated class which packages a function that determines the order of two objects of a given class...
Definition e32cmn.h:5489
Encapsulates literal text.
Definition e32cmn.h:1626
const TDesC & operator()() const
Returns a const TDesC type reference.
const TDesC * operator&() const
Returns a const TDesC type pointer.
TUint8 __TText
Definition e32cmn.h:1646
@ BufferSize
Definition e32cmn.h:1633
TUint iTypeLength
Definition e32cmn.h:1681
__TText iBuf[__Align(S)]
Definition e32cmn.h:1688
Packages an object into a modifiable buffer descriptor.
Definition e32cmn.h:1807
TPckgBuf()
Constructs a packaged modifiable buffer descriptor for an object whose type is defined by the templat...
T & operator()()
Gets a reference to the object contained by this packaged modifiable buffer descriptor.
TPckgBuf & operator=(const TPckgBuf< T > &aRef)
Copies data from the specified packaged modifiable buffer descriptor into this packaged modifiable bu...
Packages a non-modifiable pointer descriptor which represents an object of specific type.
Definition e32cmn.h:1751
const T & operator()() const
Gets a reference to the object represented by this packaged non-modifiable pointer descriptor.
Packages a modifiable pointer descriptor which represents an object of specific type.
Definition e32cmn.h:1778
T & operator()()
Gets a reference to the object represented by this packaged modifiable pointer descriptor.
Stores a three-dimensional point in Cartesian or polar co-ordinates.
Definition e32cmn.h:2333
IMPORT_C TPoint3D operator-() const
Unary minus operator.
IMPORT_C TBool operator!=(const TPoint3D &aPoint3D) const
Compares two 3D points for inequality.
IMPORT_C TBool operator==(const TPoint3D &aPoint3D) const
Compares two 3D points(TPoint3D) for equality.
TInt iZ
The z co-ordinate.
Definition e32cmn.h:2401
IMPORT_C TPoint3D & operator+=(const TPoint3D &aPoint3D)
TPoint3D addition assignment operator.
IMPORT_C TPoint3D operator+(const TPoint3D &aPoint3D) const
The operator adds the specified point to this point, and returns the resulting value.
IMPORT_C TPoint AsPoint() const
Returns TPoint from TPoint3D.
TInt iY
The y co-ordinate.
Definition e32cmn.h:2397
IMPORT_C void SetXYZ(TInt aX, TInt aY, TInt aZ)
Set Method to set the xyz co-ordinates of TPoint3D.
IMPORT_C void SetPoint(const TPoint &aPoint)
TPoint3D from TPoint, sets the Z co-ordinate to Zero.
TUninitialized
Definition e32cmn.h:2336
@ EUninitialized
Definition e32cmn.h:2336
TInt iX
The x co-ordinate.
Definition e32cmn.h:2393
IMPORT_C TPoint3D & operator-=(const TPoint3D &aPoint3D)
TPoint3D subtraction assignment operator.
TPoint3D()
Constructs default TPoint3D, initialising its iX , iY and iZ members to zero.
Stores a two-dimensional point in Cartesian co-ordinates.
Definition e32cmn.h:2285
TPoint()
Constructs default point, initialising its iX and iY members to zero.
TInt iX
The x co-ordinate.
Definition e32cmn.h:2313
TUninitialized
Definition e32cmn.h:2288
@ EUninitialized
Definition e32cmn.h:2288
IMPORT_C void SetXY(TInt aX, TInt aY)
Sets the x and y co-ordinates for this point.
TInt iY
The y co-ordinate.
Definition e32cmn.h:2317
IMPORT_C TBool operator==(const TPoint &aPoint) const
Compares two points for equality.
IMPORT_C TPoint & operator-=(const TPoint &aPoint)
TPoint subtraction assignment operator.
IMPORT_C TPoint operator-() const
Unary minus operator.
IMPORT_C TBool operator!=(const TPoint &aPoint) const
Compares two points for inequality.
IMPORT_C TPoint & operator+=(const TPoint &aPoint)
TPoint addition assignment operator.
IMPORT_C TPoint operator+(const TPoint &aPoint) const
The operator adds the specified point to this point, and returns the resulting value.
IMPORT_C TSize AsSize() const
Gets the size of the rectangle whose top left hand corner is the origin of the screen co-ordinates an...
Contains information about the code and data sections belonging to a process.
Definition e32cmn.h:5233
TUint32 iInitialisedDataBase
The base address of the initialised data section (.data).
Definition e32cmn.h:5263
TUint32 iCodeSize
The size of the code section (.text).
Definition e32cmn.h:5244
TUint32 iConstDataSize
The size of the constant data section (.radata).
Definition e32cmn.h:5257
TUint32 iCodeBase
The code base address (.text).
Definition e32cmn.h:5238
TUint32 iConstDataBase
The base address of the constant data section (.radata).
Definition e32cmn.h:5250
TUint32 iUninitialisedDataSize
The size of the uninitialised data section (.bss).
Definition e32cmn.h:5281
TUint32 iInitialisedDataSize
The size of the initialised data section (.data).
Definition e32cmn.h:5269
TUint32 iUninitialisedDataBase
The base address of the uninitialised data section (.bss).
Definition e32cmn.h:5275
A templated class which encapsulates a reference to an object within a wrapper.
Definition e32cmn.h:436
Indicates the completion status of a request made to a service provider.
Definition e32cmn.h:2243
TBool operator>(TInt aVal) const
Tests whether the request status object's completion code is greater than the specified value.
TInt Int() const
Gets this request status object's completion code value.
TInt operator=(TInt aVal)
Assigns the specified completion code to the request status object.
TBool operator!=(TInt aVal) const
Tests whether the request status object's completion code is not equal to the specified value.
TBool operator>=(TInt aVal) const
Tests whether the request status object's completion code is greater than or equal to the specified v...
TBool operator==(TInt aVal) const
Tests whether the request status object's completion code is the same as the specified value.
TRequestStatus()
Default constructor.
TBool operator<=(TInt aVal) const
Tests whether the request status object's completion code is less than or equal to the specified valu...
TBool operator<(TInt aVal) const
Tests whether the request status object's completion code is less than the specified value.
A class used to represent the Secure ID of a process or executable image.
Definition e32cmn.h:2041
TUint32 iId
Definition e32cmn.h:2049
TSecureId()
Default constructor.
Class representing all security attributes of a process or DLL.
Definition e32cmn.h:3737
TSecurityInfo()
Default constructor.
IMPORT_C void SetToCreatorInfo()
Sets this TSecurityInfo to the security attributes of this process' creator.
TCapabilitySet iCaps
Capability Set.
Definition e32cmn.h:3757
void Set(RProcess aProcess)
Constructs a TSecurityInfo using the security attributes of aProcess.
void SetToCurrentInfo()
Sets this TSecurityInfo to the security attributes of this process.
TSecureId iSecureId
Secure ID.
Definition e32cmn.h:3755
TVendorId iVendorId
Vendor ID.
Definition e32cmn.h:3756
Class representing a generic security policy.
Definition e32cmn.h:3830
TUint32 iVendorId
Definition e32cmn.h:3942
TSecurityPolicy()
Constructs a TSecurityPolicy that will always fail, irrespective of the checked object's attributes.
friend class TCompiledSecurityPolicy
Definition e32cmn.h:3945
IMPORT_C TInt Set(const TDesC8 &aDes)
Sets this TSecurityPolicy to a copy of the policy described by the supplied descriptor.
TBool CheckPolicyCreator(const char *aDiagnostic=0) const
Checks this policy against the platform security attributes of this process' creator.
TUint32 iSecureId
Definition e32cmn.h:3941
TType
Constants to specify the type of TSecurityPolicy objects.
Definition e32cmn.h:3914
@ ETypePass
Always pass.
Definition e32cmn.h:3916
@ ETypeFail
Always fail.
Definition e32cmn.h:3915
@ ETypeLimit
The number of possible TSecurityPolicy types This is intended for internal Symbian use only.
Definition e32cmn.h:3928
@ ETypeC7
Up to 7 capabilities.
Definition e32cmn.h:3918
@ ETypeS3
Secure ID and up to 3 capabilities.
Definition e32cmn.h:3919
@ ETypeV3
Vendor ID and up to 3 capabilities.
Definition e32cmn.h:3920
@ ETypeC3
Up to 3 capabilities.
Definition e32cmn.h:3917
IMPORT_C TPtrC8 Package() const
Constructs a TPtrC8 wrapping the platform security attributes of this TSecurityPolicy.
TUint8 iExtraCaps[4]
Definition e32cmn.h:3943
TBool CheckPolicy(RProcess aProcess, const char *aDiagnostic=0) const
Checks this policy against the platform security attributes of aProcess.
TBool Validate() const
Checks that this object is in a valid state.
The shared chunk buffer configuration class (used by the multimedia device drivers).
Definition e32cmn.h:3577
TInt iNumBuffers
The number of buffers.
Definition e32cmn.h:3582
TUint iFlags
Shared chunk buffer flag settings.
Definition e32cmn.h:3588
TInt iBufferSizeInBytes
The size of each buffer in bytes.
Definition e32cmn.h:3584
TInt iReserved1
Reserved field.
Definition e32cmn.h:3586
Stores a two-dimensional size as a width and a height value.
Definition e32cmn.h:2442
TInt iWidth
The width of this TSize object.
Definition e32cmn.h:2470
TSize()
Constructs the size object with its iWidth and iHeight members set to zero.
TInt iHeight
The height of this TSize object.
Definition e32cmn.h:2474
IMPORT_C TBool operator==(const TSize &aSize) const
Compares this TSize with the specified TSize for equality.
@ EUninitialized
Definition e32cmn.h:2445
IMPORT_C TPoint AsPoint() const
Gets a TPoint object whose co-ordinates are the width and height of this TSize.
IMPORT_C TSize operator+(const TSize &aSize) const
TSize addition operator.
IMPORT_C TBool operator!=(const TSize &aSize) const
Compares two TSize for inequality.
IMPORT_C void SetSize(TInt aWidth, TInt aHeight)
Sets the width and height.
IMPORT_C TSize & operator+=(const TSize &aSize)
TSize addition assignment operator.
IMPORT_C TSize & operator-=(const TSize &aSize)
TSize subtraction assignment operator.
IMPORT_C TSize operator-() const
Unary minus operator.
Stores information about a thread's stack.
Definition e32cmn.h:7089
TLinAddr iLimit
The address which the stack pointer would contain if the stack were full, (The lowest valid address).
Definition e32cmn.h:7100
TLinAddr iBase
The address which the stack pointer would contain if the stack were empty.
Definition e32cmn.h:7094
TLinAddr iExpandLimit
The limit value for the stack if it were expanded to its maximum size.
Definition e32cmn.h:7107
Abstract class that defines a handler to work with the TRAP mechanism.
Definition e32std.h:4912
TInt iState[EMaxState]
Definition e32cmn.h:6196
static IMPORT_C void UnTrap()
TTrapHandler * iHandler
Definition e32cmn.h:6199
TTrap * iNext
Definition e32cmn.h:6197
IMPORT_C TInt Trap(TInt &aResult)
TInt * iResult
Definition e32cmn.h:6198
@ EMaxState
Definition e32cmn.h:6194
Encapsulates a set of three unique identifiers (UIDs) which, in combination, identify a system object...
Definition e32cmn.h:1991
IMPORT_C const TUid & operator[](TInt anIndex) const
Gets the UID component as identified by the specified index.
IMPORT_C TUidType()
Default constructor.
IMPORT_C TBool IsPresent(TUid aUid) const
Tests if any of the component UIDs are equal to the specified UID.
IMPORT_C TUid MostDerived() const
Gets the most derived UID.
IMPORT_C TBool operator!=(const TUidType &aUidType) const
Compares this UID type for inequality with the specified UID type.
IMPORT_C TBool operator==(const TUidType &aUidType) const
Compares this UID type for equality with the specified UID type.
IMPORT_C TBool IsValid() const
Tests the object for a valid (non-KNullUid) UID type.
A globally unique 32-bit number.
Definition e32cmn.h:1959
IMPORT_C TBool operator==(const TUid &aUid) const
Compares two UIDs for equality.
IMPORT_C TBool operator!=(const TUid &aUid) const
Compares two UIDs for inequality.
static TUid Null()
Constructs a Null-valued TUid object.
TInt32 iUid
The 32-bit integer UID value.
Definition e32cmn.h:1972
IMPORT_C TUidName Name() const
Generates and returns the standard text form of the UID.
static TUid Uid(TInt aUid)
Constructs the TUid object from a 32-bit integer.
A class used to represent the Vendor ID of a process or executable image.
Definition e32cmn.h:2084
TVendorId()
Default constructor which leaves the object in an undefined state.
TUint32 iId
Definition e32cmn.h:2092
Contains version information.
Definition e32cmn.h:2200
TInt8 iMinor
The minor version number.
Definition e32cmn.h:2215
TInt8 iMajor
The major version number.
Definition e32cmn.h:2209
TInt16 iBuild
The build number.
Definition e32cmn.h:2221
IMPORT_C TVersion()
Default constructor.
IMPORT_C TVersionName Name() const
Gets a descriptor buffer containing the formatted character representation of the version information...
A set of static functions for constructing fixed length heaps and local or global heaps.
Definition e32std.h:3881
TBool operator!=(RMessagePtr2 aLeft, RMessagePtr2 aRight)
TBuf< KMaxPath > TPath
A buffer that can contain the name of a path.
Definition e32cmn.h:1896
RBuf8 RBuf
Defines a build-independent resizable buffer descriptor.
Definition e32cmn.h:1472
TBuf< KMaxExitCategoryName > TExitCategoryName
Defines a modifiable buffer descriptor to contain the category name identifying the cause of thread o...
Definition e32cmn.h:1864
TInt LimX(TInt aVal, TUint aLimit)
Tests whether the specified value is strictly less than the specified upper limit.
Definition e32cmn.h:215
T * PtrAdd(T *aPtr, S aVal)
Adds a value to a pointer.
Definition e32cmn.h:357
HBufC8 HBufC
Defines a build-independent heap descriptor.
Definition e32cmn.h:1431
TBuf< KMaxVersionName > TVersionName
Version name type.
Definition e32cmn.h:1915
__invalid_capability_value
A dummy enum for use by the CAPABILITY_AS_TUINT8 macro.
Definition e32cmn.h:4062
T Max(T aLeft, T aRight)
Returns the larger of two values.
Definition e32cmn.h:276
TProcessMemoryInfo TModuleMemoryInfo
Defines a more useful synonym for TProcessMemoryInfo.
Definition e32cmn.h:5295
TRefByValue< const TDesC > __TRefDesC
Value reference used in operator TLitC::__TRefDesC().
Definition e32cmn.h:1604
IMPORT_C TAny * memcpy(TAny *aTrg, const TAny *aSrc, unsigned int aLength)
A Nanokernel utility function that copies bytes in memory.
TPtr8 TPtr
Defines a build-independent modifiable pointer descriptor.
Definition e32cmn.h:1408
IMPORT_C TAny * memclr(TAny *aTrg, unsigned int aLength)
A Nanokernel utility function that sets the specified number of bytes to binary zero.
TBuf8< KMaxSerialNumLength > TMediaSerialNumber
Definition e32cmn.h:5219
TBool(* TGeneralIdentityRelation)(const TAny *, const TAny *)
Defines a function type used by a TIdentityRelation object.
Definition e32cmn.h:5386
TDes8 TDes
Defines a build-independent modifiable descriptor.
Definition e32cmn.h:1387
T Abs(T aVal)
Returns an absolute value.
Definition e32cmn.h:316
TBufCBase8 TBufCBase
Definition e32cmn.h:1481
TPtrC8 TPtrC
Defines a build-independent non-modifiable pointer descriptor.
Definition e32cmn.h:1366
const TInt KMaxSecurityPolicySize
Maximum size of any future extension to TSecurityPolicy.
Definition e32cmn.h:3604
TBuf< KMaxFileName > TFileName
A buffer that can contain the name of a file.
Definition e32cmn.h:1880
_LIT8(KNullDesC8,"")
Defines an empty or null literal descriptor for use with 8-bit descriptors.
TPckgBuf< TSecurityPolicy > TSecurityPolicyBuf
Provides a TPkcgBuf wrapper for a descriptorised TSecurityPolicy.
Definition e32cmn.h:3955
IMPORT_C TAny * wordmove(TAny *aTrg, const TAny *aSrc, unsigned int aLength)
A Nanokernel utility function that moves (copies) bytes in memory.
TBool operator==(RMessagePtr2 aLeft, RMessagePtr2 aRight)
TArrayFindMode
Definition e32cmn.h:5518
@ EArrayFindMode_First
Indicates that the first element in a block of duplicate elements is returned.
Definition e32cmn.h:5533
@ EArrayFindMode_Any
Indicates that any element in a block of duplicate elements can be returned by a search function.
Definition e32cmn.h:5527
@ EArrayFindMode_Last
Indicates that the first element after the last element in a block of duplicate elements is returned.
Definition e32cmn.h:5539
@ EArrayFindMode_Limit
Definition e32cmn.h:5546
TInt(* TGeneralLinearOrder)(const TAny *, const TAny *)
Defines a function type used by a TLinearOrder object.
Definition e32cmn.h:5404
TDesC8 TDesC
Defines a build-independent non-modifiable descriptor.
Definition e32cmn.h:1345
void(OnlyCreateWithNull::* __NullPMF)()
Definition e32cmn.h:3177
T Align4(T aValue)
Aligns the specified value onto a 4-byte boundary.
Definition e32cmn.h:415
_LIT16(KNullDesC16,"")
Defines an empty or null literal descriptor for use with 16-bit descriptors.
T * PtrSub(T *aPtr, S aVal)
Subtracts a value from a pointer.
Definition e32cmn.h:377
IMPORT_C TInt memcompare(const TUint8 *aLeft, TInt aLeftLen, const TUint8 *aRight, TInt aRightLen)
A Nanokernel utility function that compares two memory buffers for equality.
TBuf8< KMaxMediaPassword > TMediaPassword
Defines an 8-bit modifiable buffer descriptor to contain passwords when dealing with password securit...
Definition e32cmn.h:3544
const TInt KCapabilitySetMaxSize
Maximum size of capability set.
Definition e32cmn.h:3597
TBool Rng(T aMin, T aVal, T aMax)
Determines whether a specified value lies within a defined range of values.
Definition e32cmn.h:337
TInt Lim(TInt aVal, TUint aLimit)
Tests whether the specified value is less than or equal to the specified upper limit.
Definition e32cmn.h:194
const TUint KScFlagUseGuardPages
A configuration flag for the shared chunk buffer configuration class (used by the multimedia device d...
Definition e32cmn.h:3566
TBuf< KMaxName > TName
Defines a modifiable buffer descriptor that can contain the name of a reference counting object.
Definition e32cmn.h:1832
TDes8Overflow TDesOverflow
Defines a build-independent descriptor overflow handler.
Definition e32cmn.h:1453
TBuf< KMaxUidName > TUidName
Defines a modifiable buffer descriptor for the text form of the UID.
Definition e32cmn.h:1932
_LIT(KNullDesC,"")
Defines an empty or null literal descriptor.
IMPORT_C TAny * memset(TAny *aTrg, TInt aValue, unsigned int aLength)
A Nanokernel utility function that sets all of the specified number of bytes to the specified fill va...
const TUint KScFlagBufOffsetListInUse
A configuration flag for the shared chunk buffer configuration class (used by the multimedia device d...
Definition e32cmn.h:3556
T Align2(T aValue)
Aligns the specified value onto a 2-byte boundary.
Definition e32cmn.h:396
TBuf< KMaxFullName > TFullName
Defines a modifiable buffer descriptor that can contain the full name of a reference counting object.
Definition e32cmn.h:1847
T Min(T aLeft, T aRight)
Returns the smaller of two values.
Definition e32cmn.h:235
IMPORT_C TAny * memmove(TAny *aTrg, const TAny *aSrc, unsigned int aLength)
A Nanokernel utility function that moves (copies) bytes in memory.
const TDesC8 * iFileName
Definition e32cmn.h:2948
TInt nestingLevel
The nested level.
Definition e32cmn.h:3058
TInt allocCount
The cumulative number of allocated cells.
Definition e32cmn.h:3063
SDebugCell * iStranded
Definition e32cmn.h:3071
TBool NotEmpty() const
Definition e32cmn.h:3664
void AddCapability(TCapability aCap1)
Definition e32cmn.h:3662
TUint32 iCaps[ENCapW]
Definition e32cmn.h:3669
const TUint32 & operator[](TInt aIndex) const
Definition e32cmn.h:3666
void Remove(const SCapabilitySet &aCaps)
Definition e32cmn.h:3663
SDouble & operator=(TReal a)
TUint32 iData[2]
Definition e32cmn.h:7072
SInt64 & operator=(Int64 a)
TUint32 iData[2]
Definition e32cmn.h:7040
TUint32 iVendorId
Definition e32cmn.h:3680
SCapabilitySet iCaps
Definition e32cmn.h:3681
TUint32 iSecureId
Definition e32cmn.h:3679
SUint64 & operator=(Uint64 a)
TUint32 iData[2]
Definition e32cmn.h:7056
A structure to hold information about a Unicode character.
Definition e32cmn.h:1057
TInt iNumericValue
Integer numeric value: -1 if none, -2 if a fraction.
Definition e32cmn.h:1103
TBdCategory iBdCategory
Bi-directional category.
Definition e32cmn.h:1067
TInt iCombiningClass
Combining class: number (currently) in the range 0..234.
Definition e32cmn.h:1073
TBool iMirrored
True, if the character is mirrored.
Definition e32cmn.h:1097
TUint iLowerCase
Lower case form.
Definition e32cmn.h:1079
TUint iTitleCase
Title case form.
Definition e32cmn.h:1091
TUint iUpperCase
Upper case form.
Definition e32cmn.h:1085
TCategory iCategory
General category.
Definition e32cmn.h:1061
SSecurityInfo iS
Definition e32cmn.h:7274
TUid iUids[KMaxCheckedUid]
Definition e32cmn.h:7272
TUint32 iModuleVersion
Definition e32cmn.h:7277
TProcessPriority iPriority
Definition e32cmn.h:7273
Structure for compile-time initialisation of a security policy.
Definition e32cmn.h:4021
TUint32 iB
Internal component API.
Definition e32cmn.h:4052
const TSecurityPolicy & operator()() const
A method to explicity generate a TSecurityPolicy reference.
TBool CheckPolicyCreator(const char *aDiagnostic=0) const
TSecurityPolicy::CheckPolicyCreator(const char* aDiagnostic)
const TSecurityPolicy * operator&() const
'Address of' operator which generates a TSecurityPolicy*
TBool CheckPolicy(RProcess aProcess, const char *aDiagnostic=0) const
TSecurityPolicy::CheckPolicy(RProcess aProcess, const char* aDiagnostic)
TUint32 iA
Internal component API.
Definition e32cmn.h:4051