sysstatemgmt/systemstatereferenceplugins/clayer/inc/saastateadaptation.h
changeset 0 4e1aa6a622a0
equal deleted inserted replaced
-1:000000000000 0:4e1aa6a622a0
       
     1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #ifndef __SAASTATEADAPTATION_H__
       
    17 #define __SAASTATEADAPTATION_H__
       
    18 
       
    19 #include <ssm/ssmadaptation.h>
       
    20 #include "adaptationbase.h"
       
    21 
       
    22 class CStartupAdaptationAdapter;
       
    23 
       
    24 /*
       
    25  * Provides a concrete class to provide the appropriate adaptation interface
       
    26  * 
       
    27  * @internalComponent
       
    28  */
       
    29 NONSHARABLE_CLASS(CSaaStateAdaptation) : public CAdaptationBase, public MStateAdaptation
       
    30 {
       
    31 public:
       
    32 	static CSaaStateAdaptation* NewL(CStartupAdaptationAdapter* aAdapter);
       
    33 	~CSaaStateAdaptation();
       
    34 
       
    35 	void ProcessEventL(TSsmCoopSysEventType aEventType);
       
    36 	
       
    37 private:
       
    38 
       
    39 	//from MStateAdaptation
       
    40 	virtual void Release();
       
    41 	virtual void RequestCoopSysStateChange(TSsmState aState, TRequestStatus& aStatus);
       
    42 	virtual void RequestCoopSysSelfTest(TRequestStatus& aStatus);
       
    43 	virtual void RequestCoopSysPerformRestartActions(TInt aReason, TRequestStatus& aStatus);
       
    44 	virtual void RequestCoopSysPerformShutdownActions(TInt aReason, TRequestStatus& aStatus);
       
    45 	virtual void RequestCoopSysPerformRfsActions(TSsmRfsType aRfsType, TRequestStatus& aStatus);
       
    46 	virtual void RequestCancel();
       
    47 
       
    48 	virtual void NotifyCoopSysEvent(TDes8& aEvent, TRequestStatus& aStatus);
       
    49 	virtual void NotifyCancel();
       
    50 	
       
    51 	//from CAdaptationBase
       
    52 	virtual void RequestComplete(const StartupAdaptation::TCommand aCommandId, TDesC8& aRetPckg); 
       
    53 	virtual TDesC8* ParameterPckg();
       
    54 	
       
    55 private:
       
    56 	CSaaStateAdaptation(CStartupAdaptationAdapter* aAdapter);
       
    57 	void ConstructL();
       
    58 	
       
    59 	static StartupAdaptation::TGlobalState MapToStartupAdaptationState(TSsmState aState);
       
    60 	
       
    61 private:
       
    62 	TBuf8<1> iNullBuf;
       
    63 	StartupAdaptation::TGlobalStateChangePckg iGlobalStatePckg;
       
    64 	StartupAdaptation::TRFSReasonPckg iRfsReasonPckg;
       
    65 	StartupAdaptation::TResetReasonPckg iResetReasonPckg;
       
    66 	TDes8* iEventOutputBuffer;
       
    67 	TRequestStatus* iEventStatus;
       
    68 	RArray<TSsmCoopSysEventType> iEventQueue;
       
    69 };
       
    70 
       
    71 #endif // __SAASTATEADAPTATION_H__