|
1 /* |
|
2 * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: These are the declarations for dialogs shared between the |
|
15 * Device Diagnostics Application and plugins. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef DEVDIAGCOMMONCANCELDIALOGS_H |
|
21 #define DEVDIAGCOMMONCANCELDIALOGS_H |
|
22 |
|
23 // System Include Files |
|
24 #include <aknlistquerydialog.h> // CAknQueryDialog |
|
25 |
|
26 // Forward Declarations |
|
27 class CDevDiagEngine; |
|
28 |
|
29 /** |
|
30 * Cancel Execution Dialog Class. |
|
31 * This dialog asks the user if they would like to cancel all test |
|
32 * execution. It suspends test execution while it is active, and resumes |
|
33 * or cancels test execution when it is dismissed. |
|
34 * |
|
35 * @lib avkon.lib |
|
36 */ |
|
37 class CDevDiagCommonCancelDialogs : public CAknListQueryDialog |
|
38 { |
|
39 |
|
40 public: // New Functions |
|
41 |
|
42 /** |
|
43 * Two-phased constructor. |
|
44 */ |
|
45 static CDevDiagCommonCancelDialogs* NewLC( CDevDiagEngine& aEngine, |
|
46 TBool aSuspendTestsOnExecute ); |
|
47 |
|
48 |
|
49 public: // From base class CAknQueryDialog |
|
50 |
|
51 /** |
|
52 * From CAknQueryDialog. |
|
53 * Runs the dialog, and returns the ID of the button used to dismiss |
|
54 * it. |
|
55 */ |
|
56 virtual TInt RunLD(); |
|
57 |
|
58 |
|
59 private: // New Functions |
|
60 |
|
61 /** |
|
62 * The default constructor. |
|
63 */ |
|
64 CDevDiagCommonCancelDialogs( CDevDiagEngine& aEngine, |
|
65 TBool aSuspendTestsOnExecute ); |
|
66 |
|
67 /** |
|
68 * Two-phased constructor. |
|
69 */ |
|
70 void ConstructL(); |
|
71 |
|
72 |
|
73 private: // From base class CAknQueryDialog |
|
74 |
|
75 /** |
|
76 * From CAknQueryDialog. |
|
77 * This function is called for a button press on the dialog. It is used |
|
78 * to determine if the dialog may be exited. |
|
79 * |
|
80 * @param aButtonId The id of the button that was pressed. |
|
81 * @return ETrue, if the dialog may exit. EFalse, otherwise. |
|
82 */ |
|
83 virtual TBool OkToExitL( TInt aButtonId ); |
|
84 |
|
85 |
|
86 private: // Data |
|
87 |
|
88 /** |
|
89 * The application engine, which the dialog uses to suspend and resume |
|
90 * test execution. |
|
91 */ |
|
92 CDevDiagEngine& iEngine; |
|
93 |
|
94 /** |
|
95 * Indicates if the dialog should call suspend when it is executed. If |
|
96 * EFalse, then only the watchdog timer is stopped. |
|
97 */ |
|
98 TBool iSuspendTestsOnExecute; |
|
99 |
|
100 TInt iIndex; |
|
101 |
|
102 }; |
|
103 |
|
104 #endif // DEVDIAGCOMMONDIALOGS_H |