|
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 __STARTANDRETRY_H__ |
|
17 #define __STARTANDRETRY_H__ |
|
18 |
|
19 #include <e32base.h> |
|
20 |
|
21 #include "startandretrynotifications.h" |
|
22 #include "rvobservernotification.h" |
|
23 #include "ssconst.h" |
|
24 |
|
25 |
|
26 |
|
27 class CApaStarter; |
|
28 class CRvObserver; |
|
29 class CSsmStartupProperties; |
|
30 |
|
31 NONSHARABLE_CLASS( CStartAndRetry ) : public CBase, public MRvObserverNotification |
|
32 { |
|
33 public: |
|
34 static CStartAndRetry* NewL( MStartAndRetryNotifications& aStartSafeNotify, const CSsmStartupProperties& aStartupProperties, RProcess& aProcess, TInt aCallerIndex, CApaStarter* aApaStarter ); |
|
35 static CStartAndRetry* NewLC( MStartAndRetryNotifications& aStartSafeNotify, const CSsmStartupProperties& aStartupProperties, RProcess& aProcess, TInt aCallerIndex, CApaStarter* aApaStarter ); |
|
36 ~CStartAndRetry(); |
|
37 |
|
38 void Actuate(); |
|
39 // From MRvObserverNotification |
|
40 void NotifyCompletion( const TInt aCompletion ); |
|
41 void NotifyCancellation( TInt aCompletion ); |
|
42 |
|
43 private: |
|
44 CStartAndRetry( MStartAndRetryNotifications& aStartSafeNotify, RProcess& aProcess, TInt aCallerIndex, CApaStarter* aApaStarter ); |
|
45 void ConstructL( const CSsmStartupProperties& aStartupProperties ); |
|
46 void DoFireAndForgetL(); |
|
47 void DoWaitForStartL(); |
|
48 |
|
49 private: |
|
50 TInt iCallerIndex; |
|
51 RProcess& iProcess; |
|
52 CRvObserver* iRvObserver; |
|
53 MStartAndRetryNotifications& iStartSafeNotify; // We are owned by |
|
54 CApaStarter* iApaStarter; // Not owning. Might be NULL, therefore ptr. |
|
55 CSsmStartupProperties* iStartupProperties; |
|
56 }; |
|
57 |
|
58 |
|
59 |
|
60 #endif // __STARTANDRETRY_H__ |