|
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 #if !defined(__MULTIPLE_WAIT2_H__) |
|
17 #define __MULTIPLE_WAIT2_H__ |
|
18 |
|
19 #include <e32base.h> |
|
20 #include "StartupStateInfo.h" |
|
21 |
|
22 class CAppStarter; |
|
23 class CStartupProperties; |
|
24 class CStartupUtilProvider; |
|
25 |
|
26 /** A startup command object responsible for checking that all deferred |
|
27 wait commands have rendezvoused. |
|
28 @internalComponent |
|
29 @deprecated |
|
30 */ |
|
31 class CMultipleWait : public CBase, public MStartupCommand |
|
32 { |
|
33 public: |
|
34 static CMultipleWait* NewL(CommandList& aDeferredList, CStartupUtilProvider& aProvider); |
|
35 static CMultipleWait* NewLC(CommandList& aDeferredList, CStartupUtilProvider& aProvider); |
|
36 ~CMultipleWait(); |
|
37 void Execute(TRequestStatus& aStatus); // from MStartupCommand |
|
38 void Release(); |
|
39 |
|
40 void SetTimeout(TInt aTimeout); |
|
41 void SetFailOnError(TBool aFail); |
|
42 TInt Timeout() const; |
|
43 TBool FailOnError() const; |
|
44 |
|
45 private: |
|
46 CMultipleWait(CStartupUtilProvider& aProvider); |
|
47 void ConstructL(CommandList& aDeferredList); |
|
48 |
|
49 void CheckCommandsAndIgnore(TRequestStatus& aTimerStatus); |
|
50 void CheckCommandsForRestart(TRequestStatus& aTimerStatus); |
|
51 void RegisterMonitoringL(CAppStarter& aStartCommand); |
|
52 void RestartSystem(const CStartupProperties& aStartupProperties); |
|
53 |
|
54 private: |
|
55 CStartupUtilProvider& iProvider; |
|
56 CommandList iDeferredList; |
|
57 TInt iTimeout; |
|
58 TBool iFailOnError; |
|
59 }; |
|
60 |
|
61 #endif // __MULTIPLE_WAIT2_H__ |