diff -r f345bda72bc4 -r 43e37759235e Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/gsastatepolicynormal_8h-source.html --- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/gsastatepolicynormal_8h-source.html Tue Mar 30 11:56:28 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,80 +0,0 @@ - -
-00001 // -00002 // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -00003 // All rights reserved. -00004 // This component and the accompanying materials are made available -00005 // under the terms of "Eclipse Public License v1.0" -00006 // which accompanies this distribution, and is available -00007 // at the URL "http://www.eclipse.org/legal/epl-v10.html". -00008 // -00009 // Initial Contributors: -00010 // Nokia Corporation - initial contribution. -00011 // -00012 // Contributors: -00013 // -00014 // Description: -00015 // Extends the GSA (Generic Startup Architecture) normal policy to -00016 // to support the dummy backup and restore states added as part of this example. -00017 // The example uses this extended normal state, which replaces the existing normal policy. -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 //from MSsmStatePolicy -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 // from MSsmConditionalCallback -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 // Possible panic codes within Normal policy -00068 enum TNormalPanicCodes -00069 { -00073 EInvalidResourceReader = 1, -00077 EInvalidNormalState, -00081 EConditionalInfoNotImplemented -00082 }; -00083 }; -00084 -00085 #endif // __GSASTATEPOLICYNORMAL_H__ -