connectivitymodules/SeCon/services/pcd/src/sconpcdutility.cpp
branchRCL_3
changeset 18 453dfc402455
parent 1 f8e15b44d440
equal deleted inserted replaced
17:dbd1c5e08735 18:453dfc402455
     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".
   215     {
   215     {
   216     TRACE_FUNC_ENTRY;
   216     TRACE_FUNC_ENTRY;
   217     CJavaRegistry* javaRegistry = CJavaRegistry::NewLC( );
   217     CJavaRegistry* javaRegistry = CJavaRegistry::NewLC( );
   218     RArray<TUid> packageUids;
   218     RArray<TUid> packageUids;
   219     CleanupClosePushL( packageUids );
   219     CleanupClosePushL( packageUids );
   220     javaRegistry->GetRegistryEntryUidsL( /*EGeneralPackage,*/ packageUids );
   220     javaRegistry->GetRegistryEntryUidsL( packageUids );
   221     LOGGER_WRITE_1("packageUids.Count(): %d", packageUids.Count());
   221     LOGGER_WRITE_1("packageUids.Count(): %d", packageUids.Count());
   222     for (TInt i=0; i<packageUids.Count(); i++ )
   222     for (TInt i=0; i<packageUids.Count(); i++ )
   223         {
   223         {
   224         LOGGER_WRITE_1("RegistryEntryL: %d",i);
   224         LOGGER_WRITE_1("RegistryEntryL: %d",i);
   225         LOGGER_WRITE_1("handle entry uid: 0x%08X",packageUids[i].iUid);
   225         LOGGER_WRITE_1("handle entry uid: 0x%08X",packageUids[i].iUid);
   315     
   315     
   316     // Get the list of installed widgets
   316     // Get the list of installed widgets
   317     RWidgetInfoArray widgetInfoArr;
   317     RWidgetInfoArray widgetInfoArr;
   318     CleanupClosePushL( widgetInfoArr );
   318     CleanupClosePushL( widgetInfoArr );
   319     widgetSession.InstalledWidgetsL( widgetInfoArr );
   319     widgetSession.InstalledWidgetsL( widgetInfoArr );
   320     
   320     TFileName bundleId;
   321     for ( TInt i = 0; i < widgetInfoArr.Count(); i++ )
   321     for ( TInt i = 0; i < widgetInfoArr.Count(); i++ )
   322         {
   322         {
   323         CWidgetInfo *item = widgetInfoArr[i];
   323         CWidgetInfo *item = widgetInfoArr[i];
   324         CleanupStack::PushL( item );
   324         CleanupStack::PushL( item );
   325         
   325         
   357                 {
   357                 {
   358                 app->iVersion.Copy( *(propValue->iValue.s) );
   358                 app->iVersion.Copy( *(propValue->iValue.s) );
   359                 }
   359                 }
   360             delete propValue;
   360             delete propValue;
   361             propValue = NULL;
   361             propValue = NULL;
       
   362             bundleId.Zero();
       
   363             widgetSession.GetWidgetBundleId( item->iUid, bundleId );
       
   364             app->iWidgetBundleId = bundleId.AllocL();
   362             
   365             
   363             User::LeaveIfError( aListInstApps.iApps.Append( app ) );
   366             User::LeaveIfError( aListInstApps.iApps.Append( app ) );
   364             CleanupStack::Pop( app ); // ownership transferred, do not delete
   367             CleanupStack::Pop( app ); // ownership transferred, do not delete
   365             }
   368             }
   366         CleanupStack::PopAndDestroy( item );
   369         CleanupStack::PopAndDestroy( item );