566 { |
566 { |
567 iLogBus->LogText( _L( "ChspsMaintenanceHandler::ServiceAddPluginL(): - Updating failed with code: %d" ), err ); |
567 iLogBus->LogText( _L( "ChspsMaintenanceHandler::ServiceAddPluginL(): - Updating failed with code: %d" ), err ); |
568 } |
568 } |
569 #endif |
569 #endif |
570 } |
570 } |
|
571 else |
|
572 { |
|
573 iThemeServer.SetResourceFileCopyRequired( appODT->RootUid() ); |
|
574 } |
571 } |
575 } |
572 |
576 |
573 // Unlock after the changes have been done |
577 // Unlock after the changes have been done |
574 iDefinitionRepository.Unlock(); |
578 iDefinitionRepository.Unlock(); |
575 CleanupStack::Pop(&iDefinitionRepository); |
579 CleanupStack::Pop(&iDefinitionRepository); |
576 |
|
577 if ( !err ) |
|
578 { |
|
579 // Inform clients that the ODT has been modified |
|
580 ThspsRepositoryInfo info( |
|
581 ThspsRepositoryEvent(EhspsODTModified), |
|
582 appODT->RootUid(), |
|
583 appODT->ThemeUid(), |
|
584 aMessage.SecureId().iId, |
|
585 appODT->ProviderUid(), |
|
586 0, |
|
587 0, |
|
588 pluginUid,usedPluginId,ETrue, |
|
589 pluginODT->ThemeFullName(), |
|
590 (TLanguage)(appODT->OdtLanguage() ) ); |
|
591 iDefinitionRepository.RegisterNotification( info ); |
|
592 } |
|
593 } |
580 } |
594 } |
581 } |
595 |
582 |
596 // Cleaning |
583 // Cleaning |
597 if ( pluginODT ) |
584 if ( pluginODT ) |
1198 } |
1185 } |
1199 |
1186 |
1200 // Unlock after the changes have been done |
1187 // Unlock after the changes have been done |
1201 iDefinitionRepository.Unlock(); |
1188 iDefinitionRepository.Unlock(); |
1202 CleanupStack::Pop(&iDefinitionRepository); |
1189 CleanupStack::Pop(&iDefinitionRepository); |
1203 |
|
1204 if ( !err ) |
|
1205 { |
|
1206 // Inform clients that the ODT has been modified |
|
1207 ThspsRepositoryInfo info( |
|
1208 ThspsRepositoryEvent(EhspsODTRemoved), |
|
1209 appODT->RootUid(), |
|
1210 appODT->ThemeUid(), |
|
1211 aMessage.SecureId().iId, |
|
1212 appODT->ProviderUid(), |
|
1213 0,0, |
|
1214 pluginUid,pluginId,ETrue, |
|
1215 pluginName, |
|
1216 (TLanguage)(appODT->OdtLanguage()) |
|
1217 ); |
|
1218 iDefinitionRepository.RegisterNotification( info ); |
|
1219 } |
|
1220 } |
1190 } |
1221 } |
1191 } |
1222 |
1192 |
1223 // Cleaning |
1193 // Cleaning |
1224 if ( appODT ) |
1194 if ( appODT ) |
1598 ChspsOdtDump::Dump( *appODT, *iLogBus ); |
1568 ChspsOdtDump::Dump( *appODT, *iLogBus ); |
1599 } |
1569 } |
1600 #endif |
1570 #endif |
1601 // Stores the new application configuration into the repository |
1571 // Stores the new application configuration into the repository |
1602 err = iDefinitionRepository.SetOdtL( *appODT ); |
1572 err = iDefinitionRepository.SetOdtL( *appODT ); |
|
1573 |
1603 // Unlock after the changes have been done |
1574 // Unlock after the changes have been done |
1604 iDefinitionRepository.Unlock(); |
1575 iDefinitionRepository.Unlock(); |
1605 if ( err ) |
1576 if ( err ) |
1606 { |
1577 { |
1607 #ifdef HSPS_LOG_ACTIVE |
1578 #ifdef HSPS_LOG_ACTIVE |
1608 if( iLogBus ) |
1579 if( iLogBus ) |
1609 { |
1580 { |
1610 iLogBus->LogText( _L( "ChspsMaintenanceHandler::ServiceReplacePluginL(): - Updating failed" ) ); |
1581 iLogBus->LogText( _L( "ChspsMaintenanceHandler::ServiceReplacePluginL(): - Updating failed" ) ); |
1611 } |
1582 } |
1612 #endif |
1583 #endif |
1613 } |
1584 } |
1614 else |
1585 else |
1615 { |
1586 { |
1616 // Inform clients that the ODT has been modified |
1587 iThemeServer.SetResourceFileCopyRequired( appODT->RootUid() ); |
1617 ThspsRepositoryInfo info( |
1588 } |
1618 ThspsRepositoryEvent(EhspsPluginReplaced), |
|
1619 appODT->RootUid(), |
|
1620 appODT->ThemeUid(), |
|
1621 aMessage.SecureId().iId, |
|
1622 0, |
|
1623 0, |
|
1624 0, |
|
1625 confUid, |
|
1626 pluginId, |
|
1627 ETrue, |
|
1628 KNullDesC(), |
|
1629 (TLanguage)(appODT->OdtLanguage()) |
|
1630 ); |
|
1631 iDefinitionRepository.RegisterNotification( info ); |
|
1632 } |
|
1633 } |
1589 } |
1634 else |
1590 else |
1635 { |
1591 { |
1636 // Unlock repository |
1592 // Unlock repository |
1637 iDefinitionRepository.Unlock(); |
1593 iDefinitionRepository.Unlock(); |
3639 odt->SetThemeVersionL( header->ThemeVersion() ); |
3595 odt->SetThemeVersionL( header->ThemeVersion() ); |
3640 odt->SetDescriptionL( header->Description() ); |
3596 odt->SetDescriptionL( header->Description() ); |
3641 odt->SetFlags( header->Flags() ); |
3597 odt->SetFlags( header->Flags() ); |
3642 odt->SetMultiInstance( header->MultiInstance() ); |
3598 odt->SetMultiInstance( header->MultiInstance() ); |
3643 User::LeaveIfError( iDefinitionRepository.GetOdtL( *odt ) ); |
3599 User::LeaveIfError( iDefinitionRepository.GetOdtL( *odt ) ); |
3644 |
|
3645 |
3600 |
3646 RArray<TInt> pluginIds; |
3601 RArray<TInt> pluginIds; |
3647 |
3602 CleanupClosePushL( pluginIds ); |
3648 hspsServerUtil::GetPluginIdsByUidL( *odt, |
3603 hspsServerUtil::GetPluginIdsByUidL( *odt, |
3649 TUid::Uid( aOdt.ThemeUid() ), |
3604 TUid::Uid( aOdt.ThemeUid() ), |
3650 pluginIds ); |
3605 pluginIds ); |
3651 |
3606 |
3652 |
|
3653 if ( pluginIds.Count() > 0 ) |
3607 if ( pluginIds.Count() > 0 ) |
3654 { |
3608 { |
3655 |
3609 |
3656 |
3610 |
3657 TInt err = UpdatePluginConfigurationL( |
3611 TInt err = UpdatePluginConfigurationL( |
3658 *odt, |
3612 *odt, |
3659 aOdt, |
3613 aOdt, |
3660 pluginIds ); |
3614 pluginIds ); |
3661 |
3615 |
3662 User::LeaveIfError( iDefinitionRepository.SetOdtL( *odt ) ); |
3616 User::LeaveIfError( iDefinitionRepository.SetOdtL( *odt ) ); |
3663 |
|
3664 |
|
3665 |
3617 |
3666 TBool status = EFalse; |
3618 TBool status = EFalse; |
3667 for(TInt i = 0; i < pluginIds.Count(); i++ ) |
3619 for(TInt i = 0; i < pluginIds.Count(); i++ ) |
3668 { |
3620 { |
3669 if( i == pluginIds.Count() - 1 ) |
3621 if( i == pluginIds.Count() - 1 ) |