sysstatemgmt/systemstateplugins/gsapolicy/src/gsastatepolicynormal.cpp
changeset 35 f7565e9c9ce8
parent 0 4e1aa6a622a0
equal deleted inserted replaced
29:e5a0aab53f3f 35:f7565e9c9ce8
     1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
   157 		return response;
   157 		return response;
   158 		}
   158 		}
   159 
   159 
   160 	//Check if the requested transition is supported from current state
   160 	//Check if the requested transition is supported from current state
   161 	if (TransitionSupported(aRequest.State()))
   161 	if (TransitionSupported(aRequest.State()))
   162 		{
   162 		{		
   163 		if((NULL == aCurrent) && (NULL == aQueued))
   163 		//Transition is allowed when there is no current and queued transitions.
       
   164 		//or allow substate(ESsmNormalRfOnSubState and ESsmNormalRfOffSubState)transition only when KSsmGracefulOffline is enabled and queue is empty.
       
   165 		if (((NULL == aCurrent) && (NULL == aQueued)) || (IsSsmGracefulOffline() && (NULL == aQueued)))
   164 			{
   166 			{
   165 			// SsmServer is idle
       
   166 			response = EDefinitelyAllowed;
   167 			response = EDefinitelyAllowed;
   167 			}
   168 			}
   168 		else if((aRequest.State().MainState() == ESsmFail) || (aRequest.State().MainState() == ESsmShutdown))
   169 		else if((aRequest.State().MainState() == ESsmFail) || (aRequest.State().MainState() == ESsmShutdown))
   169 			{
   170 			{
   170 			// Going into fail/shutdown state will override anything currently ongoing or queued
   171 			// Going into fail/shutdown state will override anything currently ongoing or queued