Original Symbian headers
Selected EUSER, Window Server, networking, graphics and device declarations
Loading...
Searching...
No Matches
e32base.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\e32base.h
15//
16//
17
18#ifndef __E32BASE_H__
19#define __E32BASE_H__
20#include <e32std.h>
21
22#ifdef __ARMCC__
23#pragma push
24#pragma diag_suppress 830
25#endif
29class CBase
58 {
59public:
63 inline CBase() {}
64 IMPORT_C virtual ~CBase();
65 inline TAny* operator new(TUint aSize, TAny* aBase) __NO_THROW;
66 inline TAny* operator new(TUint aSize) __NO_THROW;
67 inline TAny* operator new(TUint aSize, TLeave);
68 inline TAny* operator new(TUint aSize, TUint aExtraSize) __NO_THROW;
69 inline TAny* operator new(TUint aSize, TLeave, TUint aExtraSize);
70 IMPORT_C static void Delete(CBase* aPtr);
71protected:
72 IMPORT_C virtual TInt Extension_(TUint aExtensionId, TAny*& a0, TAny* a1);
73private:
74 CBase(const CBase&);
75 CBase& operator=(const CBase&);
76private:
77 };
78
79#ifdef __ARMCC__
80#pragma pop
81#endif
82
83
84class CBufBase : public CBase
104 {
105public:
106 IMPORT_C ~CBufBase();
107 inline TInt Size() const;
108 IMPORT_C void Reset();
109 IMPORT_C void Read(TInt aPos,TDes8& aDes) const;
110 IMPORT_C void Read(TInt aPos,TDes8& aDes,TInt aLength) const;
111 IMPORT_C void Read(TInt aPos,TAny* aPtr,TInt aLength) const;
112 IMPORT_C void Write(TInt aPos,const TDesC8& aDes);
113 IMPORT_C void Write(TInt aPos,const TDesC8& aDes,TInt aLength);
114 IMPORT_C void Write(TInt aPos,const TAny* aPtr,TInt aLength);
115 IMPORT_C void InsertL(TInt aPos,const TDesC8& aDes);
116 IMPORT_C void InsertL(TInt aPos,const TDesC8& aDes,TInt aLength);
117 IMPORT_C void InsertL(TInt aPos,const TAny* aPtr,TInt aLength);
118 IMPORT_C void ExpandL(TInt aPos,TInt aLength);
119 IMPORT_C void ResizeL(TInt aSize);
120// Pure virtual
135 virtual void Compress()=0;
149 virtual void Delete(TInt aPos,TInt aLength)=0;
165 virtual TPtr8 Ptr(TInt aPos)=0;
186 virtual TPtr8 BackPtr(TInt aPos)=0;
187private:
188 virtual void DoInsertL(TInt aPos,const TAny* aPtr,TInt aLength)=0;
189protected:
190 IMPORT_C CBufBase(TInt anExpandSize);
191protected:
192 TInt iSize;
193 TInt iExpandSize;
194 };
195
198
199class CBufFlat : public CBufBase
213 {
214public:
215 IMPORT_C ~CBufFlat();
216 IMPORT_C static CBufFlat* NewL(TInt anExpandSize);
217 inline TInt Capacity() const;
218 IMPORT_C void SetReserveL(TInt aSize);
219 IMPORT_C void Compress();
220 IMPORT_C void Delete(TInt aPos,TInt aLength);
221 IMPORT_C TPtr8 Ptr(TInt aPos);
222 IMPORT_C TPtr8 BackPtr(TInt aPos);
223protected:
224 IMPORT_C CBufFlat(TInt anExpandSize);
225private:
226 IMPORT_C void DoInsertL(TInt aPos,const TAny* aPtr,TInt aLength);
227private:
228 TInt iMaxSize;
229 TUint8* iPtr;
230 };
231
232
233
234
235class TBufSegLink;
236class CBufSeg : public CBufBase
256 {
257public:
258 IMPORT_C ~CBufSeg();
259 IMPORT_C static CBufSeg* NewL(TInt anExpandSize);
260 IMPORT_C void Compress();
261 IMPORT_C void Delete(TInt aPos,TInt aLength);
262 IMPORT_C TPtr8 Ptr(TInt aPos);
263 IMPORT_C TPtr8 BackPtr(TInt aPos);
264protected:
265 IMPORT_C CBufSeg(TInt anExpandSize);
266 void InsertIntoSegment(TBufSegLink* aSeg,TInt anOffset,const TAny* aPtr,TInt aLength);
267 void DeleteFromSegment(TBufSegLink* aSeg,TInt anOffset,TInt aLength);
268 void FreeSegment(TBufSegLink* aSeg);
269 void SetSBO(TInt aPos);
270 void AllocSegL(TBufSegLink* aSeg,TInt aNumber);
271private:
272 IMPORT_C void DoInsertL(TInt aPos,const TAny* aPtr,TInt aLength);
273private:
275 TBufSegLink* iSeg;
276 TInt iBase;
277 TInt iOffset;
278 };
279
280
281
282
283class TKeyArrayFix : public TKey
307 {
308public:
309 IMPORT_C TKeyArrayFix(TInt anOffset,TKeyCmpText aType);
310 IMPORT_C TKeyArrayFix(TInt anOffset,TKeyCmpText aType,TInt aLength);
311 IMPORT_C TKeyArrayFix(TInt anOffset,TKeyCmpNumeric aType);
312protected:
313 IMPORT_C virtual void Set(CBufBase* aBase,TInt aRecordLength);
314 IMPORT_C TAny* At(TInt anIndex) const;
315protected:
316 TInt iRecordLength;
318 friend class CArrayFixBase;
319 };
322
324typedef CBufBase*(*TBufRep)(TInt anExpandSize);
325class CArrayFixBase : public CBase
337 {
338public:
339 IMPORT_C ~CArrayFixBase();
340 inline TInt Count() const;
341 inline TInt Length() const;
342 IMPORT_C void Compress();
343 IMPORT_C void Reset();
344 IMPORT_C TInt Sort(TKeyArrayFix& aKey);
345 IMPORT_C TAny* At(TInt anIndex) const;
346 IMPORT_C TAny* End(TInt anIndex) const;
347 IMPORT_C TAny* Back(TInt anIndex) const;
348 IMPORT_C void Delete(TInt anIndex);
349 IMPORT_C void Delete(TInt anIndex,TInt aCount);
350 IMPORT_C TAny* ExpandL(TInt anIndex);
351 IMPORT_C TInt Find(const TAny* aPtr,TKeyArrayFix& aKey,TInt& anIndex) const;
352 IMPORT_C TInt FindIsq(const TAny* aPtr,TKeyArrayFix& aKey,TInt& anIndex) const;
353 IMPORT_C void InsertL(TInt anIndex,const TAny* aPtr);
354 IMPORT_C void InsertL(TInt anIndex,const TAny* aPtr,TInt aCount);
355 IMPORT_C TInt InsertIsqL(const TAny* aPtr,TKeyArrayFix& aKey);
356 IMPORT_C TInt InsertIsqAllowDuplicatesL(const TAny* aPtr,TKeyArrayFix& aKey);
357 IMPORT_C void ResizeL(TInt aCount,const TAny* aPtr);
358protected:
359 IMPORT_C CArrayFixBase(TBufRep aRep,TInt aRecordLength,TInt aGranularity);
360 IMPORT_C void InsertRepL(TInt anIndex,const TAny* aPtr,TInt aReplicas);
361 IMPORT_C void SetKey(TKeyArrayFix& aKey) const;
362 IMPORT_C void SetReserveFlatL(TInt aCount);
363 IMPORT_C static TInt CountR(const CBase* aPtr);
364 IMPORT_C static const TAny* AtR(const CBase* aPtr,TInt anIndex);
365private:
366 TInt iCount;
367 TInt iGranularity;
368 TInt iLength;
369 TBufRep iCreateRep;
370 CBufBase* iBase;
371 };
376template <class T>
377class CArrayFix : public CArrayFixBase
388 {
389public:
390 inline CArrayFix(TBufRep aRep,TInt aGranularity);
391 inline const T& operator[](TInt anIndex) const;
392 inline T& operator[](TInt anIndex);
393 inline const T& At(TInt anIndex) const;
394 inline const T* End(TInt anIndex) const;
395 inline const T* Back(TInt anIndex) const;
396 inline T& At(TInt anIndex);
397 inline T* End(TInt anIndex);
398 inline T* Back(TInt anIndex);
399 inline void AppendL(const T& aRef);
400 inline void AppendL(const T* aPtr,TInt aCount);
401 inline void AppendL(const T& aRef,TInt aReplicas);
402 inline T& ExpandL(TInt anIndex);
403 inline T& ExtendL();
404 inline TInt Find(const T& aRef,TKeyArrayFix& aKey,TInt& anIndex) const;
405 inline TInt FindIsq(const T& aRef,TKeyArrayFix& aKey,TInt& anIndex) const;
406 inline void InsertL(TInt anIndex,const T& aRef);
407 inline void InsertL(TInt anIndex,const T* aPtr,TInt aCount);
408 inline void InsertL(TInt anIndex,const T& aRef,TInt aReplicas);
409 inline TInt InsertIsqL(const T& aRef,TKeyArrayFix& aKey);
410 inline TInt InsertIsqAllowDuplicatesL(const T& aRef,TKeyArrayFix& aKey);
411 inline void ResizeL(TInt aCount);
412 inline void ResizeL(TInt aCount,const T& aRef);
413 inline const TArray<T> Array() const;
414 };
419TEMPLATE_SPECIALIZATION class CArrayFix<TAny> : public CArrayFixBase
431 {
432public:
433 inline CArrayFix(TBufRep aRep,TInt aRecordLength,TInt aGranularity);
434 inline const TAny* At(TInt anIndex) const;
435 inline const TAny* End(TInt anIndex) const;
436 inline const TAny* Back(TInt anIndex) const;
437 inline TAny* At(TInt anIndex);
438 inline TAny* End(TInt anIndex);
439 inline TAny* Back(TInt anIndex);
440 inline void AppendL(const TAny* aPtr);
441 inline void AppendL(const TAny* aPtr,TInt aCount);
442 inline TAny* ExtendL();
443 };
444
445
446
447
448
449template <class T>
450class CArrayFixFlat : public CArrayFix<T>
470 {
471public:
472 inline explicit CArrayFixFlat(TInt aGranularity);
473 inline void SetReserveL(TInt aCount);
474 };
475
476
477
478
479TEMPLATE_SPECIALIZATION class CArrayFixFlat<TAny> : public CArrayFix<TAny>
498public:
499 inline CArrayFixFlat(TInt aRecordLength,TInt aGranularity);
500 inline void SetReserveL(TInt aCount);
501 };
502
503
504
505
506TEMPLATE_SPECIALIZATION class CArrayFixFlat<TInt> : public CArrayFix<TInt>
516 {
517public:
518 IMPORT_C explicit CArrayFixFlat(TInt aGranularity);
519 IMPORT_C ~CArrayFixFlat();
520 inline void SetReserveL(TInt aCount);
521 };
522
523
524
525
526TEMPLATE_SPECIALIZATION class CArrayFixFlat<TUid> : public CArrayFix<TUid>
536 {
537public:
538 IMPORT_C explicit CArrayFixFlat(TInt aGranularity);
539 IMPORT_C ~CArrayFixFlat();
540 inline void SetReserveL(TInt aCount);
541 };
543
544
545
546template <class T>
547class CArrayFixSeg : public CArrayFix<T>
564public:
565 inline explicit CArrayFixSeg(TInt aGranularity);
566 };
567
568
569
570
571TEMPLATE_SPECIALIZATION class CArrayFixSeg<TAny> : public CArrayFix<TAny>
589 {
590public:
591 inline CArrayFixSeg(TInt aRecordLength,TInt aGranularity);
592 };
593
594
595
596
597template <class T>
598class CArrayPtr : public CArrayFix<T*>
609 {
610public:
611 inline CArrayPtr(TBufRep aRep,TInt aGranularity);
612 void ResetAndDestroy();
613 };
614
615
616
617
618
619template <class T>
620class CArrayPtrFlat : public CArrayPtr<T>
643public:
644 inline explicit CArrayPtrFlat(TInt aGranularity);
645 inline void SetReserveL(TInt aCount);
646 };
647
648
649
651template <class T>
652class CArrayPtrSeg : public CArrayPtr<T>
670 {
671public:
672 inline explicit CArrayPtrSeg(TInt aGranularity);
673 };
674
675
678class TKeyArrayVar : public TKey
707 {
708public:
709 IMPORT_C TKeyArrayVar(TInt anOffset,TKeyCmpText aType);
710 IMPORT_C TKeyArrayVar(TInt anOffset,TKeyCmpText aType,TInt aLength);
711 IMPORT_C TKeyArrayVar(TInt anOffset,TKeyCmpNumeric aType);
712protected:
713 IMPORT_C virtual void Set(CBufBase* aBase);
714 IMPORT_C TAny* At(TInt anIndex) const;
715protected:
717 friend class CArrayVarBase;
718 };
719
720
721
722
723
724class CArrayVarBase : public CBase
736 {
737public:
738 IMPORT_C ~CArrayVarBase();
739 inline TInt Count() const;
740 IMPORT_C TInt Length(TInt anIndex) const;
741 IMPORT_C void Compress();
742 IMPORT_C void Reset();
743 IMPORT_C TInt Sort(TKeyArrayVar& aKey);
744 IMPORT_C TAny* At(TInt anIndex) const;
745 IMPORT_C void Delete(TInt anIndex);
746 IMPORT_C void Delete(TInt anIndex,TInt aCount);
747 IMPORT_C TAny* ExpandL(TInt anIndex,TInt aLength);
748 IMPORT_C TInt Find(const TAny* aPtr,TKeyArrayVar& aKey,TInt& anIndex) const;
749 IMPORT_C TInt FindIsq(const TAny* aPtr,TKeyArrayVar& aKey,TInt& anIndex) const;
750 IMPORT_C void InsertL(TInt anIndex,const TAny* aPtr,TInt aLength);
751 IMPORT_C TInt InsertIsqL(const TAny* aPtr,TInt aLength,TKeyArrayVar& aKey);
752 IMPORT_C TInt InsertIsqAllowDuplicatesL(const TAny* aPtr,TInt aLength,TKeyArrayVar& aKey);
753protected:
754 IMPORT_C CArrayVarBase(TBufRep aRep,TInt aGranularity);
755 IMPORT_C void SetKey(TKeyArrayVar& aKey) const;
756 IMPORT_C static TInt CountR(const CBase* aPtr);
757 IMPORT_C static const TAny* AtR(const CBase* aPtr,TInt anIndex);
758private:
759 TInt iCount;
760 TInt iGranularity;
761 TBufRep iCreateRep;
762 CBufBase* iBase;
763 };
764
765
766
767
768template <class T>
769class CArrayVar : public CArrayVarBase
781public:
782 inline CArrayVar(TBufRep aRep,TInt aGranularity);
783 inline const T& operator[](TInt anIndex) const;
784 inline T& operator[](TInt anIndex);
785 inline const T& At(TInt anIndex) const;
786 inline T& At(TInt anIndex);
787 inline void AppendL(const T& aRef,TInt aLength);
788 inline T& ExpandL(TInt anIndex,TInt aLength);
789 inline T& ExtendL(TInt aLength);
790 inline TInt Find(const T& aRef,TKeyArrayVar& aKey,TInt& anIndex) const;
791 inline TInt FindIsq(const T& aRef,TKeyArrayVar& aKey,TInt& anIndex) const;
792 inline void InsertL(TInt anIndex,const T& aRef,TInt aLength);
793 inline TInt InsertIsqL(const T& aRef,TInt aLength,TKeyArrayVar& aKey);
794 inline TInt InsertIsqAllowDuplicatesL(const T& aRef,TInt aLength,TKeyArrayVar& aKey);
795 inline const TArray<T> Array() const;
796 };
797
798
799
800
801TEMPLATE_SPECIALIZATION class CArrayVar<TAny> : public CArrayVarBase
817 {
818public:
819 inline CArrayVar(TBufRep aRep,TInt aGranularity);
820 inline const TAny* At(TInt anIndex) const;
821 inline TAny* At(TInt anIndex);
822 inline void AppendL(const TAny* aPtr,TInt aLength);
823 inline TAny* ExtendL(TInt aLength);
824 };
829template <class T>
830class CArrayVarFlat : public CArrayVar<T>
846 {
847public:
848 inline explicit CArrayVarFlat(TInt aGranularity);
849 };
850
851
852
853
854template <class T>
855class CArrayVarSeg : public CArrayVar<T>
871 {
872public:
873 inline explicit CArrayVarSeg(TInt aGranularity);
874 };
875
876
877
878
879class TKeyArrayPak : public TKeyArrayVar
908 {
909public:
910 IMPORT_C TKeyArrayPak(TInt anOffset,TKeyCmpText aType);
911 IMPORT_C TKeyArrayPak(TInt anOffset,TKeyCmpText aType,TInt aLength);
912 IMPORT_C TKeyArrayPak(TInt anOffset,TKeyCmpNumeric aType);
913protected:
914 IMPORT_C virtual void Set(CBufBase* aBase);
915 IMPORT_C TAny* At(TInt anIndex) const;
916private:
917 TInt iCacheIndex;
918 TInt iCacheOffset;
919 friend class CArrayPakBase;
920 };
921
922
923
924
925class CArrayPakBase : public CBase
934 {
935public:
936 IMPORT_C ~CArrayPakBase();
937 inline TInt Count() const;
938 IMPORT_C TInt Length(TInt anIndex) const;
939 IMPORT_C void Compress();
940 IMPORT_C void Reset();
941 IMPORT_C void SortL(TKeyArrayVar& aKey);
942 IMPORT_C TAny* At(TInt anIndex) const;
943 IMPORT_C void Delete(TInt anIndex);
944 IMPORT_C void Delete(TInt anIndex,TInt aCount);
945 IMPORT_C TAny* ExpandL(TInt anIndex,TInt aLength);
946 IMPORT_C TInt Find(const TAny* aPtr,TKeyArrayPak& aKey,TInt& anIndex) const;
947 IMPORT_C TInt FindIsq(const TAny* aPtr,TKeyArrayPak& aKey,TInt& anIndex) const;
948 IMPORT_C void InsertL(TInt anIndex,const TAny* aPtr,TInt aLength);
949 IMPORT_C TInt InsertIsqL(const TAny* aPtr,TInt aLength,TKeyArrayPak& aKey);
950 IMPORT_C TInt InsertIsqAllowDuplicatesL(const TAny* aPtr,TInt aLength,TKeyArrayPak& aKey);
951protected:
952 IMPORT_C CArrayPakBase(TBufRep aRep,TInt aGranularity);
953 IMPORT_C void SetKey(TKeyArrayPak& aKey) const;
954 IMPORT_C TInt GetOffset(TInt anIndex) const;
955 IMPORT_C void BuildVarArrayL(CArrayVarFlat<TAny>*& aVarFlat);
956 IMPORT_C static TInt CountR(const CBase* aPtr);
957 IMPORT_C static const TAny* AtR(const CBase* aPtr,TInt anIndex);
958private:
959 TInt iCount;
960 TInt iGranularity;
961 TBufRep iCreateRep;
962 CBufBase* iBase;
963 TInt iCacheIndex;
964 TInt iCacheOffset;
965 };
966
968
969
970template <class T>
971class CArrayPak : public CArrayPakBase
982 {
983public:
984 inline CArrayPak(TBufRep aRep,TInt aGranularity);
985 inline const T& operator[](TInt anIndex) const;
986 inline T& operator[](TInt anIndex);
987 inline const T& At(TInt anIndex) const;
988 inline T& At(TInt anIndex);
989 inline void AppendL(const T& aRef,TInt aLength);
990 inline T& ExpandL(TInt anIndex,TInt aLength);
991 inline T& ExtendL(TInt aLength);
992 inline TInt Find(const T& aRef,TKeyArrayPak& aKey,TInt& anIndex) const;
993 inline TInt FindIsq(const T& aRef,TKeyArrayPak& aKey,TInt& anIndex) const;
994 inline void InsertL(TInt anIndex,const T& aRef,TInt aLength);
995 inline TInt InsertIsqL(const T& aRef,TInt aLength,TKeyArrayPak& aKey);
996 inline TInt InsertIsqAllowDuplicatesL(const T& aRef,TInt aLength,TKeyArrayPak& aKey);
997 inline const TArray<T> Array() const;
998 };
1001
1003TEMPLATE_SPECIALIZATION class CArrayPak<TAny> : public CArrayPakBase
1019 {
1020public:
1021 inline CArrayPak(TBufRep aRep,TInt aGranularity);
1022 inline const TAny* At(TInt anIndex) const;
1023 inline TAny* At(TInt anIndex);
1024 inline void AppendL(const TAny* aPtr,TInt aLength);
1025 inline TAny* ExtendL(TInt aLength);
1026 };
1027
1028
1029
1030
1031template <class T>
1032class CArrayPakFlat : public CArrayPak<T>
1048public:
1049 inline explicit CArrayPakFlat(TInt aGranularity);
1050 };
1051
1052
1053
1054
1056class CObject : public CBase
1073 {
1074public:
1075 IMPORT_C CObject();
1076 IMPORT_C ~CObject();
1077 IMPORT_C virtual TInt Open();
1078 IMPORT_C virtual void Close();
1079 IMPORT_C virtual TName Name() const;
1080 IMPORT_C virtual TFullName FullName() const;
1081 IMPORT_C TInt SetName(const TDesC* aName);
1082 IMPORT_C void SetNameL(const TDesC* aName);
1083 inline CObject* Owner() const;
1084 inline void SetOwner(CObject* anOwner);
1085 inline TInt AccessCount() const;
1086protected:
1087 IMPORT_C virtual TInt Extension_(TUint aExtensionId, TAny*& a0, TAny* a1);
1088protected:
1089 inline TInt UniqueID() const;
1090 inline void Inc();
1091 inline void Dec();
1092private:
1093 TInt iAccessCount;
1094 CObject* iOwner;
1095 CObjectCon* iContainer;
1096 HBufC* iName;
1097 TAny* iSpare1;
1098 TAny* iSpare2;
1099 friend class CObjectCon;
1100 friend class CObjectIx;
1101 __DECLARE_TEST;
1102 };
1103
1104//Forward declaration of SObjectIxRec
1105struct SObjectIxRec;
1106
1107class CObjectIx : public CBase
1123 {
1124public:
1125 enum {
1130 ENoClose=KHandleNoClose,
1131
1132
1137 ELocalHandle=KHandleFlagLocal
1139public:
1140 IMPORT_C static CObjectIx* NewL();
1141 IMPORT_C ~CObjectIx();
1142 IMPORT_C TInt AddL(CObject* anObj);
1143 IMPORT_C void Remove(TInt aHandle);
1144 IMPORT_C CObject* At(TInt aHandle,TInt aUniqueID);
1145 IMPORT_C CObject* At(TInt aHandle);
1146 IMPORT_C CObject* AtL(TInt aHandle,TInt aUniqueID);
1147 IMPORT_C CObject* AtL(TInt aHandle);
1148 IMPORT_C TInt At(const CObject* anObject) const;
1149 IMPORT_C TInt Count(CObject* anObject) const;
1150 IMPORT_C CObject* operator[](TInt anIndex);
1151 inline TInt Count() const;
1152 inline TInt ActiveCount() const;
1153protected:
1154 IMPORT_C CObjectIx();
1155private:
1156 void UpdateState();
1157private:
1158 TInt iNumEntries; // Number of actual entries in the index
1159 TInt iHighWaterMark; // points to at least 1 above the highest active index
1160 TInt iAllocated; // Max entries before realloc needed
1161 TInt iNextInstance;
1162 SObjectIxRec *iObjects;
1163 TInt iFree; // The index of the first free slot or -1.
1164 TInt iUpdateDisabled; // If >0, disables HWM update, reorder of the free list and memory shrinking.
1165 TAny* iSpare1;
1166 TAny* iSpare2;
1167 };
1168//
1169inline TBool IsLocalHandle(TInt aHandle)
1170 {return(aHandle&CObjectIx::ELocalHandle);}
1171inline void SetLocalHandle(TInt &aHandle)
1172 {aHandle|=CObjectIx::ELocalHandle;}
1173inline void UnSetLocalHandle(TInt &aHandle)
1174 {aHandle&=(~CObjectIx::ELocalHandle);}
1175
1176
1177
1178
1179class CObjectCon : public CBase
1203public:
1204 IMPORT_C static CObjectCon* NewL();
1205 IMPORT_C ~CObjectCon();
1206 IMPORT_C void Remove(CObject* anObj);
1207 IMPORT_C void AddL(CObject* anObj);
1208 IMPORT_C CObject* operator[](TInt anIndex);
1209 IMPORT_C CObject* At(TInt aFindHandle) const;
1210 IMPORT_C CObject* AtL(TInt aFindHandle) const;
1211 IMPORT_C TInt CheckUniqueFullName(const CObject* anOwner,const TDesC& aName) const;
1212 IMPORT_C TInt CheckUniqueFullName(const CObject* anObject) const;
1213 IMPORT_C TInt FindByName(TInt& aFindHandle,const TDesC& aMatch,TName& aName) const;
1214 IMPORT_C TInt FindByFullName(TInt& aFindHandle,const TDesC& aMatch,TFullName& aFullName) const;
1215 inline TInt UniqueID() const;
1216 inline TInt Count() const;
1217protected:
1218 IMPORT_C CObjectCon(TInt aUniqueID);
1219 TBool NamesMatch(const CObject* anObject, const CObject* aCurrentObject) const;
1220 TBool NamesMatch(const CObject* anObject, const TName& anObjectName, const CObject* aCurrentObject) const;
1221public:
1225 TInt iUniqueID;
1226private:
1227 TInt iCount;
1228 TInt iAllocated;
1229 CObject** iObjects;
1230 TAny* iSpare1;
1231 TAny* iSpare2;
1232 friend class CObjectConIx;
1234
1235
1236
1237
1238class CObjectConIx : public CBase
1253 {
1254#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
1255protected:
1259 enum {ENotOwnerID};
1260#endif
1261
1262public:
1263 IMPORT_C static CObjectConIx* NewL();
1264 IMPORT_C ~CObjectConIx();
1265 IMPORT_C CObjectCon* Lookup(TInt aFindHandle) const;
1266 IMPORT_C CObjectCon* CreateL();
1267 IMPORT_C void Remove(CObjectCon* aCon);
1268protected:
1269 IMPORT_C CObjectConIx();
1270 IMPORT_C void CreateContainerL(CObjectCon*& anObject);
1271private:
1272 CObjectCon* LookupByUniqueId(TInt aUniqueId) const;
1273private:
1274 TInt iCount;
1275 TInt iAllocated;
1276 TUint16 iNextUniqueID;
1277 TUint16 iUniqueIDHasWrapped;
1278 CObjectCon** iContainers;
1279 TAny* iSpare1;
1280 TAny* iSpare2;
1283// Forward Declaration of TCleanupStackItem
1284class TCleanupStackItem;
1285
1286
1288
1299typedef void (*TCleanupOperation)(TAny*);
1301
1302
1303
1304class TCleanupItem
1315 {
1316public:
1317 inline TCleanupItem(TCleanupOperation anOperation, TAny* aPtr = 0);
1318private:
1319 TCleanupOperation iOperation;
1320 TAny* iPtr;
1321 friend class TCleanupStackItem;
1322 };
1323
1324
1326
1327class CCleanup : public CBase
1337 {
1338public:
1339 IMPORT_C static CCleanup* New();
1340 IMPORT_C static CCleanup* NewL();
1341 IMPORT_C ~CCleanup();
1342 IMPORT_C void NextLevel();
1343 IMPORT_C void PreviousLevel();
1344 IMPORT_C void PushL(TAny* aPtr);
1345 IMPORT_C void PushL(CBase* anObject);
1346 IMPORT_C void PushL(TCleanupItem anItem);
1347 IMPORT_C void Pop();
1348 IMPORT_C void Pop(TInt aCount);
1349 IMPORT_C void PopAll();
1350 IMPORT_C void PopAndDestroy();
1351 IMPORT_C void PopAndDestroy(TInt aCount);
1352 IMPORT_C void PopAndDestroyAll();
1353 IMPORT_C void Check(TAny* aExpectedItem);
1354protected:
1355 IMPORT_C void DoPop(TInt aCount,TBool aDestroy);
1356 IMPORT_C void DoPopAll(TBool aDestroy);
1357protected:
1358 IMPORT_C CCleanup();
1359protected:
1363 TCleanupStackItem* iBase;
1364
1365
1369 TCleanupStackItem* iTop;
1370
1371
1375 TCleanupStackItem* iNext;
1376 };
1377
1378
1379
1380
1381NONSHARABLE_CLASS(TCleanupTrapHandler) : public TTrapHandler
1392public:
1393 TCleanupTrapHandler();
1394 virtual void Trap();
1395 virtual void UnTrap();
1396
1397 virtual void Leave(TInt aValue);
1398 inline CCleanup& Cleanup();
1399private:
1400 CCleanup* iCleanup;
1401 friend class CTrapCleanup;
1402 };
1403
1404
1405
1406
1407template <class T>
1408class TAutoClose
1419public:
1420 inline ~TAutoClose();
1421 inline void PushL();
1422 inline void Pop();
1423private:
1424 static void Close(TAny *aObj);
1425public:
1429 T iObj;
1431
1432
1433
1434
1435class CTrapCleanup : public CBase
1445 {
1446public:
1447 IMPORT_C static CTrapCleanup* New();
1448 IMPORT_C ~CTrapCleanup();
1449protected:
1450 IMPORT_C CTrapCleanup();
1451private:
1452 TCleanupTrapHandler iHandler;
1453 TTrapHandler* iOldHandler;
1454 };
1455
1456
1457
1458
1459class CCirBufBase : public CBase
1471 {
1472public:
1473 IMPORT_C ~CCirBufBase();
1474 inline TInt Count() const;
1475 inline TInt Length() const;
1476 IMPORT_C void SetLengthL(TInt aLength);
1477 IMPORT_C void Reset();
1478protected:
1479 IMPORT_C CCirBufBase(TInt aSize);
1480 IMPORT_C TInt DoAdd(const TUint8* aPtr);
1481 IMPORT_C TInt DoAdd(const TUint8* aPtr,TInt aCount);
1482 IMPORT_C TInt DoRemove(TUint8* aPtr);
1483 IMPORT_C TInt DoRemove(TUint8* aPtr,TInt aCount);
1484protected:
1485 TInt iCount;
1486 TInt iSize;
1487 TInt iLength;
1488 TUint8* iPtr;
1489 TUint8* iPtrE;
1490 TUint8* iHead;
1491 TUint8* iTail;
1492 };
1493
1494
1495
1497template <class T>
1498class CCirBuf : public CCirBufBase
1506 {
1507public:
1508 inline CCirBuf();
1509#if defined(__VC32__)
1510 inline ~CCirBuf() {}
1511#endif
1512 inline TInt Add(const T* aPtr);
1513 inline TInt Add(const T* aPtr,TInt aCount);
1514 inline TInt Remove(T* aPtr);
1515 inline TInt Remove(T* aPtr,TInt aCount);
1516 };
1517
1518
1519
1520
1521class CCirBuffer : public CCirBuf<TUint8>
1530 {
1531public:
1532 IMPORT_C CCirBuffer();
1533 IMPORT_C ~CCirBuffer();
1534 IMPORT_C TInt Get();
1535 IMPORT_C TInt Put(TInt aVal);
1536 };
1538
1539
1540
1541class CActive : public CBase
1552 {
1553public:
1558enum TPriority
1564 EPriorityIdle=-100,
1572
1577
1584
1585
1589 EPriorityHigh=20,
1591public:
1592 IMPORT_C ~CActive();
1593 IMPORT_C void Cancel();
1594 IMPORT_C void Deque();
1595 IMPORT_C void SetPriority(TInt aPriority);
1596 inline TBool IsActive() const;
1597 inline TBool IsAdded() const;
1598 inline TInt Priority() const;
1599protected:
1600 IMPORT_C CActive(TInt aPriority);
1601 IMPORT_C void SetActive();
1602
1617 virtual void DoCancel() =0;
1651 virtual void RunL() =0;
1652 IMPORT_C virtual TInt RunError(TInt aError);
1653protected:
1654 IMPORT_C virtual TInt Extension_(TUint aExtensionId, TAny*& a0, TAny* a1);
1655public:
1669private:
1670// TBool iActive;
1671 TPriQueLink iLink;
1672 TAny* iSpare;
1673 friend class CActiveScheduler;
1674 friend class CServer;
1675 friend class CServer2;
1676 };
1677
1681class CIdle : public CActive
1693 {
1694public:
1695 IMPORT_C static CIdle* New(TInt aPriority);
1696 IMPORT_C static CIdle* NewL(TInt aPriority);
1697 IMPORT_C ~CIdle();
1698 IMPORT_C void Start(TCallBack aCallBack);
1699protected:
1700 IMPORT_C CIdle(TInt aPriority);
1701 IMPORT_C void RunL();
1702 IMPORT_C void DoCancel();
1703protected:
1704
1711 };
1712
1713
1714
1715
1716class CAsyncOneShot : public CActive
1746 {
1747public:
1748 IMPORT_C CAsyncOneShot(TInt aPriority);
1749 IMPORT_C virtual void DoCancel();
1750 IMPORT_C virtual void Call();
1751 IMPORT_C virtual ~CAsyncOneShot();
1752 inline RThread& Thread();
1753private:
1754 void Setup();
1755 RThread iThread;
1756 };
1757
1758
1769 {
1770public:
1771 IMPORT_C CAsyncCallBack(TInt aPriority);
1772 IMPORT_C CAsyncCallBack(const TCallBack& aCallBack, TInt aPriority);
1773 IMPORT_C void Set(const TCallBack& aCallBack);
1774 IMPORT_C void CallBack();
1775 IMPORT_C virtual ~CAsyncCallBack();
1776protected:
1777 virtual void RunL();
1778//
1779protected:
1787
1802 {
1803 friend class CDeltaTimer;
1804public:
1805 inline TDeltaTimerEntry(const TCallBack& aCallback);
1806 inline TDeltaTimerEntry();
1807 inline void Set(TCallBack& aCallback);
1808private:
1809 TCallBack iCallBack;
1810 TTickCountQueLink iLink;
1811 };
1812
1813
1814
1815
1816class CDeltaTimer : public CActive
1857 {
1858public:
1859 // Queue management
1860 IMPORT_C virtual void Queue(TTimeIntervalMicroSeconds32 aTimeInMicroSeconds, TDeltaTimerEntry& aEntry);
1861 IMPORT_C virtual void Remove(TDeltaTimerEntry& aEntry);
1862 IMPORT_C TInt QueueLong(TTimeIntervalMicroSeconds aTimeInMicroSeconds, TDeltaTimerEntry& aEntry);
1864 // Factory functions
1865 IMPORT_C static CDeltaTimer* NewL(TInt aPriority);
1866 IMPORT_C static CDeltaTimer* NewL(TInt aPriority, TTimeIntervalMicroSeconds32 aGranularity);
1868 // Destructor
1870
1871private:
1872 // Construction
1873 CDeltaTimer(TInt aPriority, TInt aTickPeriod);
1874
1875 // From CActive
1876 void DoCancel();
1877 void RunL();
1878
1879 // Utility
1880 void Activate(TBool aRequeueTimer = EFalse);
1882private:
1886 RTimer iTimer;
1887
1891 TTickCountQue iQueue;
1892
1896 const TInt iTickPeriod;
1901 TBool iQueueBusy;
1902 };
1903
1904
1905
1906
1907class CTimer : public CActive
1938 {
1939public:
1940 IMPORT_C ~CTimer();
1941 IMPORT_C void At(const TTime& aTime);
1942 IMPORT_C void AtUTC(const TTime& aTimeInUTC);
1943 IMPORT_C void After(TTimeIntervalMicroSeconds32 anInterval);
1944 IMPORT_C void Lock(TTimerLockSpec aLock);
1945 IMPORT_C void Inactivity(TTimeIntervalSeconds aSeconds);
1946 IMPORT_C void HighRes(TTimeIntervalMicroSeconds32 aInterval);
1947protected:
1948 IMPORT_C CTimer(TInt aPriority);
1949 IMPORT_C void ConstructL();
1950 IMPORT_C void DoCancel();
1951private:
1952 RTimer iTimer;
1953 };
1954
1955
1958class CPeriodic : public CTimer
1999 {
2000public:
2001 IMPORT_C static CPeriodic* New(TInt aPriority);
2002 IMPORT_C static CPeriodic* NewL(TInt aPriority);
2003 IMPORT_C ~CPeriodic();
2004 IMPORT_C void Start(TTimeIntervalMicroSeconds32 aDelay,TTimeIntervalMicroSeconds32 anInterval,TCallBack aCallBack);
2005protected:
2006 IMPORT_C CPeriodic(TInt aPriority);
2007 IMPORT_C void RunL();
2008private:
2010 TCallBack iCallBack;
2011 };
2012
2013
2014
2015
2016class MBeating
2031 {
2032public:
2039 virtual void Beat() =0;
2048 virtual void Synchronize() =0;
2049 };
2050
2051
2052
2053
2054class CHeartbeat : public CTimer
2095 {
2096public:
2097 IMPORT_C static CHeartbeat* New(TInt aPriority);
2098 IMPORT_C static CHeartbeat* NewL(TInt aPriority);
2099 IMPORT_C ~CHeartbeat();
2100 IMPORT_C void Start(TTimerLockSpec aLock,MBeating *aBeating);
2101protected:
2102 IMPORT_C CHeartbeat(TInt aPriority);
2103 IMPORT_C void RunL();
2104private:
2105 TTimerLockSpec iLock;
2106 MBeating *iBeating;
2108//
2109
2110class CServer2;
2111
2112
2113
2114
2134class CSession2 : public CBase
2135 {
2136 friend class CServer2;
2137public:
2138 IMPORT_C virtual ~CSession2() =0;
2139private:
2140 IMPORT_C virtual void CreateL(); // Default method, does nothing
2141public:
2142 inline const CServer2* Server() const;
2143 IMPORT_C void ResourceCountMarkStart();
2144 IMPORT_C void ResourceCountMarkEnd(const RMessage2& aMessage);
2145 IMPORT_C virtual TInt CountResources();
2146
2156 virtual void ServiceL(const RMessage2& aMessage) =0;
2157 IMPORT_C virtual void ServiceError(const RMessage2& aMessage,TInt aError);
2158protected:
2159 IMPORT_C CSession2();
2160 IMPORT_C virtual void Disconnect(const RMessage2& aMessage);
2161 IMPORT_C virtual TInt Extension_(TUint aExtensionId, TAny*& a0, TAny* a1);
2162public:
2163 IMPORT_C void SetServer(const CServer2* aServer);
2168
2169private:
2170 TInt iResourceCountMark;
2171 TDblQueLink iLink;
2172 const CServer2* iServer;
2173 TAny* iSpare;
2174 };
2175
2190class CServer2 : public CActive
2191 {
2192public:
2193
2199 enum TServerType
2200 {
2201 EUnsharableSessions = EIpcSession_Unsharable,
2202 ESharableSessions = EIpcSession_Sharable,
2203 EGlobalSharableSessions = EIpcSession_GlobalSharable,
2205
2206public:
2207 IMPORT_C virtual ~CServer2() =0;
2208 IMPORT_C TInt Start(const TDesC& aName);
2209 IMPORT_C void StartL(const TDesC& aName);
2210 IMPORT_C void ReStart();
2211 IMPORT_C void SetPinClientDescriptors(TBool aPin);
2212
2222 inline RServer2 Server() const { return iServer; }
2223protected:
2224 inline const RMessage2& Message() const;
2225 IMPORT_C CServer2(TInt aPriority, TServerType aType=EUnsharableSessions);
2226 IMPORT_C void DoCancel();
2227 IMPORT_C void RunL();
2228 IMPORT_C TInt RunError(TInt aError);
2229 IMPORT_C virtual void DoConnect(const RMessage2& aMessage);
2230 IMPORT_C virtual TInt Extension_(TUint aExtensionId, TAny*& a0, TAny* a1);
2231private:
2232
2256 IMPORT_C virtual CSession2* NewSessionL(const TVersion& aVersion,const RMessage2& aMessage) const =0;
2257 void Connect(const RMessage2& aMessage);
2258 void DoConnectL(const RMessage2& aMessage,CSession2* volatile& aSession);
2259public:
2260 IMPORT_C void SetMaster(const CServer2* aServer);
2261
2271 };
2272
2273private:
2274 TUint8 iSessionType;
2275 TUint8 iServerRole;
2276 TUint16 iServerOpts;
2277 RServer2 iServer;
2278 RMessage2 iMessage;
2279 TAny* iSpare;
2280 TDblQue<CSession2> iSessionQ;
2281
2282protected:
2284private:
2285 void Disconnect(const RMessage2& aMessage);
2286 static void BadMessage(const RMessage2& aMessage);
2287 static void NotConnected(const RMessage2& aMessage);
2288 friend class CPolicyServer;
2289 };
2290
2291
2292
2368class CPolicyServer : public CServer2
2369 {
2370public:
2391 enum TCustomResult
2392 {
2393 EPass = 0,
2394 EFail = 1,
2396 };
2397
2405 class TPolicyElement
2406 {
2407 public:
2439
2444 TInt iAction;
2445 };
2446
2450 enum TSpecialCase
2451 {
2453 ECustomCheck =255u,
2454
2457 ENotSupported =254u,
2458
2461 EAlwaysPass =253u,
2462
2463 ESpecialCaseLimit =252u,
2465 };
2466
2511 class TPolicy
2512 {
2513 public:
2516 TUint8 iOnConnect;
2517
2519 TUint16 iRangeCount;
2520
2541 const TInt* iRanges;
2542
2579 const TUint8* iElementsIndex;
2580
2608 const TPolicyElement* iElements;
2609 };
2610
2611public:
2626 IMPORT_C void ProcessL(const RMessage2& aMsg);
2627
2644 IMPORT_C void CheckFailedL(const RMessage2& aMsg, TInt aAction, const TSecurityInfo& aMissing);
2645
2659 IMPORT_C void ProcessError(const RMessage2& aMsg, TInt aError);
2660
2661protected:
2672 IMPORT_C CPolicyServer(TInt aPriority, const TPolicy& aPolicy, TServerType aType=EUnsharableSessions);
2673
2722 IMPORT_C virtual TCustomResult CustomSecurityCheckL(const RMessage2& aMsg, TInt& aAction, TSecurityInfo& aMissing);
2723
2773 IMPORT_C virtual TCustomResult CustomFailureActionL(const RMessage2& aMsg, TInt aAction, const TSecurityInfo& aMissing);
2774
2775protected:
2776 IMPORT_C virtual TInt Extension_(TUint aExtensionId, TAny*& a0, TAny* a1);
2777private:
2778 IMPORT_C virtual void RunL();
2779 IMPORT_C virtual TInt RunError(TInt aError);
2780 const CPolicyServer::TPolicyElement* FindPolicyElement(TInt aFn, TUint& aSpecialCase) const;
2781private:
2782 const TPolicy& iPolicy;
2783
2784 };
2785
2786
2787
2788class CActiveScheduler : public CBase
2816 {
2817 friend class CActiveSchedulerWait;
2818public:
2819 struct TLoop;
2820 typedef TLoop* TLoopOwner;
2821public:
2822 IMPORT_C CActiveScheduler();
2823 IMPORT_C ~CActiveScheduler();
2824 IMPORT_C static void Install(CActiveScheduler* aScheduler);
2825 IMPORT_C static CActiveScheduler* Current();
2826 IMPORT_C static void Add(CActive* aActive);
2827 IMPORT_C static void Start();
2828 IMPORT_C static void Stop();
2829 IMPORT_C static TBool RunIfReady(TInt& aError, TInt aMinimumPriority);
2830 IMPORT_C static CActiveScheduler* Replace(CActiveScheduler* aNewActiveScheduler);
2831 IMPORT_C virtual void WaitForAnyRequest();
2832 IMPORT_C virtual void Error(TInt aError) const;
2833 IMPORT_C void Halt(TInt aExitCode) const;
2834 IMPORT_C TInt StackDepth() const;
2835private:
2836 class TCleanupBundle
2837 {
2838 public:
2839 CCleanup* iCleanupPtr;
2840 TInt iDummyInt;
2841 };
2842private:
2843 static void Start(TLoopOwner* aOwner);
2844 IMPORT_C virtual void OnStarting();
2845 IMPORT_C virtual void OnStopping();
2846 IMPORT_C virtual void Reserved_1();
2847 IMPORT_C virtual void Reserved_2();
2848 void Run(TLoopOwner* const volatile& aLoop);
2849 void DoRunL(TLoopOwner* const volatile& aLoop, CActive* volatile & aCurrentObj, TCleanupBundle* aCleanupBundle);
2850protected:
2851 IMPORT_C virtual TInt Extension_(TUint aExtensionId, TAny*& a0, TAny* a1);
2852protected:
2853 inline TInt Level() const; // deprecated
2854private:
2855 TLoop* iStack;
2856 TPriQue<CActive> iActiveQ;
2857 TAny* iSpare;
2858 };
2859
2860
2861
2862
2863class CActiveSchedulerWait : public CBase
2879public:
2880 IMPORT_C CActiveSchedulerWait();
2882 IMPORT_C void Start();
2883 IMPORT_C void AsyncStop();
2884 IMPORT_C void AsyncStop(const TCallBack& aCallMeWhenStopped);
2885 inline TBool IsStarted() const;
2886 IMPORT_C TBool CanStopNow() const;
2887private:
2889 };
2890
2891
2892
2894class CleanupStack
2902 {
2903public:
2904 IMPORT_C static void PushL(TAny* aPtr);
2905 IMPORT_C static void PushL(CBase* aPtr);
2906 IMPORT_C static void PushL(TCleanupItem anItem);
2907 IMPORT_C static void Pop();
2908 IMPORT_C static void Pop(TInt aCount);
2909 IMPORT_C static void PopAndDestroy();
2910 IMPORT_C static void PopAndDestroy(TInt aCount);
2911 IMPORT_C static void Check(TAny* aExpectedItem);
2912 inline static void Pop(TAny* aExpectedItem);
2913 inline static void Pop(TInt aCount, TAny* aLastExpectedItem);
2914 inline static void PopAndDestroy(TAny* aExpectedItem);
2915 inline static void PopAndDestroy(TInt aCount, TAny* aLastExpectedItem);
2916 };
2917
2918
2919
2920
2931template <class T>
2934public:
2935 inline static void PushL(T* aPtr);
2936private:
2937 static void Delete(TAny *aPtr);
2942
2979template <class T>
2980inline void CleanupDeletePushL(T* aPtr);
2981
2982
2983
2984
2995template <class T>
2997 {
2998public:
2999 inline static void PushL(T* aPtr);
3000private:
3001 static void ArrayDelete(TAny *aPtr);
3002 };
3004
3005
3006
3045template <class T>
3046inline void CleanupArrayDeletePushL(T* aPtr);
3047
3049
3050
3061template <class T>
3062class CleanupClose
3063 {
3064public:
3065 inline static void PushL(T& aRef);
3066private:
3067 static void Close(TAny *aPtr);
3068 };
3069
3070
3071
3072
3123template <class T>
3124inline void CleanupClosePushL(T& aRef);
3125
3126
3127
3128
3139template <class T>
3140class CleanupRelease
3141 {
3142public:
3143 inline static void PushL(T& aRef);
3144private:
3145 static void Release(TAny *aPtr);
3146 };
3147
3148
3149
3150
3197template <class T>
3198inline void CleanupReleasePushL(T& aRef);
3199
3200
3201
3202
3203class CConsoleBase;
3204
3209class Console
3210 {
3211public:
3212 IMPORT_C static CConsoleBase* NewL(const TDesC& aTitle,TSize aSize);
3213 };
3214
3215#include <e32base.inl>
3216
3217#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
3218#include <e32base_private.h>
3219#endif
3220
3221#endif //__E32BASE_H__
Controls a single scheduling loop in the current active scheduler.
Definition e32base.h:2987
IMPORT_C CActiveSchedulerWait()
Default constructor.
IMPORT_C TBool CanStopNow() const
Reports whether stopping will have immediate effect.
IMPORT_C void Start()
Starts a new wait loop under the control of the current active scheduler.
IMPORT_C ~CActiveSchedulerWait()
Ensures that the attached scheduler loop, and all nested loops, are stopped prior to destruction.
IMPORT_C void AsyncStop()
Stops the scheduling loop owned by this object.
TBool IsStarted() const
Reports whether this CActiveSchedulerWait object is currently started.
Controls the handling of asynchronous requests as represented by active objects.
Definition e32base.h:2923
IMPORT_C void Halt(TInt aExitCode) const
Unilaterally terminates the current scheduler loop.
static IMPORT_C void Install(CActiveScheduler *aScheduler)
Installs the specified active scheduler as the current active scheduler.
virtual IMPORT_C void Error(TInt aError) const
Handles the result of a leave occurring in an active object s RunL() function.
static IMPORT_C CActiveScheduler * Current()
Gets a pointer to the currently installed active scheduler.
IMPORT_C TInt StackDepth() const
Gets the current number of nested wait loops.
TInt Level() const
Use the StackDepth() function instead.
virtual IMPORT_C void WaitForAnyRequest()
Wait for an asynchronous request to complete.
static IMPORT_C TBool RunIfReady(TInt &aError, TInt aMinimumPriority)
Causes the RunL() function of at most one pending active object of priority aMinimumPriority or great...
IMPORT_C CActiveScheduler()
Constructs an active scheduler.
static IMPORT_C CActiveScheduler * Replace(CActiveScheduler *aNewActiveScheduler)
Allows the current active scheduler to be replaced, while retaining its active objects.
IMPORT_C ~CActiveScheduler()
Frees resources prior to destruction.
static IMPORT_C void Start()
Starts a new wait loop under the control of the current active scheduler.
static IMPORT_C void Stop()
Stops the wait loop started by the most recent call to Start().
static IMPORT_C void Add(CActive *aActive)
Adds the specified active object to the current active scheduler.
virtual IMPORT_C TInt Extension_(TUint aExtensionId, TAny *&a0, TAny *a1)
Extension function.
TLoop * TLoopOwner
Definition e32base.h:2927
The core class of the active object abstraction.
Definition e32base.h:1638
IMPORT_C void SetPriority(TInt aPriority)
Sets the priority of the active object.
virtual void RunL()=0
Handles an active object's request completion event.
TPriority
Defines standard priorities for active objects.
Definition e32base.h:1645
@ EPriorityIdle
A low priority, useful for active objects representing background processing.
Definition e32base.h:1650
@ EPriorityLow
A priority higher than EPriorityIdle but lower than EPriorityStandard.
Definition e32base.h:1656
@ EPriorityUserInput
A priority higher than EPriorityStandard; useful for active objects handling user input.
Definition e32base.h:1669
@ EPriorityHigh
A priority higher than EPriorityUserInput.
Definition e32base.h:1675
@ EPriorityStandard
Most active objects will have this priority.
Definition e32base.h:1662
TRequestStatus iStatus
The request status associated with an asynchronous request.
Definition e32base.h:1754
IMPORT_C void Deque()
Removes the active object from the active scheduler's list of active objects.
TBool IsActive() const
Determines whether the active object has a request outstanding.
IMPORT_C void SetActive()
Indicates that the active object has issued a request and that it is now outstanding.
friend class CServer2
Definition e32base.h:1761
virtual IMPORT_C TInt Extension_(TUint aExtensionId, TAny *&a0, TAny *a1)
Extension function.
IMPORT_C ~CActive()
Frees resources prior to destruction.
friend class CServer
Definition e32base.h:1760
TBool IsAdded() const
Determines whether the active object has been added to the active scheduler's list of active objects.
IMPORT_C void Cancel()
Cancels the wait for completion of an outstanding request.
TInt Priority() const
Gets the priority of the active object.
virtual void DoCancel()=0
Implements cancellation of an outstanding request.
virtual IMPORT_C TInt RunError(TInt aError)
Handles a leave occurring in the request completion event handler RunL().
Base class for arrays of fixed length objects.
Definition e32base.h:349
IMPORT_C void SetReserveFlatL(TInt aCount)
Reserve space to contain aCount items.
IMPORT_C void Delete(TInt anIndex)
Deletes a single element from the array at a specified position.
IMPORT_C void Compress()
Compresses the array.
IMPORT_C TAny * At(TInt anIndex) const
Index into the array.
IMPORT_C ~CArrayFixBase()
Destructor.
IMPORT_C void InsertL(TInt anIndex, const TAny *aPtr)
Insert a record into the array.
IMPORT_C void Reset()
Deletes all elements from the array and frees the memory allocated to the array buffer.
IMPORT_C void InsertRepL(TInt anIndex, const TAny *aPtr, TInt aReplicas)
Insert aReplicas copies of a record into the array.
static IMPORT_C const TAny * AtR(const CBase *aPtr, TInt anIndex)
Return the address of an item in the array.
IMPORT_C TInt InsertIsqL(const TAny *aPtr, TKeyArrayFix &aKey)
Insert in sequence, no duplicates allowed.
TInt Length() const
Gets the length of an element.
IMPORT_C TInt InsertIsqAllowDuplicatesL(const TAny *aPtr, TKeyArrayFix &aKey)
Insert in sequence, allow duplicates.
IMPORT_C TAny * Back(TInt anIndex) const
Return a pointer to contiguous elements before anIndex.
IMPORT_C TInt Find(const TAny *aPtr, TKeyArrayFix &aKey, TInt &anIndex) const
Find in the array using a sequential search.
IMPORT_C TInt FindIsq(const TAny *aPtr, TKeyArrayFix &aKey, TInt &anIndex) const
Find in the array using a binary search.
IMPORT_C TAny * End(TInt anIndex) const
Return a pointer past contiguous elements starting at anIndex.
IMPORT_C void ResizeL(TInt aCount, const TAny *aPtr)
Resize the array to contain aCount records, copying a record into any new slots.
TInt Count() const
Gets the number of elements held in the array.
IMPORT_C TAny * ExpandL(TInt anIndex)
Expand the array to make room for a new record at anIndex.
IMPORT_C void SetKey(TKeyArrayFix &aKey) const
Set the key data.
IMPORT_C TInt Sort(TKeyArrayFix &aKey)
Sorts the elements of the array into key sequence.
static IMPORT_C TInt CountR(const CBase *aPtr)
Return the number of items in the array.
void SetReserveL(TInt aCount)
Reserves space in the array buffer.
Array of fixed length objects contained within a flat dynamic buffer.
Definition e32base.h:488
void SetReserveL(TInt aCount)
Reserves space in the array buffer.
Array of fixed length objects contained within a segmented buffer.
Definition e32base.h:589
CArrayFixSeg(TInt aGranularity)
Constructs a segmented array of fixed length objects with the specified granularity.
A thin templated base class for arrays of fixed length objects.
Definition e32base.h:402
const T * End(TInt anIndex) const
Gets a pointer to the (const) first byte following the end of the contiguous region containing the el...
T & ExtendL()
Expands the array by one element at the end of the array.
const T & At(TInt anIndex) const
Gets a const reference to the element located at the specified position within the array.
TInt FindIsq(const T &aRef, TKeyArrayFix &aKey, TInt &anIndex) const
Finds the position of an element within the array, based on the matching of keys, using a binary sear...
void ResizeL(TInt aCount)
Changes the size of the array so that it contains the specified number of elements.
void InsertL(TInt anIndex, const T &aRef)
Inserts an element into the array at the specified position.
TInt InsertIsqAllowDuplicatesL(const T &aRef, TKeyArrayFix &aKey)
Inserts a single element into the array at a position determined by a key, allowing duplicates.
const T & operator[](TInt anIndex) const
Gets a const reference to the element located at the specified position within the array.
TInt Find(const T &aRef, TKeyArrayFix &aKey, TInt &anIndex) const
Finds the position of an element within the array, based on the matching of keys, using a sequential ...
const T * Back(TInt anIndex) const
Gets a pointer to the (const) beginning of a contiguous region.
void AppendL(const T &aRef)
Appends a single element onto the end of the array.
TInt InsertIsqL(const T &aRef, TKeyArrayFix &aKey)
Inserts a single element into the array at a position determined by a key.
const TArray< T > Array() const
Constructs and returns a TArray<T> object.
T & ExpandL(TInt anIndex)
Expands the array by one element at the specified position.
An implementation base class for all variable length, packed arrays.
Definition e32base.h:984
IMPORT_C TInt InsertIsqAllowDuplicatesL(const TAny *aPtr, TInt aLength, TKeyArrayPak &aKey)
Insert in sequence, allow duplicates.
IMPORT_C TInt Find(const TAny *aPtr, TKeyArrayPak &aKey, TInt &anIndex) const
Find using a sequential search.
IMPORT_C TInt InsertIsqL(const TAny *aPtr, TInt aLength, TKeyArrayPak &aKey)
Insert in sequence, no duplicates allowed.
IMPORT_C TAny * ExpandL(TInt anIndex, TInt aLength)
Expand the array at anIndex.
TInt Count() const
Gets the number of elements held in the array.
static IMPORT_C TInt CountR(const CBase *aPtr)
Return the number of items in the array.
IMPORT_C TAny * At(TInt anIndex) const
TAny points to the data associated with the record with anIndex.
IMPORT_C TInt FindIsq(const TAny *aPtr, TKeyArrayPak &aKey, TInt &anIndex) const
Find using a binary search.
static IMPORT_C const TAny * AtR(const CBase *aPtr, TInt anIndex)
Return the address of an item in the array.
IMPORT_C void Delete(TInt anIndex)
Removes a single element from the array.
IMPORT_C void BuildVarArrayL(CArrayVarFlat< TAny > *&aVarFlat)
Make a copy of the current array as a CArrayVarFlat.
IMPORT_C TInt GetOffset(TInt anIndex) const
Return the offset into the buffer of the record with index anIndex;.
IMPORT_C void Compress()
Removes excess space from the array buffer.
IMPORT_C void SortL(TKeyArrayVar &aKey)
Sorts the elements of the array into key sequence.
IMPORT_C void InsertL(TInt anIndex, const TAny *aPtr, TInt aLength)
Inserts a record at index anIndex.
IMPORT_C void Reset()
Deletes all elements from the array and frees the memory allocated to the array buffer.
IMPORT_C void SetKey(TKeyArrayPak &aKey) const
Set the key data.
IMPORT_C ~CArrayPakBase()
Destructor.
IMPORT_C TInt Length(TInt anIndex) const
Gets the length of the specified element.
Array of variable length objects packed into a flat buffer.
Definition e32base.h:1103
A thin templated base class for variable length, packed, arrays.
Definition e32base.h:1034
T & ExpandL(TInt anIndex, TInt aLength)
Expands the array by one element of specified length at the specified position.
const TArray< T > Array() const
Constructs and returns a TArray<T> object.
const T & operator[](TInt anIndex) const
Gets a reference to the element located at the specified position within the array.
const T & At(TInt anIndex) const
Gets a reference to the element located at the specified position within the array.
void InsertL(TInt anIndex, const T &aRef, TInt aLength)
Inserts an element of a specified length into the array at the specified position.
TInt FindIsq(const T &aRef, TKeyArrayPak &aKey, TInt &anIndex) const
Finds the position of an element within the array, based on the matching of keys, using a binary sear...
TInt Find(const T &aRef, TKeyArrayPak &aKey, TInt &anIndex) const
Finds the position of an element within the array, based on the matching of keys, using a sequential ...
T & ExtendL(TInt aLength)
Expands the array by one element of specified length at the end of the array.
void AppendL(const T &aRef, TInt aLength)
Appends an element of a specified length onto the array.
TInt InsertIsqL(const T &aRef, TInt aLength, TKeyArrayPak &aKey)
Inserts a single element of a specified length into the array at a position determined by a key.
TInt InsertIsqAllowDuplicatesL(const T &aRef, TInt aLength, TKeyArrayPak &aKey)
Inserts a single element of a specified length into the array at a position determined by a key,...
Array of pointers to objects implemented using a flat dynamic buffer.
Definition e32base.h:674
void SetReserveL(TInt aCount)
Reserves space in the array buffer.
Array of pointers to objects implemented using a segmented dynamic buffer.
Definition e32base.h:704
A thin templated base class for arrays of pointers to objects.
Definition e32base.h:639
void ResetAndDestroy()
Destroys all objects whose pointers form the elements of the array, before resetting the array.
An implementation base class for variable length arrays.
Definition e32base.h:774
TInt Count() const
Gets the number of elements held in the array.
IMPORT_C void SetKey(TKeyArrayVar &aKey) const
Set the key data.
IMPORT_C TInt InsertIsqAllowDuplicatesL(const TAny *aPtr, TInt aLength, TKeyArrayVar &aKey)
Insert in sequence, allow duplicates.
IMPORT_C void Delete(TInt anIndex)
Removes one element from the array.
IMPORT_C TInt Length(TInt anIndex) const
Gets the length of a specific element.
IMPORT_C TInt Sort(TKeyArrayVar &aKey)
Sorts the elements of the array into key sequence.
IMPORT_C TAny * At(TInt anIndex) const
Return a pointer to the data in the array.
IMPORT_C void Compress()
Removes excess space from the array buffer.
static IMPORT_C TInt CountR(const CBase *aPtr)
Return the number of items in the array.
IMPORT_C void InsertL(TInt anIndex, const TAny *aPtr, TInt aLength)
Insert a new record in the array.
IMPORT_C void Reset()
Deletes all elements from the array and frees the memory allocated to the array buffer.
static IMPORT_C const TAny * AtR(const CBase *aPtr, TInt anIndex)
Return the address of an item in the array.
IMPORT_C ~CArrayVarBase()
Destructor.
IMPORT_C TInt InsertIsqL(const TAny *aPtr, TInt aLength, TKeyArrayVar &aKey)
Insert in sequence, no duplicates allowed.
IMPORT_C TInt Find(const TAny *aPtr, TKeyArrayVar &aKey, TInt &anIndex) const
Find using a sequential search.
IMPORT_C TInt FindIsq(const TAny *aPtr, TKeyArrayVar &aKey, TInt &anIndex) const
Find using a binary search.
IMPORT_C TAny * ExpandL(TInt anIndex, TInt aLength)
Expand the array at anIndex.
Array of variable length objects implemented using a flat dynamic buffer.
Definition e32base.h:890
Array of variable length objects implemented using a segmented dynamic buffer.
Definition e32base.h:917
A thin templated base class for variable length arrays.
Definition e32base.h:820
TInt InsertIsqAllowDuplicatesL(const T &aRef, TInt aLength, TKeyArrayVar &aKey)
Inserts a single element of a specified length into the array at a position determined by a key,...
void InsertL(TInt anIndex, const T &aRef, TInt aLength)
Inserts an element of a specified length into the array at the specified position.
TInt Find(const T &aRef, TKeyArrayVar &aKey, TInt &anIndex) const
Finds the position of an element within the array, based on the matching of keys, using a sequential ...
void AppendL(const T &aRef, TInt aLength)
Appends an element of a specified length onto the array.
const T & operator[](TInt anIndex) const
Gets a reference to the const element located at the specified position within the array.
TInt FindIsq(const T &aRef, TKeyArrayVar &aKey, TInt &anIndex) const
Finds the position of an element within the array, based on the matching of keys, using a binary sear...
const T & At(TInt anIndex) const
Gets a reference to the const element located at the specified position within the array.
TInt InsertIsqL(const T &aRef, TInt aLength, TKeyArrayVar &aKey)
Inserts a single element of a specified length into the array at a position determined by a key.
T & ExpandL(TInt anIndex, TInt aLength)
Expands the array by one element of specified length at the specified position.
T & ExtendL(TInt aLength)
Expands the array by one element of specified length at the end of the array.
const TArray< T > Array() const
Constructs and returns a TArray<T> object.
An active object that performs its processing through an associated call back function,...
Definition e32base.h:1861
IMPORT_C void Set(const TCallBack &aCallBack)
Sets the call back.
TCallBack iCallBack
The callback object that encapsulates the callback function.
Definition e32base.h:1875
IMPORT_C void CallBack()
Queues this active object to be run, if it is not already queued.
virtual IMPORT_C ~CAsyncCallBack()
Destructor.
virtual void RunL()
Handles an active object's request completion event.
An active object that performs processing that is only performed once.
Definition e32base.h:1836
virtual IMPORT_C void Call()
Queues this active object to be run once.
RThread & Thread()
Gets a handle to the current thread.
virtual IMPORT_C ~CAsyncOneShot()
Frees resources prior to destruction.
virtual IMPORT_C void DoCancel()
Implements cancellation of an outstanding request.
Container Base Class.
Definition e32base.h:60
CBase()
Default constructor.
Definition e32base.h:65
virtual IMPORT_C TInt Extension_(TUint aExtensionId, TAny *&a0, TAny *a1)
Extension function.
virtual IMPORT_C ~CBase()
Virtual destructor.
static IMPORT_C void Delete(CBase *aPtr)
Deletes the specified object.
Defines the interface for dynamic buffers.
Definition e32base.h:108
virtual void Delete(TInt aPos, TInt aLength)=0
Deletes data from the buffer.
IMPORT_C ~CBufBase()
Destructor.
virtual TPtr8 BackPtr(TInt aPos)=0
Gets a pointer descriptor to represent data from just before the specified data byte backward to the ...
virtual TPtr8 Ptr(TInt aPos)=0
Gets a pointer descriptor to represent the data from the specified position to the end of the conti...
IMPORT_C void Reset()
Deletes all data in the buffer.
TInt iSize
Definition e32base.h:196
IMPORT_C void InsertL(TInt aPos, const TDesC8 &aDes)
Inserts data into the buffer.
TInt Size() const
Gets the number of data bytes in the buffer.
virtual void Compress()=0
Compresses the buffer so as to occupy minimal space.
IMPORT_C void Write(TInt aPos, const TDesC8 &aDes)
Writes data from a descriptor to the buffer.
IMPORT_C void Read(TInt aPos, TDes8 &aDes) const
Reads data from the buffer into a descriptor.
IMPORT_C void ExpandL(TInt aPos, TInt aLength)
Inserts an uninitialised region into the buffer.
IMPORT_C void ResizeL(TInt aSize)
Re-sizes the buffer to the specified size.
TInt iExpandSize
Definition e32base.h:197
Provides a flat storage dynamic buffer.
Definition e32base.h:219
static IMPORT_C CBufFlat * NewL(TInt anExpandSize)
Allocates and constructs a flat buffer.
IMPORT_C void Delete(TInt aPos, TInt aLength)
Deletes data from the buffer.
IMPORT_C TPtr8 Ptr(TInt aPos)
Gets a pointer descriptor to represent the data from the specified position to the end of the conti...
TInt Capacity() const
Gets the size to which the buffer may expand without re-allocation.
IMPORT_C void SetReserveL(TInt aSize)
Specifies a minimum amount of space which the flat buffer should occupy.
IMPORT_C void Compress()
Compresses the buffer so as to occupy minimal space.
IMPORT_C TPtr8 BackPtr(TInt aPos)
Gets a pointer descriptor to represent data from just before the specified data byte backward to the ...
IMPORT_C ~CBufFlat()
Destructor.
Provides a segmented dynamic buffer.
Definition e32base.h:264
void DeleteFromSegment(TBufSegLink *aSeg, TInt anOffset, TInt aLength)
IMPORT_C TPtr8 Ptr(TInt aPos)
Gets a pointer descriptor to represent the data from the specified position to the end of the conti...
void FreeSegment(TBufSegLink *aSeg)
IMPORT_C void Compress()
Compresses the buffer so as to occupy minimal space.
IMPORT_C void Delete(TInt aPos, TInt aLength)
Deletes data from the buffer.
static IMPORT_C CBufSeg * NewL(TInt anExpandSize)
Allocates and constructs a segmented buffer.
void AllocSegL(TBufSegLink *aSeg, TInt aNumber)
IMPORT_C TPtr8 BackPtr(TInt aPos)
Gets a pointer descriptor to represent data from just before the specified data byte backward to the ...
IMPORT_C ~CBufSeg()
Destructor.
void InsertIntoSegment(TBufSegLink *aSeg, TInt anOffset, const TAny *aPtr, TInt aLength)
void SetSBO(TInt aPos)
Base class for circular buffers.
Definition e32base.h:1551
TUint8 * iHead
Definition e32base.h:1570
IMPORT_C void Reset()
Empties the buffer.
TInt iCount
Definition e32base.h:1565
IMPORT_C TInt DoAdd(const TUint8 *aPtr)
Implementation function for CCirBuf::Add(const T*)
TUint8 * iPtrE
Definition e32base.h:1569
TUint8 * iTail
Definition e32base.h:1571
IMPORT_C TInt DoRemove(TUint8 *aPtr)
Implementation function for CCirBuf::Remove(T*)
TInt Length() const
Gets the maximum capacity of this circular buffer.
IMPORT_C ~CCirBufBase()
Destructor.
IMPORT_C void SetLengthL(TInt aLength)
Sets the maximum capacity of this circular buffer, and resets all of the buffer pointers.
TUint8 * iPtr
Definition e32base.h:1568
TInt iLength
Definition e32base.h:1567
TInt Count() const
Gets the current number of objects in this circular buffer.
A circular buffer containing objects of a type defined by the template parameter.
Definition e32base.h:1588
TInt Add(const T *aPtr)
Adds a single object to the circular buffer.
TInt Remove(T *aPtr)
Removes a single object from the circular buffer.
CCirBuf()
Default C++ constructor.
Circular buffer of unsigned 8-bit integers.
Definition e32base.h:1614
IMPORT_C ~CCirBuffer()
Destructor.
IMPORT_C TInt Get()
Removes an unsigned 8-bit integer value from the circular buffer and returns its value.
IMPORT_C CCirBuffer()
Default C++ constructor.
IMPORT_C TInt Put(TInt aVal)
Adds an unsigned 8-bit integer value in the range 0 to 255 to the circular buffer.
Implements the cleanup stack.
Definition e32base.h:1409
static IMPORT_C CCleanup * New()
Creates a new cleanup stack object.
IMPORT_C void Pop()
Pops a single cleanup item from the cleanup stack.
IMPORT_C void PushL(TAny *aPtr)
Pushes a cleanup item onto the cleanup stack.
IMPORT_C void DoPop(TInt aCount, TBool aDestroy)
Provides an implementation for Pop() and PopAndDestroy().
IMPORT_C CCleanup()
Default constructor.
IMPORT_C void Check(TAny *aExpectedItem)
Checks that the cleanup item at the top of the cleanup stack represents a cleanup operation for the s...
IMPORT_C void PopAndDestroyAll()
Pops all cleanup items at the current level, invokes their cleanup operations and then decrements the...
IMPORT_C void NextLevel()
Goes to the next cleanup level.
static IMPORT_C CCleanup * NewL()
Creates a new cleanup stack object, and leaves if there is insufficient memory to create it.
IMPORT_C void PopAndDestroy()
Pops a single cleanup item from the cleanup stack, and invokes its cleanup operation.
TCleanupStackItem * iBase
Pointer to the bottom of the cleanup stack.
Definition e32base.h:1435
IMPORT_C void DoPopAll(TBool aDestroy)
Provides an implementation for PopAll() and PopAndDestroyAll().
TCleanupStackItem * iNext
Pointer to the next availaible slot in the cleanup stack.
Definition e32base.h:1447
TCleanupStackItem * iTop
Pointer to the top of the cleanup stack.
Definition e32base.h:1441
IMPORT_C ~CCleanup()
Destructor.
IMPORT_C void PopAll()
Pops all cleanup items at the current level, and then decrements the level.
IMPORT_C void PreviousLevel()
Goes to the previous cleanup level.
A queue of timed events.
Definition e32base.h:1953
IMPORT_C TInt QueueLong(TTimeIntervalMicroSeconds aTimeInMicroSeconds, TDeltaTimerEntry &aEntry)
Adds a new timed event entry into the timed event queue.
virtual IMPORT_C void Remove(TDeltaTimerEntry &aEntry)
Removes the specified timed event entry from the timer queue.
virtual IMPORT_C void Queue(TTimeIntervalMicroSeconds32 aTimeInMicroSeconds, TDeltaTimerEntry &aEntry)
Adds a new timed event entry into the timed event queue.
static IMPORT_C CDeltaTimer * NewL(TInt aPriority)
Creates a new timed event queue with the specified active object priority.
~CDeltaTimer()
Destructor.
Heatbeat timer.
Definition e32base.h:2199
IMPORT_C void Start(TTimerLockSpec aLock, MBeating *aBeating)
Starts generating heartbeat events.
IMPORT_C void RunL()
Handles an active object's request completion event.
IMPORT_C ~CHeartbeat()
Destructor.
static IMPORT_C CHeartbeat * New(TInt aPriority)
Allocates and constructs a CHeartbeat object - non-leaving.
static IMPORT_C CHeartbeat * NewL(TInt aPriority)
Allocates and constructs a CHeartbeat object - leaving.
An active object that performs low-priority processing when no higher-priority active objects are rea...
Definition e32base.h:1781
IMPORT_C ~CIdle()
Frees resources prior to destruction.
static IMPORT_C CIdle * New(TInt aPriority)
Allocates and initialises an Idle time active object and adds it to the active scheduler.
IMPORT_C void RunL()
Handles an active object's request completion event.
IMPORT_C void DoCancel()
Implements cancellation of an outstanding request.
static IMPORT_C CIdle * NewL(TInt aPriority)
Allocates and initialises an Idle time active object, adds it to the active scheduler,...
TCallBack iCallBack
The callback object that encapsulates the background task.
Definition e32base.h:1798
IMPORT_C void Start(TCallBack aCallBack)
Starts the background task.
A container for object containers.
Definition e32base.h:1317
static IMPORT_C CObjectConIx * NewL()
Creates a new container index.
IMPORT_C CObjectCon * Lookup(TInt aFindHandle) const
Gets a pointer to the object container with the unique ID from the specified find handle.
IMPORT_C CObjectCon * CreateL()
Creates a new object container and adds it into this container index's collection.
IMPORT_C CObjectConIx()
Default constructor.
IMPORT_C ~CObjectConIx()
Destructor.
IMPORT_C void CreateContainerL(CObjectCon *&anObject)
Actually create the container.
IMPORT_C void Remove(CObjectCon *aCon)
Removes the specified object container from this container index and deletes it.
An object container.
Definition e32base.h:1264
TInt iUniqueID
The object container's unique Id value.
Definition e32base.h:1287
IMPORT_C CObject * operator[](TInt anIndex)
Gets a pointer to the reference counting object located at the specified offset within the object con...
IMPORT_C TInt FindByFullName(TInt &aFindHandle, const TDesC &aMatch, TFullName &aFullName) const
Searches for the reference counting object whose full name matches the specified match pattern.
TInt UniqueID() const
Gets this object container's unique ID.
IMPORT_C TInt CheckUniqueFullName(const CObject *anOwner, const TDesC &aName) const
Checks that a name will be unique.
IMPORT_C void AddL(CObject *anObj)
Adds a reference counting object to this object container.
IMPORT_C CObject * AtL(TInt aFindHandle) const
Gets a pointer to the reference counting object with the specified find-handle number,...
static IMPORT_C CObjectCon * NewL()
Creates an object container.
IMPORT_C void Remove(CObject *anObj)
Removes a reference counting object from this object container.
IMPORT_C TInt FindByName(TInt &aFindHandle, const TDesC &aMatch, TName &aName) const
Searches for the reference counting object whose name matches the specified match pattern.
TBool NamesMatch(const CObject *anObject, const CObject *aCurrentObject) const
protected recursive function for use by CheckUniqueFullName
TInt Count() const
Gets the number of reference counting objects in this object container.
IMPORT_C CObject * At(TInt aFindHandle) const
Gets a pointer to the reference counting object with the specified find-handle number.
IMPORT_C ~CObjectCon()
Destructor.
Generates handle numbers for reference counting objects.
Definition e32base.h:1183
IMPORT_C CObject * AtL(TInt aHandle, TInt aUniqueID)
Gets a pointer to the reference counting object with the specified handle number and matching unique ...
static IMPORT_C CObjectIx * NewL()
Creates a new object index.
IMPORT_C void Remove(TInt aHandle)
Removes the reference counting object identified by handle number from this object index and closes i...
IMPORT_C CObject * operator[](TInt anIndex)
Gets a pointer to a reference counting object located at the specified offset within the object index...
IMPORT_C CObject * At(TInt aHandle, TInt aUniqueID)
Gets a pointer to the reference counting object with the specified handle number and matching unique ...
IMPORT_C TInt AddL(CObject *anObj)
Adds the specified reference counting object into this object index and returns the handle number tha...
@ ENoClose
When ORd into the handle number, indicates that the reference counting object cannot be closed.
Definition e32base.h:1190
@ ELocalHandle
When ORed into the handle number, indicates that the handle is a local handle.
Definition e32base.h:1197
TInt Count() const
Gets the number greater then the last slot number used to hold valid CObject pointer.
TInt ActiveCount() const
Gets the current number of reference counting objects held by this object index.
IMPORT_C CObjectIx()
Default constructor.
IMPORT_C ~CObjectIx()
Destructor.
Implements reference counting to track concurrent references to itself.
Definition e32base.h:1131
void SetOwner(CObject *anOwner)
Sets the owner of this reference counting object.
virtual IMPORT_C TName Name() const
Gets the name of this reference counting object.
IMPORT_C void SetNameL(const TDesC *aName)
Sets or clears this reference counting object's name, and leaves on error.
virtual IMPORT_C TInt Extension_(TUint aExtensionId, TAny *&a0, TAny *a1)
Extension function.
IMPORT_C TInt SetName(const TDesC *aName)
Sets or clears this reference counting object's name.
TInt AccessCount() const
Gets the number of open references to this reference counting object.
IMPORT_C CObject()
Constructs the object and initializes the reference count to one.
void Inc()
Adds one to the reference count.
virtual IMPORT_C void Close()
Closes this reference counting object.
void Dec()
Subtracts one from the reference count.
virtual IMPORT_C TFullName FullName() const
Gets the full name of this reference counting object.
IMPORT_C ~CObject()
Destructor.
TInt UniqueID() const
Gets this reference counting object's unique ID.
virtual IMPORT_C TInt Open()
Opens this reference counting object.
CObject * Owner() const
Gets a pointer to the reference counting object which owns this reference counting object.
Periodic timer active object.
Definition e32base.h:2099
IMPORT_C void Start(TTimeIntervalMicroSeconds32 aDelay, TTimeIntervalMicroSeconds32 anInterval, TCallBack aCallBack)
Starts generating periodic events.
IMPORT_C void RunL()
Handles an active object's request completion event.
static IMPORT_C CPeriodic * New(TInt aPriority)
Allocates and constructs a CPeriodic object - non-leaving.
static IMPORT_C CPeriodic * NewL(TInt aPriority)
Allocates and constructs a CPeriodic object - leaving.
IMPORT_C ~CPeriodic()
Destructor.
Class specifying a security check and the action to take.
Definition e32base.h:2519
TStaticSecurityPolicy iPolicy
Security policy to check against the client which sent a message.
Definition e32base.h:2551
TInt iAction
Action to take on failure.
Definition e32base.h:2557
Object specifying which security checks to perform on each request number and what action to take if ...
Definition e32base.h:2624
const TUint8 * iElementsIndex
A pointer to an array of TUint8 values specifying the appropriate action to take for each range in iR...
Definition e32base.h:2687
TUint16 iRangeCount
Number of ranges in the iRanges array.
Definition e32base.h:2631
const TInt * iRanges
A pointer to an array of ordered ranges of request numbers.
Definition e32base.h:2653
TUint8 iOnConnect
The index into iElements, or an allowed value of TSpecialCase, that is used to check a connection att...
Definition e32base.h:2628
const TPolicyElement * iElements
A pointer to an array of distinct policy elements.
Definition e32base.h:2713
A security policy framework built on top of the normal CServer2 class.
Definition e32base.h:2482
virtual IMPORT_C TInt Extension_(TUint aExtensionId, TAny *&a0, TAny *a1)
Extension function.
virtual IMPORT_C TCustomResult CustomFailureActionL(const RMessage2 &aMsg, TInt aAction, const TSecurityInfo &aMissing)
Performs a custom action after the failure of a security check.
IMPORT_C void ProcessError(const RMessage2 &aMsg, TInt aError)
Called if a leave occurs during processing of a message.
TCustomResult
Enumeration of acceptable return codes from both of CustomSecurityCheckL() and CustomFailureActionL()...
Definition e32base.h:2505
@ EAsync
Security checking will be performed asynchronously.
Definition e32base.h:2508
@ EFail
Security check failed.
Definition e32base.h:2507
@ EPass
Security check passed.
Definition e32base.h:2506
TSpecialCase
Special case values which can be used instead of a policy element index contained in the array TPolic...
Definition e32base.h:2564
@ ENotSupported
Indicates that message is requesting an unsupported function.
Definition e32base.h:2570
@ ESpecialCaseLimit
Internal technology API.
Definition e32base.h:2576
@ ECustomCheck
Indicates a custom check should be made by calling CustomSecurityCheckL()
Definition e32base.h:2566
@ EAlwaysPass
Indicates that the message is requesting an unrestricted function and therefore should be processed w...
Definition e32base.h:2574
@ ESpecialCaseHardLimit
Internal technology API.
Definition e32base.h:2577
TFailureAction
Enumeration specifying action to take if a security check fails.
Definition e32base.h:2491
@ EPanicClient
Panic client.
Definition e32base.h:2493
@ EFailClient
Complete message with KErrPermissionDenied.
Definition e32base.h:2492
IMPORT_C void CheckFailedL(const RMessage2 &aMsg, TInt aAction, const TSecurityInfo &aMissing)
Called when a security check has failed.
virtual IMPORT_C TCustomResult CustomSecurityCheckL(const RMessage2 &aMsg, TInt &aAction, TSecurityInfo &aMissing)
Performs a custom security check.
IMPORT_C void ProcessL(const RMessage2 &aMsg)
Process an accepted message which has passed its policy check.
Abstract base class for servers (version 2).
Definition e32base.h:2301
IMPORT_C void SetMaster(const CServer2 *aServer)
Assigns a role (master or slave) for this server.
RServer2 Server() const
Gets a handle to the server.
Definition e32base.h:2332
IMPORT_C TInt Start(const TDesC &aName)
Adds the server with the specified name to the active scheduler, and issues the first request for mes...
IMPORT_C void SetPinClientDescriptors(TBool aPin)
Sets whether the kernel will pin descriptors passed to this server in the context of the client threa...
IMPORT_C TInt RunError(TInt aError)
Handles the situation where a call to CServer2::RunL(), leaves.
const RMessage2 & Message() const
Gets a reference to the server's current message.
TDblQueIter< CSession2 > iSessionIter
Definition e32base.h:2395
IMPORT_C void ReStart()
Restarts the server.
friend class CPolicyServer
Definition e32base.h:2400
@ EClientDoesntHaveRequiredCaps
Definition e32base.h:2382
@ ESessionNotConnected
Definition e32base.h:2380
@ ESessionAlreadyConnected
Definition e32base.h:2381
@ EBadMessageNumber
Definition e32base.h:2379
virtual IMPORT_C ~CServer2()=0
Frees resources prior to destruction.
IMPORT_C void RunL()
Handles an active object's request completion event.
virtual IMPORT_C void DoConnect(const RMessage2 &aMessage)
Handles the connect request from the client.
virtual IMPORT_C TInt Extension_(TUint aExtensionId, TAny *&a0, TAny *a1)
Extension function.
IMPORT_C void StartL(const TDesC &aName)
Adds the server with the specified name to the active scheduler, and issues the first request for mes...
TServerType
This enumeration defines the maximum sharability of sessions opened with this server; for backwards c...
Definition e32base.h:2310
@ ESharableSessions
Definition e32base.h:2312
@ EGlobalSharableSessions
Definition e32base.h:2313
@ EUnsharableSessions
Definition e32base.h:2311
IMPORT_C void DoCancel()
Implements cancellation of an outstanding request.
Represents a session (version 2) for a client thread on the server-side.
Definition e32base.h:2241
virtual IMPORT_C ~CSession2()=0
Destructor.
virtual IMPORT_C void ServiceError(const RMessage2 &aMessage, TInt aError)
Handles the situation when a call to CSession2::ServiceL(), which services a client request,...
IMPORT_C void ResourceCountMarkStart()
Marks the start of resource count checking.
virtual IMPORT_C TInt Extension_(TUint aExtensionId, TAny *&a0, TAny *a1)
Extension function.
IMPORT_C void ResourceCountMarkEnd(const RMessage2 &aMessage)
Marks the end of resource count checking.
virtual IMPORT_C TInt CountResources()
Gets the number of resources currently in use.
const CServer2 * Server() const
Gets the server active object that handles messages for this session.
@ ESesFoundResCountHeaven
Definition e32base.h:2275
@ ESesCountResourcesNotImplemented
Definition e32base.h:2275
virtual void ServiceL(const RMessage2 &aMessage)=0
Handles the servicing of a client request that has been passed to the server.
virtual IMPORT_C void Disconnect(const RMessage2 &aMessage)
Called by a server when it receives a disconnect message for the session.
IMPORT_C void SetServer(const CServer2 *aServer)
Designates the (master or slave) server that is to service this session.
IMPORT_C CSession2()
Default constructor.
Base class for a timer active object.
Definition e32base.h:2036
IMPORT_C void DoCancel()
Implements cancellation of an outstanding request.
IMPORT_C void After(TTimeIntervalMicroSeconds32 anInterval)
Requests an event after an interval.
IMPORT_C void HighRes(TTimeIntervalMicroSeconds32 aInterval)
Requests an event after the specified interval to a resolution of 1ms.
IMPORT_C void Inactivity(TTimeIntervalSeconds aSeconds)
Requests an event if no activity occurs within the specified interval.
IMPORT_C void AtUTC(const TTime &aTimeInUTC)
Requests an event at a given UTC time.
IMPORT_C void At(const TTime &aTime)
Requests an event at a given local time.
IMPORT_C ~CTimer()
Destructor.
IMPORT_C void Lock(TTimerLockSpec aLock)
Requests an event on a specified second fraction.
IMPORT_C void ConstructL()
Constructs a new asynchronous timer.
Cleanup stack interface.
Definition e32base.h:1523
static IMPORT_C CTrapCleanup * New()
Allocates and constructs a cleanup stack.
IMPORT_C CTrapCleanup()
Default constructor.
IMPORT_C ~CTrapCleanup()
Destructor.
A utility class used by the templated function CleanupArrayDeletePushL() to create a TCleanupItem ite...
Definition e32base.h:3112
static void PushL(T *aPtr)
Creates a TCleanupItem for the specified array.
A utility class used by the templated function CleanupClosePushL() to create a TCleanupItem item that...
Definition e32base.h:3182
static void PushL(T &aRef)
Creates a TCleanupItem for the specified object.
A utility class used by the templated function CleanupDeletePushL() to create a TCleanupItem item tha...
Definition e32base.h:3046
static void PushL(T *aPtr)
Creates a TCleanupItem for the specified object.
A utility class used by the templated function CleanupReleasePushL() to create a TCleanupItem item th...
Definition e32base.h:3263
static void PushL(T &aRef)
Creates a TCleanupItem for the specified object.
A collection of static functions that are used to add resources to and remove resources from the clea...
Definition e32base.h:3013
static IMPORT_C void PushL(TAny *aPtr)
Pushes a pointer to an object onto the cleanup stack.
static IMPORT_C void Pop()
Pops an object previously pushed onto the cleanup stack by CleanupStack::PushL().
static IMPORT_C void PopAndDestroy()
Pops and cleans up an item pushed onto the stack.
static IMPORT_C void Check(TAny *aExpectedItem)
Checks that the specified object is at the top of the cleanup stack.
static IMPORT_C CConsoleBase * NewL(const TDesC &aTitle, TSize aSize)
Creates a new console object.
Heartbeat timer call-back handling interface.
Definition e32base.h:2133
virtual void Beat()=0
Handles a regular heartbeat timer event.
virtual void Synchronize()=0
Synchronises the heartbeat timer with system clock.
An object that encapsulates the details of a client request.
Definition e32cmn.h:3465
A handle to a thread.
Definition e32std.h:4091
Asynchronous timer services.
Definition e32std.h:3307
Generic array.
Definition e32cmn.h:5358
Automatically calls Close() on an object when that object goes out of scope.
Definition e32base.h:1494
void Pop()
Pops a single cleanup item from the cleanup stack.
T iObj
An instance of the template class.
Definition e32base.h:1505
~TAutoClose()
Destructor.
void PushL()
Pushes a cleanup item onto the cleanup stack, so that Close() is called on the templated class object...
Encapsulates a general call-back function.
Definition e32std.h:70
Encapsulates a cleanup operation and an object on which the operation is to be performed.
Definition e32base.h:1385
friend class TCleanupStackItem
Definition e32base.h:1391
A templated class that provides the behaviour for iterating through a set of doubly linked list eleme...
Definition e32std.h:689
A templated class that provides the behaviour for managing a doubly linked list.
Definition e32std.h:447
A timed event entry.
Definition e32base.h:1896
TDeltaTimerEntry()
Default constructor.
void Set(TCallBack &aCallback)
Sets the specified callback.
Defines the characteristics of a key used to access the elements of arrays of fixed length objects.
Definition e32base.h:317
CBufBase * iBase
Definition e32base.h:327
TInt iRecordLength
Definition e32base.h:326
virtual IMPORT_C void Set(CBufBase *aBase, TInt aRecordLength)
IMPORT_C TAny * At(TInt anIndex) const
Gets a pointer to the key of a specified array element.
Defines the characteristics of a key used to access the elements of packed arrays.
Definition e32base.h:956
virtual IMPORT_C void Set(CBufBase *aBase)
IMPORT_C TAny * At(TInt anIndex) const
Gets a pointer to the key of a specified array element.
Defines the characteristics of a key used to access the elements of arrays of variable length objects...
Definition e32base.h:743
virtual IMPORT_C void Set(CBufBase *aBase)
IMPORT_C TAny * At(TInt anIndex) const
Gets a pointer to the key of a specified array element.
CBufBase * iBase
Definition e32base.h:752
Defines the characteristics of a key used to access the elements of an array.
Definition e32std.h:915
A templated class that provides the behaviour for managing a doubly linked list in which the elements...
Definition e32std.h:483
Indicates the completion status of a request made to a service provider.
Definition e32cmn.h:2243
Class representing all security attributes of a process or DLL.
Definition e32cmn.h:3737
Stores a two-dimensional size as a width and a height value.
Definition e32cmn.h:2442
A class that provides the behaviour for managing a doubly linked list in which elements are added in ...
Definition e32std.h:565
Represents a microsecond time interval stored in 32 rather than 64 bits.
Definition e32std.h:1678
Represents a time interval of a millionth of a second stored as a 64-bit integer.
Definition e32std.h:1607
Represents a time interval in seconds.
Definition e32std.h:1703
Stores and manipulates the date and time.
Definition e32std.h:1889
Abstract class that defines a handler to work with the TRAP mechanism.
Definition e32std.h:4912
A globally unique 32-bit number.
Definition e32cmn.h:1959
Contains version information.
Definition e32cmn.h:2200
void CleanupArrayDeletePushL(T *aPtr)
Constructs and pushes a TCleanupItem object onto the cleanup stack.
NONSHARABLE_CLASS(TCleanupTrapHandler)
Implementation for a handler to work with the TRAP mechanism.
Definition e32base.h:1453
void CleanupReleasePushL(T &aRef)
Constructs and pushes a TCleanupItem object onto the cleanup stack.
TBool IsLocalHandle(TInt aHandle)
Definition e32base.h:1229
void CleanupDeletePushL(T *aPtr)
Constructs and pushes a TCleanupItem object onto the cleanup stack.
void SetLocalHandle(TInt &aHandle)
Definition e32base.h:1231
void CleanupClosePushL(T &aRef)
Constructs and pushes a TCleanupItem object onto the cleanup stack.
void(* TCleanupOperation)(TAny *)
Defines a function which takes a single argument of type TAny* and returns void.
Definition e32base.h:1367
void UnSetLocalHandle(TInt &aHandle)
Definition e32base.h:1233
CBufBase *(* TBufRep)(TInt anExpandSize)
Definition e32base.h:334
HBufC8 HBufC
Defines a build-independent heap descriptor.
Definition e32cmn.h:1431
TDesC8 TDesC
Defines a build-independent non-modifiable descriptor.
Definition e32cmn.h:1345
TKeyCmpText
Governs the type of comparison to be made between descriptor keys or between text keys.
Definition e32std.h:715
TKeyCmpNumeric
Governs the type of comparison to be made between numeric keys.
Definition e32std.h:834
Structure for compile-time initialisation of a security policy.
Definition e32cmn.h:4021