|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef MEMSPYENGINEHELPERKERNELCONTAINERS_H |
|
19 #define MEMSPYENGINEHELPERKERNELCONTAINERS_H |
|
20 |
|
21 // System includes |
|
22 #include <e32base.h> |
|
23 #include <u32std.h> |
|
24 #include <badesca.h> |
|
25 |
|
26 // Driver includes |
|
27 #include <memspy/driver/memspydriverobjectsshared.h> |
|
28 |
|
29 // User includes |
|
30 #include <memspy/engine/memspyengineobject.h> |
|
31 |
|
32 // Classes referenced |
|
33 class CMemSpyEngine; |
|
34 class CMemSpyEngineOutputSink; |
|
35 class CMemSpyEngineGenericKernelObjectList; |
|
36 class CMemSpyEngineGenericKernelObjectContainer; |
|
37 |
|
38 |
|
39 |
|
40 NONSHARABLE_CLASS( CMemSpyEngineHelperKernelContainers ) : public CBase |
|
41 { |
|
42 public: |
|
43 static CMemSpyEngineHelperKernelContainers* NewL( CMemSpyEngine& aEngine ); |
|
44 ~CMemSpyEngineHelperKernelContainers(); |
|
45 |
|
46 private: |
|
47 CMemSpyEngineHelperKernelContainers( CMemSpyEngine& aEngine ); |
|
48 void ConstructL(); |
|
49 |
|
50 public: // API |
|
51 IMPORT_C CMemSpyEngineGenericKernelObjectList* ObjectsForSpecificContainerL( TMemSpyDriverContainerType aForContainer ); |
|
52 IMPORT_C CMemSpyEngineGenericKernelObjectContainer* ObjectsAllL(); |
|
53 IMPORT_C void OutputL( const CMemSpyEngineGenericKernelObjectContainer& aContainer ) const; |
|
54 |
|
55 public: // But not exported |
|
56 CMemSpyEngine& Engine() const; |
|
57 CMemSpyEngineGenericKernelObjectContainer* ObjectsAllLightweightL(); |
|
58 static TMemSpyDriverContainerType MapToType( TObjectType aType ); |
|
59 |
|
60 private: // Internal methods |
|
61 void AddObjectsFromContainerL( CMemSpyEngineGenericKernelObjectList& aList, TMemSpyDriverContainerType aContainer, TBool aGetInfo = ETrue ); |
|
62 |
|
63 private: |
|
64 CMemSpyEngine& iEngine; |
|
65 }; |
|
66 |
|
67 |
|
68 |
|
69 |
|
70 |
|
71 |
|
72 |
|
73 NONSHARABLE_CLASS( CMemSpyEngineGenericKernelObjectList ) : public CBase |
|
74 { |
|
75 public: |
|
76 static CMemSpyEngineGenericKernelObjectList* NewLC( TMemSpyDriverContainerType aType, CMemSpyEngine& aEngine ); |
|
77 IMPORT_C ~CMemSpyEngineGenericKernelObjectList(); |
|
78 |
|
79 private: |
|
80 CMemSpyEngineGenericKernelObjectList( TMemSpyDriverContainerType aType ); |
|
81 void ConstructL( CMemSpyEngine& aEngine ); |
|
82 |
|
83 public: // API |
|
84 IMPORT_C TInt Count() const; |
|
85 IMPORT_C const TMemSpyDriverHandleInfoGeneric& At( TInt aIndex ) const; |
|
86 IMPORT_C TMemSpyDriverContainerType Type() const; |
|
87 IMPORT_C static TPtrC TypeAsString( TMemSpyDriverContainerType aType ); |
|
88 IMPORT_C TPtrC Name() const; |
|
89 IMPORT_C void OutputL( CMemSpyEngineOutputSink& aSink ) const; |
|
90 |
|
91 public: // But not exported |
|
92 TAny* HandleAt( TInt aIndex ) const; |
|
93 void AddItemL( TAny* aHandle ); |
|
94 void AddItemL( const TMemSpyDriverHandleInfoGeneric& aItem ); |
|
95 |
|
96 private: // Internal methods |
|
97 void UpdateNameL(); |
|
98 |
|
99 private: // Data members |
|
100 TMemSpyDriverContainerType iType; |
|
101 RArray<TMemSpyDriverHandleInfoGeneric> iItems; |
|
102 RPointerArray<TAny> iHandles; |
|
103 HBufC* iName; |
|
104 TInt iSize; |
|
105 }; |
|
106 |
|
107 |
|
108 |
|
109 |
|
110 |
|
111 |
|
112 NONSHARABLE_CLASS( CMemSpyEngineGenericKernelObjectContainer ) : public CBase, public MDesCArray |
|
113 { |
|
114 public: |
|
115 static CMemSpyEngineGenericKernelObjectContainer* NewLC(); |
|
116 IMPORT_C ~CMemSpyEngineGenericKernelObjectContainer(); |
|
117 |
|
118 private: |
|
119 CMemSpyEngineGenericKernelObjectContainer(); |
|
120 void ConstructL(); |
|
121 |
|
122 public: // API |
|
123 IMPORT_C TInt Count() const; |
|
124 IMPORT_C const CMemSpyEngineGenericKernelObjectList& At( TInt aIndex ) const; |
|
125 IMPORT_C void OutputL( CMemSpyEngineOutputSink& aSink ) const; |
|
126 |
|
127 public: // But not exported |
|
128 void AddListL( CMemSpyEngineGenericKernelObjectList* aList ); |
|
129 |
|
130 public: // From MDesCArray |
|
131 IMPORT_C TInt MdcaCount() const; |
|
132 IMPORT_C TPtrC MdcaPoint( TInt aIndex ) const; |
|
133 |
|
134 private: // Data members |
|
135 RPointerArray<CMemSpyEngineGenericKernelObjectList> iItems; |
|
136 }; |
|
137 |
|
138 |
|
139 |
|
140 #endif |