diff -r 6edeef394eb7 -r 9397a16b6eb8 testexecmdw/tef/tef/wrapperutils/src/sysstartplugin.cpp --- a/testexecmdw/tef/tef/wrapperutils/src/sysstartplugin.cpp Fri Sep 03 07:55:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,117 +0,0 @@ -/* -* Copyright (c) 2005-2009 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: -* -*/ - - - -#include -#ifdef SYMBIAN_SYSTEM_STATE_MANAGEMENT -#include -#include -#include -#include - -CSysStartPlugin::CSysStartPlugin() -#else -#include -#include -#include - -CSysStartPlugin::CSysStartPlugin() : CDmDomain(KDmHierarchyIdStartup, KAppServicesDomain3) -#endif - { - - } - -/** - * Destructor - * Frees the resources located in second-phase constructor - */ -CSysStartPlugin::~CSysStartPlugin() - { -#ifdef SYMBIAN_SYSTEM_STATE_MANAGEMENT - if (iStateAwareSession) - { - delete iStateAwareSession; - } -#endif - } - -/** - * Creates, and returns a pointer to CSysStartPlugin object, leave on failure - * @param aName - Path and name of the ini file to be parsed - * @return A pointer to the CSysStartPlugin object - */ -CSysStartPlugin* CSysStartPlugin::NewL() - { - CSysStartPlugin* self = new(ELeave) CSysStartPlugin(); - CleanupStack::PushL(self); - self->ConstructL(); - CleanupStack::Pop(); - return self; - } - -void CSysStartPlugin::ConstructL() - { -#ifdef SYMBIAN_SYSTEM_STATE_MANAGEMENT - iStateAwareSession = CSsmStateAwareSession::NewL(KSM2AppServicesDomain3); - iStateAwareSession->AddSubscriberL(*this); - } - -void CSysStartPlugin::StateChanged(TSsmState aSsmState) - { - //if (ESsmNormal==aSsmState.MainState() && ESsmNormalSubState==aSsmState.SubState()) - if (aSsmState.Int() >= ESsmStartupSubStateNonCritical) - { - CActiveScheduler::Stop(); - } -#else - CDmDomain::ConstructL(); -#endif - } - -void CSysStartPlugin::WaitForSystemStartL() - { -#ifdef SYMBIAN_SYSTEM_STATE_MANAGEMENT - TSsmState state = iStateAwareSession->State(); - if (state.Int() < ESsmStartupSubStateNonCritical) - { - CActiveScheduler::Start(); - } - } -#else - TDmDomainState state = GetState(); - if (state < EStartupStateNonCritical) - { - RequestTransitionNotification(); - CActiveScheduler::Start(); - } - } - -void CSysStartPlugin::RunL() - { - TDmDomainState state = GetState(); - if (state >= EStartupStateNonCritical) - { - CActiveScheduler::Stop(); - } - else - { - RequestTransitionNotification(); - } - } - -#endif