# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1286970826 -10800 # Node ID 67f2ed48ad91f2a737373bd5fbd46966e2027a72 # Parent 6cadd6867c17ff868f8032f1fbba0dd8232c2a90 Revision: 201039 Kit: 201041 diff -r 6cadd6867c17 -r 67f2ed48ad91 contentcontrolsrv/ccsrv/src/ccsrv.cpp --- a/contentcontrolsrv/ccsrv/src/ccsrv.cpp Wed Sep 15 12:32:36 2010 +0300 +++ b/contentcontrolsrv/ccsrv/src/ccsrv.cpp Wed Oct 13 14:53:46 2010 +0300 @@ -251,7 +251,7 @@ CCcSrv::TCcProvider provider; provider.iId = aProvider; provider.iSession = aSession; - iProviders.AppendL( provider ); + iProviders.Append( provider ); // Register possible active observers for ( TUint32 i = 0; i < iObservers.Count(); i++ ) @@ -283,7 +283,7 @@ CCcSrv::TCcObserver observer; observer.iProviderId = aProvider; observer.iObserver = aSession->Id(); - iObservers.AppendL( observer ); + iObservers.Append( observer ); } // ----------------------------------------------------------------------------- diff -r 6cadd6867c17 -r 67f2ed48ad91 contentpublishingsrv/contentpublishingutils/contentpublishingdebug/src/cpdebug.cpp --- a/contentpublishingsrv/contentpublishingutils/contentpublishingdebug/src/cpdebug.cpp Wed Sep 15 12:32:36 2010 +0300 +++ b/contentpublishingsrv/contentpublishingutils/contentpublishingdebug/src/cpdebug.cpp Wed Oct 13 14:53:46 2010 +0300 @@ -167,15 +167,12 @@ RDebug::Printf( "CPS Client::Request %s Parameters: \n", aStringParam ); for ( TInt i = 0; i < aInParamList.Count( ); i++ ) { - TRAP_IGNORE( - { - TLiwGenericParam tempParam; - tempParam.PushL(); - aInParamList.AtL(i ,tempParam); - Dump( tempParam.Value() ); - CleanupStack::Pop(&tempParam); - tempParam.Reset(); - } ); + TLiwGenericParam tempParam; + tempParam.PushL(); + TRAP_IGNORE( aInParamList.AtL(i ,tempParam) ); + Dump( tempParam.Value() ); + CleanupStack::Pop(&tempParam); + tempParam.Reset(); } } diff -r 6cadd6867c17 -r 67f2ed48ad91 homescreenpluginsrv/conf/hsps.confml Binary file homescreenpluginsrv/conf/hsps.confml has changed diff -r 6cadd6867c17 -r 67f2ed48ad91 homescreenpluginsrv/conf/hsps_200159c9.crml Binary file homescreenpluginsrv/conf/hsps_200159c9.crml has changed diff -r 6cadd6867c17 -r 67f2ed48ad91 homescreenpluginsrv/conf/hsps_qhd.confml Binary file homescreenpluginsrv/conf/hsps_qhd.confml has changed diff -r 6cadd6867c17 -r 67f2ed48ad91 homescreenpluginsrv/conf/hsps_vga.confml --- a/homescreenpluginsrv/conf/hsps_vga.confml Wed Sep 15 12:32:36 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,44 +0,0 @@ - - - - CenRep keys for Homescreenpluginsrv - - Holds UID of an active application configuration plugin for AI3 client - - - Holds UID of an active application configuration plugin for EUnit client - - - Holds device language ID from previous startup - - - FW version or empty if plugins should be reinstalled in next start up - - - Holds information whether configuration states must be checked - - - Access control for clients which are missing the capablities - - - - - 536999055 - 536916224 - 1 - - 0 - 0x102750F0;0x200159C6;0x20000FB1;0x10005A32;0x100058EC;0x200159c5;0x200255FF; - - - - - true - true - true - true - true - false - - - diff -r 6cadd6867c17 -r 67f2ed48ad91 homescreenpluginsrv/group/bld.inf --- a/homescreenpluginsrv/group/bld.inf Wed Sep 15 12:32:36 2010 +0300 +++ b/homescreenpluginsrv/group/bld.inf Wed Oct 13 14:53:46 2010 +0300 @@ -49,13 +49,9 @@ // Generic configuration interface for component cenrep settings -#if defined(FF_LAYOUT_480_640_TOUCH_VGA4) || defined(FF_LAYOUT_640_480_TOUCH_VGA4) -../conf/hsps_vga.confml APP_LAYER_CONFML(hsps.confml) -#else -../conf/hsps_qhd.confml APP_LAYER_CONFML(hsps.confml) -#endif +../conf/hsps.confml APP_LAYER_CONFML(hsps.confml) +../conf/hsps_200159c9.crml APP_LAYER_CRML(hsps_200159c9.crml) -../conf/hsps_200159c9.crml APP_LAYER_CRML(hsps_200159c9.crml) // Exports for SAPI impl ../inc/hspsdomattribute.h MW_LAYER_PLATFORM_EXPORT_PATH(hspsdomattribute.h) diff -r 6cadd6867c17 -r 67f2ed48ad91 homescreenpluginsrv/hspsmanager/inc/hspsconfiguration.h --- a/homescreenpluginsrv/hspsmanager/inc/hspsconfiguration.h Wed Sep 15 12:32:36 2010 +0300 +++ b/homescreenpluginsrv/hspsmanager/inc/hspsconfiguration.h Wed Oct 13 14:53:46 2010 +0300 @@ -54,7 +54,7 @@ // Options for the KConfigurationAttrLocking _LIT8( KConfLockingLocked, "locked" ); // Locked state -_LIT8( KConfLockingPermanent, "permanent" ); // Permanent state (not removable, not movable) +_LIT8( KConfLockingRemovable, "removable" ); // Removable state _LIT8( KConfLockingNone, "none" ); // Default // Control element diff -r 6cadd6867c17 -r 67f2ed48ad91 homescreenpluginsrv/hspsmanager/inc/hspsmaintenancehandler.h --- a/homescreenpluginsrv/hspsmanager/inc/hspsmaintenancehandler.h Wed Sep 15 12:32:36 2010 +0300 +++ b/homescreenpluginsrv/hspsmanager/inc/hspsmaintenancehandler.h Wed Oct 13 14:53:46 2010 +0300 @@ -725,16 +725,6 @@ ChspsODT& aOdt ); /** - * Activates default configuration defined for the application - * @since S60 5.2 - * @param aHeader application which default configuration is activated - * @param aOdt activated application configuration - */ - void ActivateDefaultAppConfL( - const ChspsODT& aHeader, - ChspsODT& aOdt ); - - /** * HandleDefinitionRespositoryEventL * * @since S60 5.0 @@ -752,28 +742,6 @@ RArray& aNotificationParams); /** - * RemoveAppConfFromRepositoryL - * Removes application confguration from definition repository - * @since S60 5.2 - * @param aOdt application configuration to be removed - * @param aNotificationParams notifications need to be sent after removal - */ - void RemoveAppConfFromRepositoryL( - const ChspsODT& aOdt, - RArray& aNotificationParams ); - - /** - * RemovePluginConfFromRepositoryL - * Removes plugin confguration from definition repository - * @since S60 5.2 - * @param aOdt plugin configuration to be removed - * @param aNotificationParams notifications need to be sent after removal - */ - void RemovePluginConfFromRepositoryL( - const ChspsODT& aOdt, - RArray& aNotificationParams ); - - /** * InvalidateUninstalledPluginInstancesL * Removes uninstalled plugin instances from an inactive * application configuration by changing them to error state. diff -r 6cadd6867c17 -r 67f2ed48ad91 homescreenpluginsrv/hspsmanager/src/hspsclientrequesthandler.cpp --- a/homescreenpluginsrv/hspsmanager/src/hspsclientrequesthandler.cpp Wed Sep 15 12:32:36 2010 +0300 +++ b/homescreenpluginsrv/hspsmanager/src/hspsclientrequesthandler.cpp Wed Oct 13 14:53:46 2010 +0300 @@ -741,13 +741,7 @@ } else { - // Child counts should match, set plugin to Error state - const TInt pluginUid = hspsServerUtil::GetPluginUid( parentNode ).iUid; - __ASSERT_DEBUG( pluginUid > 0, User::Leave( KErrCorrupt ) ); - AddErrorConfigurationL( - appDom, - *parentNode, - pluginUid ); + error = KErrCorrupt; } } else diff -r 6cadd6867c17 -r 67f2ed48ad91 homescreenpluginsrv/hspsmanager/src/hspsinstallationhandler.cpp --- a/homescreenpluginsrv/hspsmanager/src/hspsinstallationhandler.cpp Wed Sep 15 12:32:36 2010 +0300 +++ b/homescreenpluginsrv/hspsmanager/src/hspsinstallationhandler.cpp Wed Oct 13 14:53:46 2010 +0300 @@ -395,22 +395,12 @@ TRAPD( err, DoInstallThemeL(aManifestFileName) ); if( !err ) { - // correct headerdata is in iHeaderData set by CheckHeaderL(), check space - const TUint bytesRequired = iHeaderData->Des().Length(); - const TUint bytesAllocated = aHeaderData.MaxLength(); - if( bytesRequired <= bytesAllocated ) - { - aHeaderData = iHeaderData->Des(); - - // Set next phase - iInstallationPhase = EhspsPhaseCleanup; - ret = EhspsInstallThemeSuccess; - } - else - { - err = KErrOverflow; - iInstallationPhase = EhspsPhaseIdle; - } + // correct headerdata is in iHeaderData set by CheckHeaderL() + aHeaderData = iHeaderData->Des(); + + // Set next phase + iInstallationPhase = EhspsPhaseCleanup; + ret = EhspsInstallThemeSuccess; } else { @@ -1598,8 +1588,8 @@ KNullDesC(), (TLanguage)( fullODT->OdtLanguage() ) ); - notifications.AppendL( info ); - } + notifications.Append( info ); + } CleanupStack::PopAndDestroy(); // pluginIds. CleanupStack::PopAndDestroy( fullODT ); @@ -2270,11 +2260,11 @@ TInt drive = hspsServerUtil::GetEmmcDrivePath( iFsSession ); if ( drive != KErrNotFound ) { - driveArray.AppendL( drive ); + driveArray.Append( drive ); } - driveArray.AppendL( EDriveC ); - driveArray.AppendL( EDriveZ ); + driveArray.Append( EDriveC ); + driveArray.Append( EDriveZ ); FindResourceFilesL( aPath, ETrue, driveArray, systemEpocLanguageCodes ); diff -r 6cadd6867c17 -r 67f2ed48ad91 homescreenpluginsrv/hspsmanager/src/hspsmaintenancehandler.cpp --- a/homescreenpluginsrv/hspsmanager/src/hspsmaintenancehandler.cpp Wed Sep 15 12:32:36 2010 +0300 +++ b/homescreenpluginsrv/hspsmanager/src/hspsmaintenancehandler.cpp Wed Oct 13 14:53:46 2010 +0300 @@ -319,7 +319,6 @@ CleanupStack::PopAndDestroy(headerdata); ThspsRepositoryInfo info( EhspsODTActivated ); - info.iAppUid = odt->RootUid(); iDefinitionRepository.RegisterNotification( info ); } } @@ -1866,7 +1865,7 @@ TInt pluginCount = pluginsNode->ChildNodes().Length(); for( TInt pluginIndex=0; pluginIndex < pluginCount; pluginIndex++ ) { - nodeArray.AppendL( (ChspsDomNode*)pluginsNode->ChildNodes().Item( pluginIndex ) ); + nodeArray.Append( (ChspsDomNode*)pluginsNode->ChildNodes().Item( pluginIndex ) ); } // Remove the nodes and related resources @@ -3210,8 +3209,7 @@ if( !( aSetMask.Flags() & EhspsThemeStatusLicenceeDefault ) ) { RArray notifParams; - CleanupClosePushL( notifParams ); - + if( !iDefinitionRepository.Locked() ) { iDefinitionRepository.Lock(); @@ -3223,11 +3221,14 @@ TInt error( KErrNone ); if ( aSetMask.ConfigurationType() != EhspsAppConfiguration ) { - TRAP( error, RemovePluginConfFromRepositoryL( aSetMask, notifParams ) ); + // Fix plugin instances and get notifications from valid cases + TRAP( error, RemovePluginFromAppConfsL( aSetMask, notifParams ) ); } - else + + if( !error ) { - TRAP( error, RemoveAppConfFromRepositoryL( aSetMask, notifParams ) ); + // Remove the actual plugin from file system + TRAP( error, RemoveThemeL( aSetMask ) ); } if( !error ) @@ -3256,7 +3257,7 @@ } } - CleanupStack::PopAndDestroy( ¬ifParams ); + notifParams.Close(); } return ret; @@ -3271,7 +3272,7 @@ RArray& aNotificationParams ) { __ASSERT_DEBUG( aOdt.ThemeUid(), User::Leave( KErrArgument ) ); - + // Loop application configurations const TInt count = iHeaderListCache.Count(); for ( TInt i = 0; i < count; i++ ) @@ -3359,7 +3360,7 @@ lastNotification, aOdt.ThemeFullName(), (TLanguage)( aOdt.OdtLanguage() ) ); - aNotificationParams.AppendL(info); + aNotificationParams.Append(info); } #ifdef HSPS_LOG_ACTIVE if( iLogBus ) @@ -3389,59 +3390,18 @@ ETrue, aOdt.ThemeFullName(), (TLanguage)( aOdt.OdtLanguage() ) ); - aNotificationParams.AppendL(info); + aNotificationParams.Append(info); } } + pluginIds.Close(); CleanupStack::PopAndDestroy( 2, appOdt ); // appOdt, pluginIds appOdt = NULL; } // app configuration } // header loop - } - -// ----------------------------------------------------------------------------- -// RemoveAppConfFromRepositoryL -// ----------------------------------------------------------------------------- -// -void ChspsMaintenanceHandler::RemoveAppConfFromRepositoryL( - const ChspsODT& aOdt, - RArray& /* aNotificationParams */ ) - { - __ASSERT_DEBUG( aOdt.ThemeUid(), User::Leave( KErrArgument ) ); - - ChspsODT* activeAppConf = ChspsODT::NewL(); - CleanupStack::PushL( activeAppConf ); - iThemeServer.GetActivateAppConfigurationL( aOdt.RootUid(), *activeAppConf ); - if ( aOdt.ThemeUid() == activeAppConf->ThemeUid() ) - { - // Active application configuration removed - ActivateDefaultAppConfL( aOdt, *activeAppConf ); - } - - CleanupStack::PopAndDestroy( activeAppConf ); - - // Remove the actual application configuration from file system - RemoveThemeL( aOdt ); - - } - -// ----------------------------------------------------------------------------- -// RemovePluginConfFromRepositoryL -// ----------------------------------------------------------------------------- -// -void ChspsMaintenanceHandler::RemovePluginConfFromRepositoryL( - const ChspsODT& aOdt, - RArray& aNotificationParams ) - { - __ASSERT_DEBUG( aOdt.ThemeUid(), User::Leave( KErrArgument ) ); - - // Fix plugin instances and get notifications from valid cases - RemovePluginFromAppConfsL( aOdt, aNotificationParams ); - - // Remove the actual plugin configuration from file system - RemoveThemeL( aOdt ); + } // ----------------------------------------------------------------------------- @@ -3555,8 +3515,7 @@ User::LeaveIfError( iDefinitionRepository.GetOdtL( *odt ) ); RArray notifParams; - CleanupClosePushL( notifParams ); - + TRAP( errorCode, UpdatePluginFromAppConfsL( *odt, notifParams )); if( errorCode ) @@ -3581,8 +3540,8 @@ } } + notifParams.Close(); - CleanupStack::PopAndDestroy( ¬ifParams ); CleanupStack::PopAndDestroy( odt ); } @@ -3658,7 +3617,7 @@ status, aOdt.ThemeFullName(), (TLanguage)( aOdt.OdtLanguage() ) ); - aNotificationParams.AppendL(info); + aNotificationParams.Append(info); } } @@ -3666,6 +3625,7 @@ CleanupStack::PopAndDestroy( odt ); } } + } } // ----------------------------------------------------------------------------- @@ -4547,8 +4507,28 @@ // If active application configuration is not "LicenceeRestorable" if ( !(aHeader->Flags() & EhspsThemeStatusLicenceeRestorable) ) { - // Try to activate default configuation - ActivateDefaultAppConfL( *aHeader, aOdt ); + // Try to activate a configuation with the LicenceeRestorable status + ChspsODT* searchMask = ChspsODT::NewL(); + CleanupStack::PushL( searchMask ); + searchMask->SetRootUid( aHeader->RootUid() ); + searchMask->SetFamily( aHeader->Family() ); + searchMask->SetFlags( EhspsThemeStatusLicenceeRestorable ); + TInt pos( 0 ); + iThemeServer.GetConfigurationHeader( *searchMask, aHeader, pos ); + if ( aHeader ) + { + // Activate licensee restorable configuration + iThemeServer.ActivateThemeL( *aHeader, aOdt ); + ThspsRepositoryInfo info( EhspsODTActivated ); + iDefinitionRepository.RegisterNotification( info ); + } + else + { + // Licensee restorable configuration not found. There must be + // at least one licensee restorable configuration per application + User::Leave( KErrNotFound ); + } + CleanupStack::PopAndDestroy( searchMask ); } else { @@ -4558,39 +4538,6 @@ } // ----------------------------------------------------------------------------- -// ChspsMaintenanceHandler::ActivateDefaultAppConfL -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void ChspsMaintenanceHandler::ActivateDefaultAppConfL( - const ChspsODT& aHeader, - ChspsODT& aOdt ) - { - ChspsODT* searchMask = ChspsODT::NewL(); - CleanupStack::PushL( searchMask ); - searchMask->SetRootUid( aHeader.RootUid() ); - searchMask->SetFamily( aHeader.Family() ); - searchMask->SetFlags( EhspsThemeStatusLicenceeRestorable ); - - ChspsODT* defaultAppConf( NULL ); - TInt pos( 0 ); - iThemeServer.GetConfigurationHeader( *searchMask, defaultAppConf, pos ); - if ( defaultAppConf ) - { - // Activate licensee restorable configuration - iThemeServer.ActivateThemeL( *defaultAppConf, aOdt ); - } - else - { - // Licensee restorable configuration not found. There must be - // at least one licensee restorable configuration per application - User::Leave( KErrNotFound ); - } - - CleanupStack::PopAndDestroy( searchMask ); - } - -// ----------------------------------------------------------------------------- // ChspsMaintenanceHandler::AddErrorConfigurationL() // ----------------------------------------------------------------------------- // @@ -4894,12 +4841,8 @@ ChspsDomAttribute* attr = static_cast( attrList.FindByName( KConfigurationAttrLocking ) ); if( attr ) - { - if( attr->Value().CompareF( KConfLockingLocked ) == 0 || - attr->Value().CompareF( KConfLockingPermanent ) == 0 ) - { - isLocked = ETrue; - } + { + isLocked = ( attr->Value().CompareF( KConfLockingLocked ) == 0 ); } return isLocked; @@ -4963,7 +4906,7 @@ if( !isLocked || foundLocked ) { // Mark for removal - nodeArray.AppendL( pluginNode ); + nodeArray.Append( pluginNode ); } else { diff -r 6cadd6867c17 -r 67f2ed48ad91 homescreenpluginsrv/hspsmanager/src/hspsserverutil.cpp --- a/homescreenpluginsrv/hspsmanager/src/hspsserverutil.cpp Wed Sep 15 12:32:36 2010 +0300 +++ b/homescreenpluginsrv/hspsmanager/src/hspsserverutil.cpp Wed Oct 13 14:53:46 2010 +0300 @@ -951,10 +951,8 @@ void hspsServerUtil::FindUniquePluginsL( ChspsODT& aOdt, RArray& aPluginArray ) - { - aPluginArray.Reset(); - CleanupClosePushL( aPluginArray ); - + { + aPluginArray.Reset(); ChspsDomDocument& dom = aOdt.DomDocument(); ChspsDomDepthIterator* iter = ChspsDomDepthIterator::NewL( *dom.RootNode() ); CleanupStack::PushL( iter ); @@ -962,32 +960,32 @@ ChspsDomNode* node = iter->First(); ChspsDomNode* prevNode = NULL; while( node && prevNode != node ) - { - const TDesC8& name = node->Name(); + { + const TDesC8& name = node->Name(); - // Plugin element was found - if ( name == KPluginElement ) - { - ChspsDomList& attrList = node->AttributeList(); - ChspsDomAttribute* uidAttr = static_cast( attrList.FindByName(KPluginAttrUid) ); - if ( uidAttr ) - { - // Convert from hex to int - const TUid pluginUid = ConvertDescIntoUid( uidAttr->Value() ); - if ( pluginUid.iUid > 0 ) - { - TBool isUnique = ETrue; - for( TInt i=0; isUnique && iAttributeList(); + ChspsDomAttribute* uidAttr = static_cast( attrList.FindByName(KPluginAttrUid) ); + if ( uidAttr ) + { + // Convert from hex to int + const TUid pluginUid = ConvertDescIntoUid( uidAttr->Value() ); + if ( pluginUid.iUid > 0 ) + { + TBool isUnique = ETrue; + for( TInt i=0; isUnique && iNextL(); } - - CleanupStack::PopAndDestroy( iter ); - CleanupStack::Pop( &aPluginArray ); - } + CleanupStack::PopAndDestroy( iter ); +} //---------------------------------------------------------------------------- // CHspsServiceUtilities::HexString2Uint @@ -1280,9 +1276,10 @@ TFileName file; file.Append( aDirName ); file.Append( fileEntry.iName ); - aFiles.AppendL( file ); + aFiles.Append( file ); } CleanupStack::PopAndDestroy( fileList ); + CleanupStack::PopAndDestroy(); // fs } @@ -2048,13 +2045,6 @@ { aFs.SetSessionToPrivate( drive ); } -// When Emmc drive is not present in emulator it is replaced by D drive -#ifdef __WINSCW__ - else - { - aFs.SetSessionToPrivate( EDriveD ); - } -#endif } else { @@ -2216,7 +2206,7 @@ // Find files from the subdirectory and the drive RArray driveArray; CleanupClosePushL( driveArray ); - driveArray.AppendL( aDriveArray[driveIndex] ); + driveArray.Append( aDriveArray[driveIndex] ); FindResourcesL( aFs, driveArray, file, aFileArray, NULL ); CleanupStack::PopAndDestroy( &driveArray ); } diff -r 6cadd6867c17 -r 67f2ed48ad91 homescreenpluginsrv/hspsmanager/src/hspsthemeserver.cpp --- a/homescreenpluginsrv/hspsmanager/src/hspsthemeserver.cpp Wed Sep 15 12:32:36 2010 +0300 +++ b/homescreenpluginsrv/hspsmanager/src/hspsthemeserver.cpp Wed Oct 13 14:53:46 2010 +0300 @@ -624,8 +624,7 @@ if( aRepositoryInfo.iEventType & EhspsODTUpdated || aRepositoryInfo.iEventType & EhspsODTModified || - aRepositoryInfo.iEventType & EhspsPluginReplaced || - aRepositoryInfo.iEventType == EhspsODTActivated ) + aRepositoryInfo.iEventType & EhspsPluginReplaced ) { SetResourceFileCopyRequired( aRepositoryInfo.iAppUid ); } @@ -3643,7 +3642,7 @@ } if ( !alreadyIncluded ) { - notificationTargets.AppendL( header ); + notificationTargets.Append( header ); // Check if active configuration supports the current family TBool updateRequired = ETrue; diff -r 6cadd6867c17 -r 67f2ed48ad91 homescreenpluginsrv/hspsmanager/src/hspsthemeserversession.cpp --- a/homescreenpluginsrv/hspsmanager/src/hspsthemeserversession.cpp Wed Sep 15 12:32:36 2010 +0300 +++ b/homescreenpluginsrv/hspsmanager/src/hspsthemeserversession.cpp Wed Oct 13 14:53:46 2010 +0300 @@ -781,7 +781,7 @@ ChspsODT& aAppODT, RArray& aUidArray ) { - aUidArray.Reset(); + aUidArray.Reset(); const TInt resourceCount = aAppODT.ResourceCount(); for( TInt resourceIndex = 0; resourceIndex < resourceCount; resourceIndex++ ) { @@ -790,9 +790,9 @@ if ( uid > 0 && aUidArray.Find( uid ) == KErrNotFound ) { - aUidArray.AppendL( uid ); + aUidArray.Append( uid ); } - } + } } // ----------------------------------------------------------------------------- diff -r 6cadd6867c17 -r 67f2ed48ad91 homescreensrv_plat/ai_variation_api/inc/activeidle2domaincrkeys.h --- a/homescreensrv_plat/ai_variation_api/inc/activeidle2domaincrkeys.h Wed Sep 15 12:32:36 2010 +0300 +++ b/homescreensrv_plat/ai_variation_api/inc/activeidle2domaincrkeys.h Wed Oct 13 14:53:46 2010 +0300 @@ -128,9 +128,4 @@ */ const TUint32 KAIActiveViewPluginId = 0x00000852; -/** - * Key id for finger follow view switching support - */ -const TUint32 KAIFingerFollowSupport = 0x00000853; - #endif // __AI2INTERNALCRKEYS_H__ diff -r 6cadd6867c17 -r 67f2ed48ad91 homescreensrv_plat/hs_widget_publisher_api/src/hswidgetitem.cpp --- a/homescreensrv_plat/hs_widget_publisher_api/src/hswidgetitem.cpp Wed Sep 15 12:32:36 2010 +0300 +++ b/homescreensrv_plat/hs_widget_publisher_api/src/hswidgetitem.cpp Wed Oct 13 14:53:46 2010 +0300 @@ -27,6 +27,7 @@ HsWidgetItem::HsWidgetItem(std::string& aItemName, std::string& aValue): mItemName(aItemName), mItemString(aValue), mItemInt(0), mIsString(true),mTrigger(false) + { } @@ -35,8 +36,7 @@ // --------------------------------------------------------------------------- // HsWidgetItem::HsWidgetItem( std::string& aItemName, int aValue ): - mItemName(aItemName), mItemString(), mItemInt(aValue), - mIsString(false), mTrigger(false) + mItemName(aItemName), mItemString(), mItemInt(aValue), mIsString(false) { } diff -r 6cadd6867c17 -r 67f2ed48ad91 homescreensrv_plat/hs_widget_publisher_api/tsrc/src/TestHspApiBlocks.cpp --- a/homescreensrv_plat/hs_widget_publisher_api/tsrc/src/TestHspApiBlocks.cpp Wed Sep 15 12:32:36 2010 +0300 +++ b/homescreensrv_plat/hs_widget_publisher_api/tsrc/src/TestHspApiBlocks.cpp Wed Oct 13 14:53:46 2010 +0300 @@ -630,7 +630,7 @@ delete mHSPApi; - if ( count != 4 ) + if ( count != 1 ) { err = KErrGeneral; } @@ -724,7 +724,7 @@ CLiwGenericParamList* res = GetListL( contentType, identifier, widgetName ); TInt count = ExtractItemCountL( *res ); - if ( count != 4 ) + if ( count != 1 ) { err = KErrGeneral; } @@ -770,7 +770,7 @@ CLiwGenericParamList* res = GetListL( contentType, identifier, widgetName ); TInt count = ExtractItemCountL( *res ); - if ( count != 4 ) + if ( count != 1 ) { err = KErrGeneral; } @@ -816,7 +816,7 @@ CLiwGenericParamList* res = GetListL( contentType, identifier, widgetName ); TInt count = ExtractItemCountL( *res ); - if ( count != 4 ) + if ( count != 1 ) { err = KErrGeneral; } diff -r 6cadd6867c17 -r 67f2ed48ad91 homescreensrv_plat/sapi_homescreenplugin/hspsservice/src/hspsconfigurationservice.cpp --- a/homescreensrv_plat/sapi_homescreenplugin/hspsservice/src/hspsconfigurationservice.cpp Wed Sep 15 12:32:36 2010 +0300 +++ b/homescreensrv_plat/sapi_homescreenplugin/hspsservice/src/hspsconfigurationservice.cpp Wed Oct 13 14:53:46 2010 +0300 @@ -422,7 +422,7 @@ for(TInt i=0; i < iNotifyParams->iCount; i++ ) { - iPluginIds.AppendL( aParams.iPluginIds[i] ); + iPluginIds.Append( aParams.iPluginIds[i] ); } iNotifyParams->SetNameL(aParams.Name()); diff -r 6cadd6867c17 -r 67f2ed48ad91 homescreensrv_plat/sapi_homescreenplugin/src/hspsliwutilities.cpp --- a/homescreensrv_plat/sapi_homescreenplugin/src/hspsliwutilities.cpp Wed Sep 15 12:32:36 2010 +0300 +++ b/homescreensrv_plat/sapi_homescreenplugin/src/hspsliwutilities.cpp Wed Oct 13 14:53:46 2010 +0300 @@ -1057,7 +1057,7 @@ } if ( aItemMask & CHspsLiwUtilities::EPluginMapLocked ) { - //Add plugin locked status - locked/permanent/none(default) + //Add plugin locked status - locked/removable/none(default) AppendAttributeToMapL( aMap, attrList, KConfigurationAttrLockingStatus, diff -r 6cadd6867c17 -r 67f2ed48ad91 homescreensrv_plat/sapi_homescreenplugin/tsrc/hspsconfigurationif/group/mt_hspsconfigurationif.mmp --- a/homescreensrv_plat/sapi_homescreenplugin/tsrc/hspsconfigurationif/group/mt_hspsconfigurationif.mmp Wed Sep 15 12:32:36 2010 +0300 +++ b/homescreensrv_plat/sapi_homescreenplugin/tsrc/hspsconfigurationif/group/mt_hspsconfigurationif.mmp Wed Oct 13 14:53:46 2010 +0300 @@ -61,6 +61,5 @@ LIBRARY hspsclient.lib LIBRARY hspsodt.lib LIBRARY hspsresult.lib -LIBRARY PlatformEnv.lib // for DriveInfo // End of file diff -r 6cadd6867c17 -r 67f2ed48ad91 homescreensrv_plat/sapi_homescreenplugin/tsrc/hspsconfigurationif/src/mt_hspsconfigurationif.cpp --- a/homescreensrv_plat/sapi_homescreenplugin/tsrc/hspsconfigurationif/src/mt_hspsconfigurationif.cpp Wed Sep 15 12:32:36 2010 +0300 +++ b/homescreensrv_plat/sapi_homescreenplugin/tsrc/hspsconfigurationif/src/mt_hspsconfigurationif.cpp Wed Oct 13 14:53:46 2010 +0300 @@ -23,7 +23,6 @@ #include #include #include -#include #include "mt_hspsconfigurationif.h" #include "mt_hspsliwlistprinter.h" #include "mt_hspsinstallationservice.h" @@ -133,38 +132,8 @@ _LIT( KMinimalResourceFile4, "c:\\private\\20000fb1\\2456\\270513751\\536916225\\1.0\\sources\\picture.jpeg" ); _LIT( KFinnishMifLogo, "c:\\private\\20000fb1\\2456\\270513751\\536916274\\1.0\\sources\\dummy.mif" ); -const TInt16 KletterA = 'a'; // ASCII code for 'a' - // ======== LOCAL FUNCTIONS ==================================================== -//------------------------------------------------------------------------------ -// EMMC drive finder - from hspsServerUtil -//------------------------------------------------------------------------------ -TInt GetEmmcDrivePath( ) - { - RFs fs; - if ( fs.Connect() != KErrNone ) - { - return KErrNotFound; - } - TInt drive = KErrNotFound; - if ( DriveInfo::GetDefaultDrive( - DriveInfo::EDefaultMassStorage, drive ) == KErrNone ) - { - TUint status; - if ( DriveInfo::GetDriveStatus( fs, drive, status ) == KErrNone ) - { - if ( status & DriveInfo::EDriveInternal ) - { - fs.Close(); - return drive; - } - } - } - fs.Close(); - return KErrNotFound; - } - // ======== MEMBER FUNCTIONS =================================================== //------------------------------------------------------------------------------ @@ -3240,15 +3209,6 @@ void MT_CHSPSConfigurationIf::Customization_1_L() { // Pre conditions - // There is minimal configuration and a D drive present in emulator - // Outcome: - // The original configuration file is bypassed by a new one placed on the D - // drive - // Possible problems: - // There is no E drive (EMMC) in emulator. The data are copied to the D - // drive. In case there is the E drive,please check all possible references - // to the D drive and change, if needed. This is important for HW testing. - // Remark: hspsServerUtil::FindFile() determines which drives are searched. EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Minimal" ) ); SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfMinimal ); @@ -3259,24 +3219,13 @@ // Simulate customization by copying configuration files to D drive ("ROM" stuff is on C) CFileMan* fileManager = CFileMan::NewL( iFileserver ); CleanupStack::PushL( fileManager ); - - // Find MMC drive, if not found copy it to the D drive - TInt drive = GetEmmcDrivePath(); - if ( drive == KErrNotFound ) - { - drive = EDriveD; // Set D drive - } - _LIT( Kconfigdir, "d:\\data\\mt_hsps\\installed_widget\\widgetconfiguration.xml" ); - TBuf<200> confdir; - confdir.Append( Kconfigdir ); - confdir[0] = ( TInt16 )drive + KletterA; // see ACII table User::LeaveIfError( fileManager->Copy( - _L( "c:\\data\\mt_hsps\\installed_widget\\widgetconfiguration_customized.xml" ), - confdir, - CFileMan::ERecurse|CFileMan::EOverWrite ) + _L( "c:\\data\\mt_hsps\\installed_widget\\widgetconfiguration_customized.xml" ), + _L( "d:\\data\\mt_hsps\\installed_widget\\widgetconfiguration.xml" ), + CFileMan::ERecurse|CFileMan::EOverWrite + ) ); - CleanupStack::PopAndDestroy( fileManager ); MT_CHspsInstallationService* installationService = MT_CHspsInstallationService::NewL(); diff -r 6cadd6867c17 -r 67f2ed48ad91 idlefw/conf/activeidle2.confml Binary file idlefw/conf/activeidle2.confml has changed diff -r 6cadd6867c17 -r 67f2ed48ad91 idlefw/conf/activeidle2_10275102.crml Binary file idlefw/conf/activeidle2_10275102.crml has changed diff -r 6cadd6867c17 -r 67f2ed48ad91 idlefw/hslaunch/src/hslaunch.cpp --- a/idlefw/hslaunch/src/hslaunch.cpp Wed Sep 15 12:32:36 2010 +0300 +++ b/idlefw/hslaunch/src/hslaunch.cpp Wed Oct 13 14:53:46 2010 +0300 @@ -21,6 +21,7 @@ // ========================= DECLARATIONS ================================== _LIT( KHsExeName, "homescreen.exe" ); +_LIT( KHsProcessName, "Home screen" ); const TInt KSleepOnRetry = 250000; // 250ms const TUid KPSCategoryUid = TUid::Uid( 0x200286E3 ); const TInt KPSCrashCountKey = 1; @@ -185,11 +186,17 @@ // ----------------------------------------------------------------------------- // void CHsLaunch::RunL() - { - // Create process + { + // Create app or connect to existing. + TInt processExisted = EFalse; + RProcess process; - TInt processError = KErrNone; - processError = process.Create( KHsExeName, KNullDesC ); + TInt processError = process.Create( KHsExeName, KNullDesC ); + if( processError == KErrAlreadyExists ) + { + processError = process.Open( KHsProcessName, EOwnerProcess ); + processExisted = ETrue; + } TInt monitorError = KErrNone; if( processError == KErrNone ) @@ -197,7 +204,8 @@ TRAP( monitorError, InitProcessMonitorL( process.Id() ) ); } - if( processError == KErrNone ) + if( processError == KErrNone && + !processExisted ) { // Make sure process is started even if monitor startup // fails. This will assure that process is not left in diff -r 6cadd6867c17 -r 67f2ed48ad91 idlefw/plugins/devicestatus/inc/aimcnpublisher.h --- a/idlefw/plugins/devicestatus/inc/aimcnpublisher.h Wed Sep 15 12:32:36 2010 +0300 +++ b/idlefw/plugins/devicestatus/inc/aimcnpublisher.h Wed Oct 13 14:53:46 2010 +0300 @@ -98,11 +98,6 @@ * Own. */ CAiNetworkInfoListener* iListener; - - /** - * MCN info to show - */ - TNWMCNName iMCNName; }; diff -r 6cadd6867c17 -r 67f2ed48ad91 idlefw/plugins/devicestatus/src/aicontentobserveroptimizer.cpp --- a/idlefw/plugins/devicestatus/src/aicontentobserveroptimizer.cpp Wed Sep 15 12:32:36 2010 +0300 +++ b/idlefw/plugins/devicestatus/src/aicontentobserveroptimizer.cpp Wed Oct 13 14:53:46 2010 +0300 @@ -194,24 +194,7 @@ TInt aContent, TInt aIndex ) { - if ( IsInBlackList( aContent, aIndex ) ) - { - return KErrNotFound; - } - TInt err = iObserver.Clean( aPlugin, aContent, aIndex ); - // Publish went through OK, we need to commit the transaction - if ( err == KErrNone && iTransactionStarted ) - { - iCommitNeeded = ETrue; - } - // publish failed because the ui declaration doesn't - // include this content => add to black list and - // don't try to publish again - else if ( err == KErrNotFound || err == KErrNotSupported ) - { - AddToBlackList( aContent, aIndex ); - } - return err; + return iObserver.Clean( aPlugin, aContent, aIndex ); } MAiContentObserver& CAiContentObserverOptimizer::Observer() const diff -r 6cadd6867c17 -r 67f2ed48ad91 idlefw/plugins/devicestatus/src/aimcnpublisher.cpp --- a/idlefw/plugins/devicestatus/src/aimcnpublisher.cpp Wed Sep 15 12:32:36 2010 +0300 +++ b/idlefw/plugins/devicestatus/src/aimcnpublisher.cpp Wed Oct 13 14:53:46 2010 +0300 @@ -71,10 +71,7 @@ void CAiMCNPublisher::RefreshL( TBool /*aClean*/ ) { - iContentObserver->Publish( *iExtension, - EAiDeviceStatusContentMCNIndicator, - iMCNName, - 0 ); + //cannot be refreshed } @@ -88,15 +85,14 @@ { if ( aInfo.iMCNIndicatorType == ENWMCNIndicatorTypeActive ) { - iMCNName.Copy( aInfo.iMCNName ); + TPtrC msg = aInfo.iMCNName; iContentObserver->Publish( *iExtension, EAiDeviceStatusContentMCNIndicator, - iMCNName, + msg, 0 ); } else if ( aInfo.iMCNIndicatorType == ENWMCNIndicatorTypeNone ) { - iMCNName.Copy( KNullDesC ); iContentObserver->Clean( *iExtension, EAiDeviceStatusContentMCNIndicator, 0 ); diff -r 6cadd6867c17 -r 67f2ed48ad91 idlefw/plugins/mcsplugin/group/bld.inf --- a/idlefw/plugins/mcsplugin/group/bld.inf Wed Sep 15 12:32:36 2010 +0300 +++ b/idlefw/plugins/mcsplugin/group/bld.inf Wed Oct 13 14:53:46 2010 +0300 @@ -35,7 +35,6 @@ ../handler/inc/mcspluginparamval.h MW_LAYER_PLATFORM_EXPORT_PATH(mcspluginparamval.h) -qgn_mcsplugin_log_out.svg /epoc32/s60/icons/qgn_mcsplugin_log_out.svg PRJ_EXTENSIONS @@ -46,7 +45,7 @@ OPTION SOURCES -c8,8 qgn_prop_ai_shortcut -c8,8 qgn_menu_url \ -c8,8 qgn_menu_mce_sel_mes -c8,8 qgn_menu_mce_syncmail \ -c8,8 qgn_menu_am -c8,8 qgn_prop_cp_conn_shortcut \ - -c8,8 qgn_prop_psln_ai_sub -c8,8 qgn_mcsplugin_log_out \ + -c8,8 qgn_prop_psln_ai_sub -c8,8 qgn_prop_log_calls_sub \ -c8,8 qgn_menu_mce_postcard -c8,8 qgn_menu_mce_email \ -c8,8 qgn_menu_mce_audio -c8,8 qgn_menu_mce_gene END diff -r 6cadd6867c17 -r 67f2ed48ad91 idlefw/plugins/mcsplugin/group/qgn_mcsplugin_log_out.svg --- a/idlefw/plugins/mcsplugin/group/qgn_mcsplugin_log_out.svg Wed Sep 15 12:32:36 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,127 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 6cadd6867c17 -r 67f2ed48ad91 idlefw/plugins/mcsplugin/handler/src/mcspluginhandler.cpp --- a/idlefw/plugins/mcsplugin/handler/src/mcspluginhandler.cpp Wed Sep 15 12:32:36 2010 +0300 +++ b/idlefw/plugins/mcsplugin/handler/src/mcspluginhandler.cpp Wed Oct 13 14:53:46 2010 +0300 @@ -30,7 +30,6 @@ #include #include #include -#include // User includes #include "mcsplugincompletedoperation.h" @@ -40,13 +39,10 @@ // Constants _LIT( KMenuTypeShortcut, "menu:shortcut" ); ///< Menu folder type. _LIT( KMenuAttrParamLogs, "logs:dialed" ); -_LIT( KMenuAttrProfiles, "profiles" ); /** Argument value for parameter*/ _LIT( KMenuAttrParam, "param" ); -const TUid KProfilesAppUid = { 0x100058F8 }; - #define KMCSCmailUidValue 0x2001E277 #define KMCSCmailMailboxDefaultViewIdValue 0x1 #define KMCSCmailMailboxViewIdValue 0x2 @@ -252,27 +248,6 @@ { LogsUiCmdStarter::CmdStartL( LogsUiCmdStarterConsts::KDialledView() ); } - else if ( param.Find( KMenuAttrProfiles ) != KErrNotFound ) - { - RApaLsSession apaLsSession; - User::LeaveIfError( apaLsSession.Connect() ); - CleanupClosePushL( apaLsSession ); - - TApaAppInfo appInfo; - TInt retVal = apaLsSession.GetAppInfo( appInfo, KProfilesAppUid ); - - if ( retVal == KErrNone ) - { - CApaCommandLine* cmdLine = CApaCommandLine::NewLC(); - cmdLine->SetExecutableNameL( appInfo.iFullName ); - cmdLine->SetCommandL( EApaCommandRun ); - User::LeaveIfError( apaLsSession.StartApp( *cmdLine ) ); - - CleanupStack::PopAndDestroy( cmdLine ); - } - - CleanupStack::PopAndDestroy( &apaLsSession ); - } CleanupStack::PopAndDestroy( sendUi ); } diff -r 6cadd6867c17 -r 67f2ed48ad91 idlefw/plugins/mcsplugin/publisher/inc/mcsplugindata.h --- a/idlefw/plugins/mcsplugin/publisher/inc/mcsplugindata.h Wed Sep 15 12:32:36 2010 +0300 +++ b/idlefw/plugins/mcsplugin/publisher/inc/mcsplugindata.h Wed Oct 13 14:53:46 2010 +0300 @@ -62,7 +62,7 @@ /** * Name of the item. */ - const TDesC* Name(); + TDesC& Name(); /** * Set name of the item, @@ -72,7 +72,7 @@ /** * Value of the item. Used for bookmark url. */ - const TDesC* Value(); + TDesC& Value(); /* * Set value of the item. diff -r 6cadd6867c17 -r 67f2ed48ad91 idlefw/plugins/mcsplugin/publisher/inc/mcspluginengine.h --- a/idlefw/plugins/mcsplugin/publisher/inc/mcspluginengine.h Wed Sep 15 12:32:36 2010 +0300 +++ b/idlefw/plugins/mcsplugin/publisher/inc/mcspluginengine.h Wed Oct 13 14:53:46 2010 +0300 @@ -147,12 +147,9 @@ void SetBackupRestore( TBool aBackupRestore ); /** - * Shows shortcut settings - * - * @param aEditIdx Change specified shortcut - * @return void - */ - void ShowSettingsL( const TInt aEditIdx ); + * ShowSettingsL + */ + void ShowSettingsL(); private: // from MMCSPluginWatcherObserver diff -r 6cadd6867c17 -r 67f2ed48ad91 idlefw/plugins/mcsplugin/publisher/src/mcsplugin.cpp --- a/idlefw/plugins/mcsplugin/publisher/src/mcsplugin.cpp Wed Sep 15 12:32:36 2010 +0300 +++ b/idlefw/plugins/mcsplugin/publisher/src/mcsplugin.cpp Wed Oct 13 14:53:46 2010 +0300 @@ -40,7 +40,6 @@ _LIT( KEventNameShowSettings, "ShowSettings" ); _LIT( KContentItemTypeText, "text" ); _LIT( KContentItemTypeImage, "image" ); -const TInt KUndefinedIndex = -1; const TImplementationProxy KImplementationTable[] = { @@ -376,7 +375,7 @@ } else if( aEventName == KEventNameShowSettings ) { - TRAP_IGNORE( iEngine->ShowSettingsL( KUndefinedIndex ) ); + TRAP_IGNORE( iEngine->ShowSettingsL() ); } } diff -r 6cadd6867c17 -r 67f2ed48ad91 idlefw/plugins/mcsplugin/publisher/src/mcsplugindata.cpp --- a/idlefw/plugins/mcsplugin/publisher/src/mcsplugindata.cpp Wed Sep 15 12:32:36 2010 +0300 +++ b/idlefw/plugins/mcsplugin/publisher/src/mcsplugindata.cpp Wed Oct 13 14:53:46 2010 +0300 @@ -111,9 +111,9 @@ // // --------------------------------------------------------------------------- // -const TDesC* CMCSData::Name() +TDesC& CMCSData::Name() { - return iName; + return *iName; } // --------------------------------------------------------------------------- @@ -131,9 +131,9 @@ // // --------------------------------------------------------------------------- // -const TDesC* CMCSData::Value() +TDesC& CMCSData::Value() { - return iValue; + return *iValue; } // --------------------------------------------------------------------------- @@ -265,20 +265,20 @@ // id of all bookmarks is zero so name has to be check // in case of bookmark has changed - if( data->MenuItem().Id() != id || - ( id == 0 && data->Name() != NULL && iData[i]->Name() != NULL && - data->Name()->CompareF( *iData[i]->Name() ) != 0 ) ) + if ( id >= 0 && ( data->MenuItem().Id() != id || + ( id == 0 && data->Name().CompareF( + iData[ i ]->Name() ) != 0 ) ) ) { data->SetDirty( ETrue ); CMCSData* oldData = iData[i]; iData.Remove( i ); delete oldData; + iData.InsertL( data, i ); - CleanupStack::Pop( data ); + CleanupStack::Pop( data ); } else { - // keep old data CleanupStack::PopAndDestroy( data ); } } @@ -572,8 +572,8 @@ } } } - // EFalse tells that modified settings are not stored to plugin reference - iPluginSettings->SetSettingsL( iInstanceUid, settingItems, EFalse ); + // ETrue tells that modified settings are stored also to plugin reference + iPluginSettings->SetSettingsL( iInstanceUid, settingItems, ETrue ); CleanupStack::PopAndDestroy(); // settingItems } diff -r 6cadd6867c17 -r 67f2ed48ad91 idlefw/plugins/mcsplugin/publisher/src/mcspluginengine.cpp --- a/idlefw/plugins/mcsplugin/publisher/src/mcspluginengine.cpp Wed Sep 15 12:32:36 2010 +0300 +++ b/idlefw/plugins/mcsplugin/publisher/src/mcspluginengine.cpp Wed Oct 13 14:53:46 2010 +0300 @@ -50,7 +50,9 @@ _LIT( KResourceFile, "mcspluginres.rsc" ); _LIT( KResPath, "\\resource\\" ); _LIT( KMMApplication, "mm://" ); -_LIT( KSetOpenItemString, "!openitem?id=" ); +_LIT( KHideExit2, "&exit=hide" ); +_LIT( KSetFocusString, "!setfocus?applicationgroup_name=" ); +_LIT( KApplicationGroupName, "applicationgroup_name" ); _LIT( KIcon, "icon" ); _LIT( KMenuAttrUndefUid, "0x99999991" ); _LIT( KMenuIconFile, "aimcsplugin.mif" ); @@ -60,7 +62,6 @@ _LIT( KMenuMailboxMaskId, "16389" ); _LIT( KMenuTypeMailbox, "menu:mailbox" ); _LIT( KPrefix, "0x" ); -_LIT( KMenuAttrInvokeSettingsUid, "0x99999990" ); const TUid KHomescreenUid = { AI_UID3_AIFW_COMMON }; const TUid KMMUid = { 0x101F4CD2 }; @@ -68,13 +69,6 @@ const TUid KMCSCmailMailboxViewIdValue = { 0x2 }; const TUid KBrowserUid = { 0x10008D39 }; -// maximum custom message length -const TInt KMaxCustomMsg = 256; -const TInt KUndefinedIndex = -1; - -// maximun integer character length -const TInt KMaxLength = 12; - // ======== LOCAL FUNCTIONS ======== // ---------------------------------------------------------------------------- // NextIdToken @@ -361,7 +355,7 @@ { item = CMenuItem::CreateL( iMenu, KMenuTypeUrl, 0, 0 ); CleanupStack::PushL( item ); - item->SetAttributeL( KMenuAttrLongName, *aData.Name() ); + item->SetAttributeL( KMenuAttrLongName, aData.Name() ); item->SetAttributeL( KMenuAttrIconFile, KMenuIconFile ); item->SetAttributeL( KMenuAttrIconId, KMenuBookmarkIconId ); item->SetAttributeL( KMenuAttrMaskId, KMenuBookmarkMaskId ); @@ -381,7 +375,7 @@ { item = CMenuItem::CreateL( iMenu, KMenuTypeMailbox, 0, 0 ); CleanupStack::PushL( item ); - item->SetAttributeL( KMenuAttrLongName, *aData.Name() ); + item->SetAttributeL( KMenuAttrLongName, aData.Name() ); item->SetAttributeL( KMenuAttrIconFile, KMenuIconFile ); item->SetAttributeL( KMenuAttrIconId, KMenuMailboxIconId ); item->SetAttributeL( KMenuAttrMaskId, KMenuMailboxMaskId ); @@ -409,14 +403,7 @@ TUint32 isHidden = flags & TMenuItem::EHidden; TUint32 isMissing = flags & TMenuItem::EMissing; - TBool attrExists = ETrue; - TPtrC uid = aMenuItem->GetAttributeL(KMenuAttrUid, attrExists); - - // if item is hidden or missing (mmc card removed) - // use "Undefined" icon instead - // for empty item it's own icon is shown - if ( iUndefinedItem && uid.Compare(KMenuAttrInvokeSettingsUid) != 0 && - ( isHidden || isMissing ) ) + if ( iUndefinedItem && ( isHidden || isMissing ) ) { menuItem = iUndefinedItem; } @@ -484,14 +471,9 @@ TUint32 isHidden = flags & TMenuItem::EHidden; TUint32 isMissing = flags & TMenuItem::EMissing; - TBool attrExists = ETrue; - TPtrC uid = aMenuItem->GetAttributeL(KMenuAttrUid, attrExists); - // if item is hidden or missing (mmc card removed) // use "Undefined" text instead - // for empty item it's own icon is shown - if ( iUndefinedItem && uid.Compare(KMenuAttrInvokeSettingsUid) != 0 && - ( isHidden || isMissing ) ) + if ( iUndefinedItem && ( isHidden || isMissing ) ) { menuItem = iUndefinedItem; } @@ -550,23 +532,7 @@ } else { - CMenuItem* item(CMenuItem::OpenL(iMenu, dataItem.MenuItem().Id())); - CleanupStack::PushL(item); - - TBool attrExists = ETrue; - - TPtrC uid = item->GetAttributeL(KMenuAttrUid, attrExists); - - // Show selected shortcut settings - if (uid.Compare(KMenuAttrInvokeSettingsUid) == 0) - { - TRAP_IGNORE( ShowSettingsL(aIndex + 1) ); - } - else - { - LaunchMCSItemL(dataItem); - } - CleanupStack::PopAndDestroy(item); + LaunchMCSItemL( dataItem ); } } @@ -594,15 +560,25 @@ HBufC8* message; // prepare message for launching folder - TBuf itemId; - itemId.Num( item->Id() ); + TBool hasApplicationGroupName( EFalse ); + + TPtrC applicationGroupName( item->GetAttributeL( + KApplicationGroupName, hasApplicationGroupName ) ); + + if ( !hasApplicationGroupName ) + { + return; + } - message = HBufC8::NewLC( KMMApplication().Length() - + KSetOpenItemString().Length() - + itemId.Length() ); + message = HBufC8::NewLC( KMMApplication().Length() + + KSetFocusString().Length() + + applicationGroupName.Length() + + KHideExit2().Length() ); + message->Des().Copy( KMMApplication ); - message->Des().Append( KSetOpenItemString ); - message->Des().Append( itemId ); + message->Des().Append( KSetFocusString ); + message->Des().Append( applicationGroupName ); + message->Des().Append( KHideExit2 ); // find MM application TApaTaskList taskList( CCoeEnv::Static()->WsSession() ); @@ -648,7 +624,7 @@ { StartEffect( KBrowserUid ); - CSchemeHandler* urlHandler = CSchemeHandler::NewL( *aData.Value()); + CSchemeHandler* urlHandler = CSchemeHandler::NewL( aData.Value()); CleanupStack::PushL( urlHandler ); urlHandler->HandleUrlStandaloneL(); CleanupStack::PopAndDestroy( urlHandler ); @@ -740,6 +716,7 @@ CMCSData& data( iPluginData->DataItemL( i ) ); data.SetDirty( ETrue ); } + iPluginData->UpdateDataL(); iPlugin.PublishL(); @@ -792,22 +769,12 @@ // Launch General Settings plugin // --------------------------------------------------------------------------- // -void CMCSPluginEngine::ShowSettingsL( const TInt aEditIdx ) +void CMCSPluginEngine::ShowSettingsL() { TUid uid = {AI_UID_ECOM_IMPLEMENTATION_SETTINGS_MCSPLUGIN}; - // format the custom message - // iInstanceUid/aEditIdx is the format - TBuf8 msg; - msg.Append(iInstanceUid); - if( aEditIdx != KUndefinedIndex ) - { - msg.Append('//'); - msg.AppendFormat(_L8("%d"), aEditIdx); - } - CGSLauncher* launcher = CGSLauncher::NewLC(); - launcher->LaunchGSViewL ( uid, KHomescreenUid, msg ); + launcher->LaunchGSViewL ( uid, KHomescreenUid, iInstanceUid ); CleanupStack::PopAndDestroy( launcher ); } diff -r 6cadd6867c17 -r 67f2ed48ad91 idlefw/plugins/mcsplugin/settings/inc/mcspluginsettings.h --- a/idlefw/plugins/mcsplugin/settings/inc/mcspluginsettings.h Wed Sep 15 12:32:36 2010 +0300 +++ b/idlefw/plugins/mcsplugin/settings/inc/mcspluginsettings.h Wed Oct 13 14:53:46 2010 +0300 @@ -159,11 +159,6 @@ */ void HandleListBoxSelectionL(); - /** - * Callback function to be used with CPeriodic. - */ - static TInt TimerCallbackL( TAny *aPtr ); - private: // data /** @@ -171,12 +166,6 @@ * Own. */ CMCSPluginSettingsModel* iModel; - - /** - * Timer to change specified shortcut when view is activated. - * Own. - */ - CPeriodic* iTimer; }; #endif // MCSPLUGINSETTINGS_H diff -r 6cadd6867c17 -r 67f2ed48ad91 idlefw/plugins/mcsplugin/settings/inc/mcspluginsettingsapplist.h --- a/idlefw/plugins/mcsplugin/settings/inc/mcspluginsettingsapplist.h Wed Sep 15 12:32:36 2010 +0300 +++ b/idlefw/plugins/mcsplugin/settings/inc/mcspluginsettingsapplist.h Wed Oct 13 14:53:46 2010 +0300 @@ -130,11 +130,6 @@ */ TPtrC UndefinedText() { return *iUndefinedText; }; - /** - * Returns title for empty item - */ - TPtrC EmptyText() { return *iEmptyText; }; - private: /** * Constructor @@ -174,14 +169,6 @@ */ void AddMailboxL( const TDesC& aMailbox, const TDesC& aMailboxId ); - /** - * Returns title for requested item - * - * @param aUid Shortcut items uid - * @return HBufC title - */ - HBufC* MenuItemTextL( const TDesC& aUid ); - private: // data /** @@ -205,11 +192,10 @@ */ HBufC* iUndefinedText; - /** - * Name of "Empty" application, own + /* + * Undefined MCS item, own */ - HBufC* iEmptyText; - + CMenuItem* iUndefinedItem; }; #endif // CMCSPLUGINSETTINGSAPPLIST_H diff -r 6cadd6867c17 -r 67f2ed48ad91 idlefw/plugins/mcsplugin/settings/inc/mcspluginsettingsbkmlist.h --- a/idlefw/plugins/mcsplugin/settings/inc/mcspluginsettingsbkmlist.h Wed Sep 15 12:32:36 2010 +0300 +++ b/idlefw/plugins/mcsplugin/settings/inc/mcspluginsettingsbkmlist.h Wed Oct 13 14:53:46 2010 +0300 @@ -109,13 +109,6 @@ TSettingItem FindItemL( RPointerArray& aProperties ); - /** - * Checks with a given index if bookmark has been hidden from menulist - * - * @param aIndex Index of the bookmark in the list - * @return ETrue if the bookmark is hidden, EFalse otherwise - */ - TBool ItemHidden( TInt aIndex ); protected: @@ -243,11 +236,6 @@ * Target bookmark parameters */ HBufC* iUrl; - - /** - * Target bookmark hidden - */ - TBool iHidden; private: diff -r 6cadd6867c17 -r 67f2ed48ad91 idlefw/plugins/mcsplugin/settings/inc/mcspluginsettingscontainer.h --- a/idlefw/plugins/mcsplugin/settings/inc/mcspluginsettingscontainer.h Wed Sep 15 12:32:36 2010 +0300 +++ b/idlefw/plugins/mcsplugin/settings/inc/mcspluginsettingscontainer.h Wed Oct 13 14:53:46 2010 +0300 @@ -117,12 +117,7 @@ * Hanle notify */ void HandleNotifyL(); - - /** - * Sets currently selected index - */ - void SetCurrentItemIndex(TInt aIdx); - + private: /* diff -r 6cadd6867c17 -r 67f2ed48ad91 idlefw/plugins/mcsplugin/settings/inc/mcspluginsettingsmodel.h --- a/idlefw/plugins/mcsplugin/settings/inc/mcspluginsettingsmodel.h Wed Sep 15 12:32:36 2010 +0300 +++ b/idlefw/plugins/mcsplugin/settings/inc/mcspluginsettingsmodel.h Wed Oct 13 14:53:46 2010 +0300 @@ -52,7 +52,6 @@ TInt id; TSettingType type; TBool locked; - TBool empty; }; /** @@ -223,14 +222,6 @@ TBool SettingLockedL( RPointerArray& aProperties ); - /** - * Empty setting - * - * @param aProperties - * @return TBool - */ - TBool SettingEmptyL( - RPointerArray& aProperties ); /** diff -r 6cadd6867c17 -r 67f2ed48ad91 idlefw/plugins/mcsplugin/settings/src/mcspluginsettings.cpp --- a/idlefw/plugins/mcsplugin/settings/src/mcspluginsettings.cpp Wed Sep 15 12:32:36 2010 +0300 +++ b/idlefw/plugins/mcsplugin/settings/src/mcspluginsettings.cpp Wed Oct 13 14:53:46 2010 +0300 @@ -75,8 +75,6 @@ // void CMCSPluginSettings::ConstructL() { - iTimer = CPeriodic::NewL( CActive::EPriorityUserInput ); - FeatureManager::InitializeLibL(); TParsePtrC driveParse(PathInfo::RomRootPath()); @@ -115,12 +113,6 @@ FeatureManager::UnInitializeLib(); iResourceLoader.Close(); delete iModel; - - if (iTimer->IsActive()) - { - iTimer->Cancel(); - } - delete iTimer; } // --------------------------------------------------------------------------- @@ -168,49 +160,11 @@ // void CMCSPluginSettings::DoActivateL(const TVwsViewId& aPrevViewId, TUid aCustomMessageId, const TDesC8& aCustomMessage) { - // Parse the custom message - TInt locate = aCustomMessage.Locate('/'); - TInt editIdx = -1; - + iModel->SetPluginIdL( aCustomMessage ); iModel->UpdateAppListL( EFalse ); iModel->UpdateBkmListL( EFalse ); - - if (locate > 0) - { - // if / is located in the custom mesage - // upto / is the plugin id - iModel->SetPluginIdL(aCustomMessage.Left(locate)); - - // right most character is the edit index - TLex8 lex(aCustomMessage.Right(1)); - lex.Val(editIdx); - - iModel->UpdateSettingsL(); - CGSBaseView::DoActivateL(aPrevViewId, aCustomMessageId, - aCustomMessage.Left(locate)); - - if (editIdx > 0) - { - // set the current edit item - Container()->SetCurrentItemIndex(editIdx - 1); - - // Set timer for handle the change of shortcut item - // Otherwise status bar is not shown correctly - if (iTimer->IsActive()) - { - iTimer->Cancel(); - } - iTimer->Start( 0, 0, TCallBack( TimerCallbackL, this ) ); - } - } - else - { - // if '/' is not located, custommessage has only the plugin id - iModel->SetPluginIdL(aCustomMessage); - iModel->UpdateSettingsL(); - CGSBaseView::DoActivateL(aPrevViewId, aCustomMessageId, - aCustomMessage); - } + iModel->UpdateSettingsL(); + CGSBaseView::DoActivateL( aPrevViewId, aCustomMessageId, aCustomMessage ); } // ---------------------------------------------------------------------------- @@ -304,18 +258,4 @@ Container()->HandleChangeCommandL(); } -// --------------------------------------------------------------------------- -// Callback for direct settings change -// --------------------------------------------------------------------------- -// -TInt CMCSPluginSettings::TimerCallbackL( TAny *aPtr ) - { - CMCSPluginSettings* self = reinterpret_cast< CMCSPluginSettings* >( aPtr ); - self->iTimer->Cancel(); - // Handle the change - self->HandleListBoxSelectionL(); - - return 0; - } - // End of File. diff -r 6cadd6867c17 -r 67f2ed48ad91 idlefw/plugins/mcsplugin/settings/src/mcspluginsettingsapplist.cpp --- a/idlefw/plugins/mcsplugin/settings/src/mcspluginsettingsapplist.cpp Wed Sep 15 12:32:36 2010 +0300 +++ b/idlefw/plugins/mcsplugin/settings/src/mcspluginsettingsapplist.cpp Wed Oct 13 14:53:46 2010 +0300 @@ -30,7 +30,6 @@ _LIT8( KItemLocked, "locked"); _LIT8( KProperValueFolder, "folder" ); _LIT( KMenuAttrUndefUid, "0x99999991" ); -_LIT( KMenuAttrInvokeSettingsUid, "0x99999990" ); _LIT( KMenuItemLongName, "long_name" ); #define KMCSCmailMtmUidValue 0x2001F406 @@ -55,11 +54,45 @@ iMenu.OpenL( KMyMenuData ); - iUndefinedText = MenuItemTextL( KMenuAttrUndefUid ); - iEmptyText = MenuItemTextL( KMenuAttrInvokeSettingsUid ); + // Get "Undefined" icon and text + CMenuFilter* filter = CMenuFilter::NewL(); + CleanupStack::PushL( filter ); + + // 'Undefined' item + filter->HaveAttributeL( KMenuAttrUid, KMenuAttrUndefUid ); + + TMenuItem item; + const TInt root = iMenu.RootFolderL(); + RArray items; + CleanupClosePushL( items ); + iMenu.GetItemsL( items, root, filter, ETrue ); + + if ( items.Count() > 0 ) + { + iUndefinedItem = CMenuItem::OpenL( iMenu, items[ 0 ] ); + iUndefinedText = NULL; + + if ( iUndefinedItem ) + { + TBool exists( KErrNotFound );//CleanupStack::PushL( undefinedItem ); + TPtrC undefined = iUndefinedItem->GetAttributeL( KMenuItemLongName, exists ); + + if ( exists ) + { + iUndefinedText = HBufC::NewMaxL( undefined.Length() ); + iUndefinedText->Des().Copy( undefined ); + } + else + { + iUndefinedText = KNullDesC().Alloc(); + } + } + } + + CleanupStack::PopAndDestroy( &items ); + CleanupStack::PopAndDestroy( filter ); } - // --------------------------------------------------------------------------- // Two-phased constructor // --------------------------------------------------------------------------- @@ -85,7 +118,7 @@ iMenu.Close(); delete iUndefinedText; - delete iEmptyText; + delete iUndefinedItem; } // --------------------------------------------------------------------------- @@ -155,7 +188,7 @@ RPointerArray& aProperties ) { TBool attrExists( EFalse ); - TSettingItem settingItem = { KErrNotFound, EApplication, EFalse, EFalse }; + TSettingItem settingItem = { KErrNotFound, EApplication, EFalse }; TBool isFolder = EFalse; // check if the item is folder @@ -215,7 +248,7 @@ // otherwise, compare attributes from HSPS and from menuitem // if there is no match, move to the next item in the list - if ( attr.CompareF( *attrValue ) != 0 ) + if ( attr != *attrValue ) { match = EFalse; } @@ -381,56 +414,4 @@ CleanupStack::Pop( newItem ); } -// --------------------------------------------------------------------------- -// Gets specified menu item text -// --------------------------------------------------------------------------- -// -HBufC* CMCSPluginSettingsAppList::MenuItemTextL( const TDesC& aUid ) - { - HBufC* text = NULL; - - // Get specified icon and text - CMenuFilter* filter = CMenuFilter::NewL(); - CleanupStack::PushL( filter ); - - // Filter specified item - filter->HaveAttributeL( KMenuAttrUid, aUid ); - - const TInt root = iMenu.RootFolderL(); - RArray items; - CleanupClosePushL( items ); - iMenu.GetItemsL( items, root, filter, ETrue ); - - CMenuItem* item = NULL; - - if ( items.Count() > 0 ) - { - item = CMenuItem::OpenL( iMenu, items[ 0 ] ); - - if ( item ) - { - TBool exists( KErrNotFound ); - TPtrC itemName = item->GetAttributeL( KMenuItemLongName, exists ); - - if ( exists ) - { - text = HBufC::NewMaxL( itemName.Length() ); - text->Des().Copy( itemName ); - } - delete item; - } - } - - if( !text ) - { - text = KNullDesC().Alloc(); - } - - CleanupStack::PopAndDestroy( &items ); - CleanupStack::PopAndDestroy( filter ); - - return text; - } - - // End of File. diff -r 6cadd6867c17 -r 67f2ed48ad91 idlefw/plugins/mcsplugin/settings/src/mcspluginsettingsbkmlist.cpp --- a/idlefw/plugins/mcsplugin/settings/src/mcspluginsettingsbkmlist.cpp Wed Sep 15 12:32:36 2010 +0300 +++ b/idlefw/plugins/mcsplugin/settings/src/mcspluginsettingsbkmlist.cpp Wed Oct 13 14:53:46 2010 +0300 @@ -28,7 +28,6 @@ _LIT( KUrl, "url" ); _LIT8( KUid, "uid" ); _LIT( KMenuAttrParameter, "param" ); -_LIT8( KMenuAttrParameter8, "param" ); // ======== MEMBER FUNCTIONS ======== @@ -86,13 +85,7 @@ // TInt CMCSPluginSettingsBkmList::MdcaCount() const { - TInt listItemsCount( 0 ); - for( TInt i = 0; i< iListItems.Count(); i++ ) - { - if( !iListItems[i]->iHidden ) - listItemsCount++; - } - return listItemsCount; + return iListItems.Count(); } // --------------------------------------------------------------------------- @@ -111,79 +104,38 @@ } // --------------------------------------------------------------------------- -// Checks with a given index if bookmark has been hidden from menulist. -// --------------------------------------------------------------------------- -// -TBool CMCSPluginSettingsBkmList::ItemHidden( TInt aIndex ) - { - if ( aIndex < 0 || aIndex >= iListItems.Count( )) - { - return EFalse; - } - return iListItems[aIndex]->iHidden; - } - -// --------------------------------------------------------------------------- // Iterates thru the bookmark list and tries to find a menuitem which // matches given property map from HSPS // --------------------------------------------------------------------------- // -TSettingItem CMCSPluginSettingsBkmList::FindItemL( - RPointerArray& aProperties ) +TSettingItem CMCSPluginSettingsBkmList::FindItemL( RPointerArray& aProperties ) { - HBufC* uid( NULL ); - HBufC* param( NULL ); TInt index( KErrNotFound ); - TSettingItem settingItem = { KErrNotFound, EBookmark, EFalse, EFalse }; - - // read property values + TSettingItem settingItem = { KErrNotFound, EBookmark, EFalse }; for( TInt i= 0; i < aProperties.Count(); i++ ) { if( aProperties[i]->Name() == KUid ) { - uid = AiUtility::CopyToBufferL( - uid, aProperties[i]->Value() ); - CleanupStack::PushL( uid ); - } - else if( aProperties[i]->Name() == KMenuAttrParameter8 ) - { - param = AiUtility::CopyToBufferL( - param, aProperties[i]->Value() ); - CleanupStack::PushL( param ); + HBufC* value( NULL ); + value = AiUtility::CopyToBufferL( value, aProperties[i]->Value()); + for( TInt j = 0; j < iListItems.Count(); j++ ) + { + TPtrC uid = *iListItems[j]->iUid; + if( uid.Compare( *value ) == 0 ) + { + index = j; + break; + } + } + delete value; } - } - - // try to find a match - for( TInt j = 0; j < iListItems.Count(); j++ ) - { - TPtrC value = *iListItems[j]->iUid; - if( value.Compare( *uid ) == 0 ) + if( index != KErrNotFound ) { - index = j; + settingItem.id = index; + settingItem.type = EBookmark; break; } } - - // menuitem not found, add a new one - if( index == KErrNotFound && uid && param ) - { - CBkmListItem* listItem = CBkmListItem::NewLC( *uid, *param ); - listItem->iType = EFavBookmark; - listItem->iUrl = KNullDesC().AllocL(); - listItem->iHidden = ETrue; - iListItems.Append( listItem ); - CleanupStack::Pop( listItem ); - - TInt listItemsCount = iListItems.Count(); - TPtrC value = *iListItems[--listItemsCount]->iUid; - if( value.Compare( *uid ) == 0 ) - index = listItemsCount; - } - - if( param ) CleanupStack::PopAndDestroy( param ); - if( uid ) CleanupStack::PopAndDestroy( uid ); - - settingItem.id = index; return settingItem; } @@ -367,7 +319,7 @@ //Nested class to store individual bookmark list items // --------------------------------------------------------------------------- // -CMCSPluginSettingsBkmList::CBkmListItem::CBkmListItem() : iHidden( EFalse ) +CMCSPluginSettingsBkmList::CBkmListItem::CBkmListItem() { } diff -r 6cadd6867c17 -r 67f2ed48ad91 idlefw/plugins/mcsplugin/settings/src/mcspluginsettingscontainer.cpp --- a/idlefw/plugins/mcsplugin/settings/src/mcspluginsettingscontainer.cpp Wed Sep 15 12:32:36 2010 +0300 +++ b/idlefw/plugins/mcsplugin/settings/src/mcspluginsettingscontainer.cpp Wed Oct 13 14:53:46 2010 +0300 @@ -186,14 +186,7 @@ { appListIndex = -1; } - - // if the selected item is hidden, set selected item to -1 - TBool itemHidden = iModel->BkmList()->ItemHidden( appListIndex ); - if ( itemHidden ) - { - appListIndex = -1; - } - + changed = HandleBookmarkChangeCommandL( appListIndex, current ); } @@ -479,16 +472,4 @@ iNotifyWatcher->WatchNotify( this ); } -// --------------------------------------------------------------------------- -// Sets the currently selected item -// --------------------------------------------------------------------------- -// -void CMCSPluginSettingsContainer::SetCurrentItemIndex( TInt aIdx ) - { - if( iListBox ) - { - iListBox->SetCurrentItemIndex( aIdx ); - } - } - // End of File. diff -r 6cadd6867c17 -r 67f2ed48ad91 idlefw/plugins/mcsplugin/settings/src/mcspluginsettingsmodel.cpp --- a/idlefw/plugins/mcsplugin/settings/src/mcspluginsettingsmodel.cpp Wed Sep 15 12:32:36 2010 +0300 +++ b/idlefw/plugins/mcsplugin/settings/src/mcspluginsettingsmodel.cpp Wed Oct 13 14:53:46 2010 +0300 @@ -49,7 +49,6 @@ _LIT8( KProperValueAppl, "application" ); _LIT8( KProperValueMailbox, "mailbox" ); _LIT( KMenuTypeMailbox, "menu:mailbox" ); -_LIT8( KMenuAttrInvokeSettingsUid, "0x99999990" ); using namespace HSPluginSettingsIf; @@ -231,7 +230,7 @@ TSettingItem CMCSPluginSettingsModel::ItemL( RPointerArray& aProperties ) { - TSettingItem setting = { KErrNotFound, EApplication , EFalse, EFalse }; + TSettingItem setting = { KErrNotFound, EApplication , EFalse }; TSettingType type = SettingTypeL( aProperties ); if ( type == EApplication || type == EMailbox ) @@ -244,8 +243,7 @@ } setting.locked = SettingLockedL( aProperties ); - setting.empty = SettingEmptyL( aProperties ); - + return setting; } @@ -303,30 +301,6 @@ } // --------------------------------------------------------------------------- -// Gets empty status of given HSPS entry -// --------------------------------------------------------------------------- -// -TBool CMCSPluginSettingsModel::SettingEmptyL( - RPointerArray& aProperties ) - { - - for( TInt i = 0; i Name(); - if( name == KProperNameUid ) - { - TPtrC8 value = aProperties[i]->Value(); - if( value.Compare(KMenuAttrInvokeSettingsUid) == 0 ) - { - return ETrue; - } - } - } - - return EFalse; - } - -// --------------------------------------------------------------------------- // Saves menuitem to HSPS to the given shortcut index // --------------------------------------------------------------------------- // @@ -507,8 +481,8 @@ } } - // EFalse tells that modified settings are not stored to plugin reference - User::LeaveIfError( iPluginSettings->SetSettingsL( *iPluginId, settingItems, EFalse ) ); + // ETrue tells that modified settings are stored also to plugin reference + User::LeaveIfError( iPluginSettings->SetSettingsL( *iPluginId, settingItems, ETrue ) ); CleanupStack::PopAndDestroy(); // settingItems } @@ -552,19 +526,10 @@ // first, we need to check if the item is missing // (application uninstalled or mmc card removed) // If it is, we return "Undefined" application name instead - // In case of empty item, it's own name is returned if ( iSettings[ aIndex ].id == KErrNotFound ) { - if ( iSettings[ aIndex ].empty ) - { - const TDesC& caption = iAppList->EmptyText(); - TRAP_IGNORE( line.Set( ListBoxLineL( caption, aIndex ) ) ) - } - else - { - const TDesC& caption = iAppList->UndefinedText(); - TRAP_IGNORE( line.Set( ListBoxLineL( caption, aIndex ) ) ) - } + const TDesC& caption = iAppList->UndefinedText(); + TRAP_IGNORE( line.Set( ListBoxLineL( caption, aIndex ) ) ) } else { @@ -601,7 +566,7 @@ // const TSettingItem CMCSPluginSettingsModel::Item( TInt aIndex ) const { - TSettingItem setting = { KErrNotFound, EApplication, EFalse, EFalse }; + TSettingItem setting = { KErrNotFound, EApplication, EFalse }; if ( aIndex >= 0 && aIndex < iSettings.Count() ) { diff -r 6cadd6867c17 -r 67f2ed48ad91 idlefw/plugins/profileplugin/src/caiprofileplugin.cpp --- a/idlefw/plugins/profileplugin/src/caiprofileplugin.cpp Wed Sep 15 12:32:36 2010 +0300 +++ b/idlefw/plugins/profileplugin/src/caiprofileplugin.cpp Wed Oct 13 14:53:46 2010 +0300 @@ -263,6 +263,18 @@ } } + // in case of Offline profile profile indicator is not shown + if ( observer->CanPublish( *this, EAiProfileContentActiveProfileName, EAiProfileContentActiveProfileName ) && + iEngine->IsOffline() ) + { + observer->Clean( *this, EAiProfileActiveProfileSilentChar, EAiProfileActiveProfileSilentChar ); + observer->Clean( *this, EAiProfileActiveProfileIcon, 1 ); + observer->Clean( *this, EAiProfileActiveProfileIcon, 2 ); + + // uncomment also this and respective policy lines in profiles.xml if whole widget needs to be hidden in AI3 + //observer->Clean( *this, EAiProfileContentActiveProfileName, EAiProfileContentActiveProfileName ); + } + if ( err == KErrNone ) { err = observer->Commit( transactionId ); diff -r 6cadd6867c17 -r 67f2ed48ad91 idlefw/plugins/sapidataplugin/src/sapidataplugin.cpp --- a/idlefw/plugins/sapidataplugin/src/sapidataplugin.cpp Wed Sep 15 12:32:36 2010 +0300 +++ b/idlefw/plugins/sapidataplugin/src/sapidataplugin.cpp Wed Oct 13 14:53:46 2010 +0300 @@ -241,9 +241,7 @@ if ( icon != NULL ) // Syntax correct but icon not found { aObserver->PublishPtr( *this, aContentId, icon , aContentId ); - CleanupStack::PushL( icon ); - iIconArray.AppendL( icon ); - CleanupStack::Pop( icon ); + iIconArray.Append(icon); } else { @@ -287,7 +285,6 @@ { // Take the ownership CGulIcon* icon = CGulIcon::NewL(bitmap); - CleanupStack::PushL( icon ); if( aMaskHandle != KErrBadHandle ) { CFbsBitmap* mask = new (ELeave) CFbsBitmap(); @@ -297,8 +294,7 @@ } } aObserver->PublishPtr( *this, aContentId, icon , aContentId ); - iIconArray.AppendL( icon ); - CleanupStack::Pop( icon ); + iIconArray.Append(icon); } else { diff -r 6cadd6867c17 -r 67f2ed48ad91 idlefw/plugins/wrtdataplugin/src/wrtdataplugin.cpp --- a/idlefw/plugins/wrtdataplugin/src/wrtdataplugin.cpp Wed Sep 15 12:32:36 2010 +0300 +++ b/idlefw/plugins/wrtdataplugin/src/wrtdataplugin.cpp Wed Oct 13 14:53:46 2010 +0300 @@ -582,9 +582,7 @@ if ( icon != NULL ) // Syntax correct but icon not found { aObserver->PublishPtr( *this, aContentId, icon , aContentId ); - CleanupStack::PushL( icon ); - iIconArray.AppendL( icon ); - CleanupStack::Pop( icon ); + iIconArray.Append(icon); } else { @@ -628,7 +626,6 @@ { // Take the ownership CGulIcon* icon = CGulIcon::NewL(bitmap); - CleanupStack::PushL( icon ); if( aMaskHandle != KErrBadHandle ) { CFbsBitmap* mask = new (ELeave) CFbsBitmap(); @@ -638,8 +635,7 @@ } } aObserver->PublishPtr( *this, aContentId, icon , aContentId ); - iIconArray.AppendL( icon ); - CleanupStack::Pop( icon ); + iIconArray.Append(icon); } else { diff -r 6cadd6867c17 -r 67f2ed48ad91 idlefw/plugins/wsplugin/src/numerickeyhandler.cpp --- a/idlefw/plugins/wsplugin/src/numerickeyhandler.cpp Wed Sep 15 12:32:36 2010 +0300 +++ b/idlefw/plugins/wsplugin/src/numerickeyhandler.cpp Wed Oct 13 14:53:46 2010 +0300 @@ -196,10 +196,11 @@ } // Homescreen should open dialer also with alpha characters, if dialer is in - // mode that accepts alpha characters into number entry (ou1cimx1#299396) + // mode that accepts alpha characters into number entry. + // ou1cimx1#299396 & ou1cimx1#552069 const TInt KPhoneKeyStart = 33; - const TInt KPhoneKeyEnd = 127; + const TInt KPhoneKeyEnd = 129; return ( ( AllowAlphaNumericMode() ) && ( ( scanCode >= KPhoneKeyStart && scanCode <= KPhoneKeyEnd ) || modifiers & EModifierSpecial ) ); diff -r 6cadd6867c17 -r 67f2ed48ad91 idlefw/src/framework/aicpsexecuteparam.cpp --- a/idlefw/src/framework/aicpsexecuteparam.cpp Wed Sep 15 12:32:36 2010 +0300 +++ b/idlefw/src/framework/aicpsexecuteparam.cpp Wed Oct 13 14:53:46 2010 +0300 @@ -201,7 +201,7 @@ // void CAiCpsExecuteParam::AddActionL(const TDesC8& aAction) { - iActions.AppendL(aAction.AllocL()); + iActions.Append(aAction.AllocL()); } // End of file diff -r 6cadd6867c17 -r 67f2ed48ad91 idlefw/src/framework/aifw.cpp --- a/idlefw/src/framework/aifw.cpp Wed Sep 15 12:32:36 2010 +0300 +++ b/idlefw/src/framework/aifw.cpp Wed Oct 13 14:53:46 2010 +0300 @@ -256,7 +256,9 @@ __TICK( "CAiFw::HandleUiReadyEventL" ); if ( iUiControllerManager->IsMainUiController( aUiController ) ) - { + { + iUiControllerManager->LoadUIDefinition(); + TInt value( EIdlePhase1Ok ); RProperty::Get( KPSUidStartup, KPSIdlePhase1Ok, value ); @@ -300,8 +302,6 @@ __PRINTS( "*** CAiFw::HandleActivateUI" ); __TIME_MARK( time ); - iUiControllerManager->LoadUIDefinition(); - iUiControllerManager->ActivateUI(); __TIME_ENDMARK( "CAiFw::HandleActivateUI, done", time ); diff -r 6cadd6867c17 -r 67f2ed48ad91 idlefw/src/framework/aipluginfactory.cpp --- a/idlefw/src/framework/aipluginfactory.cpp Wed Sep 15 12:32:36 2010 +0300 +++ b/idlefw/src/framework/aipluginfactory.cpp Wed Oct 13 14:53:46 2010 +0300 @@ -512,7 +512,7 @@ ConfigurePluginL( *plugin, info ) ); // Take plugin's ownership - iPublishers.AppendL( plugin ); + iPublishers.Append( plugin ); CleanupStack::Pop( plugin ); } diff -r 6cadd6867c17 -r 67f2ed48ad91 idlefw/src/framework/aiuicontrollermanager.cpp --- a/idlefw/src/framework/aiuicontrollermanager.cpp Wed Sep 15 12:32:36 2010 +0300 +++ b/idlefw/src/framework/aiuicontrollermanager.cpp Wed Oct 13 14:53:46 2010 +0300 @@ -55,9 +55,9 @@ User::LeaveIfError( aRepository.Get( KAiMainUIController, value ) ); CAiUiController* controller = CAiUiController::NewL( TUid::Uid( value ) ); + + iCreatedUICList.Append( value ); CleanupStack::PushL( controller ); - - iCreatedUICList.AppendL( value ); iMainUiController = controller->MainInterface(); @@ -98,7 +98,7 @@ continue; } - iCreatedUICList.AppendL( value ); + iCreatedUICList.Append( value ); CAiUiController* controller = CAiUiController::NewL( TUid::Uid( value ) ); diff -r 6cadd6867c17 -r 67f2ed48ad91 idlefw/src/idleint/aistate.cpp --- a/idlefw/src/idleint/aistate.cpp Wed Sep 15 12:32:36 2010 +0300 +++ b/idlefw/src/idleint/aistate.cpp Wed Oct 13 14:53:46 2010 +0300 @@ -96,17 +96,24 @@ // void CActiveIdleState::UpdateActiveIdleState() { - const EPSActiveIdleState state = - iIsIdleForeground ? EPSAiForeground : EPSAiBackground; - - TInt setResult = - RProperty::Set( + TInt state( 0 ); + TInt err( RProperty::Get( KPSUidAiInformation, KActiveIdleState, state ) ); + if ( !iIsIdleForeground && KErrNone == err && + EPSAiNumberEntry == (EPSActiveIdleState)state ) + { + __PRINTS( "*** CActiveIdleState::UpdateActiveIdleState - Background & EPSAiNumberEntry, skip state update" ); + } + else + { + state = iIsIdleForeground ? EPSAiForeground : EPSAiBackground; + err = RProperty::Set( KPSUidAiInformation, KActiveIdleState, - state ); + (EPSActiveIdleState)state ); - __PRINT( __DBG_FORMAT( "XAI: Set CActiveIdleState::UpdateActiveIdleState: KTelephonyIdleStatus=%d, P&S result=%d" ), - TInt(state), setResult ); + __PRINT( __DBG_FORMAT( "XAI: Set CActiveIdleState::UpdateActiveIdleState: KTelephonyIdleStatus=%d, P&S result=%d" ), + TInt(state), err ); + } } // ----------------------------------------------------------------------------- diff -r 6cadd6867c17 -r 67f2ed48ad91 idlefw/tsrc/devicestatusplugin/group/MT_DevStaPlg.mmp --- a/idlefw/tsrc/devicestatusplugin/group/MT_DevStaPlg.mmp Wed Sep 15 12:32:36 2010 +0300 +++ b/idlefw/tsrc/devicestatusplugin/group/MT_DevStaPlg.mmp Wed Oct 13 14:53:46 2010 +0300 @@ -36,12 +36,15 @@ USERINCLUDE ../mt_devstaplg USERINCLUDE ../stub/src -USERINCLUDE ../../../plugins/devicestatus/inc -USERINCLUDE ../../../../../homescreen/idlehomescreen/inc -USERINCLUDE ../../../../../homescreen/idlehomescreen/nativeuicontroller/inc -USERINCLUDE ../../../../idlefw/plugins/profileplugin/inc -USERINCLUDE ../../../../../../app/homescreen/idlehomescreen/inc -USERINCLUDE ../../../../../../app/homescreen/idlehomescreen/nativeuicontroller/inc +USERINCLUDE ../../../../inc/common +USERINCLUDE ../../../../inc/framework +USERINCLUDE ../../../../group +USERINCLUDE ../../../../plugins/devicestatus/inc +USERINCLUDE ../../../../../../homescreen/idlehomescreen/inc +USERINCLUDE ../../../../../../homescreen/idlehomescreen/nativeuicontroller/inc +USERINCLUDE ../../../../../idlefw/plugins/profileplugin/inc +USERINCLUDE ../../../../../../../app/homescreen/idlehomescreen/inc +USERINCLUDE ../../../../../../../app/homescreen/idlehomescreen/nativeuicontroller/inc APP_LAYER_SYSTEMINCLUDE diff -r 6cadd6867c17 -r 67f2ed48ad91 idlefw/tsrc/devicestatusplugin/mt_devstaplg/MT_DevStaPlg.cpp --- a/idlefw/tsrc/devicestatusplugin/mt_devstaplg/MT_DevStaPlg.cpp Wed Sep 15 12:32:36 2010 +0300 +++ b/idlefw/tsrc/devicestatusplugin/mt_devstaplg/MT_DevStaPlg.cpp Wed Oct 13 14:53:46 2010 +0300 @@ -559,7 +559,7 @@ { User::Leave( KErrNoMemory ); } - + /* MAiPropertyExtension* ext = static_cast( iPublisher->Extension( KExtensionUidProperty ) ); MAiContentRequest* request = static_cast( ext->GetPropertyL( EAiContentRequest ) ); @@ -657,7 +657,7 @@ CStubDataHolder::Instance()->SetCurrentProfileL( KProfGeneral, EProfileGeneralId ); - + /* MAiPropertyExtension* ext = static_cast( iPublisher->Extension( KExtensionUidProperty ) ); MAiContentRequest* request = static_cast( ext->GetPropertyL( EAiContentRequest ) ); diff -r 6cadd6867c17 -r 67f2ed48ad91 idlefw/tsrc/devicestatusplugin/mt_devstaplg/contentobserver.cpp --- a/idlefw/tsrc/devicestatusplugin/mt_devstaplg/contentobserver.cpp Wed Sep 15 12:32:36 2010 +0300 +++ b/idlefw/tsrc/devicestatusplugin/mt_devstaplg/contentobserver.cpp Wed Oct 13 14:53:46 2010 +0300 @@ -96,19 +96,19 @@ } -TInt CContentObserver::StartTransaction(TInt /*aTxId*/) +TInt CContentObserver::StartTransaction(TInt aTxId) { return 0; } -TInt CContentObserver::Commit(TInt /*aTxId*/) +TInt CContentObserver::Commit(TInt aTxId) { return 0; } -TInt CContentObserver::CancelTransaction(TInt /*aTxId*/) +TInt CContentObserver::CancelTransaction(TInt aTxId) { return 0; } @@ -120,7 +120,7 @@ } -TInt CContentObserver::Publish(CHsContentPublisher& /*aPlugin*/, TInt aContent, TInt aResource, TInt aIndex ) +TInt CContentObserver::Publish(CHsContentPublisher& aPlugin, TInt aContent, TInt aResource, TInt aIndex ) { RDebug::Print( _L("Publish(%d, %d, %d)"), aContent, aResource, aIndex ); CContentCache* cache = new( ELeave )CContentCache; @@ -133,7 +133,7 @@ return 0; } -TInt CContentObserver::Publish(CHsContentPublisher& /*aPlugin*/, TInt aContent, const TDesC16& aText, TInt aIndex ) +TInt CContentObserver::Publish(CHsContentPublisher& aPlugin, TInt aContent, const TDesC16& aText, TInt aIndex ) { RDebug::Print( _L("Publish(%d, \"%S\", %d)"), aContent, &aText, aIndex ); CContentCache* cache = new( ELeave )CContentCache; @@ -147,7 +147,7 @@ } -TInt CContentObserver::Publish(CHsContentPublisher& /*aPlugin*/, TInt aContent, const TDesC8& aBuf, TInt aIndex ) +TInt CContentObserver::Publish(CHsContentPublisher& aPlugin, TInt aContent, const TDesC8& aBuf, TInt aIndex ) { RDebug::Print( _L("Publish(%d, Buf.Len=%d, %d)"), aContent, aBuf.Length(), aIndex ); CContentCache* cache = new( ELeave )CContentCache; @@ -161,7 +161,7 @@ } -TInt CContentObserver::Publish(CHsContentPublisher& /*aPlugin*/, TInt aContent, RFile& /*aFile*/, TInt aIndex ) +TInt CContentObserver::Publish(CHsContentPublisher& aPlugin, TInt aContent, RFile& aFile, TInt aIndex ) { CContentCache* cache = new( ELeave )CContentCache; CleanupStack::PushL( cache ); @@ -173,7 +173,7 @@ } -TInt CContentObserver::Clean(CHsContentPublisher& /*aPlugin*/, TInt aContent, TInt aIndex) +TInt CContentObserver::Clean(CHsContentPublisher& aPlugin, TInt aContent, TInt aIndex) { RDebug::Print( _L("Clean(%d, %d)"), aContent, aIndex ); CContentCache* cache = new( ELeave )CContentCache; @@ -187,12 +187,12 @@ } -TAny* CContentObserver::Extension(TUid /*aUid*/) +TAny* CContentObserver::Extension(TUid aUid) { return NULL; } -TBool CContentObserver::RequiresSubscription( const THsPublisherInfo& /*aPublisherInfo*/ ) const +TBool CContentObserver::RequiresSubscription( const THsPublisherInfo& aPublisherInfo ) const { return EFalse; } diff -r 6cadd6867c17 -r 67f2ed48ad91 idlefw/tsrc/devicestatusplugin/stub/group/devstaplg.mmp --- a/idlefw/tsrc/devicestatusplugin/stub/group/devstaplg.mmp Wed Sep 15 12:32:36 2010 +0300 +++ b/idlefw/tsrc/devicestatusplugin/stub/group/devstaplg.mmp Wed Oct 13 14:53:46 2010 +0300 @@ -29,12 +29,11 @@ #include #include -//#include +#include TARGET aidevstaplg.dll TARGETTYPE PLUGIN -UID 0x10009D8D 0x102750F7 //AI_UID_ECOM_DLL_CONTENTPUBLISHER_DEVSTAPLUGIN - +UID 0x10009D8D AI_UID_ECOM_DLL_CONTENTPUBLISHER_DEVSTAPLUGIN CAPABILITY EUNIT_CAPS diff -r 6cadd6867c17 -r 67f2ed48ad91 idlefw/tsrc/devicestatusplugin/stub/src/profileengine.cpp --- a/idlefw/tsrc/devicestatusplugin/stub/src/profileengine.cpp Wed Sep 15 12:32:36 2010 +0300 +++ b/idlefw/tsrc/devicestatusplugin/stub/src/profileengine.cpp Wed Oct 13 14:53:46 2010 +0300 @@ -200,9 +200,7 @@ TProfileRingingVolume CProfileEngine::TempRingingVolumeL() const - { - TProfileRingingVolume vol = EProfileRingingVolumeLevel1; - return vol; + { } @@ -212,9 +210,7 @@ TProfileRingingVolume CProfileEngine::TempMediaVolumeL() const - { - TProfileRingingVolume vol = EProfileRingingVolumeLevel1; - return vol; + { } diff -r 6cadd6867c17 -r 67f2ed48ad91 idlefw/tsrc/framework/ut_aifw/ut_aipluginfactory/src/ut_aipluginfactory.cpp --- a/idlefw/tsrc/framework/ut_aifw/ut_aipluginfactory/src/ut_aipluginfactory.cpp Wed Sep 15 12:32:36 2010 +0300 +++ b/idlefw/tsrc/framework/ut_aifw/ut_aipluginfactory/src/ut_aipluginfactory.cpp Wed Oct 13 14:53:46 2010 +0300 @@ -177,29 +177,32 @@ THsPublisherInfo unknown( TUid::Uid( KUnknownUid ), KUnknown, KNs1 ); - // create 2 same without waiting first to finnish. - // Second won't be appended to load queue. + // create 2 same without waiting first to finnish. Second should return + // KErrAlreadyExists TAiFwPublisherInfo info( data, TAiFwCallback( CallBack, this ), EAiFwSystemStartup ); iFactory->LoadPlugin( info ); iFactory->LoadPlugin( info ); iWait->Start(); + EUNIT_ASSERT_EQUALS( iResult, KErrAlreadyExists ); EUNIT_ASSERT_EQUALS( iFactory->PluginByInfo( data ) != NULL, ETrue ); - + // wait for destroy to finnish iFactory->DestroyPlugin( info ); iPeriodic->Start( KDestroyDelay, KDestroyDelay, TCallBack( TimerCallBack, this ) ); iWait->Start(); EUNIT_ASSERT_EQUALS( iFactory->PluginByInfo( data ) == NULL, ETrue ); EUNIT_ASSERT_EQUALS( iFactory->Publishers().Count(), 0 ); - - // create 2 same and wait first to finnish. - // Second won't be appended to load queue. + + // create 2 same and wait first to finnish. Second should return + // KErrAlreadyExists iFactory->LoadPlugin( info ); iWait->Start(); EUNIT_ASSERT_EQUALS( iResult, KErrNone ); EUNIT_ASSERT_EQUALS( iFactory->PluginByInfo( data ) != NULL, ETrue ); iFactory->LoadPlugin( info ); + iWait->Start(); + EUNIT_ASSERT_EQUALS( iResult, KErrAlreadyExists ); EUNIT_ASSERT_EQUALS( iFactory->PluginByInfo( data ) != NULL, ETrue ); // Test missing namespace diff -r 6cadd6867c17 -r 67f2ed48ad91 idlefw/tsrc/mcsplugin/ut_mcsplugin/ut_mcspluginpublisher.cpp --- a/idlefw/tsrc/mcsplugin/ut_mcsplugin/ut_mcspluginpublisher.cpp Wed Sep 15 12:32:36 2010 +0300 +++ b/idlefw/tsrc/mcsplugin/ut_mcsplugin/ut_mcspluginpublisher.cpp Wed Oct 13 14:53:46 2010 +0300 @@ -47,13 +47,19 @@ _LIT( KMenuMailboxIconId, "16388" ); _LIT( KMenuMailboxMaskId, "16389" ); _LIT( KMenuTypeMailbox, "menu:mailbox" ); +_LIT( KIcon, "icon" ); _LIT8( KProperNameType, "type" ); +_LIT8( KProperNameParam, "param" ); _LIT8( KProperNameUid, "uid" ); +_LIT8( KProperNameView, "view" ); +_LIT8( KProperNameLocked, "locked" ); _LIT8( KProperValueBookmark, "bookmark" ); _LIT8( KProperValueFolder, "folder" ); _LIT8( KProperValueMailbox, "mailbox" ); _LIT8( KMenuAttrUndefUid, "0x99999991" ); +_LIT8( KMenuAttrViewTest, "view:test" ); +_LIT8( KMenuAttrParamTest, "param:test" ); _LIT( KTestName, "test:name" ); _LIT( KTestIconAttr, "icon_attributes" ); @@ -197,7 +203,7 @@ void UT_MCSPluginPublisher::Teardown() { User::LeaveIfError( iPluginSettings->SetSettingsL( KNameSpace, - iSettings, EFalse )); + iSettings, ETrue )); iSettings.ResetAndDestroy(); @@ -225,8 +231,8 @@ data->SetNameL( KTestName ); data->SetValueL( KTestValue ); - EUNIT_ASSERT_EQUALS( *data->Name(), KTestName ); - EUNIT_ASSERT_EQUALS( *data->Value(), KTestValue ); + EUNIT_ASSERT_EQUALS( data->Name(), KTestName ); + EUNIT_ASSERT_EQUALS( data->Value(), KTestValue ); CleanupStack::PopAndDestroy( data ); } @@ -272,7 +278,7 @@ } User::LeaveIfError( iPluginSettings->SetSettingsL( KNameSpace, settings, - EFalse )); + ETrue) ); iMCSPlugin->iEngine->iPluginData->UpdateDataL(); CMCSData& itemData = iMCSPlugin->iEngine->iPluginData->DataItemL( 0 ); @@ -303,7 +309,7 @@ } User::LeaveIfError( iPluginSettings->SetSettingsL( KNameSpace, settings, - EFalse )); + ETrue )); iMCSPlugin->iEngine->iPluginData->UpdateDataL(); CMCSData& itemData = iMCSPlugin->iEngine->iPluginData->DataItemL( 0 ); @@ -334,7 +340,7 @@ } User::LeaveIfError( iPluginSettings->SetSettingsL( KNameSpace, settings, - EFalse )); + ETrue)); iMCSPlugin->iEngine->iPluginData->UpdateDataL(); CMCSData& itemData = iMCSPlugin->iEngine->iPluginData->DataItemL(0); diff -r 6cadd6867c17 -r 67f2ed48ad91 layers.sysdef.xml --- a/layers.sysdef.xml Wed Sep 15 12:32:36 2010 +0300 +++ b/layers.sysdef.xml Wed Oct 13 14:53:46 2010 +0300 @@ -23,7 +23,7 @@ - + diff -r 6cadd6867c17 -r 67f2ed48ad91 menucontentsrv/group/mcsmenu.mmp --- a/menucontentsrv/group/mcsmenu.mmp Wed Sep 15 12:32:36 2010 +0300 +++ b/menucontentsrv/group/mcsmenu.mmp Wed Oct 13 14:53:46 2010 +0300 @@ -12,7 +12,7 @@ * Contributors: * * Description: -* Version : %version: sa1spcx1#11.1.7.1.9 % << Don't touch! Updated by Synergy at check-out. +* Version : %version: sa1spcx1#11.1.7.1.8 % << Don't touch! Updated by Synergy at check-out. * */ @@ -80,7 +80,6 @@ SOURCE mcsmmcobserver.cpp SOURCE mcsfreespaceobserver.cpp SOURCE mcsinstallnotifier.cpp -SOURCE mcsinstallstrategy.cpp SOURCE mcsgetlistcreatorinterface.cpp SOURCE mcsgetlisthandler.cpp diff -r 6cadd6867c17 -r 67f2ed48ad91 menucontentsrv/group/mcsmenusrv.mmp --- a/menucontentsrv/group/mcsmenusrv.mmp Wed Sep 15 12:32:36 2010 +0300 +++ b/menucontentsrv/group/mcsmenusrv.mmp Wed Oct 13 14:53:46 2010 +0300 @@ -12,7 +12,7 @@ * Contributors: * * Description: -* Version : %version: sa1spcx1#5.1.10 % << Don't touch! Updated by Synergy at check-out. +* Version : %version: sa1spcx1#5.1.9 % << Don't touch! Updated by Synergy at check-out. * */ @@ -27,7 +27,7 @@ TARGET mcsmenuserver.exe TARGETTYPE exe UID 0x1000008c MENU_SRV_UID3 -CAPABILITY AllFiles ProtServ ReadDeviceData ReadUserData +CAPABILITY AllFiles ProtServ ReadDeviceData VENDORID VID_DEFAULT EPOCSTACKSIZE 0x5000 diff -r 6cadd6867c17 -r 67f2ed48ad91 menucontentsrv/srvinc/mcsdrmhandler.h --- a/menucontentsrv/srvinc/mcsdrmhandler.h Wed Sep 15 12:32:36 2010 +0300 +++ b/menucontentsrv/srvinc/mcsdrmhandler.h Wed Oct 13 14:53:46 2010 +0300 @@ -32,24 +32,24 @@ * @lib mcsmenu.lib * @since S60 v5.0 */ -NONSHARABLE_CLASS( CMcsDrmHandler ): +NONSHARABLE_CLASS( CMcsDrmHandler ): public CBase, public MMcsInstallListener, public MMcsDrmObserver, public MMcsDrmAppScanner { public: - + /** * Two-phased constructor. Leaves on failure. * @return The constructed object. */ - - static CMcsDrmHandler* NewL( + + static CMcsDrmHandler* NewL( CMenuSrvEng& aSrvEng, CMenuSrvEngUtils& aUtils, CMcsCacheHandler& aCacheHandler ); - + /** * Destructor. * @since S60 v5.0 @@ -58,25 +58,24 @@ * @panic None. */ virtual ~CMcsDrmHandler(); - + void HandleDrmEvent( TUid aUid ); - + void HandleDrmAppEvent(); - + void EngineEvents( TInt aFolder, TInt aEvents ); /** * Handle Install Event */ - void HandleInstallNotifyL( TUid aPackageUid, - CMcsInstallNotifier::TNotificationType aNotificationType ); - + void HandleInstallNotifyL(TInt aPackageUid); + private: /** * Constructor. */ - CMcsDrmHandler( + CMcsDrmHandler( CMenuSrvEng& aSrvEng, CMenuSrvEngUtils& aUtils, CMcsCacheHandler& aCacheHandler ); @@ -85,27 +84,27 @@ * 2nd phase constructor. */ void ConstructL(); - - void AddRemoveObserversL( + + void AddRemoveObserversL( const RArray& aDrmProtectedArray ); - + TInt AppFolderIdL( TUid aUid ); - + private: // data - + RMcsDrmObserverManager iObserversManager; - - + + CMenuSrvEng& iSrvEng; ///< Menu Engine. Not own. - + CMenuSrvEngUtils& iUtils; - + CMcsCacheHandler& iCacheHandler; - + CMcsDrmScanner* iScanner; - + CMcsInstallNotifier* iInstallNotifier; - + }; #endif // __MCSDRMHANDLER_H__ diff -r 6cadd6867c17 -r 67f2ed48ad91 menucontentsrv/srvinc/mcsinstallnotifier.h --- a/menucontentsrv/srvinc/mcsinstallnotifier.h Wed Sep 15 12:32:36 2010 +0300 +++ b/menucontentsrv/srvinc/mcsinstallnotifier.h Wed Oct 13 14:53:46 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -11,8 +11,8 @@ * * Contributors: * -* Description: This class implements MMcsGetListCreatorInterface. It builds tree -* output list for getlist operation +* Description: This class implements MMcsGetListCreatorInterface. It builds tree +* output list for getlist operation * * */ @@ -20,92 +20,9 @@ #ifndef MCSINSTALLNOTIFIER_H_ #define MCSINSTALLNOTIFIER_H_ -#include #include #include -class CMcsNotifierStrategy; -class MMcsInstallListener; - -/** - * MCS Install notifier. - * - * @since S60 v5.0 - */ -NONSHARABLE_CLASS( CMcsInstallNotifier ) : public CActive - { -public: - - /** - * Enum defining notification type. - */ - enum TNotificationType - { - ENoNotification, ///< No notification. - ESisInstallNotification, ///< System installation notification. - EJavaInstallNotification, ///< Java instalation and uninstallation notification. - }; - - /** - * Creates an instance of CCaInstallNotifier. - * @param aNotifier Reference to notifier interface. - * @param aNotificationType Notification type. - */ - static CMcsInstallNotifier* NewL( MMcsInstallListener& aListener, - TNotificationType aNotificationType ); - - /** - * Destructor. - */ - virtual ~CMcsInstallNotifier(); - -private: - - /** - * Constructor. - * @param aListener Reference to listener interface. - */ - CMcsInstallNotifier( MMcsInstallListener& aListener ); - - /** - * Symbian 2nd phase constructor. - * @param aNotificationType Notification type. - */ - void ConstructL( TNotificationType aNotificationType ); - - /** - * From CActive. - */ - void DoCancel(); - - /** - * From CActive. - */ - void RunL(); - - /** - * From CActive. - */ - TInt RunError( TInt aError ); - -private: - - /** - * RProperty - own. - */ - RProperty iProperty; - - /** - * MMcsInstallListener - own. - */ - MMcsInstallListener& iListener; - - /* - * Notification strategy - own. - */ - CMcsNotifierStrategy* iNotifierStrategy; - - }; /** * Interface for updating after installer events. @@ -114,16 +31,109 @@ */ class MMcsInstallListener { -public: - +protected: /** - * Pure virtual method. - * @param aUid uid of installed application. - * @param aOperation operation type, see TSASwisOperation. + * Enum defining the purpouse of the installation event. */ - virtual void HandleInstallNotifyL( TUid aUid, - CMcsInstallNotifier::TNotificationType aNotificationType ) = 0; + enum TInstOp + { + EInstOpNone = 0x00000000, + EInstOpInstall = 0x00000001, + EInstOpUninstall = 0x00000002, + EInstOpRestore = 0x00000004 + }; +public: + virtual void HandleInstallNotifyL(TInt aEvent) = 0; }; +/** + * MCS Install notifier. + * + * @since S60 v5.0 + */ +NONSHARABLE_CLASS( CMcsInstallNotifier ) : + public CActive + { + /** + * Enum defining the purpouse of the installation event. + */ + enum TInstOp + { + EInstOpNone = 0x00000000, + EInstOpInstall = 0x00000001, + EInstOpUninstall = 0x00000002, + EInstOpRestore = 0x00000004 + }; + + enum TInstOpStatus + { + EInstOpStatusNone = 0x00000000, + EInstOpStatusSuccess = 0x00000100, + EInstOpStatusAborted = 0x00000200 + }; +public: + + /** + * Creates an instance of CMCSInstallNotifier implementation. + * @param aNotifier Reference to notifier interface. + * @param aCategory Package uid. + * @param aKey Key for central repository. + */ + static CMcsInstallNotifier* NewL(MMcsInstallListener& aListener, TInt aKey ); + + /** + * Destructor. + */ + virtual ~CMcsInstallNotifier(); + +private: + + /** + * Constructor. + * @param aNotifier Reference to notifier interface. + * @param aCategory Package uid. + * @param aKey Key for central repository. + */ + CMcsInstallNotifier( MMcsInstallListener& aListener, TInt aKey ); + + /** + * Symbian 2nd phase constructor. + */ + void ConstructL(); + + /** + * From CActive. + */ + void DoCancel(); + + /** + * From CActive. + */ + void RunL(); + + /** + * From CActive. + */ + TInt RunError( TInt aError ); + +private: + /**. + * Own. + */ + RProperty iProperty; + + /** + * Interface for notifying changes in folder. + * Not Own. + */ + MMcsInstallListener& iListener; + + /* + * + */ + TInt iKey; + }; + + #endif /* MCSINSTALLNOTIFIER_H_ */ diff -r 6cadd6867c17 -r 67f2ed48ad91 menucontentsrv/srvinc/mcsinstallstrategy.h --- a/menucontentsrv/srvinc/mcsinstallstrategy.h Wed Sep 15 12:32:36 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,169 +0,0 @@ -/* - * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). - * All rights reserved. - * This component and the accompanying materials are made available - * under the terms of "Eclipse Public License v1.0" - * which accompanies this distribution, and is available - * at the URL "http://www.eclipse.org/legal/epl-v10.html". - * - * Initial Contributors: - * Nokia Corporation - initial contribution. - * - * Contributors: - * - * Description: ?Description - * - */ - -#ifndef MCSINSTALLSTRATEGY_H -#define MCSINSTALLSTRATEGY_H - -#include "mcsinstallnotifier.h" -#include - -namespace Swi - { - class RSisRegistryEntry; - } - -/** - * Strategy interface. - * - * @since S60 v5.0 - */ -class CMcsNotifierStrategy: public CBase - { -public: - - /** - * Notifies listener with changes in property. - */ - virtual void NotifyListenerL() = 0; - -protected: - - /** - * Constructor. - * @param aProperty to read values from. - * @param aListener listener to notify. - */ - CMcsNotifierStrategy( - RProperty& aProperty, - MMcsInstallListener& aListener ); - -protected: - - /** - * Property. Not own. - */ - RProperty& iProperty; - - /** - * Listener. Not own. - */ - MMcsInstallListener& iListener; - - }; - -/** - * Swi Install strategy. - * - * @since S60 v5.0 - */ -NONSHARABLE_CLASS( CMcsSwiInstallStrategy ): public CMcsNotifierStrategy - { -public: - - /** - * Creates an instance of CCaInstallStrategy. - * @param aProperty to read values from. - * @param aListener listener to notify. - */ - static CMcsSwiInstallStrategy* NewL( - RProperty& aProperty, - MMcsInstallListener& aListener ); - - /** - * Notifies listener with changes in property. - */ - void NotifyListenerL(); - -private: - - /** - * Constructor. - * @param aProperty to read values from. - * @param aListener listener to notify. - */ - CMcsSwiInstallStrategy( - RProperty& aProperty, - MMcsInstallListener& aListener ); - - /** - * Symbian 2nd phase constructor. - */ - void ConstructL(); - - /** - * Handle Install Event. - * @param aUid installed/uninstalled app uid. - */ - void HandleInstallNotifyL( TInt aUid ); - - /** - * Notifies storage abaut change for aPackageEntry related app. - * @param aPackageEntry application package entry. - */ - void NotifyL( Swi::RSisRegistryEntry & aPackageEntry ); - - }; - -/** - * Mcs Java install strategy. - * - * @since S60 v5.0 - */ -NONSHARABLE_CLASS( CMcsJavaInstallStrategy ): public CMcsNotifierStrategy - { -public: - - /** - * Creates an instance of CCaInstallStrategy. - * @param aProperty to read values from. - * @param aListener listener to notify. - */ - static CMcsJavaInstallStrategy* NewL( - RProperty& aProperty, - MMcsInstallListener& aListener ); - - /** - * Notifies listener with changes in property. - */ - void NotifyListenerL(); - -private: - - /** - * Constructor. - * @param aProperty to read values from. - * @param aListener listener to notify. - */ - CMcsJavaInstallStrategy( - RProperty& aProperty, - MMcsInstallListener& aListener ); - - /** - * Symbian 2nd phase constructor. - */ - void ConstructL(); - - /** - * Handle Install Event. - * @param aUid installed/uninstalled app uid. - */ - void HandleInstallNotifyL( TUid aPackageUid ); - - }; - -#endif /* MCSINSTALLSTRATEGY_H */ -// End of File diff -r 6cadd6867c17 -r 67f2ed48ad91 menucontentsrv/srvinc/menusrvappscanner.h --- a/menucontentsrv/srvinc/menusrvappscanner.h Wed Sep 15 12:32:36 2010 +0300 +++ b/menucontentsrv/srvinc/menusrvappscanner.h Wed Oct 13 14:53:46 2010 +0300 @@ -21,7 +21,6 @@ #include #include #include -#include #include #include "menuengoperation.h" #include "mcssatnotifier.h" @@ -29,8 +28,7 @@ #include "mcsfreespaceobserver.h" #include "mcsmenuitem.h" #include "mcsmenunotifier.h" -#include "mcsinstallnotifier.h" - +#include // FORWARD DECLARATION @@ -66,7 +64,7 @@ NONSHARABLE_CLASS( CMenuSrvAppScanner ) : public CActive, public MMenuEngOperation, public MApaAppListServObserver, public MCenRepNotifyHandlerCallback, public MMcsSATNotifierCallback, - MMcsFreeSpaceObserver, MMcsInstallListener + MMcsFreeSpaceObserver { public: // Constructor @@ -84,13 +82,6 @@ CMenuEng& aEng, CMenuSrvEngUtils& aSrvEngUtils ); -public: - /** - * Schedule appscanner run. - * Self complete active object. - */ - void ScheduleScan(); - private: // Constructors and destructor /** @@ -144,18 +135,14 @@ private: // from MApaAppListServObserver - /** - * Application list event. - * @param aEvent only one type event exists. - */ void HandleAppListEvent( TInt aEvent ); private: // from MCenRepNotifyHandlerCallback /** * Called if one of CR keys has changed - * @param aKey Id of the key that has changed. - * @param aNewValue The new value of the key. + * @param aId Id of the key that has changed. + * @param aNewValue The new value of the key. */ void HandleNotifyString( TUint32 aKey, const TDesC16& aNewValue ); @@ -169,15 +156,12 @@ */ void SATChangeL(); -private: // from MMcsInstallListener - - /** - * Called application is installed. - * @param aUid uid of an application. - * @param aOperation operation type. - */ - void HandleInstallNotifyL( TUid aUid, - CMcsInstallNotifier::TNotificationType aNotificationType ); +public: + /** + * Schedule appscanner run. + * Self complete active object. + */ + void ScheduleScan(); private: // new methods @@ -191,28 +175,7 @@ * Add new menu item referring to this application. * @param aItem menu item. */ - void HandleMissingFlagUpdateL( - const TMenuItem& aItem, const CMenuSrvAppAttributes& aApaItem ); - - /** - * Notifies engine abaut application installation. - */ - void InstallationNotifyL(); - - /** - * Removes uid from installed packages array. - * @param aUid application uid. - */ - void RemoveFromInstalledPackages( TUid aUid ); - - /** - * Removes uid from installed packages array. - * @param aUid application uid. - * @param aId Item ID. - * @param aEvent event for engine to append. - */ - CMenuEngObject& ModifiableObjectL( TUid aUid, TInt aId, - TInt aEvent = RMenuNotifier::EItemAttributeChanged ); + void HandleMissingFlagUpdateL( const TMenuItem& aItem ); /** * Updates hidden flag. @@ -255,7 +218,7 @@ /** */ - void SetHiddenL( const TDesC& aHiddenAppUid, + void SetHidden( const TDesC& aHiddenAppUid, RPointerArray& aArray ); /** @@ -389,7 +352,7 @@ * @return ETrue if drive is in use. */ TBool IsDriveInUse( - const DriveInfo::TDefaultDrives& aDefaultDrive ); + const DriveInfo::TDefaultDrives& aDefaultDrive ); /** TODO @@ -430,7 +393,7 @@ TODO */ void UpdateApplicationItemL( - RArray& aMcsItems, + RArray& aMcsItems, const CMenuSrvAppAttributes& aApaItem, TUint aMmcId, TBool isLegacy ); @@ -490,12 +453,6 @@ CMcsFreeSpaceObserver* iFreeSpaceObserver; TBool iOpStatus; - - RArray iInstalledPackages; ///< Own. - - CMcsInstallNotifier* iSisInstallNotifier; ///< Native app notifier. Own. - CMcsInstallNotifier* iJavaInstallNotifier; ///< Java app notifier. Own. - }; #endif // __MENUSRVAPPSCANNER_H__ diff -r 6cadd6867c17 -r 67f2ed48ad91 menucontentsrv/srvsrc/mcscachehandler.cpp --- a/menucontentsrv/srvsrc/mcscachehandler.cpp Wed Sep 15 12:32:36 2010 +0300 +++ b/menucontentsrv/srvsrc/mcscachehandler.cpp Wed Oct 13 14:53:46 2010 +0300 @@ -11,7 +11,7 @@ * * Contributors: * -* Description: Used for receive SIM Application name, icon or +* Description: Used for receive SIM Application name, icon or * visibility information. * */ @@ -33,7 +33,7 @@ // Two-phased constructor. // ----------------------------------------------------------------------------- // -EXPORT_C CMcsCacheHandler* CMcsCacheHandler::NewL( +EXPORT_C CMcsCacheHandler* CMcsCacheHandler::NewL( CMenuEng& aEng, CMenuSrvEngUtils& aUtils ) { @@ -44,7 +44,7 @@ return self; } -// ----------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // Destructor // ----------------------------------------------------------------------------- CMcsCacheHandler::~CMcsCacheHandler() @@ -58,7 +58,7 @@ // might leave. // ----------------------------------------------------------------------------- // -CMcsCacheHandler::CMcsCacheHandler( +CMcsCacheHandler::CMcsCacheHandler( CMenuEng& aEng, CMenuSrvEngUtils& aUtils ): iEng( aEng ), iUtils( aUtils ) { @@ -75,7 +75,7 @@ // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- -// +// void CMcsCacheHandler::HandleRemoveId( TInt aId ) { iAttrCache.RemoveId( aId ); @@ -83,7 +83,7 @@ // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- -// +// void CMcsCacheHandler::HandleRemoveAttribute( TInt aId, const TDesC& aAttrName ) { iAttrCache.RemoveAttribute(aId, aAttrName); @@ -91,7 +91,7 @@ // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- -// +// void CMcsCacheHandler::EngineEvents( TInt aEvents ) { if( aEvents & RMenuNotifier::EItemsAddedRemoved ) @@ -100,7 +100,7 @@ } if( aEvents & RMenuNotifier::EItemAttributeChanged ) { - TRAP_IGNORE( RemoveItemsWithChangedAttributesL() ); + TRAP_IGNORE(RemoveItemsWithChangedAttributesL()); } } @@ -118,9 +118,9 @@ TInt id = iAttrCache[i]->Id(); TPtrC name = iAttrCache[i]->Name(); TPtrC valueCache = iAttrCache[i]->Value(); - + TPtrC valueXml(KNullDesC); - + exist = iEng.ObjectL(id).FindAttribute( name, valueXml, dummy ); if( exist && valueXml != valueCache ) { @@ -151,4 +151,4 @@ } } -// End of File +// End of File diff -r 6cadd6867c17 -r 67f2ed48ad91 menucontentsrv/srvsrc/mcsdrmhandler.cpp --- a/menucontentsrv/srvsrc/mcsdrmhandler.cpp Wed Sep 15 12:32:36 2010 +0300 +++ b/menucontentsrv/srvsrc/mcsdrmhandler.cpp Wed Oct 13 14:53:46 2010 +0300 @@ -11,7 +11,7 @@ * * Contributors: * -* Description: Used for receive SIM Application name, icon or +* Description: Used for receive SIM Application name, icon or * visibility information. * */ @@ -41,12 +41,12 @@ // ----------------------------------------------------------------------------- // -CMcsDrmHandler* CMcsDrmHandler::NewL( +CMcsDrmHandler* CMcsDrmHandler::NewL( CMenuSrvEng& aSrvEng, CMenuSrvEngUtils& aUtils, CMcsCacheHandler& aCacheHandler ) { - CMcsDrmHandler* self = new( ELeave ) + CMcsDrmHandler* self = new( ELeave ) CMcsDrmHandler( aSrvEng, aUtils, aCacheHandler ); CleanupStack::PushL( self ); self->ConstructL(); @@ -54,7 +54,7 @@ return self; } -// ----------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // Destructor // ----------------------------------------------------------------------------- CMcsDrmHandler::~CMcsDrmHandler() @@ -70,10 +70,10 @@ // might leave. // ----------------------------------------------------------------------------- // -CMcsDrmHandler::CMcsDrmHandler( +CMcsDrmHandler::CMcsDrmHandler( CMenuSrvEng& aSrvEng, CMenuSrvEngUtils& aUtils, - CMcsCacheHandler& aCacheHandler ): + CMcsCacheHandler& aCacheHandler ): iObserversManager( aUtils ), iSrvEng( aSrvEng ), iUtils( aUtils ), iCacheHandler( aCacheHandler ) { @@ -87,117 +87,148 @@ void CMcsDrmHandler::ConstructL() { iScanner = CMcsDrmScanner::NewL( *this, iSrvEng, iUtils ); - iInstallNotifier = CMcsInstallNotifier::NewL( - *this, CMcsInstallNotifier::EJavaInstallNotification ); + iInstallNotifier = CMcsInstallNotifier::NewL(*this, KPSUidJavaLatestInstallation); } // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- -// +// TInt CMcsDrmHandler::AppFolderIdL( TUid aUid ) { - RArray mcsItems; + RArray mcsItems; CleanupClosePushL( mcsItems ); - + TInt root; iSrvEng.Engine().RootFolderL( root ); TMenuSrvTypeAttrFilter appFilter; - appFilter.SetType( KMenuTypeApp() ); - + appFilter.SetType( KMenuTypeApp() ); + TBuf uidString; MenuSrvUtil::UidToStringL( aUid.iUid, uidString, 0, EHex ); - + appFilter.SetAttr( KMenuAttrUid(), uidString ); iSrvEng.Engine().GetItemsL( mcsItems, root, &appFilter, ETrue ); - + TInt folderId = KErrNotFound; if (mcsItems.Count()) { folderId = mcsItems[0].Parent(); iCacheHandler.HandleRemoveAttribute(mcsItems[0].Id(), KMenuAttrDrmProtection); } - + CleanupStack::PopAndDestroy( &mcsItems ); return folderId; } // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- -// +// void CMcsDrmHandler::HandleDrmEvent( TUid aUid ) { TRAP_IGNORE( - iSrvEng.Engine().AppendNotifyL( AppFolderIdL( aUid ), - RMenuNotifier::EItemAttributeChanged ); - iScanner->RemoveObserverAndScanL( aUid ); - ); + iSrvEng.Engine().AppendNotifyL( AppFolderIdL( aUid ), + RMenuNotifier::EItemAttributeChanged ); + iScanner->RemoveObserverAndScanL( aUid ); + ); } // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- -// +// void CMcsDrmHandler::HandleDrmAppEvent() { TRAP_IGNORE( AddRemoveObserversL( - iScanner->DrmProtectedAppArray() ) ); + iScanner->DrmProtectedAppArray() ) ); } // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- -// -void CMcsDrmHandler::AddRemoveObserversL( - const RArray& aDrmProtectedArray ) +// +void CMcsDrmHandler::AddRemoveObserversL( + const RArray& aDrmProtectedArray ) { - iObserversManager.RemoveMissingObservers( aDrmProtectedArray ); + iObserversManager.RemoveMissingObservers( aDrmProtectedArray ); iObserversManager.CreateObserversL( aDrmProtectedArray, *this ); - } + } // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- -// +// void CMcsDrmHandler::EngineEvents( TInt /*aFolder*/, TInt aEvents ) { if ( aEvents & RMenuNotifier::EItemsAddedRemoved ) { iScanner->Scan(); - } + } } // --------------------------------------------------------- -// +// CMcsDrmHandler::HandleInstallNotifyL // --------------------------------------------------------- // -void CMcsDrmHandler::HandleInstallNotifyL( TUid aPackageUid, - CMcsInstallNotifier::TNotificationType /*aNotificationType*/ ) - { - if( aPackageUid != TUid::Null() ) - { - if( ( iScanner->DrmExpiredAppArray() ).Find( aPackageUid ) - != KErrNotFound ) - { - HandleDrmEvent( aPackageUid ); - } - else - { - iObserversManager.RefreshObserverL( - iScanner->DrmProtectedAppArray(), aPackageUid, *this ); - } - } - else - { - for( TInt i = 0; i < iScanner->DrmProtectedAppArray().Count(); i++ ) - { - iObserversManager.RefreshObserverL( - iScanner->DrmProtectedAppArray(), - iScanner->DrmProtectedAppArray()[i], *this ); - } - for( TInt i = 0; i < iScanner->DrmExpiredAppArray().Count(); i++ ) - { - HandleDrmEvent( iScanner->DrmExpiredAppArray()[i] ); - } - } +void CMcsDrmHandler::HandleInstallNotifyL( TInt aPackageUid ) + { + RArray uids; + CleanupClosePushL( uids ); + + Java::CJavaRegistry* javaRegistry; + javaRegistry = Java::CJavaRegistry::NewLC(); + + Java::CJavaRegistryEntry* regEntry = + javaRegistry->RegistryEntryL( TUid::Uid(aPackageUid) ); + + if( regEntry ) + { + CleanupStack::PushL( regEntry ); + + Java::TJavaRegistryEntryType entryType = regEntry->Type(); + + if ( ( entryType >= Java::EGeneralPackage ) && + (entryType < Java::EGeneralApplication) ) + { + //package entry + Java::CJavaRegistryPackageEntry* regPackageEntry = + static_cast( regEntry ); + regPackageEntry->GetEmbeddedEntries( uids ); + } + else + { + //application entry + uids.AppendL( regEntry->Uid() ); + } + + CleanupStack::PopAndDestroy( regEntry ); + for ( TInt i = 0; i< uids.Count(); i++ ) + { + if ( ( iScanner->DrmExpiredAppArray()).Find(uids[i]) != KErrNotFound ) + { + HandleDrmEvent( uids[i] ); + } + else + { + iObserversManager.RefreshObserverL( iScanner->DrmProtectedAppArray(), + uids[i], *this ); + } + } + } + else + { + for ( TInt i = 0; i< iScanner->DrmProtectedAppArray().Count(); i++ ) + { + iObserversManager.RefreshObserverL( iScanner->DrmProtectedAppArray(), + iScanner->DrmProtectedAppArray()[i], *this ); + } + for ( TInt i = 0; i< iScanner->DrmExpiredAppArray().Count(); i++ ) + { + HandleDrmEvent( iScanner->DrmExpiredAppArray()[i] ); + } + } + + + CleanupStack::PopAndDestroy( javaRegistry ); + CleanupStack::PopAndDestroy( &uids ); } -// End of File +// End of File diff -r 6cadd6867c17 -r 67f2ed48ad91 menucontentsrv/srvsrc/mcsinstallnotifier.cpp --- a/menucontentsrv/srvsrc/mcsinstallnotifier.cpp Wed Sep 15 12:32:36 2010 +0300 +++ b/menucontentsrv/srvsrc/mcsinstallnotifier.cpp Wed Oct 13 14:53:46 2010 +0300 @@ -17,67 +17,68 @@ #include #include "mcsinstallnotifier.h" -#include "mcsinstallstrategy.h" - +#include -CMcsInstallNotifier* CMcsInstallNotifier::NewL( - MMcsInstallListener& aListener, TNotificationType aNotificationType ) - { - CMcsInstallNotifier* self = new ( ELeave ) CMcsInstallNotifier( aListener ); - CleanupStack::PushL( self ); - self->ConstructL( aNotificationType ); - CleanupStack::Pop( self ); - return self; - } +CMcsInstallNotifier* CMcsInstallNotifier::NewL(MMcsInstallListener& aListener, TInt aKey) + { + CMcsInstallNotifier* self = new (ELeave) CMcsInstallNotifier( aListener, aKey ); + CleanupStack::PushL( self ); + self->ConstructL( ); + CleanupStack::Pop( self ); + + return self; + } CMcsInstallNotifier::~CMcsInstallNotifier() - { - Cancel(); - iProperty.Close(); - delete iNotifierStrategy; - } - -CMcsInstallNotifier::CMcsInstallNotifier( MMcsInstallListener& aListener ) : - CActive( EPriorityNormal ), iListener( aListener ) - { - CActiveScheduler::Add( this ); - SetActive(); - } + { + Cancel( ); + iProperty.Close( ); + } -void CMcsInstallNotifier::ConstructL( TNotificationType aNotificationType ) - { - switch( aNotificationType ) - { - case ESisInstallNotification: - iNotifierStrategy = CMcsSwiInstallStrategy::NewL( - iProperty, iListener ); - break; - case EJavaInstallNotification: - iNotifierStrategy = CMcsJavaInstallStrategy::NewL( - iProperty, iListener ); - break; - default: - User::Leave( KErrNotSupported ); - break; - } - iProperty.Subscribe( iStatus ); - } +CMcsInstallNotifier::CMcsInstallNotifier( MMcsInstallListener& aListener, TInt aKey ) : + CActive(EPriorityNormal), iListener(aListener) + { + iKey = aKey; + // Prepare automatically + iProperty.Attach( KUidSystemCategory, iKey ); + CActiveScheduler::Add( this ); + iProperty.Subscribe( iStatus ); + SetActive( ); + } + + +void CMcsInstallNotifier::ConstructL() + { + + } + void CMcsInstallNotifier::DoCancel() - { - iProperty.Cancel(); - } + { + iProperty.Cancel( ); + } + void CMcsInstallNotifier::RunL() - { - SetActive(); - iProperty.Subscribe( iStatus ); - iNotifierStrategy->NotifyListenerL(); - } + { + SetActive( ); + iProperty.Subscribe( iStatus ); + TInt status; + User::LeaveIfError( iProperty.Get( KUidSystemCategory, + iKey, status ) ); -TInt CMcsInstallNotifier::RunError( TInt /*aError*/) - { - // No need to do anything + if (( iKey == KPSUidJavaLatestInstallation ) || + ((status & EInstOpInstall )||(status & EInstOpUninstall )) && + (status & EInstOpStatusSuccess) ) + { + iListener.HandleInstallNotifyL(status); + } + + } + + +TInt CMcsInstallNotifier::RunError( TInt /*aError*/ ) + { + // No need to do anything return KErrNone; - } - + } diff -r 6cadd6867c17 -r 67f2ed48ad91 menucontentsrv/srvsrc/mcsinstallstrategy.cpp --- a/menucontentsrv/srvsrc/mcsinstallstrategy.cpp Wed Sep 15 12:32:36 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,260 +0,0 @@ -/* - * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). - * All rights reserved. - * This component and the accompanying materials are made available - * under the terms of "Eclipse Public License v1.0" - * which accompanies this distribution, and is available - * at the URL "http://www.eclipse.org/legal/epl-v10.html". - * - * Initial Contributors: - * Nokia Corporation - initial contribution. - * - * Contributors: - * - * Description: ?Description - * - */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "mcsinstallstrategy.h" - - - -// --------------------------------------------------------------------------- -// -// --------------------------------------------------------------------------- -// -CMcsNotifierStrategy::CMcsNotifierStrategy( - RProperty& aProperty, MMcsInstallListener& aListener ) : - iProperty( aProperty ), iListener( aListener ) - { - } - -// --------------------------------------------------------------------------- -// -// --------------------------------------------------------------------------- -// -CMcsSwiInstallStrategy* CMcsSwiInstallStrategy::NewL( - RProperty& aProperty, MMcsInstallListener& aListener ) - { - CMcsSwiInstallStrategy* self = new ( ELeave ) CMcsSwiInstallStrategy( - aProperty, aListener ); - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop( self ); - return self; - } - -// --------------------------------------------------------------------------- -// -// --------------------------------------------------------------------------- -// -void CMcsSwiInstallStrategy::NotifyListenerL() - { - TInt appUid; - User::LeaveIfError( iProperty.Get( KUidSystemCategory, - KUidSwiLatestInstallation, appUid ) ); - if( appUid ) - { - HandleInstallNotifyL( appUid ); - } - } - -// --------------------------------------------------------- -// -// --------------------------------------------------------- -// -void CMcsSwiInstallStrategy::HandleInstallNotifyL( TInt aUid ) - { - Swi::RSisRegistrySession iSisRegSession; - User::LeaveIfError( iSisRegSession.Connect() ); - CleanupClosePushL( iSisRegSession ); - - // Open sis package entry related to aUid - Swi::RSisRegistryEntry packageEntry; - if( KErrNone == packageEntry.Open( iSisRegSession, TUid::Uid( aUid ) ) ) - { - CleanupClosePushL( packageEntry ); - - // Get packageEntry's embedded sis' - RPointerArray embedded; - CleanupClosePushL( embedded ); - packageEntry.EmbeddedPackagesL( embedded ); - if( embedded.Count() ) - { - // For each embadded sis we notify storage - recursive call - for( TInt i = 0; i < embedded.Count(); ++i ) - { - iListener.HandleInstallNotifyL( embedded[i]->Uid(), - CMcsInstallNotifier::ESisInstallNotification ); - } - } - else - { - // There are no embaddes sis', so we can notify storage - // of changes in apps included in packageEntry - NotifyL( packageEntry ); - } - embedded.ResetAndDestroy(); - CleanupStack::PopAndDestroy( &embedded ); - CleanupStack::PopAndDestroy( &packageEntry ); - } - - CleanupStack::PopAndDestroy( &iSisRegSession ); - } - -// --------------------------------------------------------- -// -// --------------------------------------------------------- -// -void CMcsSwiInstallStrategy::NotifyL( Swi::RSisRegistryEntry & aPackageEntry ) - { - // Get sids ( == uids of exetucables included in aPackageEntry ) - RArray sids; - CleanupClosePushL( sids ); - aPackageEntry.SidsL( sids ); - if( sids.Count() ) - { - // For each sid we notify storage - for( TInt i = 0; i < sids.Count(); ++i ) - { - iListener.HandleInstallNotifyL( - sids[i], CMcsInstallNotifier::ESisInstallNotification ); - } - } - CleanupStack::PopAndDestroy( &sids ); - } - - -// --------------------------------------------------------------------------- -// -// --------------------------------------------------------------------------- -// -CMcsSwiInstallStrategy::CMcsSwiInstallStrategy( - RProperty& aProperty, MMcsInstallListener& aListener ) - : CMcsNotifierStrategy( aProperty, aListener ) - { - iProperty.Attach( KUidSystemCategory, KUidSwiLatestInstallation ); - } - -// --------------------------------------------------------------------------- -// -// --------------------------------------------------------------------------- -// -void CMcsSwiInstallStrategy::ConstructL() - { - } - -// --------------------------------------------------------------------------- -// -// --------------------------------------------------------------------------- -// -CMcsJavaInstallStrategy* CMcsJavaInstallStrategy::NewL( - RProperty& aProperty, MMcsInstallListener& aListener ) - { - CMcsJavaInstallStrategy* self = - new ( ELeave ) CMcsJavaInstallStrategy( aProperty, aListener ); - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop( self ); - return self; - } - -// --------------------------------------------------------------------------- -// -// --------------------------------------------------------------------------- -// -void CMcsJavaInstallStrategy::NotifyListenerL() - { - TInt state; - User::LeaveIfError( iProperty.Get( KUidSystemCategory, - KPSUidJavaLatestInstallationState, state ) ); - if( ( ( state & ESASwisInstall ) || ( state & ESASwisUninstall ) ) - && ( state & ESASwisStatusSuccess ) ) - { - TInt appUid; - User::LeaveIfError( iProperty.Get( KUidSystemCategory, - KPSUidJavaLatestInstallation, appUid ) ); - HandleInstallNotifyL( TUid::Uid( appUid ) ); - } - } - -// --------------------------------------------------------- -// -// --------------------------------------------------------- -// -void CMcsJavaInstallStrategy::HandleInstallNotifyL( TUid aPackageUid ) - { - RArray uids; - CleanupClosePushL( uids ); - - Java::CJavaRegistry* javaRegistry; - javaRegistry = Java::CJavaRegistry::NewLC(); - - Java::CJavaRegistryEntry* regEntry = - javaRegistry->RegistryEntryL( aPackageUid ); - - if( regEntry ) - { - CleanupStack::PushL( regEntry ); - - Java::TJavaRegistryEntryType entryType = regEntry->Type(); - - if ( ( entryType >= Java::EGeneralPackage ) && - (entryType < Java::EGeneralApplication) ) - { - //package entry - Java::CJavaRegistryPackageEntry* regPackageEntry = - static_cast( regEntry ); - regPackageEntry->GetEmbeddedEntries( uids ); - } - else - { - //application entry - uids.AppendL( regEntry->Uid() ); - } - - for ( TInt i = 0; i < uids.Count(); i++ ) - { - iListener.HandleInstallNotifyL( - uids[i], CMcsInstallNotifier::EJavaInstallNotification ); - } - - CleanupStack::PopAndDestroy( regEntry ); - } - else - { - iListener.HandleInstallNotifyL( - TUid::Null(), CMcsInstallNotifier::EJavaInstallNotification ); - } - CleanupStack::PopAndDestroy( javaRegistry ); - CleanupStack::PopAndDestroy( &uids ); - } - - -// --------------------------------------------------------------------------- -// -// --------------------------------------------------------------------------- -// -CMcsJavaInstallStrategy::CMcsJavaInstallStrategy( - RProperty& aProperty, MMcsInstallListener& aListener ) - : CMcsNotifierStrategy( aProperty, aListener ) - { - iProperty.Attach( KUidSystemCategory, KPSUidJavaLatestInstallationState ); - } - -// --------------------------------------------------------------------------- -// -// --------------------------------------------------------------------------- -// -void CMcsJavaInstallStrategy::ConstructL() - { - } - diff -r 6cadd6867c17 -r 67f2ed48ad91 menucontentsrv/srvsrc/menusrvappscanner.cpp --- a/menucontentsrv/srvsrc/menusrvappscanner.cpp Wed Sep 15 12:32:36 2010 +0300 +++ b/menucontentsrv/srvsrc/menusrvappscanner.cpp Wed Oct 13 14:53:46 2010 +0300 @@ -73,8 +73,6 @@ { Cancel(); delete iMcsSatNotifier; - delete iSisInstallNotifier; - delete iJavaInstallNotifier; delete iNotifier; iEng.DequeueOperation( *this ); delete iMmcHistory; @@ -97,9 +95,9 @@ iCenRepNotifyHandlerCPHiddenFolders->StopListening(); } delete iCenRepNotifyHandlerCPHiddenFolders; - delete iCenRepSession; - delete iFreeSpaceObserver; - iInstalledPackages.Close(); + delete iCenRepSession; + delete iFreeSpaceObserver; + } // --------------------------------------------------------- @@ -126,13 +124,13 @@ User::LeaveIfError( iFs.PrivatePath( path ) ); TUint attribute; if( iFs.Att( path, attribute) == KErrNotFound ) - { + { TInt mdRes = iFs.MkDirAll( path ); if ( mdRes != KErrNone ) - { - User::Leave( mdRes ); - } - } + { + User::Leave( mdRes ); + } + } iMmcHistory = new (ELeave) CMenuSrvMmcHistory(); iMmcHistory->LoadL( iFs, KMenuMmcHistoryFname() ); @@ -140,34 +138,30 @@ // it as argument... :( iNotifier = CApaAppListNotifier::NewL( this, CActive::EPriorityStandard ); - iCenRepSession = CRepository::NewL( KCRUidMenu ); + iCenRepSession = CRepository::NewL( KCRUidMenu ); - iCenRepNotifyHandlerHiddenApps = CCenRepNotifyHandler::NewL( - *this, *iCenRepSession, - CCenRepNotifyHandler::EStringKey, KMenuHideApplication ); - iCenRepNotifyHandlerCPHiddenApps = CCenRepNotifyHandler::NewL( - *this, *iCenRepSession, - CCenRepNotifyHandler::EStringKey, KMenuHideCPApplication ); - - iCenRepNotifyHandlerCPHiddenFolders = CCenRepNotifyHandler::NewL( - *this, *iCenRepSession, - CCenRepNotifyHandler::EStringKey, KMenuHideCPFolder ); + iCenRepNotifyHandlerHiddenApps = CCenRepNotifyHandler::NewL( + *this, *iCenRepSession, + CCenRepNotifyHandler::EStringKey, KMenuHideApplication ); + iCenRepNotifyHandlerCPHiddenApps = CCenRepNotifyHandler::NewL( + *this, *iCenRepSession, + CCenRepNotifyHandler::EStringKey, KMenuHideCPApplication ); - iCenRepNotifyHandlerHiddenApps->StartListeningL(); - iCenRepNotifyHandlerCPHiddenApps->StartListeningL(); - iCenRepNotifyHandlerCPHiddenFolders->StartListeningL(); + iCenRepNotifyHandlerCPHiddenFolders = CCenRepNotifyHandler::NewL( + *this, *iCenRepSession, + CCenRepNotifyHandler::EStringKey, KMenuHideCPFolder ); - iMcsSatNotifier = CMcsSatNotifier::NewL( - this, KCRUidMenu, KMenuShowSatUI ); + iCenRepNotifyHandlerHiddenApps->StartListeningL(); + iCenRepNotifyHandlerCPHiddenApps->StartListeningL(); + iCenRepNotifyHandlerCPHiddenFolders->StartListeningL(); - iFreeSpaceObserver = CMcsFreeSpaceObserver::NewL( *this ); + iMcsSatNotifier = CMcsSatNotifier::NewL( + this, KCRUidMenu, KMenuShowSatUI ); - iSisInstallNotifier = CMcsInstallNotifier::NewL( - *this, CMcsInstallNotifier::ESisInstallNotification ); - iJavaInstallNotifier = CMcsInstallNotifier::NewL( - *this, CMcsInstallNotifier::EJavaInstallNotification ); + iFreeSpaceObserver = CMcsFreeSpaceObserver::NewL( *this ); - ScheduleScan(); + //SetActive(); + ScheduleScan(); //iOpStatus = ETrue; } @@ -254,8 +248,7 @@ // CMenuSrvAppScanner::HideAppIfExists // --------------------------------------------------------- // -void CMenuSrvAppScanner::HideItemIfPresentL( - TInt aFolder, TInt aId, const TDesC& aUid, TBool aWasHidden ) +void CMenuSrvAppScanner::HideItemIfPresentL( TInt aFolder, TInt aId, const TDesC& aUid, TBool aWasHidden ) { TBool hideItem = EFalse; TMenuSrvAttrFilter uidAppFilter; @@ -265,20 +258,21 @@ CleanupClosePushL( appItems ); iEng.GetItemsL( appItems, aFolder, &uidAppFilter, ETrue ); - for( TInt i=0; i < appItems.Count(); i++ ) + for (TInt i=0; i < appItems.Count(); i++) { - if( appItems[i].Type() != KMenuTypeLink() ) - { + if(appItems[i].Type() != KMenuTypeLink()) + { const TMenuItem& item = appItems[i]; - TBool itemHidden = (0 != ( item.Flags() & TMenuItem::EHidden ) ); - TBool itemMissing = ( 0 != ( item.Flags() & TMenuItem::EMissing ) ); + TBool itemHidden = (0 != (item.Flags() & TMenuItem::EHidden)); + TBool itemMissing = (0 != (item.Flags() & TMenuItem::EMissing)); if ( !itemHidden && !itemMissing ) { hideItem = ETrue; } - } + } } + SetHiddenFlagL( aId, aWasHidden, hideItem ); CleanupStack::PopAndDestroy( &appItems ); @@ -290,7 +284,7 @@ // void CMenuSrvAppScanner::SetHiddenFlagL( TInt aId, TBool aWasHidden, TBool aHide ) { - if ( aWasHidden != aHide ) + if ( aWasHidden ^ aHide ) { iEng.ModifiableObjectL( aId, RMenuNotifier::EItemsAddedRemoved ). SetFlags( TMenuItem::EHidden, aHide ); @@ -316,7 +310,7 @@ for (TInt i=0; i < appItems.Count(); i++) { if(appItems[i].Id() != aId) - { + { exists = ETrue; const TMenuItem& item = appItems[i]; @@ -326,7 +320,7 @@ { showItem = ETrue; } - } + } } UpdateLinkL( aId, exists, showItem, itemMissing ); @@ -471,72 +465,6 @@ User::RequestComplete( ownStatus, KErrNone ); } } - -// --------------------------------------------------------- -// -// --------------------------------------------------------- -// -void CMenuSrvAppScanner::InstallationNotifyL() - { - TBool isLegacy = iEng.GetOnceLegacyFormat(); - for( TInt i = iInstalledPackages.Count() - 1; i >= 0; i-- ) - { - RArray mcsUidItems; - CleanupClosePushL( mcsUidItems ); - GetMcsAppItemsL( isLegacy, iInstalledPackages[i].iUid, mcsUidItems ); - if( mcsUidItems.Count() ) - { - iEng.ModifiableObjectL( mcsUidItems[0].Id() ); - iInstalledPackages.Remove( i ); - } - CleanupStack::PopAndDestroy( &mcsUidItems ); - } - } - -// --------------------------------------------------------- -// -// --------------------------------------------------------- -// -void CMenuSrvAppScanner::RemoveFromInstalledPackages( TUid aUid ) - { - TInt appIndex = iInstalledPackages.Find( aUid ); - if( appIndex != KErrNotFound ) - { - iInstalledPackages.Remove( appIndex ); - } - } - -// --------------------------------------------------------- -// -// --------------------------------------------------------- -// -CMenuEngObject& CMenuSrvAppScanner::ModifiableObjectL( TUid aUid, TInt aId, - TInt aEvent ) - { - if( aEvent != RMenuNotifier::EItemsNone ) - { - RemoveFromInstalledPackages( aUid ); - } - return iEng.ModifiableObjectL( aId, aEvent ); - } - -// --------------------------------------------------------- -// -// --------------------------------------------------------- -// -void CMenuSrvAppScanner::HandleInstallNotifyL( TUid aUid, - CMcsInstallNotifier::TNotificationType aNotificationType ) - { - iInstalledPackages.AppendL( aUid ); - // when installing java, appscanner first gets notification from appArc, - // and then it is notified with instal notifier(RProperty) - // so we need another scan for java apps - if( aNotificationType == CMcsInstallNotifier::EJavaInstallNotification ) - { - ScheduleScan(); - } - } - // --------------------------------------------------------- // CMenuSrvAppScanner::RunMenuEngOperationL // --------------------------------------------------------- @@ -546,44 +474,43 @@ UpdateApplicationItemsL(); UpdateApplicationWithHideIfInstalledItemsL(); UpdateLinkItemsL(); - InstallationNotifyL(); iOpStatus = EFalse; } + // --------------------------------------------------------- // CMenuSrvAppScanner::UpdateApplicationItemL // --------------------------------------------------------- // void CMenuSrvAppScanner::UpdateApplicationItemL( - RArray& aMcsItems, const CMenuSrvAppAttributes& aApaItem, - TUint aMmcId, TBool isLegacy) + RArray& aMcsItems, const CMenuSrvAppAttributes& aApaItem, + TUint aMmcId, TBool isLegacy) { RArray mcsUidItems; CleanupClosePushL( mcsUidItems ); - TUid appUid = aApaItem.GetUid(); - GetMcsAppItemsL( isLegacy, appUid.iUid, mcsUidItems ); + TUid appuid = aApaItem.GetUid(); + GetMcsAppItemsL( isLegacy, appuid.iUid, mcsUidItems ); TBool isApaItemHidden( aApaItem.IsHidden() ); // This app is not in the menu, add it now. // We don't add hidden items, there are too many of them! // do not display Menu app if ( !mcsUidItems.Count() - && !isApaItemHidden - && appUid != KMmUid3 ) + && !isApaItemHidden + && appuid != KMmUid3 ) { - if( appUid == KSatUid ) + if( appuid == KSatUid ) { if( CMcsSatHandler::CheckVisibility() ) - { - AddAppItemL( aApaItem, aMmcId ); - } + { + AddAppItemL( aApaItem, aMmcId ); + } } else - { - AddAppItemL( aApaItem, aMmcId ); - GetMcsAppItemsL( isLegacy, appUid.iUid, mcsUidItems ); - RemoveFromInstalledPackages( appUid ); - } + { + AddAppItemL( aApaItem, aMmcId ); + GetMcsAppItemsL( isLegacy, appuid.iUid, mcsUidItems ); + } }//if // if there are any items with legacy UID format @@ -592,12 +519,13 @@ { //for every item with matching UID for (TInt j=0; j < mcsUidItems.Count(); j++) - { + { + CMenuEngObject& object = + iEng.ModifiableObjectL( mcsUidItems[j].Id() ); TBuf uidString; - MenuSrvUtil::UidToStringL( appUid.iUid, uidString, EFalse, EHex ); - ModifiableObjectL( appUid, mcsUidItems[j].Id() ).SetAttributeL( - KMenuAttrUid(), uidString, EFalse ); - }//for + MenuSrvUtil::UidToStringL( appuid.iUid, uidString, EFalse, EHex ); + object.SetAttributeL( KMenuAttrUid(), uidString, EFalse ); + }//for }//else if // "hidden", "missing" and "lock_delete" flags update for ( TInt j = 0; j < mcsUidItems.Count(); j++ ) @@ -607,24 +535,24 @@ //we need to handle first run of appscanner, //there might be some incorrect data in content xml file //if this will have impact on performance we may run this methods only at start up - HandleMmcAttrUpdateL( item, aApaItem, aMmcId ); - HandleNativeAttrUpdateL( item, aApaItem ); + HandleMmcAttrUpdateL( item, aApaItem, aMmcId ); + HandleNativeAttrUpdateL( item, aApaItem ); // "hidden" flag handling. HandleHiddenFlagUpdateL( item, aApaItem ); // "missing" flag handling - HandleMissingFlagUpdateL( item, aApaItem ); + HandleMissingFlagUpdateL( item ); //"lock_delete" flag handling - HandleLockDeleteFlagUpdateL( item, aApaItem ); + HandleLockDeleteFlagUpdateL(item, aApaItem ); // if item was just added to MCS it is not present in aMcsItems // so we cannot remove it TInt index = aMcsItems.Find( item, TIdentityRelation( IdMatch ) ); if ( index != KErrNotFound ) - { - aMcsItems.Remove( index ); - } + { + aMcsItems.Remove( index ); + } }//for CleanupStack::PopAndDestroy( &mcsUidItems ); } @@ -635,40 +563,37 @@ // void CMenuSrvAppScanner::HandleHiddenFlagUpdateL( const TMenuItem & aItem, const CMenuSrvAppAttributes& aApaItem ) - { - TBool itemHidden = ( 0 != ( aItem.Flags() & TMenuItem::EHidden ) ); - if( aApaItem.GetUid() == KSatUid ) - { - if( itemHidden == CMcsSatHandler::CheckVisibility() ) - { - ModifiableObjectL( aApaItem.GetUid(), aItem.Id(), - RMenuNotifier::EItemsAddedRemoved ).SetFlags( - TMenuItem::EHidden, - !CMcsSatHandler::CheckVisibility() ); - } - } - else if( itemHidden != aApaItem.IsHidden() ) - { - ModifiableObjectL( aApaItem.GetUid(), aItem.Id(), - RMenuNotifier::EItemsAddedRemoved ).SetFlags( - TMenuItem::EHidden, aApaItem.IsHidden() ); - } - } + { + TBool itemHidden = (0 != (aItem.Flags() & TMenuItem::EHidden)); + if ( aApaItem.GetUid() == KSatUid ) + { + if (itemHidden == CMcsSatHandler::CheckVisibility()) + { + iEng.ModifiableObjectL(aItem.Id(), RMenuNotifier::EItemsAddedRemoved). + SetFlags( TMenuItem::EHidden, !CMcsSatHandler::CheckVisibility()); + } + } + else if ( itemHidden != aApaItem.IsHidden() ) + { + iEng.ModifiableObjectL(aItem.Id(), RMenuNotifier::EItemsAddedRemoved). + SetFlags( TMenuItem::EHidden, aApaItem.IsHidden() ); + } + } // --------------------------------------------------------- // CMenuSrvAppScanner::HandleNativeAttrUpdateL // --------------------------------------------------------- // void CMenuSrvAppScanner::HandleNativeAttrUpdateL( - const TMenuItem& aItem, const CMenuSrvAppAttributes& aApaItem ) - { + const TMenuItem& aItem, const CMenuSrvAppAttributes& aApaItem ) + { //we need this to delete uninstalled java app item if( aApaItem.GetAppType() != iEng.ObjectL( aItem.Id() ).GetAppType() ) - { - ModifiableObjectL( aApaItem.GetUid(), aItem.Id(), - RMenuNotifier::EItemsNone ).SetAppType( aApaItem.GetAppType() ); - } - } + { + iEng.ModifiableObjectL( aItem.Id(), + RMenuNotifier::EItemsNone ).SetAppType( aApaItem.GetAppType() ); + } + } // --------------------------------------------------------- @@ -676,41 +601,31 @@ // --------------------------------------------------------- // void CMenuSrvAppScanner::HandleMmcAttrUpdateL( - const TMenuItem& aItem, const CMenuSrvAppAttributes& aApaItem, TUint aMmcId ) - { - TPtrC val; - TBool dummy; - TBool attributeExists = iEng.ObjectL( aItem.Id() ).FindAttribute( - KMenuAttrMmcId(), val, dummy ); - if( IsInMmc( aApaItem ) ) - { - //app is instaled on mmc - KMenuAttrMmcId attribute update - TBuf uidString; + const TMenuItem& aItem, const CMenuSrvAppAttributes& aApaItem, TUint aMmcId ) + { + if ( IsInMmc( aApaItem ) ) + { + //app is instaled on mmc - KMenuAttrMmcId attribute update + TBuf uidString; uidString.Format( KHexFormat, aMmcId ); - if( uidString.Compare( val ) ) - { - ModifiableObjectL( aApaItem.GetUid(), aItem.Id() ).SetAttributeL( - KMenuAttrMmcId, uidString, EFalse ); - } - } - else if( IsInMassStorage( aApaItem ) - && aApaItem.GetAppType() == CMenuEngObject::EWidgetApp ) - { - //its java app installed on mass storage, we need to leave it in xml - //in case of connecting usb in mass storage mode - if( KMenuMassStorage().Compare( val ) ) - { - ModifiableObjectL( aApaItem.GetUid(), aItem.Id() ).SetAttributeL( - KMenuAttrMmcId, KMenuMassStorage, EFalse ); - } - } - else if( attributeExists ) - { - //its installed on c: drive - remove attribute - ModifiableObjectL( aApaItem.GetUid(), aItem.Id() ).RemoveAttribute( - KMenuAttrMmcId ); - } - } + iEng.ModifiableObjectL( aItem.Id(), RMenuNotifier::EItemsAddedRemoved ). + SetAttributeL( KMenuAttrMmcId, uidString, EFalse ); + } + else if ( IsInMassStorage( aApaItem ) + && aApaItem.GetAppType() == CMenuEngObject::EWidgetApp ) + { + //its java app installed on mass storage, we need to leave it in xml + //in case of connecting usb in mass storage mode + iEng.ModifiableObjectL( aItem.Id(), RMenuNotifier::EItemsAddedRemoved ). + SetAttributeL( KMenuAttrMmcId, KMenuMassStorage, EFalse ); + } + else + { + //its installed on c: drive - remove attribute + iEng.ModifiableObjectL( aItem.Id(), RMenuNotifier::EItemsAddedRemoved ). + RemoveAttribute( KMenuAttrMmcId ); + } + } // --------------------------------------------------------- // CMenuSrvAppScanner::UpdateApplicationItemsL // --------------------------------------------------------- @@ -726,13 +641,14 @@ GetCrItemsL( iSrvEngUtils.GetAppItemsL() ); TBool isLegacy = iEng.GetOnceLegacyFormat(); + //for every item in apaAndCrItems array for ( TInt i = ( iSrvEngUtils.GetAppItemsL().Count() - 1 ); i >= 0 ; i-- ) { // if there was leave for any item we ignore it // and proceed to the next one - TRAP_IGNORE( UpdateApplicationItemL( mcsItems, - *iSrvEngUtils.GetAppItemsL()[i], currentMmcId, isLegacy ) ); + TRAP_IGNORE(UpdateApplicationItemL( + mcsItems, *iSrvEngUtils.GetAppItemsL()[i], currentMmcId, isLegacy)); } // Here the big list contains menu items that refer to missing apps. HandleMissingItemsL( mcsItems ); @@ -744,44 +660,42 @@ // --------------------------------------------------------- // void CMenuSrvAppScanner::HandleLockDeleteFlagUpdateL( - const TMenuItem& aItem, const CMenuSrvAppAttributes& aApaItem ) - { - TBool isHidden = ( ( iEng.ObjectL( aItem.Id() ) - .Flags() & TMenuItem::EHidden ) != 0 ); - if ( !isHidden && IsInRomL( aApaItem ) ) - { - if ( ( aItem.Flags() & TMenuItem::ELockDelete ) == 0 ) - { - ModifiableObjectL( aApaItem.GetUid(), aItem.Id()).SetFlags( - TMenuItem::ELockDelete, ETrue ); - } - } - else - { - if ( ( aItem.Flags() & TMenuItem::ELockDelete ) != 0 ) - { - ModifiableObjectL( aApaItem.GetUid(), aItem.Id() ).SetFlags( - TMenuItem::ELockDelete, EFalse ); - } - } - } + const TMenuItem& aItem, const CMenuSrvAppAttributes& aApaItem ) + { + TBool isHidden = ( ( iEng.ObjectL( aItem.Id() ) + .Flags() & TMenuItem::EHidden ) != 0 ); + if ( !isHidden && IsInRomL( aApaItem ) ) + { + if ( ( aItem.Flags() & TMenuItem::ELockDelete ) == 0 ) + { + iEng.ModifiableObjectL(aItem.Id()) + .SetFlags( TMenuItem::ELockDelete, ETrue ); + } + } + else + { + if ( ( aItem.Flags() & TMenuItem::ELockDelete ) != 0 ) + { + iEng.ModifiableObjectL(aItem.Id()) + .SetFlags( TMenuItem::ELockDelete, EFalse ); + } + } + } // --------------------------------------------------------- // CMenuSrvAppScanner::HandleMissingFlagUpdateL // --------------------------------------------------------- // -void CMenuSrvAppScanner::HandleMissingFlagUpdateL( - const TMenuItem& aItem, const CMenuSrvAppAttributes& aApaItem ) - { - if ( aItem.Flags() & TMenuItem::EMissing ) +void CMenuSrvAppScanner::HandleMissingFlagUpdateL( const TMenuItem& aItem ) + { + if ( aItem.Flags() & TMenuItem::EMissing ) { CLOG_WRITE_FORMAT8( "Unsetting flag EMissing on %d", item.Id() ); //application found so we unset "missing" flag - ModifiableObjectL( aApaItem.GetUid(), aItem.Id(), - RMenuNotifier::EItemsAddedRemoved ).SetFlags( - TMenuItem::EMissing, EFalse ); + iEng.ModifiableObjectL( aItem.Id(), RMenuNotifier::EItemsAddedRemoved ). + SetFlags( TMenuItem::EMissing, EFalse ); } - } + } // --------------------------------------------------------- // CMenuSrvAppScanner::GetCrItemsL @@ -789,11 +703,11 @@ // void CMenuSrvAppScanner::GetCrItemsL( RPointerArray& aArray ) { - TBuf buf; - iCenRepSession->Get( KMenuHideCPApplication, buf ); - ParseUidsL( buf, aArray );// parses UIDs from buf and appends them to array - iCenRepSession->Get( KMenuHideApplication, buf ); - ParseUidsL( buf, aArray );// parses UIDs from buf and appends them to array + TBuf buf; + iCenRepSession->Get( KMenuHideCPApplication, buf ); + ParseUidsL( buf, aArray );// parses UIDs from buf and appends them to array + iCenRepSession->Get( KMenuHideApplication, buf ); + ParseUidsL( buf, aArray );// parses UIDs from buf and appends them to array } // --------------------------------------------------------- @@ -811,24 +725,26 @@ { if( input.Peek() == ',') { - SetHiddenL(input.MarkedToken( startMark ), aArray); + SetHidden(input.MarkedToken( startMark ), aArray); input.Inc(); input.Mark( startMark ); } input.Inc(); notEmpty = ETrue; } - if ( notEmpty ) - { - SetHiddenL( input.MarkedToken( startMark ), aArray ); - } + if ( notEmpty ) + { + SetHidden(input.MarkedToken( startMark ), aArray); + } + + } // --------------------------------------------------------- // CMenuSrvAppScanner::SetHidden // --------------------------------------------------------- // -void CMenuSrvAppScanner::SetHiddenL( +void CMenuSrvAppScanner::SetHidden( const TDesC& aHiddenAppUid, RPointerArray& aArray ) { TLex appUidDescriptor(aHiddenAppUid); @@ -950,23 +866,23 @@ // --------------------------------------------------------- // void CMenuSrvAppScanner::ScheduleScan() - { - if ( !IsActive() && !iOpStatus ) - { - iOpStatus = ETrue; - TRequestStatus* ownStatus = &iStatus; - *ownStatus = KRequestPending; - SetActive(); - User::RequestComplete( ownStatus, KErrNone ); - } - } + { + if ( !IsActive() && !iOpStatus ) + { + iOpStatus = ETrue; + TRequestStatus* ownStatus = &iStatus; + *ownStatus = KRequestPending; + SetActive(); + User::RequestComplete( ownStatus, KErrNone ); + } + } // --------------------------------------------------------- // CMenuSrvAppScanner::CreateInstallFolderL // --------------------------------------------------------- // TInt CMenuSrvAppScanner::CreateInstallFolderL( const CMenuSrvAppAttributes& aApaItem ) - { + { // Find a folder for this app. TInt folder(0); if ( aApaItem.GetGroupName().Length() ) @@ -985,7 +901,7 @@ iEng.RootFolderL( folder ); } return folder; - } + } // --------------------------------------------------------- // CMenuSrvAppScanner::AddAppItemL @@ -1011,14 +927,14 @@ object->SetAttributeL( KMenuAttrMmcId, uidString, EFalse ); } if( aApaItem.GetAppType() == CMenuEngObject::EWidgetApp ) - { - //we need this to delete uninstalled java or wrt widget app item - if ( !IsInMmc( aApaItem ) - && IsInMassStorage( aApaItem ) ) - { - object->SetAttributeL( KMenuAttrMmcId, KMenuMassStorage, EFalse ); - } - } + { + //we need this to delete uninstalled java or wrt widget app item + if ( !IsInMmc( aApaItem ) + && IsInMassStorage( aApaItem ) ) + { + object->SetAttributeL( KMenuAttrMmcId, KMenuMassStorage, EFalse ); + } + } object->SetAppType( aApaItem.GetAppType() ); EnsureFolderWritableL( folder ); iEng.AddL( *object, folder, 0 ); @@ -1041,12 +957,12 @@ TBool localized; if ( rootObject.FindAttribute( KMenuAttrAppGroupName, groupName, localized ) && - groupName.Compare( aAppGroupName )==0 ) + groupName.Compare( aAppGroupName )==0 ) { folder = defaultFolderId; } else - { + { TMenuSrvTypeAttrFilter filter; filter.SetType( KMenuTypeFolder() ); filter.SetAttr( KMenuAttrAppGroupName(), aAppGroupName ); @@ -1059,7 +975,7 @@ folder = items[0].Id(); } CleanupStack::PopAndDestroy( &items ); - } + } if ( !folder ) { // No such folder, create it now. @@ -1149,7 +1065,7 @@ else if( iEng.ObjectL( aItem.Id() ).GetAppType() != CMenuEngObject::EWidgetApp || iEng.ObjectL( aItem.Id() ).FindAttribute( - KMenuAttrPredefined(), val, dummy ) ) + KMenuAttrPredefined(), val, dummy ) ) { flags = TMenuItem::EHidden; } @@ -1183,15 +1099,15 @@ // --------------------------------------------------------- // void CMenuSrvAppScanner::SetObjectFlagsL( TBool aFlagValue, const TMenuItem& aItem, - const TMenuItem::TFlags& aFlag, const RMenuNotifier::TEvent& aEvent ) - { - TBool itemFlagPresent = (0 != (aItem.Flags() & aFlag)); - if( aFlagValue != itemFlagPresent ) - { - iEng.ModifiableObjectL( aItem.Id(), aEvent ). - SetFlags( aFlag, aFlagValue ); - } - } + const TMenuItem::TFlags& aFlag, const RMenuNotifier::TEvent& aEvent ) + { + TBool itemFlagPresent = (0 != (aItem.Flags() & aFlag)); + if( aFlagValue != itemFlagPresent ) + { + iEng.ModifiableObjectL( aItem.Id(), aEvent ). + SetFlags( aFlag, aFlagValue ); + } + } // --------------------------------------------------------- // CMenuSrvAppScanner::UpdateMmcHistoryL @@ -1201,10 +1117,10 @@ { TUint mmcId = CurrentMmcId(); if( mmcId ) - { - iMmcHistory->InsertL( mmcId ); - iMmcHistory->SaveL( iFs, KMenuMmcHistoryFname() ); - } + { + iMmcHistory->InsertL( mmcId ); + iMmcHistory->SaveL( iFs, KMenuMmcHistoryFname() ); + } return mmcId; } @@ -1219,7 +1135,7 @@ TInt mmcDrive; TInt err; err = DriveInfo::GetDefaultDrive( - DriveInfo::EDefaultRemovableMassStorage, mmcDrive ); + DriveInfo::EDefaultRemovableMassStorage, mmcDrive ); if ( !err ) { TVolumeInfo volumeInfo; @@ -1237,14 +1153,14 @@ // --------------------------------------------------------- // TBool CMenuSrvAppScanner::IsFileInDrive( - const TDesC& aFileName, - const DriveInfo::TDefaultDrives& aDefaultDrive ) const + const TDesC& aFileName, + const DriveInfo::TDefaultDrives& aDefaultDrive ) const { if ( aFileName.Length() ) { TInt mmcDrive; TInt err = DriveInfo::GetDefaultDrive( - aDefaultDrive, mmcDrive ); + aDefaultDrive, mmcDrive ); if ( !err ) { TInt fileDrive; @@ -1264,13 +1180,13 @@ // TBool CMenuSrvAppScanner::IsAppInDrive( const CMenuSrvAppAttributes& aApaItem, - const DriveInfo::TDefaultDrives& aDefaultDrive ) const + const DriveInfo::TDefaultDrives& aDefaultDrive ) const { TBool ret( EFalse ); if ( IsFileInDrive( aApaItem.GetFullName(), aDefaultDrive ) ) - { - ret = ETrue; - } + { + ret = ETrue; + } return ret; } @@ -1306,24 +1222,24 @@ // --------------------------------------------------------- // TBool CMenuSrvAppScanner::IsDriveInUse( - const DriveInfo::TDefaultDrives& aDefaultDrive ) + const DriveInfo::TDefaultDrives& aDefaultDrive ) { TBool inUse( EFalse ); TInt drive; TInt err = DriveInfo::GetDefaultDrive( aDefaultDrive, drive ); if( err == KErrNone ) - { - TUint status; - err = DriveInfo::GetDriveStatus( iFs, drive, status ); - if( err == KErrNone - && ( status & DriveInfo::EDriveInUse ) ) - { - inUse = ETrue; - } - } + { + TUint status; + err = DriveInfo::GetDriveStatus( iFs, drive, status ); + if( err == KErrNone + && ( status & DriveInfo::EDriveInUse ) ) + { + inUse = ETrue; + } + } - return inUse; + return inUse; } // End of File diff -r 6cadd6867c17 -r 67f2ed48ad91 menucontentsrv/srvsrc/menusrveng.cpp --- a/menucontentsrv/srvsrc/menusrveng.cpp Wed Sep 15 12:32:36 2010 +0300 +++ b/menucontentsrv/srvsrc/menusrveng.cpp Wed Oct 13 14:53:46 2010 +0300 @@ -347,8 +347,9 @@ // CMenuSrvEng::GetRunningAppsL() // --------------------------------------------------------- // -void CMenuSrvEng::GetExtendedAttributesL(TInt aId, const TDesC& aAttrName, - TBool& aAttrExists, TDes& aAttrVal ) +void CMenuSrvEng::GetExtendedAttributesL(TInt aId, + const TDesC& aAttrName, TBool& aAttrExists, + TDes& aAttrVal ) { TBool captionInfo(aAttrName.Compare( KMenuAttrShortName ) == KErrNone || aAttrName.Compare( KMenuAttrLongName ) == KErrNone || @@ -375,7 +376,6 @@ else if( KErrNone == aAttrName.Compare( KMenuAttrNative ) ) { ApplicationNativeAttributeL( aId, aAttrExists, aAttrVal ); - addToCache = EFalse; } else // The attribute doesn't present for the item { @@ -384,7 +384,7 @@ } if( aAttrExists && addToCache ) { - AddToCacheL( aId, aAttrName, aAttrVal ); + AddToCacheL(aId, aAttrName, aAttrVal ); } } @@ -392,8 +392,8 @@ // CMenuSrvEng::ApplicationNativeAttributeL // --------------------------------------------------------- // -void CMenuSrvEng::ApplicationNativeAttributeL( TInt aId, - TBool & aAttrExists, TDes & aAttrVal ) +void CMenuSrvEng::ApplicationNativeAttributeL( + TInt aId, TBool & aAttrExists, TDes & aAttrVal ) { const CMenuEngObject & aEngObj = iEng->ObjectL(aId); @@ -449,7 +449,7 @@ void CMenuSrvEng::CaptionInfoL( TInt aId, const TDesC& aAttrName, TBool& aExists, TDes& aAttrVal ) { - const CMenuEngObject& obj = iEng->ObjectL( aId ); + const CMenuEngObject& obj = iEng->ObjectL(aId); if ( obj.Type().Compare( KMenuTypeFolder ) == KErrNone ) { TBool localized; @@ -459,14 +459,15 @@ { aExists = ETrue; aAttrVal = attrvalue; - AddToCacheL( aId, KMenuAttrLongName, aAttrVal ); - AddToCacheL( aId, KMenuAttrShortName, aAttrVal ); - AddToCacheL( aId, KMenuAttrTitleName, aAttrVal ); + AddToCacheL(aId, KMenuAttrLongName, aAttrVal ); + AddToCacheL(aId, KMenuAttrShortName, aAttrVal ); + AddToCacheL(aId, KMenuAttrTitleName, aAttrVal ); } } else if ( obj.Type().Compare( KMenuTypeApp ) == KErrNone ) { aAttrVal = AppCaptionInfoL( obj, aAttrName, aExists ); + AddToCacheL(aId, aAttrName, aAttrVal ); } else { @@ -561,8 +562,7 @@ // CMenuSrvEng::FolderChildrenCountL // --------------------------------------------------------- // - void CMenuSrvEng::FolderChildrenCountL( - TInt aId, TBool& aExists, TDes& aAttrVal ) + void CMenuSrvEng::FolderChildrenCountL( TInt aId, TBool& aExists, TDes& aAttrVal ) { const CMenuEngObject& obj = iEng->ObjectL(aId); @@ -680,54 +680,47 @@ void CMenuSrvEng::AppendExtendedAttrributesL( const TDesC& aType, RArray& aList ) -{ + { + if ( KErrNone == aType.Compare( KMenuTypeApp ) ) { - if( KErrNotFound == aList.Find( KMenuAttrTitleName(), - TIdentityRelation( CmpAttrName )) ) - { - aList.AppendL( TPtrC( KMenuAttrTitleName ) ); - } - if( KErrNotFound == aList.Find( KMenuAttrShortName(), - TIdentityRelation( CmpAttrName )) ) - { - aList.AppendL( TPtrC( KMenuAttrShortName ) ); - } - if( KErrNotFound == aList.Find( KMenuAttrLongName(), - TIdentityRelation( CmpAttrName )) ) - { - aList.AppendL( TPtrC( KMenuAttrLongName ) ); - } - if( KErrNotFound == aList.Find( KMenuAttrDrmProtection(), - TIdentityRelation( CmpAttrName )) ) - { - aList.AppendL( TPtrC( KMenuAttrDrmProtection ) ); - } + if( KErrNotFound == aList.Find( KMenuAttrTitleName(), TIdentityRelation( CmpAttrName )) ) + { + aList.AppendL( TPtrC( KMenuAttrTitleName ) ); + } + if( KErrNotFound == aList.Find( KMenuAttrShortName(), TIdentityRelation( CmpAttrName )) ) + { + aList.AppendL( TPtrC( KMenuAttrShortName ) ); + } + if( KErrNotFound == aList.Find( KMenuAttrLongName(), TIdentityRelation( CmpAttrName )) ) + { + aList.AppendL( TPtrC( KMenuAttrLongName ) ); + } + if( KErrNotFound == aList.Find( KMenuAttrDrmProtection(), TIdentityRelation( CmpAttrName )) ) + { + aList.AppendL( TPtrC( KMenuAttrDrmProtection ) ); + } } else if ( KErrNone == aType.Compare( KMenuTypeFolder ) ) { - if( KErrNotFound == aList.Find( KMenuAttrTitleName(), - TIdentityRelation( CmpAttrName )) ) - { - aList.AppendL( TPtrC( KMenuAttrTitleName ) ); - } - if( KErrNotFound == aList.Find( KMenuAttrShortName(), - TIdentityRelation( CmpAttrName )) ) - { - aList.AppendL( TPtrC( KMenuAttrShortName ) ); - } - if( KErrNotFound == aList.Find( KMenuAttrLongName(), - TIdentityRelation( CmpAttrName )) ) - { - aList.AppendL( TPtrC( KMenuAttrLongName ) ); - } - if( KErrNotFound == aList.Find( KChildrenCount(), - TIdentityRelation( CmpAttrName )) ) - { - aList.AppendL( TPtrC( KChildrenCount ) ); - } + if( KErrNotFound == aList.Find( KMenuAttrTitleName(), TIdentityRelation( CmpAttrName )) ) + { + aList.AppendL( TPtrC( KMenuAttrTitleName ) ); + } + if( KErrNotFound == aList.Find( KMenuAttrShortName(), TIdentityRelation( CmpAttrName )) ) + { + aList.AppendL( TPtrC( KMenuAttrShortName ) ); + } + if( KErrNotFound == aList.Find( KMenuAttrLongName(), TIdentityRelation( CmpAttrName )) ) + { + aList.AppendL( TPtrC( KMenuAttrLongName ) ); + } + if( KErrNotFound == aList.Find( KChildrenCount(), TIdentityRelation( CmpAttrName )) ) + { + aList.AppendL( TPtrC( KChildrenCount ) ); + } } - } + } // End of File diff -r 6cadd6867c17 -r 67f2ed48ad91 xcfw/src/xcfwlocalizer.cpp --- a/xcfw/src/xcfwlocalizer.cpp Wed Sep 15 12:32:36 2010 +0300 +++ b/xcfw/src/xcfwlocalizer.cpp Wed Oct 13 14:53:46 2010 +0300 @@ -138,10 +138,9 @@ if( !BaflUtils::FileExists( aFileSystem, locfile->Des() ) ) { RArray langs; - CleanupClosePushL( langs ); BaflUtils::GetDowngradePathL( aFileSystem, langcode, langs ); //add current language to array for ROM fetching - langs.AppendL( langcode ); + langs.Append( langcode ); TInt current = langs.Count() - 1; do { @@ -166,8 +165,8 @@ } while ( current >= 0 && !BaflUtils::FileExists( aFileSystem, locfile->Des() ) ); } - - CleanupStack::PopAndDestroy( &langs ); + langs.Reset(); + langs.Close(); }