sl@0: // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: #include sl@0: #include sl@0: #include "StartupStateObserverObject.h" sl@0: sl@0: CStartupStateObserver::CStartupStateObserver() sl@0: :CBase(), iState(SsoUndefined) sl@0: { sl@0: } sl@0: sl@0: CStartupStateObserver::~CStartupStateObserver() sl@0: { sl@0: } sl@0: sl@0: CStartupStateObserver* CStartupStateObserver::NewL() sl@0: { sl@0: CStartupStateObserver* self = CStartupStateObserver::NewLC(); sl@0: CleanupStack::Pop(self); sl@0: sl@0: return self; sl@0: } sl@0: sl@0: CStartupStateObserver* CStartupStateObserver::NewLC() sl@0: { sl@0: CStartupStateObserver* self = new(ELeave) CStartupStateObserver; sl@0: CleanupStack::PushL(self); sl@0: self->Construct(); sl@0: sl@0: return self; sl@0: } sl@0: sl@0: sl@0: void CStartupStateObserver::Construct() sl@0: { sl@0: InitialiseEvent(); sl@0: } sl@0: sl@0: sl@0: void CStartupStateObserver::InitialiseEvent() sl@0: { sl@0: iState = SsoNoPluginsInternalized; sl@0: } sl@0: sl@0: void CStartupStateObserver::ProcessSSAEventL(TStartupStateIdentifier aKnownState) sl@0: { sl@0: if(iState == SsoNoPluginsInternalized) sl@0: { sl@0: if(aKnownState == EStartupStateCriticalStatic) sl@0: { sl@0: iState = SsoCriticalPlugingsInternalized; sl@0: } sl@0: else if(aKnownState == EStartupStateNonCritical) sl@0: { sl@0: iState = SsoAllPluginsInternalized; sl@0: } sl@0: } sl@0: else if(iState == SsoCriticalPlugingsInternalized && sl@0: aKnownState == EStartupStateNonCritical) sl@0: { sl@0: iState = SsoAllPluginsInternalized; sl@0: } sl@0: } sl@0: sl@0: CStartupStateObserver::TSsoState CStartupStateObserver::GetState() sl@0: { sl@0: return iState; sl@0: } sl@0: sl@0: void CStartupStateObserver::SetState(CStartupStateObserver::TSsoState aState) sl@0: { sl@0: iState = aState; sl@0: }