23 #include <memspy/engine/memspyengineobjectthread.h> |
23 #include <memspy/engine/memspyengineobjectthread.h> |
24 #include <memspy/engine/memspyengineobjectcontainer.h> |
24 #include <memspy/engine/memspyengineobjectcontainer.h> |
25 #include <memspy/engine/memspyengineobjectthreadinfoobjects.h> |
25 #include <memspy/engine/memspyengineobjectthreadinfoobjects.h> |
26 #include <memspy/engine/memspyengineobjectthreadinfocontainer.h> |
26 #include <memspy/engine/memspyengineobjectthreadinfocontainer.h> |
27 #include <memspy/engine/memspyenginehelperactiveobject.h> |
27 #include <memspy/engine/memspyenginehelperactiveobject.h> |
|
28 #include <memspysession.h> |
28 |
29 |
29 // User includes |
30 // User includes |
30 #include "MemSpyContainerObserver.h" |
31 #include "MemSpyContainerObserver.h" |
31 |
32 |
32 |
33 |
33 |
34 CMemSpyViewThreadInfoItemActiveObjectBase::CMemSpyViewThreadInfoItemActiveObjectBase(RMemSpySession& aSession, MMemSpyViewObserver& aObserver, TProcessId aProcId, TThreadId aId, TMemSpyThreadInfoItemType aType ) |
34 CMemSpyViewThreadInfoItemActiveObjectBase::CMemSpyViewThreadInfoItemActiveObjectBase( CMemSpyEngine& aEngine, MMemSpyViewObserver& aObserver, CMemSpyThreadInfoContainer& aContainer ) |
35 : CMemSpyViewThreadInfoItemGeneric( aSession, aObserver, aProcId, aId, EMemSpyThreadInfoItemTypeActiveObject ) |
35 : CMemSpyViewThreadInfoItemGeneric( aEngine, aObserver, aContainer, EMemSpyThreadInfoItemTypeActiveObject ) |
|
36 { |
36 { |
37 } |
37 } |
38 |
38 |
39 |
39 |
40 TBool CMemSpyViewThreadInfoItemActiveObjectBase::HandleCommandL( TInt aCommand ) |
40 TBool CMemSpyViewThreadInfoItemActiveObjectBase::HandleCommandL( TInt aCommand ) |
41 { |
41 { |
42 TBool handled = ETrue; |
42 TBool handled = ETrue; |
|
43 /* |
43 // |
44 // |
44 switch ( aCommand ) |
45 switch ( aCommand ) |
45 { |
46 { |
46 case EMemSpyCmdActiveObjectListing: |
47 case EMemSpyCmdActiveObjectListing: |
47 OnCmdWriteAOListingL(); |
48 OnCmdWriteAOListingL(); |
49 default: |
50 default: |
50 handled = CMemSpyViewBase::HandleCommandL( aCommand ); |
51 handled = CMemSpyViewBase::HandleCommandL( aCommand ); |
51 break; |
52 break; |
52 } |
53 } |
53 // |
54 // |
|
55 * */ |
54 return handled; |
56 return handled; |
55 } |
57 } |
56 |
58 |
57 |
59 |
58 void CMemSpyViewThreadInfoItemActiveObjectBase::DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ) |
60 void CMemSpyViewThreadInfoItemActiveObjectBase::DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ) |
59 { |
61 { |
60 if ( aResourceId == R_MEMSPY_MENUPANE ) |
62 if ( aResourceId == R_MEMSPY_MENUPANE ) |
61 { |
63 { |
62 aMenuPane->SetItemDimmed( EMemSpyCmdActiveObject, Thread().IsDead() ); |
64 // aMenuPane->SetItemDimmed( EMemSpyCmdActiveObject, Thread().IsDead() ); |
63 } |
65 } |
64 } |
66 } |
65 |
67 |
66 |
68 |
67 CMemSpyEngineActiveObjectArray& CMemSpyViewThreadInfoItemActiveObjectBase::ActiveObjectArray() const |
69 CMemSpyEngineActiveObjectArray& CMemSpyViewThreadInfoItemActiveObjectBase::ActiveObjectArray() const |
68 { |
70 { |
69 CMemSpyThreadInfoActiveObjects* activeObjectArray = static_cast< CMemSpyThreadInfoActiveObjects* >( iInfoItem ); |
71 // CMemSpyThreadInfoActiveObjects* activeObjectArray = static_cast< CMemSpyThreadInfoActiveObjects* >( iInfoItem ); |
70 return activeObjectArray->Array(); |
72 // return activeObjectArray->Array(); |
71 } |
73 } |
72 |
74 |
73 |
75 |
74 void CMemSpyViewThreadInfoItemActiveObjectBase::OnCmdWriteAOListingL() |
76 void CMemSpyViewThreadInfoItemActiveObjectBase::OnCmdWriteAOListingL() |
75 { |
77 { |
|
78 iMemSpySession.OutputAOListL( ThreadId(), EMemSpyThreadInfoItemTypeActiveObject ); |
|
79 |
|
80 /* |
76 CMemSpyEngineActiveObjectArray& objects = ActiveObjectArray(); |
81 CMemSpyEngineActiveObjectArray& objects = ActiveObjectArray(); |
77 |
82 |
78 // Begin a new data stream |
83 // Begin a new data stream |
79 _LIT( KMemSpyContext, "Active Object List - " ); |
84 _LIT( KMemSpyContext, "Active Object List - " ); |
80 _LIT( KMemSpyFolder, "Active Objects" ); |
85 _LIT( KMemSpyFolder, "Active Objects" ); |
98 // Tidy up |
103 // Tidy up |
99 CleanupStack::PopAndDestroy(); // prefix |
104 CleanupStack::PopAndDestroy(); // prefix |
100 |
105 |
101 // End data stream |
106 // End data stream |
102 iEngine.Sink().DataStreamEndL(); |
107 iEngine.Sink().DataStreamEndL(); |
103 } |
108 */ |
104 |
109 } |
105 |
110 |
106 |
111 |
107 |
112 |
108 |
113 |
109 |
114 |
110 |
115 |
111 |
116 |
112 |
117 |
113 |
118 |
114 |
119 |
115 CMemSpyViewThreadInfoItemActiveObject::CMemSpyViewThreadInfoItemActiveObject( RMemSpySession& aSession, MMemSpyViewObserver& aObserver, TThreadId aId, TMemSpyThreadInfoItemType aType ) |
120 |
116 : CMemSpyViewThreadInfoItemActiveObjectBase( aSession, aObserver, aId, aType ) |
121 CMemSpyViewThreadInfoItemActiveObject::CMemSpyViewThreadInfoItemActiveObject( RMemSpySession& aSession, MMemSpyViewObserver& aObserver, TProcessId aProcId, TThreadId aId, TMemSpyThreadInfoItemType aType ) |
|
122 : CMemSpyViewThreadInfoItemActiveObjectBase( aSession, aObserver, aProcId, aId, aType ) |
117 { |
123 { |
118 } |
124 } |
119 |
125 |
120 |
126 |
121 void CMemSpyViewThreadInfoItemActiveObject::ConstructL( const TRect& aRect, CCoeControl& aContainer, TAny* aSelectionRune ) |
127 void CMemSpyViewThreadInfoItemActiveObject::ConstructL( const TRect& aRect, CCoeControl& aContainer, TAny* aSelectionRune ) |
125 |
131 |
126 _LIT( KTitle, "Active Objects" ); |
132 _LIT( KTitle, "Active Objects" ); |
127 SetTitleL( KTitle ); |
133 SetTitleL( KTitle ); |
128 |
134 |
129 // Try to select the correct server |
135 // Try to select the correct server |
|
136 /* TODO: to consider this |
130 CMemSpyThreadInfoHandleObjectBase* infoItem = static_cast< CMemSpyThreadInfoHandleObjectBase* >( iInfoItem ); |
137 CMemSpyThreadInfoHandleObjectBase* infoItem = static_cast< CMemSpyThreadInfoHandleObjectBase* >( iInfoItem ); |
131 TInt selectedIndex = 0; |
138 TInt selectedIndex = 0; |
132 if ( aSelectionRune ) |
139 if ( aSelectionRune ) |
133 { |
140 { |
134 CMemSpyEngineActiveObjectArray& activeObjectArray = ActiveObjectArray(); |
141 CMemSpyEngineActiveObjectArray& activeObjectArray = ActiveObjectArray(); |
187 |
199 |
188 |
200 |
189 |
201 |
190 |
202 |
191 |
203 |
192 |
204 /* |
193 CMemSpyViewThreadInfoItemActiveObjectDetails::CMemSpyViewThreadInfoItemActiveObjectDetails( CMemSpyEngine& aEngine, MMemSpyViewObserver& aObserver, CMemSpyThreadInfoContainer& aContainer, TAny* aObjectAddress ) |
205 CMemSpyViewThreadInfoItemActiveObjectDetails::CMemSpyViewThreadInfoItemActiveObjectDetails( CMemSpyEngine& aEngine, MMemSpyViewObserver& aObserver, CMemSpyThreadInfoContainer& aContainer, TAny* aObjectAddress ) |
194 : CMemSpyViewThreadInfoItemActiveObjectBase( aEngine, aObserver, aContainer ), iObjectAddress( aObjectAddress ) |
206 : CMemSpyViewThreadInfoItemActiveObjectBase( aEngine, aObserver, aContainer ), iObjectAddress( aObjectAddress ) |
195 { |
207 { |
196 } |
208 } |
197 |
209 |