# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1276066332 -10800 # Node ID 469fa8a78de73b78e0c702f5ea0c9e8c4e9cb373 # Parent 332e7bf3b42f1cf9948dfae1fc92522a18477405 Revision: 201021 Kit: 2010123 diff -r 332e7bf3b42f -r 469fa8a78de7 appfw/viewserver/server/VWSERVER.CPP --- a/appfw/viewserver/server/VWSERVER.CPP Tue May 25 12:52:36 2010 +0300 +++ b/appfw/viewserver/server/VWSERVER.CPP Wed Jun 09 09:52:12 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 1999-2010 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" @@ -206,7 +206,8 @@ iEnableBoostAppPriorityBeforePanic = valueOfKVwsBoostAppPriorityBeforePanic; } #endif - + LOG3(CVwsLog::EQuiet,_L("CVwsServer::IsPriorityBoostBeforePanicEnabled(): iEnableBoostAppPriorityBeforePanic = [%d] "),iEnableBoostAppPriorityBeforePanic); + if (iEnableBoostAppPriorityBeforePanic) { CVwsStartupAware* startupAware = new(ELeave)CVwsStartupAware(*this); @@ -837,7 +838,7 @@ { return; } - + if (starved.ProcessPriority() < EPriorityForeground) { RProcess owningProcess; diff -r 332e7bf3b42f -r 469fa8a78de7 appfw/viewserver/server/VWSEVENT.CPP --- a/appfw/viewserver/server/VWSEVENT.CPP Tue May 25 12:52:36 2010 +0300 +++ b/appfw/viewserver/server/VWSEVENT.CPP Wed Jun 09 09:52:12 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 1999-2010 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" @@ -127,6 +127,7 @@ firstDelay=iServerEventTimeOut; } + LOG3(CVwsLog::EQuiet,_L("CVwsEventTimer::Start : firstDelay [%d] "),firstDelay.Int()); TTimeIntervalMicroSeconds32 delay(firstDelay); iPeriodic->Start(delay,delay,TCallBack(TimerCallBack,this)); iScreenDeviceChangeEvent = aScreenDeviceChangeEvent; @@ -167,7 +168,7 @@ else { //Delay of KTimeoutValueForPreemptedProcess is given after boosting priority of an application - TUint8 patchableConst = KTimeoutValueForPreemptedProcess; + TInt patchableConst = KTimeoutValueForPreemptedProcess; #ifdef __WINS__ // For the emulator allow the constant to be patched via epoc.ini UserSvr::HalFunction(EHalGroupEmulator, EEmulatorHalIntProperty, @@ -175,8 +176,9 @@ #endif delay = patchableConst; iTimeOutState = EServerEventTimeOut; + LOG2(CVwsLog::ELoud,_L("CVwsEventTimer::DoTimerCallBack : iTimeOutState == EIntermediateEventTimeOut")); } - + LOG3(CVwsLog::EQuiet,_L("CVwsEventTimer::DoTimerCallBack : delay = [%d] "),delay.Int()); iPeriodic->Start(delay,delay,TCallBack(TimerCallBack,this)); } } diff -r 332e7bf3b42f -r 469fa8a78de7 appfw/viewserver/server/vwspatchdata.cpp --- a/appfw/viewserver/server/vwspatchdata.cpp Tue May 25 12:52:36 2010 +0300 +++ b/appfw/viewserver/server/vwspatchdata.cpp Wed Jun 09 09:52:12 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2008-2010 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" @@ -15,6 +15,6 @@ #include -EXPORT_C extern const TInt KVwsBoostAppPriorityBeforePanic = 0; +EXPORT_C extern const TInt KVwsBoostAppPriorityBeforePanic = 1; EXPORT_C extern const TInt KTimeoutValueForPreemptedProcess = 4*1000*1000; //4 seconds diff -r 332e7bf3b42f -r 469fa8a78de7 commonappservices/alarmserver/Client/Source/ASCliSession.cpp --- a/commonappservices/alarmserver/Client/Source/ASCliSession.cpp Tue May 25 12:52:36 2010 +0300 +++ b/commonappservices/alarmserver/Client/Source/ASCliSession.cpp Wed Jun 09 09:52:12 2010 +0300 @@ -65,7 +65,7 @@ TInt startupAttempts = KNumberOfServerStartupAttempts; for(;;) { - TInt ret = CreateSession(ASCliDefinitions::ServerAndThreadName(), ASCliDefinitions::Version(), KAlarmServerAsynchronousSlotCount); + TInt ret = CreateSession(ASCliDefinitions::ServerAndThreadName(), ASCliDefinitions::Version()); if (ret != KErrNotFound && ret != KErrServerTerminated) { diff -r 332e7bf3b42f -r 469fa8a78de7 coreapplicationuis/SysAp/Inc/SysApAppUi.h --- a/coreapplicationuis/SysAp/Inc/SysApAppUi.h Tue May 25 12:52:36 2010 +0300 +++ b/coreapplicationuis/SysAp/Inc/SysApAppUi.h Wed Jun 09 09:52:12 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2005-2010 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" @@ -1444,7 +1444,18 @@ void AddMmcMenuItemsL( CDesCArray*& aProfileNameCDesCArray, RArray& aItemIdArray, TInt& aPowerMenuItemIndex ); - + + public: + /** + * Starts the charging animation in the battery pane. + */ + void StartChargingBatteryL(); + + /** + * Stops the charging animation in the battery pane. + */ + void StopChargingBatteryL(); + private: //Data members diff -r 332e7bf3b42f -r 469fa8a78de7 coreapplicationuis/SysAp/Inc/sysapdefaultkeyhandler.h --- a/coreapplicationuis/SysAp/Inc/sysapdefaultkeyhandler.h Tue May 25 12:52:36 2010 +0300 +++ b/coreapplicationuis/SysAp/Inc/sysapdefaultkeyhandler.h Wed Jun 09 09:52:12 2010 +0300 @@ -22,6 +22,7 @@ #include #include #include +#include class MSysapCallback; class RAknKeylock2; @@ -236,6 +237,11 @@ */ CRepository* iSlideRepository; TBool iKeypadWasLocked; + + /** + * Call status P&S for slide handling + */ + RProperty iCallStateProperty; }; #endif // SYSAPDEFAULTKEYHANDLER_H diff -r 332e7bf3b42f -r 469fa8a78de7 coreapplicationuis/SysAp/Src/SysApAppUi.cpp --- a/coreapplicationuis/SysAp/Src/SysApAppUi.cpp Tue May 25 12:52:36 2010 +0300 +++ b/coreapplicationuis/SysAp/Src/SysApAppUi.cpp Wed Jun 09 09:52:12 2010 +0300 @@ -6890,4 +6890,25 @@ } } } + +// ---------------------------------------------------------------------------- +// CSysApAppUi::StartChargingBatteryL +// ---------------------------------------------------------------------------- +// +void CSysApAppUi::StartChargingBatteryL() + { + TRACES( RDebug::Print( _L("CSysApAppUi::StartChargingBatteryL") ) ); + iBatteryNotify->StartChargingL(); + } + +// ---------------------------------------------------------------------------- +// CSysApAppUi::StopChargingBatteryL +// ---------------------------------------------------------------------------- +// +void CSysApAppUi::StopChargingBatteryL() + { + TRACES( RDebug::Print( _L("CSysApAppUi::StopChargingBatteryL") ) ); + iBatteryNotify->StopChargingL(); + } + // End of File diff -r 332e7bf3b42f -r 469fa8a78de7 coreapplicationuis/SysAp/Src/SysApLightsController.cpp --- a/coreapplicationuis/SysAp/Src/SysApLightsController.cpp Tue May 25 12:52:36 2010 +0300 +++ b/coreapplicationuis/SysAp/Src/SysApLightsController.cpp Wed Jun 09 09:52:12 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2005-2008 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2005-2010 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" @@ -29,6 +29,7 @@ #endif // RD_LIGHT_CONTROL_CHANGE #include "SysApFeatureManager.h" +#include "startupdomainpskeys.h" // CONSTANTS @@ -216,7 +217,13 @@ { iLightPluginHandler->HandleEventNoAction( SysApLightExtension::EChargerConnection, TPckgBuf(aConnected) ); } -#endif // RD_LIGHT_CONTROL_CHANGE +#endif // RD_LIGHT_CONTROL_CHANGE + TInt state( 0 ); + TInt error = RProperty::Get( KPSUidStartup, KPSGlobalSystemState, state ); + if ( error == KErrNone && state == ESwStateCharging ) + { + EnableActivityManagerL(); + } } // ---------------------------------------------------------------------------- @@ -969,16 +976,26 @@ return; } - TInt err(KErrNone); + TInt err(KErrNone); + TInt state( 0 ); + TInt error = RProperty::Get( KPSUidStartup, KPSGlobalSystemState, state ); -#ifdef RD_LIGHT_CONTROL_CHANGE - if ( !iLightPluginHandler->HandleCommand( SysApLightExtension::ELightCommandOff ) ) + if ( error == KErrNone && state != ESwStateCharging ) { - TRAP(err, iLight->LightOffL(CHWRMLight::ESystemTarget)); - } +#ifdef RD_LIGHT_CONTROL_CHANGE + if ( !iLightPluginHandler->HandleCommand( SysApLightExtension::ELightCommandOff ) ) + { + TRAP(err, iLight->LightOffL(CHWRMLight::ESystemTarget)); + } #else // RD_LIGHT_CONTROL_CHANGE - TRAP(err, iLight->LightOffL(CHWRMLight::ESystemTarget)); -#endif // RD_LIGHT_CONTROL_CHANGE + TRAP(err, iLight->LightOffL(CHWRMLight::ESystemTarget)); +#endif // RD_LIGHT_CONTROL_CHANGE + } + else + { + TRAP(err, iLight->LightOffL(CHWRMLight::ESystemTarget)); + iSysApAppUi.StopChargingBatteryL(); + } // Ignore unreserved in use warnings. if ( err != KErrNone && err != KErrInUse ) { @@ -1078,6 +1095,13 @@ iLightsCurrentlyOn = ETrue; iLastLightsOnTime.HomeTime(); } + + TInt state( 0 ); + TInt error = RProperty::Get( KPSUidStartup, KPSGlobalSystemState, state ); + if ( error == KErrNone && state == ESwStateCharging ) + { + iSysApAppUi.StartChargingBatteryL(); + } } else { diff -r 332e7bf3b42f -r 469fa8a78de7 coreapplicationuis/SysAp/Src/sysapdefaultkeyhandler.cpp --- a/coreapplicationuis/SysAp/Src/sysapdefaultkeyhandler.cpp Tue May 25 12:52:36 2010 +0300 +++ b/coreapplicationuis/SysAp/Src/sysapdefaultkeyhandler.cpp Wed Jun 09 09:52:12 2010 +0300 @@ -37,6 +37,7 @@ #include //for CRepository #include #include +#include #include "sysapdefaultkeyhandler.h" #include "sysapcallback.h" #include "SysAp.hrh" @@ -128,6 +129,9 @@ //Load keylock slide handling CR TRAP_IGNORE( iSlideRepository = CRepository::NewL( KCRUidSlideSettings ) ); iKeylockPolicy = CKeyLockPolicyApi::NewL( EPolicyActivateKeyguard ); + + //Load PhoneCallStatus P&S + TInt err = iCallStateProperty.Attach(KPSUidCtsyCallInformation, KCTsyCallState); } // --------------------------------------------------------------------------- @@ -216,26 +220,41 @@ } else { // keylock action is defined by user setting - TInt keyGuardSetting; - iSlideRepository->Get( KSlideKeyguard, keyGuardSetting ); - switch( ( TSlideSettingKeyguard ) keyGuardSetting ) - { - case ESlideSettingsKeyguardActivatingOn: - iKeylock->EnableKeyLock(); - break; - case ESlideSettingsKeyguardActivatingAskMe: - iKeylock->OfferKeyLock(); - break; - case ESlideSettingsKeyguardActivatingOff: - //do nothing - break; - case ESlideSettingsKeyguardActivatingAutomatic: - if( iKeypadWasLocked ) - { - iKeylock->EnableKeyLock(); - } - break; - } + TInt status(0); + TInt err = iCallStateProperty.Get( status ); + if (err == KErrNone) + { + switch ( status ) + { + case EPSCTsyCallStateUninitialized: + case EPSCTsyCallStateNone: + { + + TInt keyGuardSetting; + iSlideRepository->Get( KSlideKeyguard, keyGuardSetting ); + switch( ( TSlideSettingKeyguard ) keyGuardSetting ) + { + case ESlideSettingsKeyguardActivatingOn: + iKeylock->EnableKeyLock(); + break; + case ESlideSettingsKeyguardActivatingAskMe: + iKeylock->OfferKeyLock(); + break; + case ESlideSettingsKeyguardActivatingOff: + //do nothing + break; + case ESlideSettingsKeyguardActivatingAutomatic: + if( iKeypadWasLocked ) + { + iKeylock->EnableKeyLock(); + } + break; + } + } + default: // any other state + break; + } + } } // apply default light control iCallback.ExecCommandL( MSysapCallback::EUpdateLights, TUpdateLightsBuf(EKeyGripClose) ); diff -r 332e7bf3b42f -r 469fa8a78de7 coreapplicationuis/powersaveutilities/group/bld.inf --- a/coreapplicationuis/powersaveutilities/group/bld.inf Tue May 25 12:52:36 2010 +0300 +++ b/coreapplicationuis/powersaveutilities/group/bld.inf Wed Jun 09 09:52:12 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2009-2010 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" @@ -28,6 +28,7 @@ ../conf/powersaveutilities_2001011A.crml MW_LAYER_CRML(powersaveutilities_2001011A.crml) ../rom/powersaveutilities.iby CORE_MW_LAYER_IBY_EXPORT_PATH(powersaveutilities.iby) +../rom/powersaveutilitiesresources.iby LANGUAGE_MW_LAYER_IBY_EXPORT_PATH(powersaveutilitiesresources.iby) ../bsutil/inc/bsutil.h |../../inc/bsutil.h // batterypopupcontrol diff -r 332e7bf3b42f -r 469fa8a78de7 coreapplicationuis/powersaveutilities/loc/batindicatorpaneplugin.loc --- a/coreapplicationuis/powersaveutilities/loc/batindicatorpaneplugin.loc Tue May 25 12:52:36 2010 +0300 +++ b/coreapplicationuis/powersaveutilities/loc/batindicatorpaneplugin.loc Wed Jun 09 09:52:12 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2007-2010 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" @@ -50,4 +50,5 @@ // l: popup_battery_window_t1 // r:5.0 // -#define qtn_battery_status_popup "%N %" \ No newline at end of file +#define qtn_battery_status_popup "%N %" + diff -r 332e7bf3b42f -r 469fa8a78de7 coreapplicationuis/powersaveutilities/rom/powersaveutilities.iby --- a/coreapplicationuis/powersaveutilities/rom/powersaveutilities.iby Tue May 25 12:52:36 2010 +0300 +++ b/coreapplicationuis/powersaveutilities/rom/powersaveutilities.iby Wed Jun 09 09:52:12 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2007-2010 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" @@ -26,7 +26,6 @@ ECOM_PLUGIN( batindicatorpaneplugin.dll, batindicatorpaneplugin.rsc ) data=DATAZ_\ECOM_RESOURCE_DIR\batindicatorpaneplugin.rsc ECOM_RESOURCE_DIR\batindicatorpaneplugin.rsc -data=DATAZ_\ECOM_RESOURCE_DIR\batindpaneplugin.rsc ECOM_RESOURCE_DIR\batindpaneplugin.rsc data=DATAZ_\APP_RESOURCE_DIR\batterypopupcontrol.mif APP_RESOURCE_DIR\batterypopupcontrol.mif #endif // __POWERSAVEUTILITIES_IBY__ diff -r 332e7bf3b42f -r 469fa8a78de7 coreapplicationuis/powersaveutilities/rom/powersaveutilitiesresources.iby --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/coreapplicationuis/powersaveutilities/rom/powersaveutilitiesresources.iby Wed Jun 09 09:52:12 2010 +0300 @@ -0,0 +1,26 @@ +/* +* Copyright (c) 2010 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: powesaveutilities resources +* +*/ + + +#ifndef __POWERSAVEUTILITIES_RESOURCES_IBY__ +#define __POWERSAVEUTILITIES_RESOURCES_IBY__ + +data=DATAZ_\ECOM_RESOURCE_DIR\batindpaneplugin.rsc ECOM_RESOURCE_DIR\batindpaneplugin.rsc + + +#endif // __POWERSAVEUTILITIES_RESOURCES_IBY__ + diff -r 332e7bf3b42f -r 469fa8a78de7 coreapplicationuis/rfsplugins/FormatterRFSPlugin/group/formatterrfsplugin.mmp --- a/coreapplicationuis/rfsplugins/FormatterRFSPlugin/group/formatterrfsplugin.mmp Tue May 25 12:52:36 2010 +0300 +++ b/coreapplicationuis/rfsplugins/FormatterRFSPlugin/group/formatterrfsplugin.mmp Wed Jun 09 09:52:12 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2006-2010 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" @@ -44,4 +44,3 @@ LIBRARY efsrv.lib // File Server LIBRARY euser.lib // Base library LIBRARY platformenv.lib // PathInfo -LIBRARY sisregistryclient.lib // RSisRegistrySession diff -r 332e7bf3b42f -r 469fa8a78de7 coreapplicationuis/rfsplugins/FormatterRFSPlugin/group/secureformatter.mmp --- a/coreapplicationuis/rfsplugins/FormatterRFSPlugin/group/secureformatter.mmp Tue May 25 12:52:36 2010 +0300 +++ b/coreapplicationuis/rfsplugins/FormatterRFSPlugin/group/secureformatter.mmp Wed Jun 09 09:52:12 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2006-2010 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" @@ -23,9 +23,11 @@ TARGETTYPE exe SECUREID 0x20002486 -CAPABILITY ALLFILES TCB // TCB required to delete c:/sys and c:/resource +CAPABILITY ALLFILES TCB ReadUserData // TCB required to delete c:/sys and c:/resource VENDORID VID_DEFAULT +EPOCHEAPSIZE 0x1000 0x200000 // if the excludelist entries are more , we need the heapsize of 2MB + SOURCEPATH ../src SOURCE dirstackentry.cpp SOURCE excludelistentry.cpp @@ -39,3 +41,4 @@ LIBRARY efsrv.lib // File Server LIBRARY euser.lib +LIBRARY sisregistryclient.lib // RSisRegistrySession \ No newline at end of file diff -r 332e7bf3b42f -r 469fa8a78de7 coreapplicationuis/rfsplugins/FormatterRFSPlugin/inc/formatterrfsplugincommon.h --- a/coreapplicationuis/rfsplugins/FormatterRFSPlugin/inc/formatterrfsplugincommon.h Tue May 25 12:52:36 2010 +0300 +++ b/coreapplicationuis/rfsplugins/FormatterRFSPlugin/inc/formatterrfsplugincommon.h Wed Jun 09 09:52:12 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2009-10 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" @@ -27,12 +27,6 @@ _LIT( KExcludeList, "\\private\\100059C9\\excludelist.txt" ); /** -* Exclude list path and file which has the entries of the NR-flagged applications which are installed in c:\ drive and the RFS operation -* is based on this file itself -*/ -_LIT( KExcludeListcache, "\\private\\100059C9\\excludelistcache.txt" ); - -/** * Application exclude list path */ _LIT( KApplicationExcludeListPath, "?:\\private\\102073ea\\excludes\\" ); diff -r 332e7bf3b42f -r 469fa8a78de7 coreapplicationuis/rfsplugins/FormatterRFSPlugin/inc/selectiveformatter.h --- a/coreapplicationuis/rfsplugins/FormatterRFSPlugin/inc/selectiveformatter.h Tue May 25 12:52:36 2010 +0300 +++ b/coreapplicationuis/rfsplugins/FormatterRFSPlugin/inc/selectiveformatter.h Wed Jun 09 09:52:12 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2006-2010 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" @@ -115,6 +115,16 @@ */ void HandleAppExcludeListsOnDriveL( TPtr aBuf, TChar aDrive ); + /** + * Handles NR-Application specific exclude list loading. + */ + void HandleNrExcludeListsL(); + + /** + * Append the list of nr-files to the excludelist entry. + */ + void AppendNrlisttoExcludeListL(RPointerArray &nrFileList); + private: // Data /** File server session. */ @@ -136,4 +146,35 @@ TBool iValidExcludeListFound; }; +/** +Template class CleanupResetAndDestroy to clean up the array +of implementation information from the cleanup stack. +*/ + +template +class CleanupResetAndDestroy + { +public: + /** + Puts an item on the cleanup stack. + + @param aRef + The implementation information to be put on the cleanup stack. + */ + inline static void PushL(T& aRef); +private: + static void ResetAndDestroy(TAny *aPtr); + }; +template +inline void CleanupResetAndDestroyPushL(T& aRef); +template +inline void CleanupResetAndDestroy::PushL(T& aRef) + {CleanupStack::PushL(TCleanupItem(&ResetAndDestroy,&aRef));} +template +void CleanupResetAndDestroy::ResetAndDestroy(TAny *aPtr) + {(STATIC_CAST(T*,aPtr))->ResetAndDestroy();} +template +inline void CleanupResetAndDestroyPushL(T& aRef) + {CleanupResetAndDestroy::PushL(aRef);} + #endif // C_SELECTIVEFORMATTER_H diff -r 332e7bf3b42f -r 469fa8a78de7 coreapplicationuis/rfsplugins/FormatterRFSPlugin/src/formatterrfsplugin.cpp --- a/coreapplicationuis/rfsplugins/FormatterRFSPlugin/src/formatterrfsplugin.cpp Tue May 25 12:52:36 2010 +0300 +++ b/coreapplicationuis/rfsplugins/FormatterRFSPlugin/src/formatterrfsplugin.cpp Wed Jun 09 09:52:12 2010 +0300 @@ -19,11 +19,9 @@ // SYSTEM INCLUDE #include #include -#include -#include -#include -#include + #include + // USER INCLUDE #include "formatterrfsplugin.h" #include "formatterrfspluginprivatecrkeys.h" @@ -39,210 +37,17 @@ // ================= LOCAL FUNCTIONS ======================= -// --------------------------------------------------------------------------- -// ExcludeListNameL -// --------------------------------------------------------------------------- -// -static void FileWriteL(RPointerArray &files) - { - RFs fileSession; - RFile file; - User::LeaveIfError(fileSession.Connect()); - TInt err = file.Open(fileSession,_L("c:\\private\\100059C9\\excludelistcache.txt"),EFileWrite|EFileStreamText); - - if ( err != KErrNone ) - { - RDebug::Print(_L("CFormatterRFSPlugin::ExcludeListNameL , FileWrite : Failed to open the file")); - return; - } - - TInt pos = 0; - file.Seek(ESeekEnd,pos); - TInt size = files.Count(); - RBuf filenameBuf; - - for ( TInt i=0; i < size; i++) - { - HBufC8* fileName = HBufC8::NewLC(files[i]->Size()); - TPtr8 fileNamePtr(fileName->Des()); - fileNamePtr.Copy(*files[i]); - - filenameBuf.Create(fileNamePtr.Length()); - filenameBuf.Copy(fileNamePtr); - TFileText fileText ; - fileText.Set(file) ; - fileText.Seek(ESeekStart); - fileText.Write(filenameBuf); - CleanupStack::PopAndDestroy();//Filename - file.Flush(); - } - - file.Close(); - fileSession.Close(); - } - -static void MergeFilesL() - { - - RFs fileSession; - RFile excludeFileName; - - User::LeaveIfError(fileSession.Connect()); - TInt ret = excludeFileName.Open(fileSession,_L("c:\\private\\100059C9\\excludelist.txt"),EFileRead); - - if(ret != KErrNone) - { - RDebug::Print(_L("CFormatterRFSPlugin::ExcludeListNameL , MergeFiles : Failed to open the file")); - return; - } - excludeFileName.Close(); - - CFileMan* fileMan=CFileMan::NewL(fileSession); - CleanupStack::PushL(fileMan); - - TInt result=fileMan->Copy(_L("c:\\private\\100059C9\\excludelist.txt"),_L("c:\\private\\100059C9\\excludelistcache.txt"),CFileMan::EOverWrite); - RDebug::Print(_L("CFormatterRFSPlugin::MergeFilesL copying the excludelist.txt to excludelistcache.txt , CFileMan::Copy returned = %d"), result); - CleanupStack::PopAndDestroy(fileMan); - - fileSession.Close(); - } static HBufC* ExcludeListNameL( TChar aSystemDrive ) { FUNC_LOG; - RDebug::Print(_L("CFormatterRFSPlugin::ExcludeListNameL")); - - RFs fileSession; - RFile file; - - _LIT8(KFileName, "c:\\private\\100059C9\\excludelistcache.txt\n"); - TBuf8 <50> fileName; - fileName.Copy(KFileName); - - User::LeaveIfError(fileSession.Connect()); - - RDir dir; - if(dir.Open(fileSession,_L("c:\\private\\100059C9\\"),KEntryAttNormal) != KErrNone) - { - User::LeaveIfError(fileSession.MkDir(_L("c:\\private\\100059C9\\"))); - } - - TInt rev = file.Replace(fileSession,_L("c:\\private\\100059C9\\excludelistcache.txt"),EFileWrite|EFileStreamText); - - RDebug::Print(_L("CFormatterRFSPlugin::ExcludeListNameL, Replace returned %d"),rev); - - file.Flush(); - file.Close(); - dir.Close(); - fileSession.Close(); - - Swi::RSisRegistrySession session; - CleanupClosePushL(session); - User::LeaveIfError(session.Connect()); - - // Get the installed application UIDs - RArray uids; - CleanupClosePushL(uids); - session.InstalledUidsL(uids); - TInt uidcount = uids.Count(); - - Swi::RSisRegistryEntry entry; - Swi::RSisRegistryEntry entry2; - CleanupClosePushL(entry); - CleanupClosePushL(entry2); - - RPointerArray registryFiles; - RPointerArray augmentedRegistryFiles; - RPointerArray nonRemovableFiles; - RPointerArray nonRemovableAugmentedFiles; - CleanupResetAndDestroyPushL(registryFiles); - CleanupResetAndDestroyPushL(augmentedRegistryFiles); - CleanupResetAndDestroyPushL(nonRemovableFiles); - CleanupResetAndDestroyPushL(nonRemovableAugmentedFiles); - - TInt count; - RPointerArray augmentationPackages; - CleanupResetAndDestroyPushL(augmentationPackages); - for ( TInt iter=0; iter=0;z--) - { - TPtr firstChar(nonRemovableFiles[z]->Des()); - if(firstChar.Mid(0,1) == _L("z")) - { - delete nonRemovableFiles[z]; - nonRemovableFiles.Remove(z); - } - } - // Look for augmentations. - if(entry.IsAugmentationL()) - { - entry.AugmentationsL(augmentationPackages); - count = entry.AugmentationsNumberL(); - for (TInt i=0; i < count; ++i) - { - User::LeaveIfError(entry2.OpenL(session,*augmentationPackages[i])); - if(EFalse == entry2.RemovableL()) - { - entry2.FilesL(nonRemovableAugmentedFiles); - entry2.RegistryFilesL(augmentedRegistryFiles); - for (TInt c=0; cDes()); - if(firstChar.Mid(0,1) == _L("z")) - { - delete nonRemovableAugmentedFiles[c]; - nonRemovableAugmentedFiles.Remove(c); - } - } - } - entry2.Close(); - } - } - } - entry.Close(); - } - RDebug::Print(_L("CFormatterRFSPlugin::ExcludeListNameL Writing the file names to the excludelist.txt")); - - MergeFilesL(); - FileWriteL(nonRemovableAugmentedFiles); - FileWriteL(augmentedRegistryFiles); - FileWriteL(nonRemovableFiles); - FileWriteL(registryFiles); - - TInt pos = 0; - User::LeaveIfError(fileSession.Connect()); - User::LeaveIfError(file.Open(fileSession,_L("c:\\private\\100059C9\\excludelistcache.txt"),EFileWrite|EFileStreamText)); - - file.Seek(ESeekEnd,pos); - - TBuf configurationLine ; - TFileText fileText ; - fileText.Set(file) ; - fileText.Seek(ESeekStart); - configurationLine.Format(_L("c:\\private\\100059C9\\excludelistcache.txt")) ; - fileText.Write(configurationLine); - - file.Flush(); - file.Close(); - fileSession.Close(); - - - CleanupStack::PopAndDestroy(9,&session); - - HBufC* buf = HBufC::NewLC( KExcludeListcache().Length() + KExcludeListPathNameLenExt ); - TPtr bufPtr = buf->Des(); - bufPtr.Append( aSystemDrive ); - bufPtr.Append( KDriveDelimiter ); - bufPtr.Append( KExcludeListcache ); - CleanupStack::Pop( buf ); + HBufC* buf = HBufC::NewLC( KExcludeList().Length() + KExcludeListPathNameLenExt ); + TPtr bufPtr = buf->Des(); + bufPtr.Append( aSystemDrive ); + bufPtr.Append( KDriveDelimiter ); + bufPtr.Append( KExcludeList ); + CleanupStack::Pop( buf ); return buf; } diff -r 332e7bf3b42f -r 469fa8a78de7 coreapplicationuis/rfsplugins/FormatterRFSPlugin/src/selectiveformatter.cpp --- a/coreapplicationuis/rfsplugins/FormatterRFSPlugin/src/selectiveformatter.cpp Tue May 25 12:52:36 2010 +0300 +++ b/coreapplicationuis/rfsplugins/FormatterRFSPlugin/src/selectiveformatter.cpp Wed Jun 09 09:52:12 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2006-2010 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" @@ -17,6 +17,9 @@ #include +#include +#include +#include #include "dirstackentry.h" #include "selectiveformatter.h" @@ -24,6 +27,7 @@ #include "rfsfileman.h" #include "trace.h" +_LIT(KZDrive,"z"); // ================= MEMBER FUNCTIONS ======================= // --------------------------------------------------------------------------- @@ -125,6 +129,9 @@ // Handle app specific files HandleAppExcludeListsL(); + // Handle NR-Applications + HandleNrExcludeListsL(); + if( !iValidExcludeListFound ) { User::Leave( KErrInvalidExcList ); @@ -329,3 +336,130 @@ dir = NULL; } } + +// --------------------------------------------------------------------------- +// CSelectiveFormatter::HandleNrExcludeListsL +// --------------------------------------------------------------------------- +// +void CSelectiveFormatter::HandleNrExcludeListsL() + { + INFO( "CSelectiveFormatter::HandleNrExcludeListsL() START "); + + Swi::RSisRegistrySession session; + CleanupClosePushL(session); + User::LeaveIfError(session.Connect()); + + INFO( "In CSelectiveFormatter::HandleNrExcludeListsL() RSisRegistrySession::Connect() established"); + // Get the installed application UIDs + RArray uids; + CleanupClosePushL(uids); + session.InstalledUidsL(uids); + TInt uidcount = uids.Count(); + + Swi::RSisRegistryEntry regEntry; + Swi::RSisRegistryEntry augmentForRegEntry; + CleanupClosePushL(regEntry); + CleanupClosePushL(augmentForRegEntry); + + // Array of registry files i.e., .reg and .ctl for the installed apps + RPointerArray registryFiles; + + // Array of registry files i.e., .reg and .ctl for the augmented apps + RPointerArray augmentedRegistryFiles; + + // Array of files installed through package. + RPointerArray nonRemovableFiles; + + // Array of augmented files installed through package. + RPointerArray nonRemovableAugmentedFiles; + + CleanupResetAndDestroyPushL(registryFiles); + CleanupResetAndDestroyPushL(augmentedRegistryFiles); + CleanupResetAndDestroyPushL(nonRemovableFiles); + CleanupResetAndDestroyPushL(nonRemovableAugmentedFiles); + + TInt count; + + //Array of augmented packages + RPointerArray augmentationPackages; + CleanupResetAndDestroyPushL(augmentationPackages); + + for ( TInt iter=0; iter=0;nonRemovableFilesCount--) + { + TPtr nrFileName(nonRemovableFiles[nonRemovableFilesCount]->Des()); + if(nrFileName.Left(1) == KZDrive ) + { + delete nonRemovableFiles[nonRemovableFilesCount]; + nonRemovableFiles.Remove(nonRemovableFilesCount); + } + } + // Look for augmentations. + if(regEntry.IsAugmentationL()) + { + regEntry.AugmentationsL(augmentationPackages); + count = regEntry.AugmentationsNumberL(); + for (TInt augPkgCount=0; augPkgCount < count; ++augPkgCount) + { + User::LeaveIfError(augmentForRegEntry.OpenL(session,*augmentationPackages[augPkgCount])); + if(EFalse == augmentForRegEntry.RemovableL()) + { + INFO( "In CSelectiveFormatter::HandleNrExcludeListsL() get the augmented nonRemovable and registry files"); + augmentForRegEntry.FilesL(nonRemovableAugmentedFiles); + augmentForRegEntry.RegistryFilesL(augmentedRegistryFiles); + } + augmentForRegEntry.Close(); + } + } + } + AppendNrlisttoExcludeListL(nonRemovableFiles); + nonRemovableFiles.ResetAndDestroy(); + regEntry.Close(); + } + INFO( "In CSelectiveFormatter::HandleNrExcludeListsL() append the list of files to the excludelist "); + + AppendNrlisttoExcludeListL(nonRemovableAugmentedFiles); + AppendNrlisttoExcludeListL(augmentedRegistryFiles); + AppendNrlisttoExcludeListL(registryFiles); + + CleanupStack::PopAndDestroy(9,&session); + INFO( "CSelectiveFormatter::HandleNrExcludeListsL() End"); + } + +// --------------------------------------------------------------------------- +// CSelectiveFormatter::HandleNrExcludeListsL +// --------------------------------------------------------------------------- +// + +void CSelectiveFormatter::AppendNrlisttoExcludeListL(RPointerArray &aFileNameArr) + { + INFO( "CSelectiveFormatter::AppendNrlisttoExcludeListL() START "); + TInt size = aFileNameArr.Count(); + CExcludeListEntry* entry; + TInt err; + for ( TInt i=0; i < size; i++) + { + entry = CExcludeListEntry::NewL( aFileNameArr[i]->Des() ); + err = iExcludeList.InsertInOrder( entry, CExcludeListEntry::Compare ); // take ownership + if( err != KErrNone ) + { + delete entry; // delete entry if ownership not transferred + + if( err != KErrAlreadyExists ) + { + INFO_1( "CSelectiveFormatter::AppendNrlisttoExcludeListL() leaves with error code %d",err); + User::Leave( err ); + } + } + } + INFO( "CSelectiveFormatter::AppendNrlisttoExcludeListL() END "); + } diff -r 332e7bf3b42f -r 469fa8a78de7 coreapplicationuis/rfsplugins/StarterRFSPlugin/conf/starterrfsplugin.confml Binary file coreapplicationuis/rfsplugins/StarterRFSPlugin/conf/starterrfsplugin.confml has changed diff -r 332e7bf3b42f -r 469fa8a78de7 coreapplicationuis/rfsplugins/tsrc/rfspluginstest/rfstestapp/data/rfstestapp.rss --- a/coreapplicationuis/rfsplugins/tsrc/rfspluginstest/rfstestapp/data/rfstestapp.rss Tue May 25 12:52:36 2010 +0300 +++ b/coreapplicationuis/rfsplugins/tsrc/rfspluginstest/rfstestapp/data/rfstestapp.rss Wed Jun 09 09:52:12 2010 +0300 @@ -21,8 +21,8 @@ #include #include #include -#include -#include +//#include +//#include #include #include #include "rfstestappcmds.hrh" @@ -120,17 +120,19 @@ // r_rfstestapp_memory_selection // --------------------------------------------------------------------------- // +/* RESOURCE MEMORYSELECTIONDIALOG r_rfstestapp_memory_selection { title = ""; softkey_1 = "Ok"; } - +*/ // --------------------------------------------------------------------------- // r_rfstestapp_specfile_selection // --------------------------------------------------------------------------- // +/* RESOURCE FILESELECTIONDIALOG r_rfstestapp_specfile_selection { title = "Select Data Specification File"; @@ -147,13 +149,14 @@ filter_data = { "*.spc" }; } }; - } + }*/ // --------------------------------------------------------------------------- // r_rfstestapp_excludelist_selection // --------------------------------------------------------------------------- // +/* RESOURCE FILESELECTIONDIALOG r_rfstestapp_excludelist_selection { title = "Select Exclude List File"; @@ -171,7 +174,7 @@ } }; } - +*/ // --------------------------------------------------------------------------- // r_rfstestapp_progress diff -r 332e7bf3b42f -r 469fa8a78de7 coreapplicationuis/rfsplugins/tsrc/rfspluginstest/rfstestapp/src/rfstestappui.cpp --- a/coreapplicationuis/rfsplugins/tsrc/rfspluginstest/rfstestapp/src/rfstestappui.cpp Tue May 25 12:52:36 2010 +0300 +++ b/coreapplicationuis/rfsplugins/tsrc/rfspluginstest/rfstestapp/src/rfstestappui.cpp Wed Jun 09 09:52:12 2010 +0300 @@ -16,9 +16,9 @@ */ -#include +//#include #include -#include +//#include #include #include #include @@ -63,13 +63,13 @@ TParsePtr parse( aPath ); TPtrC rootFolder = parse.DriveAndPath(); INFO_1( "Root folder for opening test files: %S", &rootFolder ); - TBool ret = AknCommonDialogsDynMem::RunSelectDlgLD( - AknCommonDialogsDynMem::EMemoryTypePhone | - AknCommonDialogsDynMem::EMemoryTypeMMC, - aPath, - rootFolder, - R_RFSTESTAPP_MEMORY_SELECTION, - aResId ); + TBool ret =ETrue;// = AknCommonDialogsDynMem::RunSelectDlgLD( + //AknCommonDialogsDynMem::EMemoryTypePhone | + //AknCommonDialogsDynMem::EMemoryTypeMMC, + //aPath, + //rootFolder, + //R_RFSTESTAPP_MEMORY_SELECTION, + //aResId ); return ret; } @@ -234,6 +234,7 @@ HBufC* specFile = HBufC::NewLC( KMaxFileName ); TPtr specFileDes = specFile->Des(); specFileDes = aSpec; + /* if ( AskPathL( specFileDes, R_RFSTESTAPP_SPECFILE_SELECTION ) ) { HBufC* excludeFile = HBufC::NewLC( KMaxFileName ); @@ -278,7 +279,7 @@ } CleanupStack::PopAndDestroy( excludeFile ); - } + }*/ CleanupStack::PopAndDestroy( specFile ); } diff -r 332e7bf3b42f -r 469fa8a78de7 tzservices/tzserver/Server/Source/timezonesession.cpp --- a/tzservices/tzserver/Server/Source/timezonesession.cpp Tue May 25 12:52:36 2010 +0300 +++ b/tzservices/tzserver/Server/Source/timezonesession.cpp Wed Jun 09 09:52:12 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 1997-2010 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" @@ -698,19 +698,23 @@ TInt CTzServerSession::doGetUserTimeZoneNamesL(const RMessage2& aMessage) { TInt size = iTzUserDataCache->SizeOfNames(); - CBufFlat* buffer = CBufFlat::NewL(size); - CleanupStack::PushL(buffer); - buffer->ExpandL(0,size); - - RBufWriteStream writeStream; - CleanupClosePushL(writeStream); - writeStream.Open(*buffer); - const CTzUserNames& names = iTzUserDataCache->GetNames(); - writeStream << names; - writeStream.CommitL(); - aMessage.WriteL(0, buffer->Ptr(0)); - CleanupStack::PopAndDestroy(2, buffer); - return KErrNone; + if ( size > 0 ) + { + CBufFlat* buffer = CBufFlat::NewL(size); + CleanupStack::PushL(buffer); + buffer->ExpandL(0,size); + + RBufWriteStream writeStream; + CleanupClosePushL(writeStream); + writeStream.Open(*buffer); + const CTzUserNames& names = iTzUserDataCache->GetNames(); + writeStream << names; + writeStream.CommitL(); + aMessage.WriteL(0, buffer->Ptr(0)); + CleanupStack::PopAndDestroy(2, buffer); + return KErrNone; + } + return KErrArgument; } /**