1 /* |
1 /* |
2 * Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
19 // CLASS HEADER |
19 // CLASS HEADER |
20 #include <swi/sisregistryentry.h> |
20 #include <swi/sisregistryentry.h> |
21 #include <swi/sisregistrysession.h> |
21 #include <swi/sisregistrysession.h> |
22 #include <swi/sisregistrypackage.h> |
22 #include <swi/sisregistrypackage.h> |
23 #include <stringresourcereader.h> |
23 #include <stringresourcereader.h> |
24 #include <WidgetRegistryClient.h> |
24 // #include <WidgetRegistryClient.h> |
25 #include <javaregistryincludes.h> |
25 #include <javaregistryincludes.h> |
26 #include <appversion.h> |
26 #include <appversion.h> |
27 #include <mmf/common/mmfcontrollerpluginresolver.h> |
27 #include <mmf/common/mmfcontrollerpluginresolver.h> |
28 #include <sconftp.rsg> // Resource to be read header |
28 #include <sconftp.rsg> // Resource to be read header |
29 |
29 |
306 // Appends installed widgets to aApps array. |
306 // Appends installed widgets to aApps array. |
307 //---------------------------------------------------------------------------- |
307 //---------------------------------------------------------------------------- |
308 // |
308 // |
309 void SConPcdUtility::AppendInstalledWidgetsL( CSConListInstApps& aListInstApps ) |
309 void SConPcdUtility::AppendInstalledWidgetsL( CSConListInstApps& aListInstApps ) |
310 { |
310 { |
|
311 // Commented out as WidgetRegistry will be removed from MCL. |
|
312 // TODO: Check how Widgets should be listed on future. |
|
313 /* |
311 TRACE_FUNC_ENTRY; |
314 TRACE_FUNC_ENTRY; |
312 RWidgetRegistryClientSession widgetSession; |
315 RWidgetRegistryClientSession widgetSession; |
313 CleanupClosePushL( widgetSession ); |
316 CleanupClosePushL( widgetSession ); |
314 User::LeaveIfError( widgetSession.Connect() ); |
317 User::LeaveIfError( widgetSession.Connect() ); |
315 |
318 |
316 // Get the list of installed widgets |
319 // Get the list of installed widgets |
317 RWidgetInfoArray widgetInfoArr; |
320 RWidgetInfoArray widgetInfoArr; |
318 CleanupClosePushL( widgetInfoArr ); |
321 CleanupClosePushL( widgetInfoArr ); |
319 widgetSession.InstalledWidgetsL( widgetInfoArr ); |
322 widgetSession.InstalledWidgetsL( widgetInfoArr ); |
320 |
323 TFileName bundleId; |
321 for ( TInt i = 0; i < widgetInfoArr.Count(); i++ ) |
324 for ( TInt i = 0; i < widgetInfoArr.Count(); i++ ) |
322 { |
325 { |
323 CWidgetInfo *item = widgetInfoArr[i]; |
326 CWidgetInfo *item = widgetInfoArr[i]; |
324 CleanupStack::PushL( item ); |
327 CleanupStack::PushL( item ); |
325 |
328 |
357 { |
360 { |
358 app->iVersion.Copy( *(propValue->iValue.s) ); |
361 app->iVersion.Copy( *(propValue->iValue.s) ); |
359 } |
362 } |
360 delete propValue; |
363 delete propValue; |
361 propValue = NULL; |
364 propValue = NULL; |
|
365 bundleId.Zero(); |
|
366 widgetSession.GetWidgetBundleId( item->iUid, bundleId ); |
|
367 app->iWidgetBundleId = bundleId.AllocL(); |
362 |
368 |
363 User::LeaveIfError( aListInstApps.iApps.Append( app ) ); |
369 User::LeaveIfError( aListInstApps.iApps.Append( app ) ); |
364 CleanupStack::Pop( app ); // ownership transferred, do not delete |
370 CleanupStack::Pop( app ); // ownership transferred, do not delete |
365 } |
371 } |
366 CleanupStack::PopAndDestroy( item ); |
372 CleanupStack::PopAndDestroy( item ); |
368 User::LeaveIfError( widgetSession.Disconnect() ); |
374 User::LeaveIfError( widgetSession.Disconnect() ); |
369 |
375 |
370 CleanupStack::PopAndDestroy( &widgetInfoArr ); |
376 CleanupStack::PopAndDestroy( &widgetInfoArr ); |
371 CleanupStack::PopAndDestroy( &widgetSession ); |
377 CleanupStack::PopAndDestroy( &widgetSession ); |
372 TRACE_FUNC_EXIT; |
378 TRACE_FUNC_EXIT; |
|
379 */ |
373 } |
380 } |
374 |
381 |
375 // --------------------------------------------------------- |
382 // --------------------------------------------------------- |
376 // SConPcdUtility::IsInstalledToSelectedDrive |
383 // SConPcdUtility::IsInstalledToSelectedDrive |
377 // Solve highest drive from aInstalledDrives and check |
384 // Solve highest drive from aInstalledDrives and check |