|
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 __CMDSTARTERBASE_H__ |
|
17 #define __CMDSTARTERBASE_H__ |
|
18 |
|
19 #include "ssmdeferrablecommand.h" |
|
20 |
|
21 class TSsmCommandParameters; |
|
22 class CSsmStartupProperties; |
|
23 |
|
24 /** |
|
25 Base class for start app / process commands |
|
26 @internalComponent |
|
27 @released |
|
28 */ |
|
29 NONSHARABLE_CLASS(CCmdStarterBase) : public CSsmDeferrableCommand |
|
30 { |
|
31 public: |
|
32 ~CCmdStarterBase(); |
|
33 |
|
34 // from MSsmCommand |
|
35 void Execute(TRequestStatus& aStatus); |
|
36 void Release(); |
|
37 void ExecuteCancel(); |
|
38 TSsmCommandType Type() const; |
|
39 void ExternalizeL(RWriteStream& aWriteStream) const; |
|
40 inline CSsmStartupProperties* AppInfo()const {return iAppInfo;} |
|
41 |
|
42 protected: |
|
43 // from CActive |
|
44 void RunL(); |
|
45 void DoCancel(); |
|
46 TInt RunError(TInt aError); |
|
47 |
|
48 // construct this object with app info |
|
49 void ConstructL(RReadStream& aReadStream); |
|
50 void ConstructL(TSsmCommandParameters& aCommandParameters); |
|
51 void ConstructL(const CSsmStartupProperties *aAppInfo); |
|
52 // construct this object with app info without validate only used by CLE |
|
53 void ConstructL(const CSsmStartupProperties *aAppInfo, TBool aDummy); |
|
54 |
|
55 CCmdStarterBase(TSsmCommandType aCommandType); |
|
56 CCmdStarterBase(TSsmCommandType aCommandType, TCmdErrorSeverity aSeverity); |
|
57 #ifdef SYMBIAN_SSM_FLEXIBLE_MERGE |
|
58 CCmdStarterBase(TSsmCommandType aCommandType, TCmdErrorSeverity aSeverity, const TUint16 aPriority); |
|
59 #endif |
|
60 void InternalizeL(RReadStream& aReadStream); |
|
61 void ValidateL(); |
|
62 |
|
63 private: |
|
64 // command type can be ESsmCmdStartProcess / ESsmCmdStartApp |
|
65 TSsmCommandType iCommandType; |
|
66 // Startup properties to start an application / process |
|
67 CSsmStartupProperties* iAppInfo; |
|
68 // The index integer returned by StartL() of Startsafe. It is preserved and passed in the case of a call to StartCancel() |
|
69 TInt iCallerIndex; |
|
70 // Handle to the created process |
|
71 RProcess iProcess; |
|
72 }; |
|
73 |
|
74 #endif // __CMDSTARTERBASE_H__ |