# HG changeset patch # User hgs # Date 1282564040 -10800 # Node ID 0f7422b6b602898dc986da231993c65e0c595720 # Parent d6b9e89d80a3587c6cf20bf1c640b73ccbaad947 201033_01 diff -r d6b9e89d80a3 -r 0f7422b6b602 accessoryservices/accessoryserver/inc/Server/AccSrvServerModel.h --- a/accessoryservices/accessoryserver/inc/Server/AccSrvServerModel.h Tue Aug 10 14:46:45 2010 +0300 +++ b/accessoryservices/accessoryserver/inc/Server/AccSrvServerModel.h Mon Aug 23 14:47:20 2010 +0300 @@ -187,9 +187,9 @@ * * @since S60 3.1 * @param aGenericID Generic ID of the detected accessory. - * @return void + * @return index in the array */ - void RemovePhysicalConnection( const TAccPolGenericID& aGenericID ); + TInt RemovePhysicalConnection( const TAccPolGenericID& aGenericID ); /** * Get current connection status, ie. all active connections. diff -r d6b9e89d80a3 -r 0f7422b6b602 accessoryservices/accessoryserver/src/Server/AccSrvConnectionController.cpp --- a/accessoryservices/accessoryserver/src/Server/AccSrvConnectionController.cpp Tue Aug 10 14:46:45 2010 +0300 +++ b/accessoryservices/accessoryserver/src/Server/AccSrvConnectionController.cpp Mon Aug 23 14:47:20 2010 +0300 @@ -698,14 +698,16 @@ { COM_TRACE_( "[AccFW:AccServer] CAccSrvConnectionController::PromoteToConnectedL()" ); - iServerModel->RemovePhysicalConnection( aGenericID ); //Move GID from physical connection array - iServerModel->AddConnectionL( aGenericID ); //to connection array + if( KErrNotFound != iServerModel->RemovePhysicalConnection( aGenericID )) //Move GID from physical connection array + { + iServerModel->AddConnectionL( aGenericID ); //to connection array - iNotificationQueue->CompleteControlMessageL( ENewAccessoryConnected, - KErrNone, - aGenericID.UniqueID() ); + iNotificationQueue->CompleteControlMessageL( ENewAccessoryConnected, + KErrNone, + aGenericID.UniqueID() ); - iConnectionStatusHandler->IssueRequest(); + iConnectionStatusHandler->IssueRequest(); + } COM_TRACE_( "[AccFW:AccServer] CAccSrvConnectionController::PromoteToConnectedL - return void" ); } diff -r d6b9e89d80a3 -r 0f7422b6b602 accessoryservices/accessoryserver/src/Server/AccSrvServerModel.cpp --- a/accessoryservices/accessoryserver/src/Server/AccSrvServerModel.cpp Tue Aug 10 14:46:45 2010 +0300 +++ b/accessoryservices/accessoryserver/src/Server/AccSrvServerModel.cpp Mon Aug 23 14:47:20 2010 +0300 @@ -316,7 +316,7 @@ // CAccSrvServerModel::RemovePhysicalConnectionL // ----------------------------------------------------------------------------- // -void CAccSrvServerModel::RemovePhysicalConnection( const TAccPolGenericID& aGenericID ) +TInt CAccSrvServerModel::RemovePhysicalConnection( const TAccPolGenericID& aGenericID ) { COM_TRACE_( "[AccFW:AccServer] CAccSrvServerModel::RemovePhysicalConnection()" ); @@ -329,7 +329,9 @@ iPhysicalConnectionArray.Remove( index ); } - COM_TRACE_( "[AccFW:AccServer] CAccSrvServerModel::RemovePhysicalConnection - return void" ); + COM_TRACE_1( "[AccFW:AccServer] CAccSrvServerModel::RemovePhysicalConnection - return %d", index ); + + return index; } // ----------------------------------------------------------------------------- diff -r d6b9e89d80a3 -r 0f7422b6b602 accessoryservices/accessoryserver/src/Server/AccSrvSubControl.cpp --- a/accessoryservices/accessoryserver/src/Server/AccSrvSubControl.cpp Tue Aug 10 14:46:45 2010 +0300 +++ b/accessoryservices/accessoryserver/src/Server/AccSrvSubControl.cpp Mon Aug 23 14:47:20 2010 +0300 @@ -235,12 +235,18 @@ } else { - err = notifier.StartNotifier( KAccFwUiNoteNotifierUid, KNullDesC8 ); - if ( err != KErrNone ) - { - COM_TRACE_1( "[AccFW:AccServer] CAccSrvSubControl::ConnectAccessoryL - Couldn't start notifier: err = %d", err); - } - notifier.Close(); + TPckgiReplyPck(0); + TRequestStatus iStatus =KRequestPending; + notifier.StartNotifierAndGetResponse(iStatus, + KAccFwUiNoteNotifierUid, + KNullDesC8,iReplyPck); + User::WaitForRequest(iStatus); + err = iStatus.Int(); + if(KErrNone != err) + { + COM_TRACE_1( "[AccFW:AccServer] CAccSrvSubControl::ConnectAccessoryL - Couldn't start notifier: err = %d", err); + } + notifier.Close(); } } else diff -r d6b9e89d80a3 -r 0f7422b6b602 accessoryservices/pluggeddisplay/pluggeddisplayengine/src/edidhandler.cpp --- a/accessoryservices/pluggeddisplay/pluggeddisplayengine/src/edidhandler.cpp Tue Aug 10 14:46:45 2010 +0300 +++ b/accessoryservices/pluggeddisplay/pluggeddisplayengine/src/edidhandler.cpp Mon Aug 23 14:47:20 2010 +0300 @@ -193,7 +193,7 @@ { hdmiSink = CAccPolHdmiSink::NewL( iExtensionParserPtr->BasicAudio(), - iTVOutConfigForHDMI.GetTvOutConfig()->CopyProtectionStatus() ); + ETrue ); } else { diff -r d6b9e89d80a3 -r 0f7422b6b602 accessoryservices/pluggeddisplay/pluggeddisplayengine/src/hdmicablestateconnected.cpp --- a/accessoryservices/pluggeddisplay/pluggeddisplayengine/src/hdmicablestateconnected.cpp Tue Aug 10 14:46:45 2010 +0300 +++ b/accessoryservices/pluggeddisplay/pluggeddisplayengine/src/hdmicablestateconnected.cpp Mon Aug 23 14:47:20 2010 +0300 @@ -829,13 +829,13 @@ { INFO( "Event: EIfAsyCommandHandlerEventSetCopyProtectionOn" ); TInt retVal = iTVOutConfigForCopyProtect->GetTvOutConfig()->CopyProtection( ETrue ); - iHDMICableStatusFSM.CopyProtectionSettingDone( retVal ); + iHDMICableStatusFSM.CopyProtectionSettingDone( retVal, iTVOutConfigForCopyProtect->GetTvOutConfig()->CopyProtectionStatus() ); } else if ( EIfAsyCommandHandlerEventSetCopyProtectionOff == aEvent ) { INFO( "Event: EIfAsyCommandHandlerEventSetCopyProtectionOff" ); TInt retVal = iTVOutConfigForCopyProtect->GetTvOutConfig()->CopyProtection( EFalse ); - iHDMICableStatusFSM.CopyProtectionSettingDone( retVal ); + iHDMICableStatusFSM.CopyProtectionSettingDone( retVal, iTVOutConfigForCopyProtect->GetTvOutConfig()->CopyProtectionStatus() ); } else if ( EIfAsyCommandHandlerEventGetCopyProtectStatus == aEvent ) { diff -r d6b9e89d80a3 -r 0f7422b6b602 commonservices/commonengine/conf/ci_commonengine.confml Binary file commonservices/commonengine/conf/ci_commonengine.confml has changed diff -r d6b9e89d80a3 -r 0f7422b6b602 commonservices/commonengine/conf/commonengine.confml Binary file commonservices/commonengine/conf/commonengine.confml has changed diff -r d6b9e89d80a3 -r 0f7422b6b602 commonservices/commonengine/config/export.mk --- a/commonservices/commonengine/config/export.mk Tue Aug 10 14:46:45 2010 +0300 +++ b/commonservices/commonengine/config/export.mk Mon Aug 23 14:47:20 2010 +0300 @@ -21,6 +21,7 @@ $(call push,MAKEFILE_STACK,$(MAKEFILE)) CONFFILES = $(MAKEFILEDIR)../conf/commonengine.confml $(EPOCROOT)/epoc32/rom/config/confml_data/s60/ \ + $(MAKEFILEDIR)../conf/ci_commonengine.confml $(EPOCROOT)/epoc32/rom/config/confml_data/s60/ \ $(MAKEFILEDIR)../conf/commonengine_1020503B.crml $(EPOCROOT)/epoc32/rom/config/confml_data/s60/ commonengine_config :: commonengine_config-conf diff -r d6b9e89d80a3 -r 0f7422b6b602 commonservices/commonengine/group/bld.inf --- a/commonservices/commonengine/group/bld.inf Tue Aug 10 14:46:45 2010 +0300 +++ b/commonservices/commonengine/group/bld.inf Mon Aug 23 14:47:20 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2002-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,6 +23,7 @@ PRJ_EXPORTS //Configuration tool migration ../conf/commonengine.confml OS_LAYER_CONFML(commonengine.confml) +../conf/ci_commonengine.confml OS_LAYER_CONFML(ci_commonengine.confml) ../conf/commonengine_1020503B.crml OS_LAYER_CRML(commonengine_1020503B.crml) ../rom/diskspacereserver.iby CORE_OS_LAYER_IBY_EXPORT_PATH(diskspacereserver.iby) diff -r d6b9e89d80a3 -r 0f7422b6b602 mediator/inc/Server/MediatorServerObjects.h --- a/mediator/inc/Server/MediatorServerObjects.h Tue Aug 10 14:46:45 2010 +0300 +++ b/mediator/inc/Server/MediatorServerObjects.h Mon Aug 23 14:47:20 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2005 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" @@ -827,14 +827,7 @@ */ RPointerArray& GetObservers(); - /** - * Adds an array of observers to event - * @since S60 3.1 - * @param aObservers reference to observer array - * @return None. - */ - void AddObservers( RPointerArray& aObservers ); - + /** * Gets TEvent structure of the current event * @since S60 3.1 diff -r d6b9e89d80a3 -r 0f7422b6b602 mediator/src/Client/MediatorServerClient.cpp --- a/mediator/src/Client/MediatorServerClient.cpp Tue Aug 10 14:46:45 2010 +0300 +++ b/mediator/src/Client/MediatorServerClient.cpp Mon Aug 23 14:47:20 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" @@ -465,7 +465,7 @@ command.iCommandId = aCommandId; command.iVersion = aVersion; //Time out is initiatilized to 0 as its not used on the server side. - //this is just to compress the tool warnings. + //this is just to supress the tool warnings. command.iTimeout = 0; TCommandBuffer commandBuffer( command ); @@ -504,6 +504,12 @@ // And command TCommand command; command.iCommandId = aCommandId; + //All the remaining parameters of TCommand are initiatilized to 0 as its not used on the server side. + //this is just to suppress the tool warnings. + command.iVersion = TVersion(0,0,0); + command.iCaps.SetEmpty(); + command.iTimeout = 0; + TCommandBuffer commandBuffer( command ); // Status @@ -542,6 +548,12 @@ // And command TCommand command; command.iCommandId = aCommandId; + //All the remaining parameters of TCommand are initiatilized to 0 as its not used on the server side. + //this is just to suppress the tool warnings. + command.iVersion = TVersion(0,0,0); + command.iCaps.SetEmpty(); + command.iTimeout = 0; + TCommandBuffer commandBuffer( command ); // Send the command diff -r d6b9e89d80a3 -r 0f7422b6b602 mediator/src/Server/MediatorServerObjects.cpp --- a/mediator/src/Server/MediatorServerObjects.cpp Tue Aug 10 14:46:45 2010 +0300 +++ b/mediator/src/Server/MediatorServerObjects.cpp Mon Aug 23 14:47:20 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2005 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" @@ -1079,20 +1079,6 @@ } // ----------------------------------------------------------------------------- -// CEvent::AddObservers -// -// ----------------------------------------------------------------------------- -// -void CEvent::AddObservers( RPointerArray& aObservers ) - { - // Check that observer does not exists already for this event - for (TInt index = 0; index < aObservers.Count(); index++ ) - { - iObservers.Append( aObservers[index] ); - } - } - -// ----------------------------------------------------------------------------- // CEvent::Event // Returns EItemEvent // ----------------------------------------------------------------------------- diff -r d6b9e89d80a3 -r 0f7422b6b602 package_definition.xml --- a/package_definition.xml Tue Aug 10 14:46:45 2010 +0300 +++ b/package_definition.xml Mon Aug 23 14:47:20 2010 +0300 @@ -1,295 +1,468 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r d6b9e89d80a3 -r 0f7422b6b602 package_definition_v2.xml --- a/package_definition_v2.xml Tue Aug 10 14:46:45 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,295 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r d6b9e89d80a3 -r 0f7422b6b602 package_map.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/package_map.xml Mon Aug 23 14:47:20 2010 +0300 @@ -0,0 +1,1 @@ + diff -r d6b9e89d80a3 -r 0f7422b6b602 psmservices/psmserver/inc/client/psmclientimpl.h --- a/psmservices/psmserver/inc/client/psmclientimpl.h Tue Aug 10 14:46:45 2010 +0300 +++ b/psmservices/psmserver/inc/client/psmclientimpl.h Mon Aug 23 14:47:20 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" @@ -74,6 +74,14 @@ */ CPsmSettings& PsmSettings() const; +#ifdef _DEBUG + // these functions are used only for testing + virtual TInt HeapMark(); + virtual TInt HeapMarkEnd(); + virtual TInt HeapReset(); + virtual TInt SetHeapFailure(TInt aFailureRate); +#endif //_DEBUG + private: /** diff -r d6b9e89d80a3 -r 0f7422b6b602 psmservices/psmserver/inc/engine/psmmanager.h --- a/psmservices/psmserver/inc/engine/psmmanager.h Tue Aug 10 14:46:45 2010 +0300 +++ b/psmservices/psmserver/inc/engine/psmmanager.h Mon Aug 23 14:47:20 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" @@ -72,7 +72,7 @@ /** * Register new PSM observer. Adds observer to the list of registered observers */ - void RegisterObserver( MPsmModeChangeObserver* aObserver ); + void RegisterObserverL( MPsmModeChangeObserver* aObserver ); /** * Unreqister observer. Removes observer from the list of registered observers @@ -89,6 +89,19 @@ */ void IssueRequest(); +#ifdef _DEBUG + /** + * Delete plugin loader. Used only for testing purpose + */ + void ClosePluginLoader(); + + /** + * Compress ModeObservers Array. Used only for testing purpose + */ + void CompressModeObserversArray(); + +#endif //_DEBUG + protected: // From CActive /** diff -r d6b9e89d80a3 -r 0f7422b6b602 psmservices/psmserver/inc/server/psmsrvmessage.h --- a/psmservices/psmserver/inc/server/psmsrvmessage.h Tue Aug 10 14:46:45 2010 +0300 +++ b/psmservices/psmserver/inc/server/psmsrvmessage.h Mon Aug 23 14:47:20 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" @@ -74,6 +74,11 @@ * Observes the mode change completion */ void NotifyPsmModeChangeComplete( const TInt aError ); + + /** + * Returns the message handle + */ + TInt MessageHandle( ) const; private: diff -r d6b9e89d80a3 -r 0f7422b6b602 psmservices/psmserver/inc/server/psmsrvsession.h --- a/psmservices/psmserver/inc/server/psmsrvsession.h Tue Aug 10 14:46:45 2010 +0300 +++ b/psmservices/psmserver/inc/server/psmsrvsession.h Mon Aug 23 14:47:20 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" @@ -61,6 +61,11 @@ * Service requests */ void ServiceL( const RMessage2& aMessage ); + + /** + * ServiceError handling + */ + void ServiceError(const RMessage2 &aMessage, TInt aError); private: @@ -74,10 +79,6 @@ */ void ConstructL(); - /** - * Handles client requests - */ - void DispatchL( const RMessage2& aMessage ); /** * Handles settings related requests @@ -106,11 +107,6 @@ */ CPsmMessage* iNotifyModeMessage; - /** - * Config array for Settings handling - */ - RConfigInfoArray iConfigArray; - }; #endif // PSMSRVSESSION_H diff -r d6b9e89d80a3 -r 0f7422b6b602 psmservices/psmserver/inc/util/psmclientserver.h --- a/psmservices/psmserver/inc/util/psmclientserver.h Tue Aug 10 14:46:45 2010 +0300 +++ b/psmservices/psmserver/inc/util/psmclientserver.h Mon Aug 23 14:47:20 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2006 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" @@ -66,6 +66,16 @@ */ EPsmServerCancelModeChangeNotificationRequest, + /** + * Used only for testing purpose and in debug builds only. + * Not declared under _DEBUG because command ids will be + * different in udeb and urel version, will lead to confusion + */ + EDebugHeapMark, + EDebugHeapMarkEnd, + EDebugSetHeapFailure, + EDebugHeapReset, + // --------------------------------------------------------------- // End of enum // --------------------------------------------------------------- diff -r d6b9e89d80a3 -r 0f7422b6b602 psmservices/psmserver/src/client/psmclientimpl.cpp --- a/psmservices/psmserver/src/client/psmclientimpl.cpp Tue Aug 10 14:46:45 2010 +0300 +++ b/psmservices/psmserver/src/client/psmclientimpl.cpp Mon Aug 23 14:47:20 2010 +0300 @@ -63,12 +63,10 @@ CPsmClientImpl::~CPsmClientImpl() { COMPONENT_TRACE( ( _L( "PSM Client - CPsmClientImpl::~CPsmClientImpl()" ) ) ); - + CancelPowerSaveModeChange(); - delete iActive; delete iSettings; - iPsmServer.Close(); COMPONENT_TRACE( ( _L( "PSM Client - CPsmClientImpl::~CPsmClientImpl - return" ) ) ); @@ -169,4 +167,39 @@ return *iSettings; } +#ifdef _DEBUG +TInt CPsmClientImpl::HeapMark() + { + COMPONENT_TRACE( ( _L( "PSM Client - CPsmClientImpl::HeapMark()" ) ) ); + TInt err = iPsmServer.SendReceiveSync( EDebugHeapMark, TIpcArgs() ); + COMPONENT_TRACE( ( _L( "PSM Client - CPsmClientImpl::HeapMark - return" ) ) ); + return err; + } + +TInt CPsmClientImpl::HeapMarkEnd() + { + COMPONENT_TRACE( ( _L( "PSM Client - CPsmClientImpl::HeapMarkEnd()" ) ) ); + TInt err = iPsmServer.SendReceiveSync( EDebugHeapMarkEnd, TIpcArgs() ); + COMPONENT_TRACE( ( _L( "PSM Client - CPsmClientImpl::HeapMarkEnd - return" ) ) ); + return err; + } + +TInt CPsmClientImpl::SetHeapFailure(TInt aFailureRate) + { + COMPONENT_TRACE( ( _L( "PSM Client - CPsmClientImpl::SetHeapFailure()" ) ) ); + TInt err = iPsmServer.SendReceiveSync( EDebugSetHeapFailure, TIpcArgs(aFailureRate) ); + COMPONENT_TRACE( ( _L( "PSM Client - CPsmClientImpl::SetHeapFailure - return" ) ) ); + return err; + } + +TInt CPsmClientImpl::HeapReset() + { + COMPONENT_TRACE( ( _L( "PSM Client - CPsmClientImpl::HeapReset()" ) ) ); + TInt err = iPsmServer.SendReceiveSync( EDebugHeapReset, TIpcArgs() ); + COMPONENT_TRACE( ( _L( "PSM Client - CPsmClientImpl::HeapReset - return" ) ) ); + return err; + } + +#endif //_DEBUG + // End of file diff -r d6b9e89d80a3 -r 0f7422b6b602 psmservices/psmserver/src/engine/psmbackupstorage.cpp --- a/psmservices/psmserver/src/engine/psmbackupstorage.cpp Tue Aug 10 14:46:45 2010 +0300 +++ b/psmservices/psmserver/src/engine/psmbackupstorage.cpp Mon Aug 23 14:47:20 2010 +0300 @@ -274,7 +274,10 @@ // reset error value trapErr = KErrNone; } - + else if ( KErrNoMemory == trapErr ) + { + User::Leave(trapErr); + } COMPONENT_TRACE( ( _L( "PSM Server - CPsmBackupStorage::UpdateBackupL() - Config count: %i" ), aConfigArray.Count() ) ); // Loop config array and update storage @@ -287,9 +290,19 @@ // Search set element from config and create new if not found TXmlEngElement setItem; TRAP( trapErr, setItem = FindSetItemL( settings, configInfo.iConfigId ) ); - - // If not found, create new - if ( KErrNotFound == trapErr && setItem.IsNull() ) + + COMPONENT_TRACE( ( _L( "PSM Server - FindSetItemL() TRAP error - %d" ), trapErr ) ); + + if ( KErrNoMemory == trapErr && setItem.IsNull() ) + { + User::Leave(trapErr); + } + else if (KErrNoMemory == trapErr) + { + setItem.RemoveAttributeL( KPsmSetItemValue ); + User::Leave(trapErr); + } + else if ( KErrNotFound == trapErr && setItem.IsNull() ) { // First param indicates that cannot have childs, // second is the owner document and last is tag diff -r d6b9e89d80a3 -r 0f7422b6b602 psmservices/psmserver/src/engine/psmmanager.cpp --- a/psmservices/psmserver/src/engine/psmmanager.cpp Tue Aug 10 14:46:45 2010 +0300 +++ b/psmservices/psmserver/src/engine/psmmanager.cpp Mon Aug 23 14:47:20 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" @@ -113,8 +113,8 @@ if ( iPluginLoader ) { delete iPluginLoader; - } - + } + // Close mode observers array iModeObservers.Close(); @@ -286,14 +286,14 @@ } // ----------------------------------------------------------------------------- -// CPsmManager::RegisterObserver +// CPsmManager::RegisterObserverL // ----------------------------------------------------------------------------- // -void CPsmManager::RegisterObserver( MPsmModeChangeObserver* aObserver ) +void CPsmManager::RegisterObserverL( MPsmModeChangeObserver* aObserver ) { - COMPONENT_TRACE( ( _L( "PSM Server - CPsmManager::RegisterObserver()" ) ) ); - iModeObservers.Append( aObserver ); - COMPONENT_TRACE( ( _L( "PSM Server - CPsmManager::RegisterObserver - return" ) ) ); + COMPONENT_TRACE( ( _L( "PSM Server - CPsmManager::RegisterObserverL()" ) ) ); + iModeObservers.AppendL( aObserver ); + COMPONENT_TRACE( ( _L( "PSM Server - CPsmManager::RegisterObserverL() return" ) ) ); } // ----------------------------------------------------------------------------- @@ -326,4 +326,27 @@ return *iSettingsHandler; } +#ifdef _DEBUG +// ----------------------------------------------------------------------------- +// CPsmManager::ClosePluginLoader +// For testing purpose +// ----------------------------------------------------------------------------- +void CPsmManager::ClosePluginLoader() + { + if(iPluginLoader) + { + delete iPluginLoader; + iPluginLoader=NULL; + } + } + +// ----------------------------------------------------------------------------- +// CPsmManager::CompressModeObserversArray +// For testing purpose +// ----------------------------------------------------------------------------- +void CPsmManager::CompressModeObserversArray() + { + iModeObservers.Compress(); + } +#endif // _DEBUG // End of file diff -r d6b9e89d80a3 -r 0f7422b6b602 psmservices/psmserver/src/engine/psmsettingshandler.cpp --- a/psmservices/psmserver/src/engine/psmsettingshandler.cpp Tue Aug 10 14:46:45 2010 +0300 +++ b/psmservices/psmserver/src/engine/psmsettingshandler.cpp Mon Aug 23 14:47:20 2010 +0300 @@ -25,6 +25,29 @@ #include "psmtrace.h" // ----------------------------------------------------------------------------- +// CloseHandler +// closes the storage handler +// ----------------------------------------------------------------------------- +// +void CleanupStorage(TAny* aPtr) + { + CPsmStorage* self = static_cast (aPtr); + //Ignore the Trap as Cleanup can't leave. + TRAP_IGNORE(self->CloseStorageL()); + } + +// ----------------------------------------------------------------------------- +// CloseHandler +// closes the backup storage handler +// ----------------------------------------------------------------------------- +// +void CleanupBackupStorage(TAny* aPtr) + { + CPsmBackupStorage* self = static_cast (aPtr); + //Ignore the Trap as Cleanup can't leave. + TRAP_IGNORE(self->CloseStorageL()); + } + // CPsmSettingsHandler::NewL // Two-phased constructor. // ----------------------------------------------------------------------------- @@ -114,10 +137,13 @@ RConfigInfoArray& aPsmConfigArray, TUint32 aRepository ) { COMPONENT_TRACE( ( _L( "PSM Server - CPsmSettingsHandler::BackupAndGetSettingsL()" ) ) ); + //Close config handle in case of any error + CleanupStack::PushL(TCleanupItem(CleanupStorage, iConfigStorage)); // Change settings from normal config storage iConfigStorage->InitStorageL( aRepository ); ChangeSettingsL( aPsmConfigArray, aRepository, *iConfigStorage ); iConfigStorage->CloseStorageL(); + CleanupStack::Pop(iConfigStorage); COMPONENT_TRACE( ( _L( "PSM Server - CPsmSettingsHandler::BackupAndGetSettingsL() - return" ) ) ); } @@ -226,7 +252,9 @@ // First, get current settings RConfigInfoArray currentSettings; CleanupClosePushL( currentSettings ); - + + //Close backup handler in case of any error + CleanupStack::PushL(TCleanupItem(CleanupBackupStorage, iBackupStorage)); iBackupStorage->InitStorageL( aRepository ); iBackupStorage->ListCurrentSettingSetL( currentSettings ); @@ -245,8 +273,8 @@ if ( !found ) { // Add new settings to backup - settingsToBackUp.Append( aPsmConfigArray[ i ] ); - currentSettings.Append( aPsmConfigArray[ i ] ); + settingsToBackUp.AppendL( aPsmConfigArray[ i ] ); + currentSettings.AppendL( aPsmConfigArray[ i ] ); } } @@ -272,7 +300,7 @@ RConfigInfoArray settingsFromBackUp; CleanupClosePushL( settingsFromBackUp ); - for ( TInt i = 0; currentSettings.Count() != i; i++ ) + for ( TInt i = 0; currentSettings.Count() != i; ++i ) { TPsmsrvConfigInfo& currentInfo = currentSettings[ i ]; TBool found = EFalse; @@ -287,9 +315,9 @@ if ( !found ) { // not found, get setting from backup - settingsFromBackUp.Append( currentInfo ); + settingsFromBackUp.AppendL( currentInfo ); currentSettings.Remove( i ); - i--; + --i; } else { @@ -312,12 +340,14 @@ // add settings from backup to settings for ( TInt i = 0; i < settingsFromBackUp.Count(); i++ ) { - aPsmConfigArray.Append( settingsFromBackUp[ i ] ); + //Ignore the error returned by Append + aPsmConfigArray.Append( settingsFromBackUp[ i ]); } // Cleanup config arrays CleanupStack::PopAndDestroy( &settingsFromBackUp ); CleanupStack::PopAndDestroy( &settingsToBackUp ); + CleanupStack::Pop( iBackupStorage ); CleanupStack::PopAndDestroy( ¤tSettings ); User::LeaveIfError( err ); @@ -348,15 +378,19 @@ CleanupClosePushL( psmConfigArray ); const TUint32 repository = passiveConfigs[i]; - + //Close Cenrep handler in case of any error + CleanupStack::PushL(TCleanupItem(CleanupStorage, iCenRepStorage)); iCenRepStorage->InitStorageL( repository ); if ( EPsmsrvModeNormal == iMode ) { + //Close Cenrep handler in case of any error + CleanupStack::PushL(TCleanupItem(CleanupBackupStorage, iBackupStorage)); // Moving to normal mode, get passive config set from baskup storage iBackupStorage->InitStorageL( repository ); iBackupStorage->ListPassiveConfigSetL( psmConfigArray ); iBackupStorage->CloseStorageL(); + CleanupStack::Pop( iBackupStorage ); } else { @@ -369,6 +403,7 @@ // close storage iCenRepStorage->CloseStorageL(); + CleanupStack::Pop( iCenRepStorage ); CleanupStack::PopAndDestroy( &psmConfigArray ); } diff -r d6b9e89d80a3 -r 0f7422b6b602 psmservices/psmserver/src/engine/psmstorage.cpp --- a/psmservices/psmserver/src/engine/psmstorage.cpp Tue Aug 10 14:46:45 2010 +0300 +++ b/psmservices/psmserver/src/engine/psmstorage.cpp Mon Aug 23 14:47:20 2010 +0300 @@ -204,7 +204,7 @@ } // Add info to list - aPsmConfigArray.Append( configInfo ); + aPsmConfigArray.AppendL( configInfo ); // handle next element set setElement = nodeList.Next().AsElement(); diff -r d6b9e89d80a3 -r 0f7422b6b602 psmservices/psmserver/src/server/psmsrvmessage.cpp --- a/psmservices/psmserver/src/server/psmsrvmessage.cpp Tue Aug 10 14:46:45 2010 +0300 +++ b/psmservices/psmserver/src/server/psmsrvmessage.cpp Mon Aug 23 14:47:20 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" @@ -154,4 +154,13 @@ COMPONENT_TRACE( ( _L( "PSM Server - CPsmMessage::NotifyPsmModeChangeComplete - return" ) ) ); } +// ----------------------------------------------------------------------------- +// CPsmMessage::MessageHandle +// ----------------------------------------------------------------------------- +// +TInt CPsmMessage::MessageHandle() const + { + return iMessage.Handle(); + } + // End of file diff -r d6b9e89d80a3 -r 0f7422b6b602 psmservices/psmserver/src/server/psmsrvsession.cpp --- a/psmservices/psmserver/src/server/psmsrvsession.cpp Tue Aug 10 14:46:45 2010 +0300 +++ b/psmservices/psmserver/src/server/psmsrvsession.cpp Mon Aug 23 14:47:20 2010 +0300 @@ -14,7 +14,8 @@ * Description: PSM Server session * */ - +#include +#include #include #include #include @@ -111,9 +112,6 @@ COMPONENT_TRACE( ( _L( "PSM Server - CPsmSession::~CPsmSession - No pending requests") ) ); } - // Reset and close config array - iConfigArray.Reset(); - iConfigArray.Close(); COMPONENT_TRACE( ( _L( "PSM Server - CPsmSession::~CPsmSession - return") ) ); } @@ -125,41 +123,28 @@ void CPsmSession::ServiceL( const RMessage2& aMessage ) { COMPONENT_TRACE( ( _L( "PSM Server - CPsmSession::ServiceL()" ) ) ); - - TRAPD( error, DispatchL( aMessage ) ); - - // Complete message with error code if there were errors - if ( KErrNone != error ) - { - COMPONENT_TRACE( ( _L( "PSM Server - CPsmSession::ServiceL() - Error: %i" ), error ) ); - aMessage.Complete( error ); - } - - COMPONENT_TRACE( ( _L( "PSM Server - CPsmSession::ServiceL - return" ) ) ); - } - -// ----------------------------------------------------------------------------- -// CPsmSession::DispatchL -// ----------------------------------------------------------------------------- -// -void CPsmSession::DispatchL( const RMessage2& aMessage ) - { - COMPONENT_TRACE( ( _L( "PSM Server - CPsmSession::DispatchL()" ) ) ); - switch ( aMessage.Function() ) { case EPsmServerNotifyModeChange: // For power save mode change { TInt mode = aMessage.Int0(); - if ( !iNotifyModeMessage ) - { - // Create message wrapper if not yet created - iNotifyModeMessage = CPsmMessage::NewL( iPsmManager ); - iPsmManager.RegisterObserver( iNotifyModeMessage ); - } - - // Check that mode to be set is valid, otherwise error code. - if( mode == iPsmManager.SettingsProvider().Mode() ) + if ( !iNotifyModeMessage ) + { + // Create message wrapper if not yet created + CPsmMessage* notifyModeMessage = CPsmMessage::NewL( iPsmManager ); + CleanupStack::PushL(notifyModeMessage); + iPsmManager.RegisterObserverL( notifyModeMessage ); + CleanupStack::Pop(notifyModeMessage); + iNotifyModeMessage = notifyModeMessage; + } + + //Check whether the mode is already set . + TInt cenrepMode( 0 ); + CRepository* cenrep = CRepository::NewLC( KCRUidPowerSaveMode ); + User::LeaveIfError(cenrep->Get( KPsmCurrentMode, cenrepMode )); + CleanupStack::PopAndDestroy( cenrep ); + // Check that mode to be set is valid, otherwise error code. + if( mode == cenrepMode ) { User::Leave( KErrAlreadyExists ); } @@ -188,12 +173,6 @@ case EPsmServerGetSettings: // For PSM settings case EPsmServerBackupSettings: // For PSM settings { - // Check previous config - if ( iConfigArray.Count() > 0 ) - { - iConfigArray.Reset(); - } - // Handle settings requests in different function HandleSettingsRequestL( aMessage ); break; @@ -224,8 +203,11 @@ if ( !iNotifyModeMessage ) { // Create message wrapper if not yet created - iNotifyModeMessage = CPsmMessage::NewL( iPsmManager ); - iPsmManager.RegisterObserver( iNotifyModeMessage ); + CPsmMessage* notifyModeMessage = CPsmMessage::NewL( iPsmManager ); + CleanupStack::PushL(notifyModeMessage); + iPsmManager.RegisterObserverL( notifyModeMessage ); + CleanupStack::Pop(notifyModeMessage); + iNotifyModeMessage = notifyModeMessage; } iNotifyModeMessage->Initialize( aMessage ); break; @@ -247,16 +229,78 @@ aMessage.Complete( KErrNone ); break; } +#ifdef _DEBUG + case EDebugHeapMark: + { + COMPONENT_TRACE( ( _L( "PSM Server - CPsmSession - EDebugMarkHeap: Alloc Cells: %d."), User::CountAllocCells())); + __UHEAP_MARK; + aMessage.Complete(KErrNone); + break; + } + + case EDebugHeapMarkEnd: + { + COMPONENT_TRACE( ( _L( "PSM Server - CPsmSession - EDebugMarkHeapEnd: Alloc Cells: %d."), User::CountAllocCells())); + if ( iNotifyModeMessage ) + { + // Unregister observer from manager + iPsmManager.UnregisterObserver( iNotifyModeMessage ); + // Compress the observer array + iPsmManager.CompressModeObserversArray(); + // Finally delete message + delete iNotifyModeMessage; + iNotifyModeMessage = NULL; + } + iPsmManager.ClosePluginLoader(); + __UHEAP_MARKEND; + aMessage.Complete(KErrNone); + break; + } + + case EDebugSetHeapFailure: + { + COMPONENT_TRACE( ( _L( "PSM Server - CPsmSession - EDebugSetHeapFailure: Value of Failure Rate: %d."), aMessage.Int0())); + __UHEAP_SETFAIL(RAllocator::EFailNext,aMessage.Int0()); + aMessage.Complete(KErrNone); + break; + } + + case EDebugHeapReset: + { + COMPONENT_TRACE( ( _L( "PSM Server - CPsmSession - EDebugHeapReset "))); + __UHEAP_RESET; + aMessage.Complete(KErrNone); + break; + } +#endif default: { COMPONENT_TRACE( ( _L( "PSM Server - CPsmSession::ServiceL() - unknown request: %i - ERROR" ), aMessage.Function() ) ); User::Leave( KErrUnknown ); } } + COMPONENT_TRACE( ( _L( "PSM Server - CPsmSession::ServiceL - return" ) ) ); + } - COMPONENT_TRACE( ( _L( "PSM Server - CPsmSession::DispatchL - return" ) ) ); +// ----------------------------------------------------------------------------- +// CPsmSession::ServiceError +// ----------------------------------------------------------------------------- +// +void CPsmSession::ServiceError(const RMessage2 &aMessage, TInt aError) + { + // Complete message with error code if there were errors + COMPONENT_TRACE( ( _L( "PSM Server - CPsmSession::ServiceError() - Error: %i" ), aError ) ); + if (iNotifyModeMessage && (aMessage.Handle() == iNotifyModeMessage->MessageHandle()) ) + { + iNotifyModeMessage->Complete( aError ); + } + else + { + aMessage.Complete( aError ); + } } + // ----------------------------------------------------------------------------- // CPsmSession::HandleSettingsRequestL // ----------------------------------------------------------------------------- @@ -265,37 +309,62 @@ { COMPONENT_TRACE( ( _L( "PSM Server - CPsmSession::HandleSettingsRequestL()" ) ) ); + RConfigInfoArray configArray; + CleanupClosePushL(configArray); // read config array from message - ReadConfigArrayL( iConfigArray, aMessage ); + ReadConfigArrayL( configArray, aMessage ); // Get storage UID TUint32 storage = aMessage.Int2(); TInt err( KErrNone ); - if ( aMessage.Function() == EPsmServerBackupSettings ) + switch ( aMessage.Function() ) { - iPsmManager.SettingsProvider().BackupSettingsL( iConfigArray, storage ); - } - else - { - if ( aMessage.Function() == EPsmServerGetSettings ) + case EPsmServerBackupSettings: // For server backup settings { - iPsmManager.SettingsProvider().GetSettingsL( iConfigArray, storage ); + iPsmManager.SettingsProvider().BackupSettingsL( configArray, storage ); + break; } - else + case EPsmServerGetSettings: // For getting server settingspower save mode change { - // EPsmServerChangeSettings - iPsmManager.SettingsProvider().BackupAndGetSettingsL( iConfigArray, storage ); + iPsmManager.SettingsProvider().GetSettingsL( configArray, storage ); + // check whether the configArray is empty before writing the value back to message. + if(configArray.Count() > 0) + { + // write changed values back to message + TInt arraySize( configArray.Count() * sizeof( TPsmsrvConfigInfo ) ); + TPtr8 arrayPtr( reinterpret_cast(&configArray[0]), arraySize, arraySize ); + err = aMessage.Write( 0, arrayPtr ); + COMPONENT_TRACE( ( _L( "PSM Server - CPsmSession::HandleSettingsRequestL - New data wrote to message: %i" ), err ) ); + } + else + { + ERROR_TRACE( ( _L( "PSM Server - CPsmSession::HandleSettingsRequestL - Config Array is Empty" )) ); + } + break; } - - // We have to write changed values back to message - TInt arraySize( iConfigArray.Count() * sizeof( TPsmsrvConfigInfo ) ); - TPtr8 arrayPtr( reinterpret_cast(&iConfigArray[0]), arraySize, arraySize ); - err = aMessage.Write( 0, arrayPtr ); - ERROR_TRACE( ( _L( "PSM Server - CPsmSession::HandleSettingsRequestL - New data wrote to message: %i" ), err ) ); + case EPsmServerChangeSettings: // For changing the settings + { + // We have to write changed values back to message + iPsmManager.SettingsProvider().BackupAndGetSettingsL( configArray, storage ); + // We have to write changed values back to message + TInt arraySize( configArray.Count() * sizeof( TPsmsrvConfigInfo ) ); + TPtr8 arrayPtr( reinterpret_cast(&configArray[0]), arraySize, arraySize ); + err = aMessage.Write( 0, arrayPtr ); + ERROR_TRACE( ( _L( "PSM Server - CPsmSession::HandleSettingsRequestL - New data wrote to message: %i" ), err ) ); + break; + } + default: + { + COMPONENT_TRACE( ( _L( "PSM Server - CPsmSession::HandleSettingsRequestL() - unknown request: %i - ERROR" ), aMessage.Function() ) ); + User::Leave( KErrUnknown ); + } } // Complete message before destroying local config array aMessage.Complete( err ); + + CleanupStack::PopAndDestroy(&configArray); + COMPONENT_TRACE( ( _L( "PSM Server - CPsmSession::HandleSettingsRequestL - return" ) ) ); } @@ -310,10 +379,8 @@ const TInt configCount( aMessage.Int1() ); TInt arrayLength( configCount * sizeof( TPsmsrvConfigInfo ) ); - // There is no ResizeL() for RArray - // ReserveL() does not change iCount, which will - // result array[0] failure (access beyond array index) - // That is why we fill the array with dummy items + aArray.ReserveL(configCount); + //Fill the array with dummy items for(TInt x = 0; x < configCount; ++x ) { // Append empty config infos to array diff -r d6b9e89d80a3 -r 0f7422b6b602 psmservices/psmserver/tsrc/PsmTestModule/conf/PsmTestModule.cfg --- a/psmservices/psmserver/tsrc/PsmTestModule/conf/PsmTestModule.cfg Tue Aug 10 14:46:45 2010 +0300 +++ b/psmservices/psmserver/tsrc/PsmTestModule/conf/PsmTestModule.cfg Mon Aug 23 14:47:20 2010 +0300 @@ -648,3 +648,51 @@ delete test [Endtest] +[Test] +title OOM_PSM to power save mode +create PsmTestModule test +test OOMChangePsmInit FullPsm +test ChangePsmEnd +delete test +[Endtest] + +[Test] +title OOM_Cancel PSM change +create PsmTestModule test +test OOMCancelPsm +pause 1000 +test ChangePsmEnd +delete test +[Endtest] + +[Test] +title OOM_BackupAndGetSettings +create PsmTestModule test +test ChangeSettingsInit Normal +test OOMBackupAndGetSettings +pause 1000 +test ChangePsmEnd +delete test +[Endtest] + +[Test] +title OOM_GetSettings +create PsmTestModule test +test ChangeSettingsInit Normal +test OOMGetSettings +pause 1000 +test ChangePsmEnd +delete test +[Endtest] + +[Test] +title OOM_BackupSettings +create PsmTestModule test +test ChangeSettingsInit Normal +test OOMBackupSettings +pause 1000 +test ChangePsmEnd +delete test +[Endtest] + + diff -r d6b9e89d80a3 -r 0f7422b6b602 psmservices/psmserver/tsrc/PsmTestModule/group/PsmTestModule.mmp --- a/psmservices/psmserver/tsrc/PsmTestModule/group/PsmTestModule.mmp Tue Aug 10 14:46:45 2010 +0300 +++ b/psmservices/psmserver/tsrc/PsmTestModule/group/PsmTestModule.mmp Mon Aug 23 14:47:20 2010 +0300 @@ -37,6 +37,8 @@ //RESOURCE resource_file2 USERINCLUDE ../inc +USERINCLUDE ../../../inc/client +USERINCLUDE ../../../inc/util OS_LAYER_SYSTEMINCLUDE diff -r d6b9e89d80a3 -r 0f7422b6b602 psmservices/psmserver/tsrc/PsmTestModule/inc/PSMTest.h --- a/psmservices/psmserver/tsrc/PsmTestModule/inc/PSMTest.h Tue Aug 10 14:46:45 2010 +0300 +++ b/psmservices/psmserver/tsrc/PsmTestModule/inc/PSMTest.h Mon Aug 23 14:47:20 2010 +0300 @@ -266,6 +266,13 @@ // From MPsmChangeCompleteObserver virtual void PowerSaveModeChangeError( const TInt aError ); +#ifdef _DEBUG + TInt OOMNotifyPowerSaveModeChangeInitL( CStifItemParser& aItem ); + TInt OOMCancelPowerSaveModeChangeL( CStifItemParser& aItem ); + TInt OOMPsmBackupAndGetSettingsL( CStifItemParser& /*aItem*/ ); + TInt OOMPsmGetSettingsL( CStifItemParser& /*aItem*/ ); + TInt OOMPsmBackupSettingsL( CStifItemParser& /*aItem*/ ); +#endif //_DEBUG public: // Data // ?one_line_short_description_of_data diff -r d6b9e89d80a3 -r 0f7422b6b602 psmservices/psmserver/tsrc/PsmTestModule/src/PSMTestBlocks.cpp --- a/psmservices/psmserver/tsrc/PsmTestModule/src/PSMTestBlocks.cpp Tue Aug 10 14:46:45 2010 +0300 +++ b/psmservices/psmserver/tsrc/PsmTestModule/src/PSMTestBlocks.cpp Mon Aug 23 14:47:20 2010 +0300 @@ -28,7 +28,7 @@ #include #include - +#include "psmclientimpl.h" #include "PSMTest.h" @@ -126,7 +126,16 @@ ENTRY( "OpenClosePerformanceChange", CPSMTest::OpenClosePerformanceChange ), ENTRY( "OpenClosePerformanceEnd", CPSMTest::OpenClosePerformanceEnd ), ENTRY( "ChangePsmPerformance", CPSMTest::ChangePsmPerformance ), - ENTRY( "ChangeSettingsPerformance", CPSMTest::ChangeSettingsPerformance ) + +#ifdef _DEBUG + //OOM tests for psm server + ENTRY( "OOMChangePsmInit", CPSMTest::OOMNotifyPowerSaveModeChangeInitL ), + ENTRY( "OOMCancelPsm", CPSMTest::OOMCancelPowerSaveModeChangeL ), + ENTRY( "OOMBackupAndGetSettings", CPSMTest::OOMPsmBackupAndGetSettingsL ), + ENTRY( "OOMGetSettings", CPSMTest::OOMPsmGetSettingsL ), + ENTRY( "OOMBackupSettings", CPSMTest::OOMPsmBackupSettingsL ), +#endif //_DEBUG + ENTRY( "ChangeSettingsPerformance", CPSMTest::ChangeSettingsPerformance ) }; const TInt count = sizeof( KFunctions ) / @@ -1242,6 +1251,160 @@ // CPSMTestObserver::~CPSMTestObserver() { - } + } */ +#ifdef _DEBUG +// ----------------------------------------------------------------------------- +// CPSMTest::OOMNotifyPowerSaveModeChangeInit +// ----------------------------------------------------------------------------- +// +TInt CPSMTest::OOMNotifyPowerSaveModeChangeInitL(CStifItemParser& /*aItem*/) + { + CPsmClient* psmClient = CPsmClient::NewL( *this ); + CleanupStack::PushL(psmClient); + CPsmClientImpl* psmImpl = static_cast (psmClient); + psmImpl->HeapReset(); + psmImpl->HeapMark(); + for (TInt allocFailRate = 1;; allocFailRate++) + { + psmImpl->SetHeapFailure( allocFailRate ); + psmImpl->ChangePowerSaveMode(1); + // Wait for mode to change + iSchedulerWait.Start(); + + if (iErrorCode == KErrNone) + { + iErrorCode = KErrNone; + break; + } + } + psmImpl->HeapMarkEnd(); + psmImpl->HeapReset(); + CleanupStack::PopAndDestroy(psmClient); + return KErrNone; + } + +// ----------------------------------------------------------------------------- +// CPSMTest::OOMCancelPowerSaveModeChange +// ----------------------------------------------------------------------------- +// +TInt CPSMTest::OOMCancelPowerSaveModeChangeL( CStifItemParser& /*aItem*/ ) + { + CPsmClient* psmClient = CPsmClient::NewL( *this ); + CleanupStack::PushL(psmClient); + CPsmClientImpl* psmImpl = static_cast (psmClient); + psmImpl->ChangePowerSaveMode(0); + for (TInt allocFailRate = 1;; allocFailRate++) + { + psmImpl->HeapReset(); + psmImpl->SetHeapFailure( allocFailRate ); + psmImpl->HeapMark(); + psmImpl->CancelPowerSaveModeChange(); + // Wait for mode to change + iSchedulerWait.Start(); + psmImpl->HeapMarkEnd(); + if (iErrorCode == KErrNone ) + { + iErrorCode = KErrNone; + psmImpl->HeapReset(); + break; + } + } + CleanupStack::PopAndDestroy(psmClient); + return KErrNone; + } + + +// ----------------------------------------------------------------------------- +// CPSMTest::OOMPsmBackupAndGetSettings +// ----------------------------------------------------------------------------- +// +TInt CPSMTest::OOMPsmBackupAndGetSettingsL( CStifItemParser& /*aItem*/ ) + { + CPsmClient* psmClient = CPsmClient::NewL( *this ); + CleanupStack::PushL(psmClient); + + CPsmClientImpl* psmImpl = static_cast (psmClient); + psmImpl->HeapReset(); + psmImpl->HeapMark(); + for (TInt allocFailRate = 1;; allocFailRate++) + { + + psmImpl->SetHeapFailure( allocFailRate ); + + TInt err = psmImpl->PsmSettings().BackupAndGetSettings( iPsmConfigArray, KCenRepUid2 ); + + if (err == KErrNone) + { + + break; + } + } + psmImpl->HeapMarkEnd(); + psmImpl->HeapReset(); + CleanupStack::PopAndDestroy(psmClient); + return KErrNone; + } + +// ----------------------------------------------------------------------------- +// CPSMTest::OOMPsmGetSettings +// ----------------------------------------------------------------------------- +// +TInt CPSMTest::OOMPsmGetSettingsL( CStifItemParser& /*aItem*/ ) + { + CPsmClient* psmClient = CPsmClient::NewL( *this ); + CleanupStack::PushL(psmClient); + CPsmClientImpl* psmImpl = static_cast (psmClient); + + for (TInt allocFailRate = 1;; allocFailRate++) + { + psmImpl->HeapReset(); + psmImpl->SetHeapFailure( allocFailRate ); + psmImpl->HeapMark(); + TInt err = psmImpl->PsmSettings().GetSettings( iPsmConfigArray, KCenRepUid2 ); + psmImpl->HeapMarkEnd(); + if (err == KErrNone) + { + psmImpl->HeapReset(); + break; + } + } + CleanupStack::PopAndDestroy(psmClient); + return KErrNone; + } + +// ----------------------------------------------------------------------------- +// CPSMTest::OOMPsmBackupSettings +// ----------------------------------------------------------------------------- +// +TInt CPSMTest::OOMPsmBackupSettingsL( CStifItemParser& /*aItem*/ ) + { + CPsmClient* psmClient = CPsmClient::NewL( *this ); + CleanupStack::PushL(psmClient); + CPsmClientImpl* psmImpl = static_cast (psmClient); + //IGNORE the error of Powersave mode request. If Powersave mode is not enabled the Backupsettings will fail with KErrWrite. + psmImpl->ChangePowerSaveMode(1); + iSchedulerWait.Start(); + RConfigInfoArray psmConfigArray; + GenerateConfigArray( psmConfigArray, EPsmsrvModePowerSave, 0 ); + psmImpl->HeapReset(); + psmImpl->HeapMark(); + for (TInt allocFailRate = 1;; allocFailRate++) + { + psmImpl->SetHeapFailure( allocFailRate ); + TInt err = psmImpl->PsmSettings().BackupSettings( psmConfigArray, KCenRepUid2 ); + iLog->Log( _L("PSMTest: BackupSettings- iPsmConfigArray.Count(): %d"), psmConfigArray.Count() ); + if (err == KErrNone) + { + break; + } + } + psmImpl->HeapMarkEnd(); + psmImpl->HeapReset(); + psmConfigArray.Close(); + CleanupStack::PopAndDestroy(psmClient); + return KErrNone; + } + +#endif //_DEBUG // End of File diff -r d6b9e89d80a3 -r 0f7422b6b602 resourcemgmt/data/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/resourcemgmt/data/bld.inf Mon Aug 23 14:47:20 2010 +0300 @@ -0,0 +1,29 @@ +/* +* 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: Hardware Resource Manager data files +* +*/ + +#include + +PRJ_PLATFORMS +DEFAULT + +PRJ_EXPORTS +InternalHWRMLightsPolicy.ini z:/private/101f7a02/customerhwrmlightspolicy.ini +InternalHWRMVibraPolicy.ini z:/private/101f7a02/customerhwrmvibrapolicy.ini +InternalHWRMFmTxPolicy.ini z:/private/101f7a02/customerhwrmfmtxpolicy.ini + + +// End of File diff -r d6b9e89d80a3 -r 0f7422b6b602 resourcemgmt/group/bld.inf --- a/resourcemgmt/group/bld.inf Tue Aug 10 14:46:45 2010 +0300 +++ b/resourcemgmt/group/bld.inf Mon Aug 23 14:47:20 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2002-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" @@ -21,22 +21,13 @@ DEFAULT PRJ_EXPORTS -../data/InternalHWRMLightsPolicy.ini z:/private/101f7a02/customerhwrmlightspolicy.ini -../data/InternalHWRMVibraPolicy.ini z:/private/101f7a02/customerhwrmvibrapolicy.ini -../data/InternalHWRMFmTxPolicy.ini z:/private/101f7a02/customerhwrmfmtxpolicy.ini - +#include "../data/bld.inf" #include "../hwresourcesmgr/group/bld.inf" #include "../hwresourcesmgrconfig/bld.inf" #include "../powerandmemorynotificationservice/group/bld.inf" #include "../hwrmfmtxwatcherplugin/group/bld.inf" - -#if defined(WINSCW) && !defined(__HWRM_TARGET_MODIFIER_PLUGIN) -// Do nothing -#else #include "../hwrmtargetmodifierplugin/group/bld.inf" -#endif - #include "../vibractrl/group/bld.inf" // End of File diff -r d6b9e89d80a3 -r 0f7422b6b602 resourcemgmt/hwresourcesmgrconfig/bld.inf --- a/resourcemgmt/hwresourcesmgrconfig/bld.inf Tue Aug 10 14:46:45 2010 +0300 +++ b/resourcemgmt/hwresourcesmgrconfig/bld.inf Mon Aug 23 14:47:20 2010 +0300 @@ -34,3 +34,5 @@ ./conf/hwresourcesandenhancements_1020506A.crml OS_LAYER_EXPORTS_CRML(hwresourcesandenhancements_1020506a.crml) ./conf/hwresourcesandenhancements_10200C8D.crml OS_LAYER_EXPORTS_CRML(hwresourcesandenhancements_10200c8d.crml) +// Customization interface confml file +./conf/ci_hwresourcesandenhancements.confml OS_LAYER_EXPORTS_CONFML(ci_hwresourcesandenhancements.confml) diff -r d6b9e89d80a3 -r 0f7422b6b602 resourcemgmt/hwresourcesmgrconfig/conf/ci_hwresourcesandenhancements.confml Binary file resourcemgmt/hwresourcesmgrconfig/conf/ci_hwresourcesandenhancements.confml has changed diff -r d6b9e89d80a3 -r 0f7422b6b602 resourcemgmt/hwresourcesmgrconfig/conf/hwresourcesandenhancements.confml Binary file resourcemgmt/hwresourcesmgrconfig/conf/hwresourcesandenhancements.confml has changed diff -r d6b9e89d80a3 -r 0f7422b6b602 resourcemgmt/hwrmtargetmodifierplugin/group/bld.inf --- a/resourcemgmt/hwrmtargetmodifierplugin/group/bld.inf Tue Aug 10 14:46:45 2010 +0300 +++ b/resourcemgmt/hwrmtargetmodifierplugin/group/bld.inf Mon Aug 23 14:47:20 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008 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,10 @@ * build information file * */ +#if defined(WINSCW) && !defined(__HWRM_TARGET_MODIFIER_PLUGIN) +// Do nothing +#else + #include PRJ_PLATFORMS @@ -26,5 +30,5 @@ PRJ_MMPFILES ../group/hwrmdefaultlighttargetmodifierplugin.mmp - +#endif // End of File diff -r d6b9e89d80a3 -r 0f7422b6b602 sensorservices/orientationssy/inc/OrientationCRListener.h --- a/sensorservices/orientationssy/inc/OrientationCRListener.h Tue Aug 10 14:46:45 2010 +0300 +++ b/sensorservices/orientationssy/inc/OrientationCRListener.h Mon Aug 23 14:47:20 2010 +0300 @@ -87,7 +87,7 @@ class MCenRepCallBack { public: - virtual void CreateConfigurations() = 0; + virtual TInt CreateConfigurations() = 0; }; #endif // ORIENTATIONCRLISTENER_H diff -r d6b9e89d80a3 -r 0f7422b6b602 sensorservices/orientationssy/inc/SsyOrientation.h --- a/sensorservices/orientationssy/inc/SsyOrientation.h Tue Aug 10 14:46:45 2010 +0300 +++ b/sensorservices/orientationssy/inc/SsyOrientation.h Mon Aug 23 14:47:20 2010 +0300 @@ -104,14 +104,14 @@ /** * Create configurations for angles and timers */ - void CreateConfigurations(); + TInt CreateConfigurations(); /** * Used for creating configuration for angle definitions * * @param aConfigurationForState the configuration to set. */ - void SetConfigurationForState( + TInt SetConfigurationForState( const TOrientationConfiguration& aConfigurationForState ); diff -r d6b9e89d80a3 -r 0f7422b6b602 sensorservices/orientationssy/src/OrientationCRListener.cpp --- a/sensorservices/orientationssy/src/OrientationCRListener.cpp Tue Aug 10 14:46:45 2010 +0300 +++ b/sensorservices/orientationssy/src/OrientationCRListener.cpp Mon Aug 23 14:47:20 2010 +0300 @@ -91,7 +91,7 @@ SSY_TRACE( EExtended, "ORIENTATIONSSY:RunL::Key %d changed", iStatus.Int() ); iRepository->NotifyRequest( iStatus.Int(), iStatus ); - iCallBack.CreateConfigurations(); + User::LeaveIfError(iCallBack.CreateConfigurations()); if( !IsActive() ) { diff -r d6b9e89d80a3 -r 0f7422b6b602 sensorservices/orientationssy/src/SsyChannel.cpp --- a/sensorservices/orientationssy/src/SsyChannel.cpp Tue Aug 10 14:46:45 2010 +0300 +++ b/sensorservices/orientationssy/src/SsyChannel.cpp Mon Aug 23 14:47:20 2010 +0300 @@ -208,7 +208,12 @@ // CSSYChannel::RunError() // ---------------------------------------------------------------------------------- // +#ifdef _DEBUG TInt CSSYChannel::RunError( TInt aError ) +#else +// not used in UREL builds +TInt CSSYChannel::RunError( TInt /*aError*/ ) +#endif { SSY_TRACE( EMust, "ORIENTATIONSSY:RunError %d", aError ); diff -r d6b9e89d80a3 -r 0f7422b6b602 sensorservices/orientationssy/src/SsyControlOrientation.cpp --- a/sensorservices/orientationssy/src/SsyControlOrientation.cpp Tue Aug 10 14:46:45 2010 +0300 +++ b/sensorservices/orientationssy/src/SsyControlOrientation.cpp Mon Aug 23 14:47:20 2010 +0300 @@ -224,8 +224,8 @@ if ( channel ) { - iChannelArray.Append( channel ); - channelInfoList.Append( channelInfo ); + User::LeaveIfError(iChannelArray.Append( channel )); + User::LeaveIfError(channelInfoList.Append( channelInfo)); } } diff -r d6b9e89d80a3 -r 0f7422b6b602 sensorservices/orientationssy/src/SsyOrientation.cpp --- a/sensorservices/orientationssy/src/SsyOrientation.cpp Tue Aug 10 14:46:45 2010 +0300 +++ b/sensorservices/orientationssy/src/SsyOrientation.cpp Mon Aug 23 14:47:20 2010 +0300 @@ -186,7 +186,7 @@ void CSSYOrientation::ConstructL() { iRepository = CRepository::NewL( KCRUidOrientationSsySettings ); - CreateConfigurations(); + User::LeaveIfError(CreateConfigurations()); #ifdef AUTO_ORIENTAION_TEST iCRListener = CSsyOrientationCRListener::NewL( *this, iRepository ); @@ -1090,11 +1090,13 @@ // CSSYOrientation::SetConfigurationForState() // ---------------------------------------------------------------------------------- // -void CSSYOrientation::SetConfigurationForState( +TInt CSSYOrientation::SetConfigurationForState( const TOrientationConfiguration& aConfigurationForState ) { SSY_TRACE_IN(); TBool wasFound( EFalse ); + TInt retVal( KErrNone ); + // Check if is in array for( TInt i = 0; i != iConfigArray.Count(); i++ ) { @@ -1102,15 +1104,17 @@ if( aConfigurationForState.iOrientationState == iConfigArray[ i ].iOrientationState ) { iConfigArray.Remove( i ); - iConfigArray.Insert( aConfigurationForState, i ); + retVal = iConfigArray.Insert( aConfigurationForState, i ); wasFound = ETrue; } } if( !wasFound ) { - iConfigArray.Append( aConfigurationForState ); + retVal = iConfigArray.Append( aConfigurationForState ); } + SSY_TRACE_OUT(); + return retVal; } // ---------------------------------------------------------------------------------- @@ -1139,11 +1143,12 @@ // CSSYOrientation::CreteConfigurations() // ---------------------------------------------------------------------------------- // -void CSSYOrientation::CreateConfigurations() +TInt CSSYOrientation::CreateConfigurations() { SSY_TRACE_IN(); TInt repValue( 0 ); + TInt retVal( KErrNone ); // This is used in initialisation if( iConfigForCurrentState.iOrientationState == TSensrvOrientationData::EOrientationUndefined ) @@ -1208,7 +1213,13 @@ SSY_TRACE( EExtended, "ORIENTATIONSSY:CreteConfigurations::EOrientationDisplayUp.iOrientationDisplayDownwards.iTimerValueInMilSeconds=%d", repValue ); configForDisplayUp.iOrientationDisplayDownwards.iTimerValueInMilSeconds = repValue; - SetConfigurationForState( configForDisplayUp ); + retVal = SetConfigurationForState( configForDisplayUp ); + if( retVal != KErrNone) + { + SSY_TRACE( EExtended, "ORIENTATIONSSY:SetConfigurationForState(configForDisplayUp)=%d", retVal); + SSY_TRACE_OUT(); + return retVal; + } // Configuration for display down TOrientationConfiguration configForDisplayDown; @@ -1256,7 +1267,14 @@ iRepository->Get( KOriStateDisplayDownToDisplayDownwardsTimerKey, repValue ); SSY_TRACE( EExtended, "ORIENTATIONSSY:CreteConfigurations::EOrientationDisplayDown.iOrientationDisplayDownwards.iTimerValueInMilSeconds=%d", repValue ); configForDisplayDown.iOrientationDisplayDownwards.iTimerValueInMilSeconds = repValue; - SetConfigurationForState( configForDisplayDown ); + + retVal = SetConfigurationForState( configForDisplayDown); + if( retVal != KErrNone) + { + SSY_TRACE( EExtended, "ORIENTATIONSSY:SetConfigurationForState(configForDisplayDown)=%d", retVal); + SSY_TRACE_OUT(); + return retVal; + } // Configuration for left up TOrientationConfiguration configForDisplayLeftUp; @@ -1304,7 +1322,14 @@ iRepository->Get( KOriStateDisplayLeftUpToDisplayDownwardsTimerKey, repValue ); SSY_TRACE( EExtended, "ORIENTATIONSSY:CreteConfigurations::EOrientationDisplayLeftUp.iOrientationDisplayDownwards.iTimerValueInMilSeconds=%d", repValue ); configForDisplayLeftUp.iOrientationDisplayDownwards.iTimerValueInMilSeconds = repValue; - SetConfigurationForState( configForDisplayLeftUp ); + + retVal = SetConfigurationForState( configForDisplayLeftUp ); + if( retVal != KErrNone) + { + SSY_TRACE( EExtended, "ORIENTATIONSSY:SetConfigurationForState(configForDisplayLeftUp)=%d", retVal); + SSY_TRACE_OUT(); + return retVal; + } // Configuration for right up TOrientationConfiguration configForDisplayRightUp; @@ -1352,7 +1377,14 @@ iRepository->Get( KOriStateDisplayRightUpToDisplayDownwardsTimerKey, repValue ); SSY_TRACE( EExtended, "ORIENTATIONSSY:CreteConfigurations::EOrientationDisplayRightUp.iOrientationDisplayDownwards.iTimerValueInMilSeconds=%d", repValue ); configForDisplayRightUp.iOrientationDisplayDownwards.iTimerValueInMilSeconds = repValue; - SetConfigurationForState( configForDisplayRightUp ); + + retVal = SetConfigurationForState( configForDisplayRightUp ); + if( retVal != KErrNone) + { + SSY_TRACE( EExtended, "ORIENTATIONSSY:SetConfigurationForState( configForDisplayRightUp)=%d", retVal); + SSY_TRACE_OUT(); + return retVal; + } // Configuration for upwards TOrientationConfiguration configForDisplayUpwards; @@ -1400,7 +1432,14 @@ iRepository->Get( KOriStateDisplayUpwardsToDisplayDownwardsTimerKey, repValue ); SSY_TRACE( EExtended, "ORIENTATIONSSY:CreteConfigurations::EOrientationDisplayUpwards.iOrientationDisplayDownwards.iTimerValueInMilSeconds=%d", repValue ); configForDisplayUpwards.iOrientationDisplayDownwards.iTimerValueInMilSeconds = repValue; - SetConfigurationForState( configForDisplayUpwards ); + + retVal = SetConfigurationForState( configForDisplayUpwards); + if( retVal != KErrNone) + { + SSY_TRACE( EExtended, "ORIENTATIONSSY:SetConfigurationForState( configForDisplayUpwards)=%d", retVal); + SSY_TRACE_OUT(); + return retVal; + } // Configuration for downwards TOrientationConfiguration configForDisplayDownwards; @@ -1450,7 +1489,14 @@ configForDisplayDownwards.iOrientationDisplayDownwards.iAngle = 0; configForDisplayDownwards.iOrientationDisplayDownwards.iTimerValueInMilSeconds = 0; - SetConfigurationForState( configForDisplayDownwards ); + + retVal = SetConfigurationForState( configForDisplayDownwards); + if( retVal != KErrNone) + { + SSY_TRACE( EExtended, "ORIENTATIONSSY:SetConfigurationForState( configForDisplayDownwards)=%d", retVal); + SSY_TRACE_OUT(); + return retVal; + } if( iConfigForCurrentState.iOrientationState != TSensrvOrientationData::EOrientationUndefined ) { @@ -1459,6 +1505,7 @@ } SSY_TRACE_OUT(); + return retVal; } // ---------------------------------------------------------------------------------- diff -r d6b9e89d80a3 -r 0f7422b6b602 sensorservices/orientationssy/src/SsyProperty.cpp --- a/sensorservices/orientationssy/src/SsyProperty.cpp Tue Aug 10 14:46:45 2010 +0300 +++ b/sensorservices/orientationssy/src/SsyProperty.cpp Mon Aug 23 14:47:20 2010 +0300 @@ -52,7 +52,11 @@ for ( TInt index = 0; index < aNumberOfProperties ; index++ ) { - iChannelProperties.Append( aProperties[ index ] ); + if(iChannelProperties.Append( aProperties[ index ])!= KErrNone ) + { + iChannelProperties.Reset(); + break; + } } SSY_TRACE_OUT(); diff -r d6b9e89d80a3 -r 0f7422b6b602 sensorservices/sensorserver/inc/server/senserverchannel.h --- a/sensorservices/sensorserver/inc/server/senserverchannel.h Tue Aug 10 14:46:45 2010 +0300 +++ b/sensorservices/sensorserver/inc/server/senserverchannel.h Mon Aug 23 14:47:20 2010 +0300 @@ -281,18 +281,6 @@ CSensrvConditionEvaluator* ConditionEvaluatorL(); /** - * Get clients of this channel. The client identified by aCallerSecureId - * is not added to the affected clients list. - * - * @since S60 5.0 - * @param[in,out] aAffectedClients On return contains client - * processes priorities for this channel. - * @param[in] aCallerSecureId Identifies the listener which is filtered away. - */ - void GetAffectedClients( RArray& aAffectedClients, - TSecureId aCallerSecureId ); - - /** * Gets listener for session. * * @since S60 5.0 diff -r d6b9e89d80a3 -r 0f7422b6b602 sensorservices/sensorserver/src/server/sensrvchannel.cpp --- a/sensorservices/sensorserver/src/server/sensrvchannel.cpp Tue Aug 10 14:46:45 2010 +0300 +++ b/sensorservices/sensorserver/src/server/sensrvchannel.cpp Mon Aug 23 14:47:20 2010 +0300 @@ -82,6 +82,7 @@ { COMPONENT_TRACE( ( _L( "Sensor Server - CSensrvChannel::ConstructL()" ) ) ); + // coverity[SIZECHECK] iChannelQueue = CSensrvTransactionQueue::NewL( ETrue ); iChannelInfo.iChannelGroup = TSensrvResourceChannelInfo::ESensrvChannelGroupNotSolved; @@ -979,34 +980,7 @@ return previousLow; } -// --------------------------------------------------------------------------- -// CSensrvChannel::GetAffectedClients -// -// Client is considered as "affected" if the channel is opened by the client. -// When the channel is open, channel listener also exists. -// Priorities are queried from ChannelListener. -// --------------------------------------------------------------------------- -// -void CSensrvChannel::GetAffectedClients( RArray& aAffectedClients, - TSecureId aCallerSecureId ) - { - COMPONENT_TRACE( ( _L( "Sensor Server - CSensrvChannel::GetAffectedClients()" ) ) ); - TInt count(iListenerList.Count()); - for (TInt i=0; i < count; i++) - { - if (aCallerSecureId == iListenerList[i]->Session().SecureId() ) - { - //Filter away - } - else - { - aAffectedClients.Append( iListenerList[i]->Priority() ); - } - } - - COMPONENT_TRACE( ( _L( "Sensor Server - CSensrvChannel::GetAffectedClients - %d client(s) found - return" ), count ) ); - } // --------------------------------------------------------------------------- // Creates a new condition evaluator or returns an existing one. diff -r d6b9e89d80a3 -r 0f7422b6b602 sensorservices/sensorserver/src/server/sensrvpluginproxy.cpp --- a/sensorservices/sensorserver/src/server/sensrvpluginproxy.cpp Tue Aug 10 14:46:45 2010 +0300 +++ b/sensorservices/sensorserver/src/server/sensrvpluginproxy.cpp Mon Aug 23 14:47:20 2010 +0300 @@ -80,7 +80,8 @@ User::LeaveIfError(iMutex.CreateLocal()); iMutex.Wait(); - + + // coverity[SIZECHECK] iLoadWaitQueue = CSensrvTransactionQueue::NewL(ETrue); iTransactionMonitor = CSensrvTransactionMonitor::NewL(*this); diff -r d6b9e89d80a3 -r 0f7422b6b602 sensorservices/sensorserver/src/server/sensrvproxymanager.cpp --- a/sensorservices/sensorserver/src/server/sensrvproxymanager.cpp Tue Aug 10 14:46:45 2010 +0300 +++ b/sensorservices/sensorserver/src/server/sensrvproxymanager.cpp Mon Aug 23 14:47:20 2010 +0300 @@ -90,7 +90,10 @@ iServerShutdown = CSensrvShutdown::NewL( *this ); + // coverity[SIZECHECK] iWaitQueueQueryChannels = CSensrvTransactionQueue::NewL(ETrue); + + // coverity[SIZECHECK] iWaitQueueOpenChannel = CSensrvTransactionQueue::NewL(ETrue); // Create ecom changelistener, which will make the initial check for plugins diff -r d6b9e89d80a3 -r 0f7422b6b602 sensorservices/tiltcompensationssy/inc/tcsendeventtimer.h --- a/sensorservices/tiltcompensationssy/inc/tcsendeventtimer.h Tue Aug 10 14:46:45 2010 +0300 +++ b/sensorservices/tiltcompensationssy/inc/tcsendeventtimer.h Mon Aug 23 14:47:20 2010 +0300 @@ -72,8 +72,7 @@ // @see CActive TInt RunError( TInt aError ); public: - void Start( ); - + void Start(TInt aHrz ); private: // Private data for base channel // The timer object diff -r d6b9e89d80a3 -r 0f7422b6b602 sensorservices/tiltcompensationssy/inc/tcstatetiltlistendata.h --- a/sensorservices/tiltcompensationssy/inc/tcstatetiltlistendata.h Tue Aug 10 14:46:45 2010 +0300 +++ b/sensorservices/tiltcompensationssy/inc/tcstatetiltlistendata.h Mon Aug 23 14:47:20 2010 +0300 @@ -173,9 +173,6 @@ // Pointer to the timer CTCSendEventTimer* iTimerToSend; - // Flag that states if the property has changed - TBool iHasChanged; - // The requested amount of data TInt iRequestedDataCount; diff -r d6b9e89d80a3 -r 0f7422b6b602 sensorservices/tiltcompensationssy/src/tccenrepobserver.cpp --- a/sensorservices/tiltcompensationssy/src/tccenrepobserver.cpp Tue Aug 10 14:46:45 2010 +0300 +++ b/sensorservices/tiltcompensationssy/src/tccenrepobserver.cpp Mon Aug 23 14:47:20 2010 +0300 @@ -110,8 +110,13 @@ // CTCCenrepObserver::HandleNotifyError // ----------------------------------------------------------------------------- // +#ifdef _DEBUG void CTCCenrepObserver::HandleNotifyError( TUint32 /*aKey*/, TInt aError, CCenRepNotifyHandler* aHandler) +#else +void CTCCenrepObserver::HandleNotifyError( + TUint32 /*aKey*/, TInt /*aError*/, CCenRepNotifyHandler* aHandler) +#endif { ERROR_1( aError, "CTCCenrepObserver::HandleNotifyError - aError: %d ", aError ); diff -r d6b9e89d80a3 -r 0f7422b6b602 sensorservices/tiltcompensationssy/src/tcchanneltilt.cpp --- a/sensorservices/tiltcompensationssy/src/tcchanneltilt.cpp Tue Aug 10 14:46:45 2010 +0300 +++ b/sensorservices/tiltcompensationssy/src/tcchanneltilt.cpp Mon Aug 23 14:47:20 2010 +0300 @@ -898,8 +898,14 @@ // CTCChannelTilt::DataError // ---------------------------------------------------------------------------------- // +#ifdef _DEBUG void CTCChannelTilt::DataError( CSensrvChannel& /*aChannel*/, TSensrvErrorSeverity aError ) + +#else +void CTCChannelTilt::DataError( CSensrvChannel& /*aChannel*/, + TSensrvErrorSeverity /*aError*/ ) +#endif { FUNC_LOG; @@ -1150,8 +1156,14 @@ // CTCChannelTilt::PropertyChanged // ---------------------------------------------------------------------------------- // +#ifdef _DEBUG void CTCChannelTilt::PropertyError( CSensrvChannel& /*aChannel*/, TSensrvErrorSeverity aError ) +#else +// not used in UREL builds +void CTCChannelTilt::PropertyError( CSensrvChannel& /*aChannel*/, + TSensrvErrorSeverity /*aError*/ ) +#endif { FUNC_LOG; INFO_1( "Property error [%d]", aError ); @@ -1161,7 +1173,12 @@ // CTCChannelTilt::SetPropertySuccessIndicationChanged // ----------------------------------------------------------------------------- // +#ifdef _DEBUG void CTCChannelTilt::SetPropertySuccessIndicationChanged( TSetPropertySuccessIndicator aIndication ) +#else +// not used in UREL builds +void CTCChannelTilt::SetPropertySuccessIndicationChanged( TSetPropertySuccessIndicator /*aIndication*/ ) +#endif { FUNC_LOG; diff -r d6b9e89d80a3 -r 0f7422b6b602 sensorservices/tiltcompensationssy/src/tcsendeventtimer.cpp --- a/sensorservices/tiltcompensationssy/src/tcsendeventtimer.cpp Tue Aug 10 14:46:45 2010 +0300 +++ b/sensorservices/tiltcompensationssy/src/tcsendeventtimer.cpp Mon Aug 23 14:47:20 2010 +0300 @@ -75,8 +75,9 @@ User::LeaveIfError( ret ); iTimerToHzLevel = aSetTimerToHzLevel; } -void CTCSendEventTimer::Start() +void CTCSendEventTimer::Start(TInt aHrz) { + iTimerToHzLevel = aHrz; TTimeIntervalMicroSeconds32 interval( KOneSecondInMicroSeconds / iTimerToHzLevel ); if( !IsActive() ) diff -r d6b9e89d80a3 -r 0f7422b6b602 sensorservices/tiltcompensationssy/src/tcstatetiltidle.cpp --- a/sensorservices/tiltcompensationssy/src/tcstatetiltidle.cpp Tue Aug 10 14:46:45 2010 +0300 +++ b/sensorservices/tiltcompensationssy/src/tcstatetiltidle.cpp Mon Aug 23 14:47:20 2010 +0300 @@ -75,6 +75,7 @@ case EEventIdHandleOpenChannel: { iTransactionHandler.ProcessTransactionL( ETCTransactionIdOpenChannel ); + break; } default: { diff -r d6b9e89d80a3 -r 0f7422b6b602 sensorservices/tiltcompensationssy/src/tcstatetiltlistendata.cpp --- a/sensorservices/tiltcompensationssy/src/tcstatetiltlistendata.cpp Tue Aug 10 14:46:45 2010 +0300 +++ b/sensorservices/tiltcompensationssy/src/tcstatetiltlistendata.cpp Mon Aug 23 14:47:20 2010 +0300 @@ -280,7 +280,6 @@ { property.iProperty.GetValue( iHzSamplingRate ); INFO_1( "Sampling rate changed to: %d", iHzSamplingRate ); - iHasChanged = ETrue; HandleStateEntryL(); } break; @@ -355,19 +354,8 @@ if( !iTimerToSend ) { iTimerToSend = CTCSendEventTimer::NewL( iHzSamplingRate, *this ); - iTimerToSend->Start(); } - else if( iHasChanged ) - { - delete iTimerToSend; - iTimerToSend = NULL; - iTimerToSend = CTCSendEventTimer::NewL( iHzSamplingRate, *this ); - iHasChanged = EFalse; - } - else - { - iTimerToSend->Start(); - } + iTimerToSend->Start(iHzSamplingRate); } // ---------------------------------------------------------------------------------- @@ -474,7 +462,7 @@ else { if( iTimerToSend ) - iTimerToSend->Start(); + iTimerToSend->Start(iHzSamplingRate); } } @@ -512,7 +500,11 @@ // CTCStateTiltListenData::CenrepValueChanged // ----------------------------------------------------------------------------- // +#ifdef _DEBUG void CTCStateTiltListenData::CenrepValueChanged( TUint32 aKey, CRepository& aRepository ) +#else +void CTCStateTiltListenData::CenrepValueChanged( TUint32 /*aKey*/, CRepository& aRepository ) +#endif { FUNC_LOG; diff -r d6b9e89d80a3 -r 0f7422b6b602 sysstatemgmt/systemstarter/group/loadamastart.mmp --- a/sysstatemgmt/systemstarter/group/loadamastart.mmp Tue Aug 10 14:46:45 2010 +0300 +++ b/sysstatemgmt/systemstarter/group/loadamastart.mmp Mon Aug 23 14:47:20 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2007-2009 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" @@ -24,8 +24,7 @@ userinclude ../inc -systeminclude /epoc32/include -systeminclude /epoc32/include/ssm +OS_LAYER_SYSTEMINCLUDE sourcepath ../amastartsrc diff -r d6b9e89d80a3 -r 0f7422b6b602 sysstatemgmt/systemstarter/inc/loadamastart.h --- a/sysstatemgmt/systemstarter/inc/loadamastart.h Tue Aug 10 14:46:45 2010 +0300 +++ b/sysstatemgmt/systemstarter/inc/loadamastart.h Mon Aug 23 14:47:20 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" @@ -16,7 +16,7 @@ #ifndef __LOADAMASTART_H__ #define __LOADAMASTART_H__ -#include +#include class CAmaStart; diff -r d6b9e89d80a3 -r 0f7422b6b602 sysstatemgmt/systemstarter/src/StartupSplashScreen.cpp --- a/sysstatemgmt/systemstarter/src/StartupSplashScreen.cpp Tue Aug 10 14:46:45 2010 +0300 +++ b/sysstatemgmt/systemstarter/src/StartupSplashScreen.cpp Mon Aug 23 14:47:20 2010 +0300 @@ -1,4 +1,4 @@ -// 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" @@ -93,12 +93,14 @@ // Define a splash property to control display and removal of // the splash screen on system start up. - RProperty::Define(KSplashPropertyKey, RProperty::EInt, + // Ignoring the error value. + TInt err = RProperty::Define(KSplashPropertyKey, RProperty::EInt, KSplashReadPolicy, KSplashWritePolicy); - + DEBUGPRINT2(_L("Defining the KSplashPropertyKey completed with %d"), err); + // Create and set off the splash screen process. RProcess splash; - TInt err = splash.Create(*iSplashPath, KNullDesC); + err = splash.Create(*iSplashPath, KNullDesC); if (err == KErrNone) { splash.Resume(); diff -r d6b9e89d80a3 -r 0f7422b6b602 sysstatemgmt/systemstarter/test/tamastarter/group/tamastarter_server.mmp --- a/sysstatemgmt/systemstarter/test/tamastarter/group/tamastarter_server.mmp Tue Aug 10 14:46:45 2010 +0300 +++ b/sysstatemgmt/systemstarter/test/tamastarter/group/tamastarter_server.mmp Mon Aug 23 14:47:20 2010 +0300 @@ -1,4 +1,4 @@ -// 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" @@ -30,9 +30,6 @@ OS_LAYER_SYSTEMINCLUDE_SYMBIAN MW_LAYER_SYSTEMINCLUDE_SYMBIAN -#ifdef SYMBIAN_SYSTEM_STATE_MANAGEMENT -SYSTEMINCLUDE /epoc32/include/ssm -#endif // SYMBIAN_SYSTEM_STATE_MANAGEMENT USERINCLUDE ../inc USERINCLUDE ../../../inc diff -r d6b9e89d80a3 -r 0f7422b6b602 sysstatemgmt/systemstarter/test/tamastarter/resource/emulator/tamastarter_amaadder_ssma.rss --- a/sysstatemgmt/systemstarter/test/tamastarter/resource/emulator/tamastarter_amaadder_ssma.rss Tue Aug 10 14:46:45 2010 +0300 +++ b/sysstatemgmt/systemstarter/test/tamastarter/resource/emulator/tamastarter_amaadder_ssma.rss Mon Aug 23 14:47:20 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" @@ -16,9 +16,9 @@ // #include -#include -#include -#include +#include +#include +#include UID2 KUidSsmCommandListResourceFile diff -r d6b9e89d80a3 -r 0f7422b6b602 sysstatemgmt/systemstarter/test/tamastarter/resource/hardware/tamastarter_amaadder_ssma.rss --- a/sysstatemgmt/systemstarter/test/tamastarter/resource/hardware/tamastarter_amaadder_ssma.rss Tue Aug 10 14:46:45 2010 +0300 +++ b/sysstatemgmt/systemstarter/test/tamastarter/resource/hardware/tamastarter_amaadder_ssma.rss Mon Aug 23 14:47:20 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" @@ -16,9 +16,9 @@ // #include -#include -#include -#include +#include +#include +#include UID2 KUidSsmCommandListResourceFile diff -r d6b9e89d80a3 -r 0f7422b6b602 sysstatemgmt/systemstatemgr/cmd/src/ssmcommandlistimpl.cpp --- a/sysstatemgmt/systemstatemgr/cmd/src/ssmcommandlistimpl.cpp Tue Aug 10 14:46:45 2010 +0300 +++ b/sysstatemgmt/systemstatemgr/cmd/src/ssmcommandlistimpl.cpp Mon Aug 23 14:47:20 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2007-2009 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" @@ -430,7 +430,7 @@ User::LeaveIfError(file.Open(rfs, iResourceFileName, EFileRead | EFileShareReadersOnly)); CleanupClosePushL(file); // read entire resource file into a buffer - TInt fileSize; + TInt fileSize(0); User::LeaveIfError(file.Size(fileSize)); RBuf8 buf; buf.CreateL(fileSize); diff -r d6b9e89d80a3 -r 0f7422b6b602 sysstatemgmt/systemstatemgr/cmd/src/ssmcommandlistresourcereaderimpl.cpp --- a/sysstatemgmt/systemstatemgr/cmd/src/ssmcommandlistresourcereaderimpl.cpp Tue Aug 10 14:46:45 2010 +0300 +++ b/sysstatemgmt/systemstatemgr/cmd/src/ssmcommandlistresourcereaderimpl.cpp Mon Aug 23 14:47:20 2010 +0300 @@ -567,7 +567,7 @@ User::LeaveIfError(file.Open(iFs, aFileName, EFileRead | EFileShareReadersOnly)); // read entire resource file into a buffer - TInt fileSize; + TInt fileSize(0); User::LeaveIfError(file.Size(fileSize)); RBuf8 buf; buf.CreateL(fileSize); diff -r d6b9e89d80a3 -r 0f7422b6b602 sysstatemgmt/systemstatemgr/ssm/src/ssmsession.cpp --- a/sysstatemgmt/systemstatemgr/ssm/src/ssmsession.cpp Tue Aug 10 14:46:45 2010 +0300 +++ b/sysstatemgmt/systemstatemgr/ssm/src/ssmsession.cpp Mon Aug 23 14:47:20 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2007-2009 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" @@ -79,7 +79,7 @@ const TUint swpKey = {aMessage.Int0()}; const TInt deslen = aMessage.GetDesLengthL(1); RBuf filename; - filename.Create(deslen); + filename.CreateL(deslen); filename.CleanupClosePushL(); aMessage.ReadL(1, filename); SsmServer()->RequestRegisterSwpMappingL(swpKey, filename); @@ -150,7 +150,7 @@ const TUint swpKey = {aMessage.Int0()}; const TInt length = aMessage.GetDesLengthL(1); RBuf filename; - filename.Create(length); + filename.CreateL(length); filename.CleanupClosePushL(); aMessage.ReadL(1, filename); SsmServer()->RequestDeRegisterSwpMappingL(swpKey, filename); diff -r d6b9e89d80a3 -r 0f7422b6b602 sysstatemgmt/systemstatemgr/sus/src/susmiscadaptation.cpp --- a/sysstatemgmt/systemstatemgr/sus/src/susmiscadaptation.cpp Tue Aug 10 14:46:45 2010 +0300 +++ b/sysstatemgmt/systemstatemgr/sus/src/susmiscadaptation.cpp Mon Aug 23 14:47:20 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" @@ -128,7 +128,7 @@ void CMiscAdaptation::DoGetSimLanguagesArrayL(const RMessage2& aMessage) { const TInt simLanguageCount = aMessage.Int1(); - CBufFlat* const buf=CBufFlat::NewL(simLanguageCount * sizeof(TInt32)); + CBufFlat* const buf=CBufFlat::NewL(simLanguageCount * sizeof(TInt)); CleanupStack::PushL(buf); iMiscAdaptation.GetSimLanguagesL(buf, simLanguageCount); diff -r d6b9e89d80a3 -r 0f7422b6b602 sysstatemgmt/systemstateplugins/conditionevaluator/src/cndsystemwideproperty.cpp --- a/sysstatemgmt/systemstateplugins/conditionevaluator/src/cndsystemwideproperty.cpp Tue Aug 10 14:46:45 2010 +0300 +++ b/sysstatemgmt/systemstateplugins/conditionevaluator/src/cndsystemwideproperty.cpp Mon Aug 23 14:47:20 2010 +0300 @@ -1,4 +1,4 @@ -// 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" @@ -19,6 +19,7 @@ @internalComponent */ +#include "ssmdebug.h" #include "cndsystemwideproperty.h" #include @@ -48,8 +49,9 @@ RSsmSystemWideProperty property; User::LeaveIfError(property.Connect(iKey)); - User::LeaveIfError(property.GetValue(value)); - property.Close(); + CleanupClosePushL(property); + + SSMLOGLEAVEIFERROR(property.GetValue(value)); TBool retVal = EFalse; if (iConditionCheckType == ECompareValue) @@ -60,5 +62,7 @@ { retVal = ((value & iCndValue) == iCndValue); } + + CleanupStack::PopAndDestroy(&property); return retVal; } diff -r d6b9e89d80a3 -r 0f7422b6b602 sysstatemgmt/systemstateplugins/gsapolicy/group/gsastatepolicyfail.mmp --- a/sysstatemgmt/systemstateplugins/gsapolicy/group/gsastatepolicyfail.mmp Tue Aug 10 14:46:45 2010 +0300 +++ b/sysstatemgmt/systemstateplugins/gsapolicy/group/gsastatepolicyfail.mmp Mon Aug 23 14:47:20 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2007-2009 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" @@ -16,7 +16,7 @@ #ifdef WINS TARGET ssm.state.policy.0003.dll #else -TARGET ssm.state.policy.hw.0003.dll +TARGET ssm.refrence.state.policy.hw.0003.dll #endif TARGETTYPE dll UID 0x2000D75D 0x20010330 diff -r d6b9e89d80a3 -r 0f7422b6b602 sysstatemgmt/systemstateplugins/gsapolicy/group/gsastatepolicynormal.mmp --- a/sysstatemgmt/systemstateplugins/gsapolicy/group/gsastatepolicynormal.mmp Tue Aug 10 14:46:45 2010 +0300 +++ b/sysstatemgmt/systemstateplugins/gsapolicy/group/gsastatepolicynormal.mmp Mon Aug 23 14:47:20 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2007-2009 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" diff -r d6b9e89d80a3 -r 0f7422b6b602 sysstatemgmt/systemstateplugins/gsapolicy/group/gsastatepolicyshutdown.mmp --- a/sysstatemgmt/systemstateplugins/gsapolicy/group/gsastatepolicyshutdown.mmp Tue Aug 10 14:46:45 2010 +0300 +++ b/sysstatemgmt/systemstateplugins/gsapolicy/group/gsastatepolicyshutdown.mmp Mon Aug 23 14:47:20 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2007-2009 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" @@ -16,7 +16,7 @@ #ifdef WINS TARGET ssm.state.policy.0002.dll #else -TARGET ssm.state.policy.hw.0002.dll +TARGET ssm.refrence.state.policy.hw.0002.dll #endif TARGETTYPE dll UID 0x2000D75D 0x2001032D diff -r d6b9e89d80a3 -r 0f7422b6b602 sysstatemgmt/systemstateplugins/gsapolicy/group/gsastatepolicystartup.mmp --- a/sysstatemgmt/systemstateplugins/gsapolicy/group/gsastatepolicystartup.mmp Tue Aug 10 14:46:45 2010 +0300 +++ b/sysstatemgmt/systemstateplugins/gsapolicy/group/gsastatepolicystartup.mmp Mon Aug 23 14:47:20 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2007-2009 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" @@ -16,7 +16,7 @@ #ifdef WINS TARGET ssm.state.policy.0000.dll #else -TARGET ssm.state.policy.hw.0000.dll +TARGET ssm.refrence.state.policy.hw.0000.dll #endif TARGETTYPE dll UID 0x2000D75D 0x2000D75F @@ -58,14 +58,6 @@ TARGETPATH /private/2000d75b/startup/8 END -// Launch 'sysstart.exe' if startup resource is not found. If 'sysstart.exe' fails, launch 'sysagt2svr.exe' and 'wserv.exe' -// resource file to fallback to 'sysstart.exe' -// resource file path format : "z:/private//startup/fallback/" -SOURCEPATH ../resource/wins -START RESOURCE fallbacktosysstart.rss -TARGETPATH /private/2000d75b/startup/fallback -END - #else //for hardware// SOURCEPATH ../resource/armv5 diff -r d6b9e89d80a3 -r 0f7422b6b602 sysstatemgmt/systemstateplugins/gsapolicy/group/sspluginsgsa.iby --- a/sysstatemgmt/systemstateplugins/gsapolicy/group/sspluginsgsa.iby Tue Aug 10 14:46:45 2010 +0300 +++ b/sysstatemgmt/systemstateplugins/gsapolicy/group/sspluginsgsa.iby Mon Aug 23 14:47:20 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" @@ -17,45 +17,27 @@ #ifndef __SSPLUGINSGSA_IBY__ #define __SSPLUGINSGSA_IBY__ -file=ABI_DIR\BUILD_DIR\ssm.state.policy.hw.0000.dll sys\bin\ssm.state.policy.0000.dll file=ABI_DIR\BUILD_DIR\ssm.state.policy.0001.dll sys\bin\ssm.state.policy.0001.dll -file=ABI_DIR\BUILD_DIR\ssm.state.policy.hw.0002.dll sys\bin\ssm.state.policy.0002.dll -file=ABI_DIR\BUILD_DIR\ssm.state.policy.hw.0003.dll sys\bin\ssm.state.policy.0003.dll -// rsc files for the rom -data=EPOCROOT##epoc32\data\z\private\2000d75b\startup\fallback\fallbacktosysstart_target.rsc private\2000d75b\startup\fallback\fallbacktosysstart.rsc data=EPOCROOT##epoc32\data\z\private\2000d75b\normal\gsanormalcmdlist.rsc private\2000d75b\normal\gsanormalcmdlist.rsc + +// If it is NCP image that is being made (_IMAGE_TYPE_NCP defined)then NCP ssm.state.policy is used. which +// is used for textshell mode only. +#if defined(_IMAGE_TYPE_NCP) +file=ABI_DIR\BUILD_DIR\ssm.refrence.state.policy.hw.0000.dll sys\bin\ssm.state.policy.0000.dll +file=ABI_DIR\BUILD_DIR\ssm.refrence.state.policy.hw.0002.dll sys\bin\ssm.state.policy.0002.dll +file=ABI_DIR\BUILD_DIR\ssm.refrence.state.policy.hw.0003.dll sys\bin\ssm.state.policy.0003.dll + data=EPOCROOT##epoc32\data\z\private\2000d75b\shutdown\gsashutdowncmdlist.rsc private\2000d75b\shutdown\gsashutdowncmdlist.rsc data=EPOCROOT##epoc32\data\z\private\2000d75b\fail\gsafailcmdlist.rsc private\2000d75b\fail\gsafailcmdlist.rsc +#endif //_IMAGE_TYPE_NCP REM Simple startup configuration - install a single resource file REM as the default "mode 0" file. -REM Note this is a Techview specific way of including just the -REM SCL required in the ROM. Licensees are expected to include more -REM than one SCL in their devices. -REM If _STARTUPMODE, _STARTUPMODE1, _STARTUPMODE2 etc. are defined -REM then SysStart fallback should be used so no SCL rss files will be included -REM thus forcing the startup policy to use REM The macro for selecting SCL lists is _SSMSTARTUPMODE -#if (defined(_STARTUPMODE) || \ - defined(_STARTUPMODE0) || \ - defined(_STARTUPMODE1) || \ - defined(_STARTUPMODE2) || \ - defined(_STARTUPMODE3) || \ - defined(_STARTUPMODE4) || \ - defined(_STARTUPMODE5) || \ - defined(_STARTUPMODE8)) - -REM SysStart startup mode defines found, using SysStart startup -WARNING "Use _SSMSTARTUPMODE instead of _STARTUPMODE as it is deprecated." -WARNING "_STARTUPMODE can only be used for testing fallback on SysStart by including sysstart.iby and sysstartconfig.iby in buildrom command " - -#else - -REM No legacy SysStart startup mode defines found, using SSM startup #ifdef _SSMSTARTUPMODE define _2000D75B_MODE _SSMSTARTUPMODE @@ -83,6 +65,4 @@ #endif // SSMA_MINIMAL_BOOT -#endif // Legacy SysStart mode defines not found - #endif // __SSPLUGINSGSA_IBY__ diff -r d6b9e89d80a3 -r 0f7422b6b602 sysstatemgmt/tsrc/public/basic/group/MT_SysLangUtil.mmp --- a/sysstatemgmt/tsrc/public/basic/group/MT_SysLangUtil.mmp Tue Aug 10 14:46:45 2010 +0300 +++ b/sysstatemgmt/tsrc/public/basic/group/MT_SysLangUtil.mmp Mon Aug 23 14:47:20 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2002-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" @@ -32,7 +32,6 @@ USERINCLUDE ../MT_SysLangUtil OS_LAYER_SYSTEMINCLUDE -SYSTEMINCLUDE /epoc32/include/Digia/EUnit LIBRARY EUnit.lib LIBRARY EUnitUtil.lib diff -r d6b9e89d80a3 -r 0f7422b6b602 sysstatemgmt/tsrc/public/basic/mt_rstartersession/MT_RStarterSession_DllMain.cpp --- a/sysstatemgmt/tsrc/public/basic/mt_rstartersession/MT_RStarterSession_DllMain.cpp Tue Aug 10 14:46:45 2010 +0300 +++ b/sysstatemgmt/tsrc/public/basic/mt_rstartersession/MT_RStarterSession_DllMain.cpp Mon Aug 23 14:47:20 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2006 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" @@ -20,7 +20,7 @@ #include "MT_RStarterSession.h" // EXTERNAL INCLUDES -#include +#include EXPORT_C MEUnitTest* CreateTestSuiteL() {