34 // Constants |
34 // Constants |
35 const TInt KMemSpyServerSessionsIndex = 2; |
35 const TInt KMemSpyServerSessionsIndex = 2; |
36 |
36 |
37 |
37 |
38 |
38 |
39 CMemSpyViewThreadInfoItemServer::CMemSpyViewThreadInfoItemServer( CMemSpyEngine& aEngine, MMemSpyViewObserver& aObserver, CMemSpyThreadInfoContainer& aContainer ) |
39 CMemSpyViewThreadInfoItemServer::CMemSpyViewThreadInfoItemServer( RMemSpySession& aSession, MMemSpyViewObserver& aObserver, TProcessId aProcId, TThreadId aId, TMemSpyThreadInfoItemType aType ) |
40 : CMemSpyViewThreadInfoItemGeneric( aEngine, aObserver, aContainer, EMemSpyThreadInfoItemTypeServer ) |
40 : CMemSpyViewThreadInfoItemGeneric( aSession, aObserver, aProcId, aId, EMemSpyThreadInfoItemTypeServer ) |
41 { |
41 { |
42 } |
42 } |
43 |
43 |
44 |
44 |
45 void CMemSpyViewThreadInfoItemServer::ConstructL( const TRect& aRect, CCoeControl& aContainer, TAny* aSelectionRune ) |
45 void CMemSpyViewThreadInfoItemServer::ConstructL( const TRect& aRect, CCoeControl& aContainer, TAny* aSelectionRune ) |
51 SetTitleL( KTitle ); |
51 SetTitleL( KTitle ); |
52 |
52 |
53 #ifdef _DEBUG |
53 #ifdef _DEBUG |
54 RDebug::Printf( "CMemSpyViewThreadInfoItemServer::ConstructL() - aSelectionRune: 0x%08x", aSelectionRune ); |
54 RDebug::Printf( "CMemSpyViewThreadInfoItemServer::ConstructL() - aSelectionRune: 0x%08x", aSelectionRune ); |
55 #endif |
55 #endif |
56 |
56 /* TODO |
57 // Try to select the correct server |
57 // Try to select the correct server |
58 CMemSpyThreadInfoHandleObjectBase* infoItem = static_cast< CMemSpyThreadInfoHandleObjectBase* >( iInfoItem ); |
58 CMemSpyThreadInfoHandleObjectBase* infoItem = static_cast< CMemSpyThreadInfoHandleObjectBase* >( iInfoItem ); |
|
59 */ |
59 TInt selectedIndex = 0; |
60 TInt selectedIndex = 0; |
60 if ( aSelectionRune ) |
61 /*if ( aSelectionRune ) |
61 { |
62 { |
62 // Treat the rune as a handle, and try to look it up |
63 // Treat the rune as a handle, and try to look it up |
63 selectedIndex = infoItem->DetailsIndexByHandle( aSelectionRune ); |
64 selectedIndex = infoItem->DetailsIndexByHandle( aSelectionRune ); |
64 } |
65 } |
65 |
66 |
66 // Select item |
67 // Select item |
67 if ( infoItem->DetailsCount() > 0 ) |
68 if ( infoItem->DetailsCount() > 0 ) |
68 { |
69 {*/ |
69 iListBox->SetCurrentItemIndex( selectedIndex ); |
70 iListBox->SetCurrentItemIndex( selectedIndex ); |
70 HandleListBoxItemSelectedL( selectedIndex ); |
71 HandleListBoxItemSelectedL( selectedIndex ); |
71 } |
72 /*}*/ |
72 } |
73 } |
73 |
74 |
74 |
75 |
75 TBool CMemSpyViewThreadInfoItemServer::HandleCommandL( TInt aCommand ) |
76 TBool CMemSpyViewThreadInfoItemServer::HandleCommandL( TInt aCommand ) |
76 { |
77 { |
79 } |
80 } |
80 |
81 |
81 |
82 |
82 CMemSpyViewBase* CMemSpyViewThreadInfoItemServer::PrepareChildViewL() |
83 CMemSpyViewBase* CMemSpyViewThreadInfoItemServer::PrepareChildViewL() |
83 { |
84 { |
|
85 /* |
84 CMemSpyViewThreadInfoItemServerDetails* child = new(ELeave) CMemSpyViewThreadInfoItemServerDetails( iEngine, iObserver, iContainer, iCurrentInfoItemDetails ); |
86 CMemSpyViewThreadInfoItemServerDetails* child = new(ELeave) CMemSpyViewThreadInfoItemServerDetails( iEngine, iObserver, iContainer, iCurrentInfoItemDetails ); |
85 CleanupStack::PushL( child ); |
87 CleanupStack::PushL( child ); |
86 child->ConstructL( Rect(), *Parent() ); |
88 child->ConstructL( Rect(), *Parent() ); |
87 CleanupStack::Pop( child ); |
89 CleanupStack::Pop( child ); |
88 return child; |
90 return child; |
|
91 */ |
89 } |
92 } |
90 |
93 |
91 |
94 |
92 void CMemSpyViewThreadInfoItemServer::HandleListBoxItemSelectedL( TInt aIndex ) |
95 void CMemSpyViewThreadInfoItemServer::HandleListBoxItemSelectedL( TInt aIndex ) |
93 { |
96 {/* TODO |
94 // Identify the type of item to display... |
97 // Identify the type of item to display... |
95 CMemSpyThreadInfoHandleObjectBase* infoItem = static_cast< CMemSpyThreadInfoHandleObjectBase* >( iInfoItem ); |
98 CMemSpyThreadInfoHandleObjectBase* infoItem = static_cast< CMemSpyThreadInfoHandleObjectBase* >( iInfoItem ); |
96 iCurrentInfoItemDetails = infoItem->DetailsAt( aIndex ); |
99 iCurrentInfoItemDetails = infoItem->DetailsAt( aIndex ); |
97 |
100 |
98 #ifdef _DEBUG |
101 #ifdef _DEBUG |
99 RDebug::Printf( "CMemSpyViewThreadInfoItemServer::HandleListBoxItemSelectedL() - iCurrentInfoItemDetails.iHandle: 0x%08x", iCurrentInfoItemDetails.iHandle ); |
102 RDebug::Printf( "CMemSpyViewThreadInfoItemServer::HandleListBoxItemSelectedL() - iCurrentInfoItemDetails.iHandle: 0x%08x", iCurrentInfoItemDetails.iHandle ); |
100 #endif |
103 #endif |
101 |
104 */ |
102 // Notify observer about item selection |
105 // Notify observer about item selection |
103 ReportEventL( MMemSpyViewObserver::EEventItemSelected ); |
106 ReportEventL( MMemSpyViewObserver::EEventItemSelected ); |
104 } |
107 } |
105 |
108 |
106 |
109 |
125 |
128 |
126 |
129 |
127 |
130 |
128 |
131 |
129 |
132 |
130 |
133 /* |
131 CMemSpyViewThreadInfoItemServerDetails::CMemSpyViewThreadInfoItemServerDetails( CMemSpyEngine& aEngine, MMemSpyViewObserver& aObserver, CMemSpyThreadInfoContainer& aContainer, const TMemSpyDriverHandleInfoGeneric& aInfoItemDetails ) |
134 CMemSpyViewThreadInfoItemServerDetails::CMemSpyViewThreadInfoItemServerDetails( CMemSpyEngine& aEngine, MMemSpyViewObserver& aObserver, CMemSpyThreadInfoContainer& aContainer, const TMemSpyDriverHandleInfoGeneric& aInfoItemDetails ) |
132 : CMemSpyViewThreadInfoItemGeneric( aEngine, aObserver, aContainer, EMemSpyThreadInfoItemTypeServer ), iInfoItemDetails( aInfoItemDetails ) |
135 : CMemSpyViewThreadInfoItemGeneric( aEngine, aObserver, aContainer, EMemSpyThreadInfoItemTypeServer ), iInfoItemDetails( aInfoItemDetails ) |
133 { |
136 { |
134 } |
137 } |
135 |
138 |
227 listbox->Model()->SetItemTextArray( model ); |
230 listbox->Model()->SetItemTextArray( model ); |
228 listbox->Model()->SetOwnershipType( ELbmOwnsItemArray ); |
231 listbox->Model()->SetOwnershipType( ELbmOwnsItemArray ); |
229 CleanupStack::Pop( model ); |
232 CleanupStack::Pop( model ); |
230 } |
233 } |
231 |
234 |
232 |
235 */ |
233 void CMemSpyViewThreadInfoItemServerDetails::HandleListBoxItemActionedL( TInt /*aIndex*/ ) |
236 /* |
234 { |
237 void CMemSpyViewThreadInfoItemServerDetails::HandleListBoxItemActionedL( TInt /*aIndex*/ /*) |
235 // Notify observer about an item being 'fired' |
238 */ |
|
239 /* |
|
240 { |
|
241 // Notify observer about an item being 'fired' |
236 ReportEventL( MMemSpyViewObserver::EEventItemActioned ); |
242 ReportEventL( MMemSpyViewObserver::EEventItemActioned ); |
237 } |
243 } |
238 |
244 |
239 |
245 |
240 void CMemSpyViewThreadInfoItemServerDetails::HandleListBoxItemSelectedL( TInt /*aIndex*/ ) |
246 void CMemSpyViewThreadInfoItemServerDetails::HandleListBoxItemSelectedL( TInt /*aIndex*/ /*) |
|
247 */ |
|
248 /* |
241 { |
249 { |
242 // Notify observer about item selection |
250 // Notify observer about item selection |
243 ReportEventL( MMemSpyViewObserver::EEventItemSelected ); |
251 ReportEventL( MMemSpyViewObserver::EEventItemSelected ); |
244 } |
252 } |
245 |
253 */ |
246 |
254 |
247 |
255 |
248 |
256 |
249 |
257 |
250 |
258 |
251 |
259 |
252 |
260 |
253 |
261 |
254 |
262 |
255 |
263 |
256 |
264 |
257 |
265 |
258 |
266 |
259 |
267 |
260 |
268 |
261 |
269 |
262 |
270 |
263 |
271 |
264 |
272 |
265 |
273 |
266 |
274 |
267 |
275 |
268 |
276 |
269 |
277 |
270 |
278 /* |
271 |
279 |
272 |
280 |
273 CMemSpyViewThreadInfoItemServerSessions::CMemSpyViewThreadInfoItemServerSessions( CMemSpyEngine& aEngine, MMemSpyViewObserver& aObserver, CMemSpyThreadInfoContainer& aContainer, const TMemSpyDriverHandleInfoGeneric& aInfoItemDetails ) |
281 CMemSpyViewThreadInfoItemServerSessions::CMemSpyViewThreadInfoItemServerSessions( CMemSpyEngine& aEngine, MMemSpyViewObserver& aObserver, CMemSpyThreadInfoContainer& aContainer, const TMemSpyDriverHandleInfoGeneric& aInfoItemDetails ) |
274 : CMemSpyViewThreadInfoItemGeneric( aEngine, aObserver, aContainer, EMemSpyThreadInfoItemTypeServer ), iInfoItemDetails( aInfoItemDetails ) |
282 : CMemSpyViewThreadInfoItemGeneric( aEngine, aObserver, aContainer, EMemSpyThreadInfoItemTypeServer ), iInfoItemDetails( aInfoItemDetails ) |
275 { |
283 { |