|
1 // Copyright (c) 2001-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 __APPSTARTER_H__ |
|
17 #define __APPSTARTER_H__ |
|
18 |
|
19 //#include <e32base.h> |
|
20 #include <apgcli.h> |
|
21 |
|
22 class CThreadWatcher; |
|
23 class CStarter; |
|
24 |
|
25 class CAppStarter : public CTimer |
|
26 { |
|
27 public: |
|
28 static void NewLD(TInt aAppType, TUint32 aAppUid, TDesC& aExeFileName, TDesC& aDllFileName, TDesC* aCmdLineArgs, TUint32 aStackSize, |
|
29 TUint32 aMinHeapSize, TUint32 aMaxHeapSize, TBool aMonitoring, TBool aViewless, |
|
30 TBool aSemaphore, TSglQue<CThreadWatcher>* aQue, RApaLsSession& aSession, CStarter* aStarter); |
|
31 virtual void RunL(); |
|
32 protected: //from CActive |
|
33 virtual TInt RunError(TInt aError); |
|
34 private: |
|
35 CAppStarter(RApaLsSession& aSession); |
|
36 ~CAppStarter(); |
|
37 |
|
38 void StartL(); |
|
39 void Done(TBool aSucces); |
|
40 void Next(); |
|
41 void TryStartViewlessAppL(TApaAppInfo aInfo, TThreadId aThreadId); |
|
42 |
|
43 |
|
44 enum |
|
45 { |
|
46 EStartApp, |
|
47 EAppStarted, |
|
48 EAppFailed |
|
49 } iState; |
|
50 |
|
51 TInt iAppType; |
|
52 TUint32 iAppUid; |
|
53 TFullName iExeFileName; |
|
54 TFullName iDllFileName; |
|
55 TDesC* iCmdLineArgs; |
|
56 TUint32 iStackSize; |
|
57 TUint32 iMinHeapSize; |
|
58 TUint32 iMaxHeapSize; |
|
59 TBool iMonitoring; |
|
60 TBool iViewless; |
|
61 TBool iSemaphore; |
|
62 TSglQue<CThreadWatcher>* iQue; |
|
63 RApaLsSession& iSession; |
|
64 CStarter* iStarter; |
|
65 |
|
66 TInt iRetries; |
|
67 }; |
|
68 #endif //__APPSTARTER_H__ |