|
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 __SSMCOMMANDLISTIMPL_H__ |
|
17 #define __SSMCOMMANDLISTIMPL_H__ |
|
18 |
|
19 #include <e32base.h> |
|
20 |
|
21 #include "ssmcommandlistinterface.h" |
|
22 #include <ssm/ssmcmd.hrh> |
|
23 #include <ssm/ssmconditionalcallback.h> |
|
24 |
|
25 class RReadStream; |
|
26 class RWriteStream; |
|
27 class CSsmDeferredDeleter; |
|
28 class CSsmCommandUtilProvider; |
|
29 |
|
30 /** |
|
31 @internalComponent |
|
32 @released |
|
33 */ |
|
34 NONSHARABLE_CLASS(CSsmCommandListImpl) : public CBase, public MSsmCommandList |
|
35 { |
|
36 public: |
|
37 static CSsmCommandListImpl* NewL(); |
|
38 static CSsmCommandListImpl* NewL(const CSsmCommandListImpl* aSsmCommandListImpl, CSsmCommandUtilProvider* aUtilProvider); |
|
39 ~CSsmCommandListImpl(); |
|
40 |
|
41 void InternalizeL(RReadStream& aReadStream, CSsmCommandUtilProvider* aUtilProvider); |
|
42 void ExternalizeL(RWriteStream& aWriteStream) const; |
|
43 |
|
44 void Execute(const TInt aIndex, TRequestStatus& aStatus); |
|
45 void ExecuteCancel(const TInt aIndex); |
|
46 TInt Count() const; |
|
47 const MSsmCommand* operator[](TInt aIndex) const; |
|
48 |
|
49 //from MSsmCommandList |
|
50 void AppendL(MSsmCommand* aCmd); |
|
51 void SetDelayBetweenCommands(TInt aDelayBetweenCommands); |
|
52 void SetResourceFileNameL(const TDesC& aFileName); |
|
53 void SetConditionalCallback(MSsmConditionalCallback& aCallBack); |
|
54 MSsmConditionalCallback& ConditionalCallback() const; |
|
55 |
|
56 TInt DelayBetweenCommands() const; |
|
57 TArray<MSsmCommand*> PendingDeferred() const; |
|
58 void DeferredDelete(); |
|
59 TInt PendingCommandIndex(); |
|
60 TCmdErrorSeverity Severity(TInt aCommandIndex) const; |
|
61 void GetDataToValidateCommandlist(TInt& aPublishSysStateCmdCount, TInt& aPublishSwpCmdCount) const; |
|
62 #ifdef SYMBIAN_SSM_FLEXIBLE_MERGE |
|
63 static TInt ComparePriority(const MSsmCommand& aFirst, const MSsmCommand& aSecond); |
|
64 #endif |
|
65 private: |
|
66 CSsmCommandListImpl(); |
|
67 void ConstructL(); |
|
68 void ConstructL(const CSsmCommandListImpl* aSsmCommandListImpl, CSsmCommandUtilProvider* aUtilProvider); |
|
69 |
|
70 void InitialiseResourceFileL(); |
|
71 |
|
72 private: |
|
73 RPointerArray<MSsmCommand> iCmdList; |
|
74 RPointerArray<MSsmCommand> iDeferredList; |
|
75 TInt iDelayBetweenCommands; |
|
76 CSsmDeferredDeleter* iDeferredDeleter; |
|
77 RBuf iResourceFileName; |
|
78 CResourceFile* iResourceFile; |
|
79 MSsmConditionalCallback* iConditionalCallback; |
|
80 TInt iPublishSysStateCmdCount; |
|
81 TInt iPublishSwpCmdCount; |
|
82 TBool iInValidDeferredWaitCmd; |
|
83 }; |
|
84 |
|
85 #endif // __SSMCOMMANDLISTIMPL_H__ |