applicationmanagement/server/src/ApplicationManagementServer.cpp
changeset 2 a5fecba4b1e4
parent 0 3ce708148e4d
child 20 f6aa907032f4
equal deleted inserted replaced
1:4490afcb47b1 2:a5fecba4b1e4
  2485                     User::LeaveIfError(sisEntry.Open(sisSession, compo.Uid()));
  2485                     User::LeaveIfError(sisEntry.Open(sisSession, compo.Uid()));
  2486                     CleanupClosePushL(sisEntry);   
  2486                     CleanupClosePushL(sisEntry);   
  2487 
  2487 
  2488 										add  = sisEntry.IsPresentL();	
  2488 										add  = sisEntry.IsPresentL();	
  2489 										
  2489 										
  2490 										if(add)
  2490 			  if(add)
  2491 										RDEBUG( "CApplicationManagementSession::ActiveComponentsL ETrue" );
  2491                     {
  2492 										else
  2492 				
  2493 										RDEBUG( "CApplicationManagementSession::ActiveComponentsL EFalse" );
  2493 				// If Present update the Version, name and other info to that deployement component. Since application would have got an update
       
  2494                         // by some other means
       
  2495 				
       
  2496                         TVersion version = sisEntry.VersionL();
       
  2497                         TBuf8<KVersionLength> pkgDes;
       
  2498                         pkgDes.AppendNum(version.iMajor);
       
  2499                         pkgDes.Append(KLiteralPeriod);
       
  2500                         pkgDes.AppendNum(version.iMinor);
       
  2501                         
       
  2502 				
       
  2503 				HBufC *packagename = sisEntry.PackageNameL();
       
  2504 				TBuf8<512> packagename8;
       
  2505 				packagename8.Copy(*packagename);
       
  2506 				delete packagename;
       
  2507 
       
  2508                         compo.SetNameL(packagename8);
       
  2509                         compo.SetVersionL(pkgDes);
       
  2510 				                        
       
  2511 
       
  2512                         Server().Storage()->UpdateL( compo );
       
  2513                         
       
  2514 
       
  2515 				
       
  2516 
       
  2517 				RDEBUG( "CApplicationManagementSession::ActiveComponentsL ETrue" );
       
  2518 
       
  2519 
       
  2520 			  }
       
  2521 			  else
       
  2522 			      RDEBUG( "CApplicationManagementSession::ActiveComponentsL EFalse" );
  2494 																	    
  2523 																	    
  2495 	
  2524 	
  2496                     CleanupStack::PopAndDestroy(2, &sisSession);
  2525                     CleanupStack::PopAndDestroy(2, &sisSession);
  2497                                    
  2526                                    
  2498                     }
  2527                     }
  3660                         preInstallCompo = Server().Storage()->NewComponentL(EDCSActive, preInstalledAppName);
  3689                         preInstallCompo = Server().Storage()->NewComponentL(EDCSActive, preInstalledAppName);
  3661                         preInstallCompo->SetUid(preInstalledAppParams[count]->iPreInstalledAppUid);
  3690                         preInstallCompo->SetUid(preInstalledAppParams[count]->iPreInstalledAppUid);
  3662                         preInstallCompo->SetNameL(preInstalledAppName);
  3691                         preInstallCompo->SetNameL(preInstalledAppName);
  3663                         preInstallCompo->SetVersionL(preInstalledAppParams[count]->iVersion);
  3692                         preInstallCompo->SetVersionL(preInstalledAppParams[count]->iVersion);
  3664                         preInstallCompo->SetMimeTypeL(preInstalledAppParams[count]->iMimeType);
  3693                         preInstallCompo->SetMimeTypeL(preInstalledAppParams[count]->iMimeType);
       
  3694 				preInstallCompo->SetAppRemovableStatus(ETrue);
       
  3695 
  3665                         Server().Storage()->UpdateL( *preInstallCompo );
  3696                         Server().Storage()->UpdateL( *preInstallCompo );
  3666                         Server().Storage()->CheckForDuplicateNodesInDeployedL(*preInstallCompo);
  3697                         Server().Storage()->CheckForDuplicateNodesInDeployedL(*preInstallCompo);
  3667                         }
  3698                         }
  3668                     }
  3699                     }
  3669                 delete preInstallApp;
  3700                 delete preInstallApp;