installationservices/swi/source/sishelper/uissclienthandler.cpp
changeset 25 98b66e4fb0be
parent 0 ba25891c3a9e
equal deleted inserted replaced
24:84a16765cd86 25:98b66e4fb0be
   625 
   625 
   626 	CleanupStack::PopAndDestroy(nativeCompInfo);
   626 	CleanupStack::PopAndDestroy(nativeCompInfo);
   627 	CleanupStack::PopAndDestroy(&stream);
   627 	CleanupStack::PopAndDestroy(&stream);
   628     }
   628     }
   629 
   629 
       
   630  void CUissClientHandler::MapToApplicationInfoL(RCPointerArray<Swi::CNativeComponentInfo::CNativeApplicationInfo>& aNativeApplicationsInfo, RPointerArray<Usif::CComponentInfo::CApplicationInfo>& aApplicationsInfo)
       
   631     {        
       
   632         TInt count = aNativeApplicationsInfo.Count();
       
   633         for (TInt i = 0; i < count; ++i)
       
   634             {
       
   635             Usif::CComponentInfo::CApplicationInfo* app ;
       
   636             app =  Usif::CComponentInfo::CApplicationInfo::NewLC(aNativeApplicationsInfo[i]->AppUid(), aNativeApplicationsInfo[i]->Name(), aNativeApplicationsInfo[i]->GroupName(), aNativeApplicationsInfo[i]->IconFileName());                       
       
   637             DEBUG_PRINTF2(_L("App Uid 0x%08x"),app->AppUid());
       
   638             DEBUG_PRINTF2(_L("File Name %S"),&app->Name());
       
   639             DEBUG_PRINTF2(_L("Group Name %S"),&app->GroupName());
       
   640             DEBUG_PRINTF2(_L("Icon File Name %S"),&app->IconFileName());            
       
   641             aApplicationsInfo.AppendL(app);
       
   642             CleanupStack::Pop(app);
       
   643             }        
       
   644     }
       
   645 
   630 Usif::CComponentInfo::CNode* CUissClientHandler::MapToComponentInfoL(CNativeComponentInfo& aNativeComponentInfo)
   646 Usif::CComponentInfo::CNode* CUissClientHandler::MapToComponentInfoL(CNativeComponentInfo& aNativeComponentInfo)
   631 	{
   647 	{
   632 	// Create the array to store the children nodes.
   648 	// Create the array to store the children nodes.
   633 	RPointerArray<Usif::CComponentInfo::CNode> children;
   649 	RPointerArray<Usif::CComponentInfo::CNode> children;
   634 	CleanupResetAndDestroyPushL(children);
   650 	CleanupResetAndDestroyPushL(children);
   641 		{
   657 		{
   642 		Usif::CComponentInfo::CNode* node = MapToComponentInfoL(*aNativeComponentInfo.iChildren[i]);
   658 		Usif::CComponentInfo::CNode* node = MapToComponentInfoL(*aNativeComponentInfo.iChildren[i]);
   643 		CleanupStack::PushL(node);
   659 		CleanupStack::PushL(node);
   644 		children.AppendL(node);
   660 		children.AppendL(node);
   645 		CleanupStack::Pop(node);
   661 		CleanupStack::Pop(node);
   646 		}
   662 		}		
   647 		
   663 	
       
   664 	RPointerArray<Usif::CComponentInfo::CApplicationInfo> applicationInfo;	
       
   665 	CleanupResetAndDestroyPushL(applicationInfo);
       
   666 	MapToApplicationInfoL(aNativeComponentInfo.iApplications, applicationInfo);	
   648 	// Create the CNode object using the appropriate parameters.
   667 	// Create the CNode object using the appropriate parameters.
   649 	// children for leaf nodes (bottom most nodes in the embedded tree) will be null.
   668 	// children for leaf nodes (bottom most nodes in the embedded tree) will be null.
   650 	Usif::CComponentInfo::CNode* node = Usif::CComponentInfo::CNode::NewLC(
   669 	Usif::CComponentInfo::CNode* node = Usif::CComponentInfo::CNode::NewLC(
   651 										Usif::KSoftwareTypeNative(),
   670 										Usif::KSoftwareTypeNative(),
   652 										*(aNativeComponentInfo.iComponentName), 
   671 										*(aNativeComponentInfo.iComponentName), 
   658 										*(aNativeComponentInfo.iGlobalComponentId),
   677 										*(aNativeComponentInfo.iGlobalComponentId),
   659 										static_cast<Usif::TAuthenticity>(aNativeComponentInfo.iAuthenticity),
   678 										static_cast<Usif::TAuthenticity>(aNativeComponentInfo.iAuthenticity),
   660 										aNativeComponentInfo.iUserGrantableCaps,
   679 										aNativeComponentInfo.iUserGrantableCaps,
   661 										aNativeComponentInfo.iMaxInstalledSize,
   680 										aNativeComponentInfo.iMaxInstalledSize,
   662 										aNativeComponentInfo.iHasExe,
   681 										aNativeComponentInfo.iHasExe,
       
   682 										aNativeComponentInfo.iIsDriveSelectionRequired,
       
   683 										&applicationInfo,
   663 										&children);
   684 										&children);
   664 	CleanupStack::Pop(node);
   685 	CleanupStack::Pop(node);	
       
   686 	CleanupStack::Pop(&applicationInfo);
       
   687 	applicationInfo.Close();
   665 	CleanupStack::Pop(&children);
   688 	CleanupStack::Pop(&children);
   666 	children.Close();
   689 	children.Close();
   667 	return (node);
   690 	return (node);
   668 	}
   691 	}
   669 #endif
   692 #endif