author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Wed, 15 Sep 2010 12:00:00 +0300 | |
branch | RCL_3 |
changeset 93 | b01126ce0bec |
parent 83 | 5456b4e8b3a8 |
child 102 | ba63c83f4716 |
permissions | -rw-r--r-- |
83 | 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 |
* widget manager plugin implementation |
|
16 |
* |
|
17 |
*/ |
|
18 |
||
19 |
// INCLUDE FILES |
|
20 |
#include <bautils.h> |
|
21 |
#include <coemain.h> |
|
22 |
#include <aknViewAppUi.h> |
|
23 |
#include <eikappui.h> |
|
24 |
#include <eikapp.h> |
|
25 |
#include <e32property.h> |
|
26 |
#include <e32base.h> |
|
27 |
#include <activeidle2domainpskeys.h> |
|
28 |
#include <widgetmanagerview.rsg> |
|
29 |
||
30 |
#include "wmcommon.h" |
|
31 |
#include "widgetmanager.hrh" |
|
32 |
#include "wmmaincontainer.h" |
|
33 |
#include "wmmaincontainerview.h" |
|
34 |
#include "wmresourceloader.h" |
|
35 |
#include "wmplugin.h" |
|
36 |
#include "wmeffectmanager.h" |
|
37 |
#include "wmwidgetdata.h" |
|
38 |
#include "wminstaller.h" |
|
39 |
#include "wmlistbox.h" |
|
93
b01126ce0bec
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
83
diff
changeset
|
40 |
#include "wmconfiguration.h" |
83 | 41 |
|
42 |
const TInt KExecuteCommandDelay( 50000 ); // 50ms |
|
43 |
const TInt KMaxCmdExecutionCount( 6 ); |
|
44 |
||
45 |
// --------------------------------------------------------- |
|
46 |
// CWmPlugin::NewL |
|
47 |
// --------------------------------------------------------- |
|
48 |
// |
|
49 |
CWmPlugin* CWmPlugin::NewL() |
|
50 |
{ |
|
51 |
CWmPlugin* self = new( ELeave ) CWmPlugin(); |
|
52 |
CleanupStack::PushL( self ); |
|
53 |
self->ConstructL(); |
|
54 |
CleanupStack::Pop(self); |
|
55 |
return self; |
|
56 |
} |
|
57 |
||
58 |
// --------------------------------------------------------- |
|
59 |
// CWmPlugin::~CWmPlugin |
|
60 |
// --------------------------------------------------------- |
|
61 |
// |
|
62 |
CWmPlugin::~CWmPlugin() |
|
63 |
{ |
|
64 |
if ( iLauncher && iLauncher->IsActive() ) |
|
65 |
{ |
|
66 |
iLauncher->Cancel(); |
|
67 |
} |
|
68 |
delete iLauncher; |
|
69 |
||
70 |
if ( iWmInstaller && |
|
71 |
iWmInstaller->IsActive() ) |
|
72 |
{ |
|
73 |
iWmInstaller->Cancel(); |
|
74 |
} |
|
75 |
||
76 |
// delete members |
|
77 |
delete iResourceLoader; |
|
78 |
delete iEffectManager; |
|
79 |
delete iPostponedContent; |
|
80 |
delete iWmInstaller; |
|
93
b01126ce0bec
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
83
diff
changeset
|
81 |
delete iConfiguration; |
83 | 82 |
} |
83 |
||
84 |
// --------------------------------------------------------- |
|
85 |
// CWmPlugin::CWmPlugin |
|
86 |
// --------------------------------------------------------- |
|
87 |
// |
|
88 |
CWmPlugin::CWmPlugin() |
|
89 |
{ |
|
90 |
iPreviousViewUid.iViewUid = KNullUid; |
|
91 |
iExecutionCount = 0; |
|
92 |
} |
|
93 |
||
94 |
// --------------------------------------------------------- |
|
95 |
// CWmPlugin::ConstructL |
|
96 |
// --------------------------------------------------------- |
|
97 |
// |
|
98 |
void CWmPlugin::ConstructL() |
|
99 |
{ |
|
100 |
iWmMainContainer = NULL; |
|
101 |
iPostponedCommand = ENone; |
|
102 |
||
103 |
// store static view app ui |
|
104 |
CEikonEnv* eikonEnv = CEikonEnv::Static(); |
|
105 |
if ( !eikonEnv ) User::Leave( KErrUnknown ); |
|
106 |
iViewAppUi = (CAknViewAppUi*)eikonEnv->EikAppUi(); |
|
107 |
if ( !iViewAppUi ) User::Leave( KErrUnknown ); |
|
108 |
||
109 |
// create resource loader |
|
110 |
iFs = &eikonEnv->FsSession(); |
|
111 |
iResourceLoader = CWmResourceLoader::NewL( *eikonEnv ); |
|
112 |
iEffectManager = CWmEffectManager::NewL( *eikonEnv ); |
|
113 |
iWmInstaller = CWmInstaller::NewL( *this ); |
|
114 |
||
115 |
// main view |
|
116 |
CWmMainContainerView* mainView = |
|
117 |
CWmMainContainerView::NewL( *this ); |
|
118 |
CleanupStack::PushL( mainView ); |
|
119 |
iViewAppUi->AddViewL( mainView ); |
|
120 |
CleanupStack::Pop( mainView ); |
|
121 |
||
122 |
// laucher for adding widgets. |
|
123 |
iLauncher = CPeriodic::NewL( CActive::EPriorityUserInput + 1 ); |
|
124 |
} |
|
125 |
||
126 |
// --------------------------------------------------------- |
|
127 |
// CWmPlugin::Activate |
|
128 |
// --------------------------------------------------------- |
|
129 |
// |
|
130 |
void CWmPlugin::Activate() |
|
131 |
{ |
|
132 |
// prevents opening wm if adding widget is ongoing. |
|
133 |
if ( !iLauncher->IsActive() ) |
|
134 |
{ |
|
135 |
CWmMainContainerView* view = static_cast<CWmMainContainerView*>( |
|
136 |
iViewAppUi->View( TUid::Uid(EWmMainContainerViewId) ) ); |
|
137 |
if ( !IsActive() && view && iHsContentController ) |
|
138 |
{ |
|
139 |
// stop displaying menubar before starting fullscreen effects |
|
140 |
CEikMenuBar* menuBar = CEikonEnv::Static()->AppUiFactory()->MenuBar(); |
|
141 |
if ( menuBar && menuBar->IsDisplayed() ) |
|
142 |
{ |
|
143 |
menuBar->StopDisplayingMenuBar(); |
|
144 |
} |
|
93
b01126ce0bec
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
83
diff
changeset
|
145 |
|
b01126ce0bec
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
83
diff
changeset
|
146 |
// load configuration again, there might be change |
b01126ce0bec
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
83
diff
changeset
|
147 |
delete iConfiguration; |
b01126ce0bec
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
83
diff
changeset
|
148 |
iConfiguration = NULL; |
b01126ce0bec
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
83
diff
changeset
|
149 |
|
83 | 150 |
TRAP_IGNORE( |
93
b01126ce0bec
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
83
diff
changeset
|
151 |
iConfiguration = CWmConfiguration::NewL( ResourceLoader() ); |
83 | 152 |
iEffectManager->BeginFullscreenEffectL( |
93
b01126ce0bec
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
83
diff
changeset
|
153 |
KAppStartEffectStyle ); |
83 | 154 |
iViewAppUi->ActivateLocalViewL( |
155 |
TUid::Uid( EWmMainContainerViewId ) ); |
|
156 |
); |
|
157 |
} |
|
158 |
} |
|
159 |
} |
|
160 |
||
161 |
// --------------------------------------------------------- |
|
162 |
// CWmPlugin::DeActivate |
|
163 |
// --------------------------------------------------------- |
|
164 |
// |
|
165 |
void CWmPlugin::DeActivate() |
|
166 |
{ |
|
167 |
iPostponedCommand = ENone; |
|
168 |
iPreviousViewUid.iViewUid = KNullUid; |
|
169 |
CWmMainContainerView* view = static_cast<CWmMainContainerView*>( |
|
170 |
iViewAppUi->View( TUid::Uid(EWmMainContainerViewId) ) ); |
|
171 |
if ( view ) { view->DoDeactivate(); } |
|
172 |
} |
|
173 |
||
174 |
// --------------------------------------------------------- |
|
175 |
// CWmPlugin::Views |
|
176 |
// --------------------------------------------------------- |
|
177 |
// |
|
178 |
void CWmPlugin::Views( RPointerArray<CAknView>& aViews ) |
|
179 |
{ |
|
180 |
// return view to be destroyed. |
|
181 |
CAknView* view = iViewAppUi->View( |
|
182 |
TUid::Uid(EWmMainContainerViewId) ); |
|
183 |
if ( view ) |
|
184 |
{ |
|
185 |
aViews.Append( view ); |
|
186 |
} |
|
187 |
} |
|
188 |
||
189 |
// --------------------------------------------------------- |
|
190 |
// CWmPlugin::IsActive |
|
191 |
// --------------------------------------------------------- |
|
192 |
// |
|
193 |
TBool CWmPlugin::IsActive() |
|
194 |
{ |
|
195 |
TVwsViewId activeViewId(KNullUid,KNullUid); |
|
196 |
if ( iViewAppUi->GetActiveViewId( activeViewId ) == KErrNone && |
|
197 |
activeViewId.iViewUid == TUid::Uid( EWmMainContainerViewId ) ) |
|
198 |
{ |
|
199 |
if ( iPreviousViewUid.iViewUid == KNullUid && |
|
200 |
iViewAppUi->GetDefaultViewId( iPreviousViewUid ) != KErrNone ) |
|
201 |
{ |
|
202 |
iPreviousViewUid.iAppUid = iViewAppUi->Application()->AppDllUid(); |
|
203 |
iPreviousViewUid.iViewUid = TUid::Uid( 1 ); |
|
204 |
} |
|
205 |
return ETrue; |
|
206 |
} |
|
207 |
||
208 |
return( iPreviousViewUid.iViewUid != KNullUid ); |
|
209 |
} |
|
210 |
||
211 |
// --------------------------------------------------------- |
|
212 |
// CWmPlugin::CloseView |
|
213 |
// --------------------------------------------------------- |
|
214 |
// |
|
215 |
void CWmPlugin::CloseView() |
|
216 |
{ |
|
217 |
if ( IsActive() ) |
|
218 |
{ |
|
219 |
iWmMainContainer->SetClosingDown( ETrue ); |
|
220 |
TRAPD( err, |
|
221 |
iEffectManager->BeginFullscreenEffectL( |
|
222 |
KAppExitEffectStyle ); |
|
223 |
iViewAppUi->ActivateLocalViewL( |
|
224 |
iPreviousViewUid.iViewUid ); |
|
225 |
); |
|
226 |
if ( KErrNone != err ) |
|
227 |
{ |
|
228 |
iWmMainContainer->SetClosingDown( EFalse ); |
|
229 |
} |
|
230 |
} |
|
231 |
} |
|
232 |
||
233 |
// --------------------------------------------------------- |
|
234 |
// CWmPlugin::MainViewActivated |
|
235 |
// --------------------------------------------------------- |
|
236 |
// |
|
237 |
void CWmPlugin::MainViewActivated( |
|
238 |
const TVwsViewId& /*aViewId*/, |
|
239 |
CWmMainContainer* aWmMainContainer ) |
|
240 |
{ |
|
241 |
// previous view for Wm is always default view. |
|
242 |
if ( iViewAppUi->GetDefaultViewId( iPreviousViewUid ) != KErrNone ) |
|
243 |
{ |
|
244 |
// use default if we got wrong viewid as previous view |
|
245 |
iPreviousViewUid.iAppUid = iViewAppUi->Application()->AppDllUid(); |
|
246 |
iPreviousViewUid.iViewUid = TUid::Uid( 1 ); |
|
247 |
} |
|
248 |
||
249 |
iWmMainContainer = aWmMainContainer; |
|
250 |
iEffectManager->UiRendered(); |
|
251 |
iWmMainContainer->SetClosingDown( EFalse ); |
|
252 |
||
253 |
// Don't forward numeric keys to phone |
|
254 |
ForwardNumericKeysToPhone( EFalse ); |
|
255 |
} |
|
256 |
||
257 |
// --------------------------------------------------------- |
|
258 |
// CWmPlugin::MainViewDeactivated |
|
259 |
// --------------------------------------------------------- |
|
260 |
// |
|
261 |
void CWmPlugin::MainViewDeactivated() |
|
262 |
{ |
|
263 |
// Forward numeric keys to phone |
|
264 |
ForwardNumericKeysToPhone( ETrue ); |
|
265 |
||
266 |
iPreviousViewUid.iViewUid = KNullUid; |
|
267 |
iWmMainContainer = NULL; |
|
268 |
if ( iEffectManager ) |
|
269 |
{ |
|
270 |
iEffectManager->UiRendered(); |
|
271 |
} |
|
272 |
||
273 |
if ( !iEffectManager->IsEffectActive() ) |
|
274 |
{ |
|
275 |
// launch effect without delay |
|
276 |
if ( !iLauncher->IsActive() ) |
|
277 |
{ |
|
278 |
iExecutionCount = KMaxCmdExecutionCount; |
|
279 |
iLauncher->Start( 0, 0, TCallBack( ExecuteCommand, this ) ); |
|
280 |
} |
|
281 |
} |
|
282 |
else |
|
283 |
{ |
|
284 |
// maximum wait time is 300ms (6 x 50ms) |
|
285 |
if ( !iLauncher->IsActive() ) |
|
286 |
{ |
|
287 |
iExecutionCount++; |
|
288 |
iLauncher->Start( |
|
289 |
KExecuteCommandDelay, |
|
290 |
KExecuteCommandDelay, |
|
291 |
TCallBack( ExecuteCommand, this ) ); |
|
292 |
} |
|
293 |
} |
|
93
b01126ce0bec
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
83
diff
changeset
|
294 |
|
b01126ce0bec
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
83
diff
changeset
|
295 |
// delete config |
b01126ce0bec
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
83
diff
changeset
|
296 |
delete iConfiguration; |
b01126ce0bec
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
83
diff
changeset
|
297 |
iConfiguration = NULL; |
83 | 298 |
} |
299 |
||
300 |
// --------------------------------------------------------- |
|
301 |
// CWmPlugin::ForwardNumericKeysToPhone |
|
302 |
// --------------------------------------------------------- |
|
303 |
// |
|
304 |
void CWmPlugin::ForwardNumericKeysToPhone( TBool aEnabled ) |
|
305 |
{ |
|
306 |
TInt value = aEnabled ? |
|
307 |
EPSAiForwardNumericKeysToPhone : |
|
308 |
EPSAiDontForwardNumericKeysToPhone; |
|
309 |
||
310 |
RProperty::Set( |
|
311 |
KPSUidAiInformation, |
|
312 |
KActiveIdleForwardNumericKeysToPhone, |
|
313 |
value ); |
|
314 |
} |
|
315 |
||
316 |
// --------------------------------------------------------- |
|
317 |
// CWmPlugin::SetPostponedCommandL |
|
318 |
// --------------------------------------------------------- |
|
319 |
// |
|
320 |
void CWmPlugin::SetPostponedCommandL( |
|
321 |
TCommand aCommand, CHsContentInfo& aContentInfo ) |
|
322 |
{ |
|
323 |
iPostponedCommand = aCommand; |
|
324 |
delete iPostponedContent; |
|
325 |
iPostponedContent = NULL; |
|
326 |
iPostponedContent = aContentInfo.CloneL(); |
|
327 |
} |
|
328 |
||
329 |
// --------------------------------------------------------- |
|
330 |
// CWmPlugin::ExecuteCommand |
|
331 |
// --------------------------------------------------------- |
|
332 |
// |
|
333 |
TInt CWmPlugin::ExecuteCommand( TAny* aSelf ) |
|
334 |
{ |
|
335 |
CWmPlugin* plugin = static_cast<CWmPlugin*>( aSelf ); |
|
336 |
plugin->DoExecuteCommand(); |
|
337 |
return 0; |
|
338 |
} |
|
339 |
||
340 |
// --------------------------------------------------------- |
|
341 |
// CWmPlugin::DoExecuteCommand |
|
342 |
// --------------------------------------------------------- |
|
343 |
// |
|
344 |
void CWmPlugin::DoExecuteCommand() |
|
345 |
{ |
|
346 |
// prevent multiple events |
|
347 |
if ( iLauncher->IsActive() ) |
|
348 |
{ |
|
349 |
iLauncher->Cancel(); |
|
350 |
} |
|
351 |
||
352 |
if ( !iEffectManager->IsEffectActive() || |
|
353 |
iExecutionCount == KMaxCmdExecutionCount ) |
|
354 |
{ |
|
355 |
if ( iPostponedCommand == EAddToHomescreen ) |
|
356 |
{ |
|
357 |
TRAP_IGNORE( |
|
358 |
TInt err( KErrNone ); |
|
359 |
err = ContentController().AddWidgetL( *iPostponedContent ); |
|
360 |
if ( KErrNone != err ) |
|
361 |
ShowErrorNoteL( err ); |
|
362 |
); |
|
363 |
} |
|
364 |
iPostponedCommand = ENone; |
|
365 |
delete iPostponedContent; |
|
366 |
iPostponedContent = NULL; |
|
367 |
iExecutionCount = 0; // reset counter |
|
368 |
} |
|
369 |
else |
|
370 |
{ |
|
371 |
iExecutionCount++; |
|
372 |
iLauncher->Start( |
|
373 |
KExecuteCommandDelay, |
|
374 |
KExecuteCommandDelay, |
|
375 |
TCallBack( ExecuteCommand, this ) ); |
|
376 |
} |
|
377 |
} |
|
378 |
||
379 |
// --------------------------------------------------------- |
|
380 |
// CWmPlugin::ShowErrorNoteL |
|
381 |
// --------------------------------------------------------- |
|
382 |
// |
|
383 |
void CWmPlugin::ShowErrorNoteL( TInt aError ) |
|
384 |
{ |
|
385 |
switch ( aError ) |
|
386 |
{ |
|
387 |
case KHsErrorViewFull: |
|
388 |
case KHsErrorDoesNotFit: |
|
389 |
// Not enough space to add new widget to active page. |
|
390 |
// Remove some content first. |
|
391 |
ResourceLoader().InfoPopupL( |
|
392 |
R_QTN_HS_ADD_WIDGET_NO_SPACE_NOTE, KNullDesC ); |
|
393 |
break; |
|
394 |
case KErrNoMemory: |
|
395 |
case KErrDiskFull: |
|
396 |
// do not show error note here to avoid multiple error notes |
|
397 |
break; |
|
398 |
default: |
|
399 |
ResourceLoader().ErrorPopup( aError ); |
|
400 |
break; |
|
401 |
} |
|
402 |
} |
|
403 |
||
404 |
// --------------------------------------------------------- |
|
405 |
// CWmPlugin::ViewAppUi |
|
406 |
// --------------------------------------------------------- |
|
407 |
// |
|
408 |
CAknViewAppUi& CWmPlugin::ViewAppUi() |
|
409 |
{ |
|
410 |
return *iViewAppUi; |
|
411 |
} |
|
412 |
||
413 |
// --------------------------------------------------------- |
|
414 |
// CWmPlugin::ResourceLoader |
|
415 |
// --------------------------------------------------------- |
|
416 |
// |
|
417 |
CWmResourceLoader& CWmPlugin::ResourceLoader() |
|
418 |
{ |
|
419 |
return *iResourceLoader; |
|
420 |
} |
|
421 |
||
422 |
// --------------------------------------------------------- |
|
423 |
// CWmPlugin::ContentController |
|
424 |
// --------------------------------------------------------- |
|
425 |
// |
|
426 |
MHsContentController& CWmPlugin::ContentController() |
|
427 |
{ |
|
428 |
return *iHsContentController; |
|
429 |
} |
|
430 |
||
431 |
// --------------------------------------------------------- |
|
432 |
// CWmPlugin::FileServer |
|
433 |
// --------------------------------------------------------- |
|
434 |
// |
|
435 |
RFs& CWmPlugin::FileServer() |
|
436 |
{ |
|
437 |
return *iFs; |
|
438 |
} |
|
439 |
||
440 |
// --------------------------------------------------------- |
|
441 |
// CWmPlugin::NotifyWidgetListChanged |
|
442 |
// --------------------------------------------------------- |
|
443 |
// |
|
444 |
void CWmPlugin::NotifyWidgetListChanged() |
|
445 |
{ |
|
446 |
if ( iWmMainContainer && !iWmMainContainer->ClosingDown() ) |
|
447 |
{ |
|
448 |
iWmMainContainer->HandleWidgetListChanged(); |
|
449 |
} |
|
450 |
} |
|
451 |
||
452 |
// --------------------------------------------------------- |
|
453 |
// CWmPlugin::WmInstaller |
|
454 |
// --------------------------------------------------------- |
|
455 |
// |
|
456 |
CWmInstaller& CWmPlugin::WmInstaller() |
|
457 |
{ |
|
458 |
return *iWmInstaller; |
|
459 |
} |
|
460 |
||
93
b01126ce0bec
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
83
diff
changeset
|
461 |
// ---------------------------------------------------- |
b01126ce0bec
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
83
diff
changeset
|
462 |
// CWmPlugin::Configuration |
b01126ce0bec
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
83
diff
changeset
|
463 |
// ---------------------------------------------------- |
b01126ce0bec
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
83
diff
changeset
|
464 |
// |
b01126ce0bec
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
83
diff
changeset
|
465 |
CWmConfiguration& CWmPlugin::Configuration() |
b01126ce0bec
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
83
diff
changeset
|
466 |
{ |
b01126ce0bec
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
83
diff
changeset
|
467 |
return *iConfiguration; |
b01126ce0bec
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
83
diff
changeset
|
468 |
} |
b01126ce0bec
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
83
diff
changeset
|
469 |
|
83 | 470 |
// --------------------------------------------------------- |
471 |
// CWmPlugin::GetUnistalledWidget |
|
472 |
// --------------------------------------------------------- |
|
473 |
// |
|
474 |
CWmWidgetData* CWmPlugin::GetUninstalledWidgetByUid( TUid aUid ) |
|
475 |
{ |
|
476 |
CWmWidgetData* retVal = NULL; |
|
477 |
if ( iWmMainContainer ) |
|
478 |
{ |
|
479 |
const RWidgetDataValues& widgetArray = |
|
480 |
iWmMainContainer->WmListBox().WidgetDataArray(); |
|
481 |
for ( TInt i = 0; i < widgetArray.Count(); i++ ) |
|
482 |
{ |
|
483 |
CWmWidgetData* widgetData = widgetArray[i]; |
|
484 |
if ( widgetData->IsUninstalling() && |
|
485 |
widgetData->PublisherUid() == aUid ) |
|
486 |
{ |
|
487 |
retVal = widgetArray[i]; |
|
488 |
break; |
|
489 |
} |
|
490 |
} |
|
491 |
} |
|
492 |
return retVal; |
|
493 |
} |
|
494 |
||
495 |
// End of file |
|
496 |