diff -r 000000000000 -r 4e1aa6a622a0 sysstatemgmt/systemstatemgr/cmd/inc/ssmcommandlistimpl.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sysstatemgmt/systemstatemgr/cmd/inc/ssmcommandlistimpl.h Tue Feb 02 00:53:00 2010 +0200 @@ -0,0 +1,85 @@ +// Copyright (c) 2007-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 __SSMCOMMANDLISTIMPL_H__ +#define __SSMCOMMANDLISTIMPL_H__ + +#include + +#include "ssmcommandlistinterface.h" +#include +#include + +class RReadStream; +class RWriteStream; +class CSsmDeferredDeleter; +class CSsmCommandUtilProvider; + +/** +@internalComponent +@released +*/ +NONSHARABLE_CLASS(CSsmCommandListImpl) : public CBase, public MSsmCommandList + { +public: + static CSsmCommandListImpl* NewL(); + static CSsmCommandListImpl* NewL(const CSsmCommandListImpl* aSsmCommandListImpl, CSsmCommandUtilProvider* aUtilProvider); + ~CSsmCommandListImpl(); + + void InternalizeL(RReadStream& aReadStream, CSsmCommandUtilProvider* aUtilProvider); + void ExternalizeL(RWriteStream& aWriteStream) const; + + void Execute(const TInt aIndex, TRequestStatus& aStatus); + void ExecuteCancel(const TInt aIndex); + TInt Count() const; + const MSsmCommand* operator[](TInt aIndex) const; + + //from MSsmCommandList + void AppendL(MSsmCommand* aCmd); + void SetDelayBetweenCommands(TInt aDelayBetweenCommands); + void SetResourceFileNameL(const TDesC& aFileName); + void SetConditionalCallback(MSsmConditionalCallback& aCallBack); + MSsmConditionalCallback& ConditionalCallback() const; + + TInt DelayBetweenCommands() const; + TArray PendingDeferred() const; + void DeferredDelete(); + TInt PendingCommandIndex(); + TCmdErrorSeverity Severity(TInt aCommandIndex) const; + void GetDataToValidateCommandlist(TInt& aPublishSysStateCmdCount, TInt& aPublishSwpCmdCount) const; +#ifdef SYMBIAN_SSM_FLEXIBLE_MERGE + static TInt ComparePriority(const MSsmCommand& aFirst, const MSsmCommand& aSecond); +#endif +private: + CSsmCommandListImpl(); + void ConstructL(); + void ConstructL(const CSsmCommandListImpl* aSsmCommandListImpl, CSsmCommandUtilProvider* aUtilProvider); + + void InitialiseResourceFileL(); + +private: + RPointerArray iCmdList; + RPointerArray iDeferredList; + TInt iDelayBetweenCommands; + CSsmDeferredDeleter* iDeferredDeleter; + RBuf iResourceFileName; + CResourceFile* iResourceFile; + MSsmConditionalCallback* iConditionalCallback; + TInt iPublishSysStateCmdCount; + TInt iPublishSwpCmdCount; + TBool iInValidDeferredWaitCmd; + }; + +#endif // __SSMCOMMANDLISTIMPL_H__