diff -r 3f0699f2e14c -r 11da52d4c847 sysstatemgmt/systemstateplugins/utilityplugins/inc/lafshutdowneventobserveradaptor.h --- a/sysstatemgmt/systemstateplugins/utilityplugins/inc/lafshutdowneventobserveradaptor.h Thu Oct 14 12:47:54 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,76 +0,0 @@ -// Copyright (c) 2008-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: -// - -#ifndef __LAFSHUTDOWNEVENTOBSERVERADAPTOR_H__ -#define __LAFSHUTDOWNEVENTOBSERVERADAPTOR_H__ - -#include -#include -#include -#include - -_LIT(KPanicShutdownEventObserverAdaptor, "ShutdownEventObserverAdaptor"); - -enum TShutdownObserverAdaptorPanicCodes - { - EInvalidSession = 1 - }; - -/** -Shutdown event observer adaptor class. -@internalComponent -*/ -NONSHARABLE_CLASS(CLafShutdownEventObserverAdaptor) : public MSsmUtility, public MShutdownEventObserver - { -public: - static IMPORT_C MSsmUtility* NewL(); - - // from MSsmUtility - void InitializeL(); - void StartL(); - void Release(); - - // from MShutdownEventObserver - void HandleShutdownEventL(MSaveObserver::TSaveType aAction,TBool aPowerOff, TPowerState aEvent = EPwStandby); - CArrayFix* ClientArrayLC(); - TBool IsClientHung(TThreadId aId) const; - void GetShutdownState(TBool& aPowerOff, TBool& aAllSessionsHavePendingRequest) const; - -private: - CLafShutdownEventObserverAdaptor(); - ~CLafShutdownEventObserverAdaptor(); - -private: - class RShutdownSrvSession: public RSessionBase - { - public: - void HandleShutdownEventL(MSaveObserver::TSaveType aAction,TBool aPowerOff, TPowerState aEvent = EPwStandby); - CArrayFix* ClientArrayLC(); - TBool IsClientHung(TThreadId aId) const; - void GetShutdownState(TBool& aPowerOff, TBool& aAllSessionsHavePendingRequest) const; - - TInt ConnectL(); - private: - TInt StartServerL(); - }; - -private: - MSsmLoadLafShut* iLafShutdown; - RLibrary iLafShutLib; - RShutdownSrvSession iShutdownSrvSession; - }; - -#endif //__LAFSHUTDOWNEVENTOBSERVERADAPTOR_H__ -