00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef __GSASTATEPOLICYNORMAL_H__
00020 #define __GSASTATEPOLICYNORMAL_H__
00021
00022 #include <e32base.h>
00023 #include <ssm/ssmstatepolicy.h>
00024 #include <ssm/ssmconditionalcallback.h>
00025
00026 class CSsmCommandListResourceReader;
00027
00036 NONSHARABLE_CLASS(CEgGsaStatePolicyNormal) : public CBase, public MSsmStatePolicy, public MSsmConditionalCallback
00037 {
00038 public:
00039 IMPORT_C static MSsmStatePolicy* NewL();
00040
00041
00042 TResponse TransitionAllowed(const TSsmStateTransition& aRequest, TSsmStateTransition const* aCurrent, TSsmStateTransition const* aQueued,
00043 const RMessagePtr2& aMessage);
00044 void Initialize(TRequestStatus& aStatus);
00045 void InitializeCancel();
00046 void PrepareCommandList(TSsmState aState, TInt aReason, TRequestStatus& aStatus);
00047 void PrepareCommandListCancel();
00048 CSsmCommandList* CommandList();
00049 TBool GetNextState(TSsmState aCurrentTransition, TInt aReason, TInt aError, TInt aSeverity, TSsmState& aNextState);
00050 void Release();
00051
00052
00053 TBool ConditionalCommandAllowedL(CResourceFile& aResourceFile, TInt aResourceId);
00054
00055 private:
00056 ~CEgGsaStatePolicyNormal();
00057 CEgGsaStatePolicyNormal();
00058
00059 void ConstructL();
00060 TBool TransitionSupported(const TSsmState& aRequestedState) const;
00061
00062 private:
00063 RArray<TSsmState> iCurrentlySupportedTransitions;
00064 CSsmCommandListResourceReader* iCommandListResourceReader;
00065 RFs iFs;
00066
00067
00068 enum TNormalPanicCodes
00069 {
00073 EInvalidResourceReader = 1,
00077 EInvalidNormalState,
00081 EConditionalInfoNotImplemented
00082 };
00083 };
00084
00085 #endif // __GSASTATEPOLICYNORMAL_H__