|
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: Plug-in view. Handles test plug-ins. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef DEVDIAGPLUGINVIEW_H |
|
20 #define DEVDIAGPLUGINVIEW_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <aknview.h> |
|
24 #include "devdiagengineobserver.h" |
|
25 |
|
26 // MACROS |
|
27 |
|
28 // DATA TYPES |
|
29 |
|
30 // FUNCTION PROTOTYPES |
|
31 |
|
32 // FORWARD DECLARATIONS |
|
33 class CAknView; |
|
34 class CDevDiagPluginContainer; |
|
35 class CDevDiagEngine; |
|
36 class CDevDiagExecResults; |
|
37 |
|
38 // CLASS DEFINITION |
|
39 /** |
|
40 * CDevDiagPluginView view class |
|
41 * @since S60 5.0 |
|
42 * |
|
43 */ |
|
44 class CDevDiagPluginView : public CAknView, public MDevDiagEngineObserver |
|
45 { |
|
46 |
|
47 public: // Constructors and destructor. |
|
48 |
|
49 /** |
|
50 * Symbian OS two-phased constructor. |
|
51 * @return a new view. |
|
52 */ |
|
53 static CDevDiagPluginView* NewL( CDevDiagEngine& aEngine, TUid aParentSuiteUid ); |
|
54 |
|
55 /** |
|
56 * Destructor. |
|
57 */ |
|
58 ~CDevDiagPluginView(); |
|
59 |
|
60 |
|
61 public: //From CAknView |
|
62 |
|
63 /** |
|
64 * From CAknView Handles user commands. |
|
65 * @since Series 60 3.1 |
|
66 * @param aCommand The command identifier. |
|
67 * @return None. |
|
68 */ |
|
69 void HandleCommandL( TInt aCommand ); |
|
70 |
|
71 /** |
|
72 * From CAknView. |
|
73 * Returns views id. |
|
74 **/ |
|
75 TUid Id() const; |
|
76 |
|
77 public: // engine observer |
|
78 |
|
79 virtual void HandleEngineCommandL( TAppEngineCommand aCommand, |
|
80 TInt aError, |
|
81 TAny* aCustom ); |
|
82 |
|
83 public: |
|
84 |
|
85 /** |
|
86 * Display confirmation dialog after successful group execution. |
|
87 * succesful execution means that all tests have the following result: |
|
88 * - passed |
|
89 * - cancelled |
|
90 * - skipped |
|
91 **/ |
|
92 void DisplayConfirmationDialogL(TInt aResourceId); |
|
93 |
|
94 /** |
|
95 * Displays message query dialog. The dialog lists all tests cases that failed. |
|
96 **/ |
|
97 void DisplayMessageQueryDialogFailedResultsL(); |
|
98 |
|
99 protected: |
|
100 /** |
|
101 * From CAknView Activates view. |
|
102 * @since Series 60 3.1 |
|
103 * @param aPrevViewId Id of previous view. |
|
104 * @param aCustomMessageId Custom message id. |
|
105 * @param aCustomMessage Custom message. |
|
106 * @return None. |
|
107 */ |
|
108 virtual void DoActivateL (const TVwsViewId &aPrevViewId, |
|
109 TUid aCustomMessageId, |
|
110 const TDesC8 &aCustomMessage); |
|
111 /** |
|
112 * From CAknView Deactivates view. |
|
113 * @since Series 60 3.1 |
|
114 * @param None. |
|
115 * @return None. |
|
116 */ |
|
117 virtual void DoDeactivate(); |
|
118 |
|
119 /** |
|
120 * Change Title. |
|
121 * |
|
122 * @aResourceId Title text resource. |
|
123 **/ |
|
124 void ChangeTitleL(TInt aResourceId); |
|
125 |
|
126 /** |
|
127 * Set Context menu. |
|
128 **/ |
|
129 void SetContextMenu(); |
|
130 |
|
131 /** |
|
132 * Display a message query dialog. |
|
133 * |
|
134 * @param aResourceId Message query resource ID. |
|
135 **/ |
|
136 TBool MessageQueryDialogLaunchL( TInt aResourceId ); |
|
137 |
|
138 /** |
|
139 * Create result texts for failed test cases. |
|
140 * |
|
141 * @param aExecResults Execution results. |
|
142 * @return New heap descriptor. Caller owns the descriptor. |
|
143 **/ |
|
144 HBufC* CreateResultsTextsForFailedTestsLC( const CDevDiagExecResults& aExecResults ); |
|
145 |
|
146 private: //Constructors |
|
147 |
|
148 /** |
|
149 * ConstructL. |
|
150 **/ |
|
151 void ConstructL(); |
|
152 |
|
153 /** |
|
154 * Normal constructor. |
|
155 * |
|
156 * @param aEngine Diagnostics Engine. |
|
157 * @param aParentSuiteUid UID of the parent suite. |
|
158 **/ |
|
159 CDevDiagPluginView( CDevDiagEngine& aEngine, TUid aParentSuiteUid ); |
|
160 |
|
161 |
|
162 private: |
|
163 |
|
164 // Container. Own. |
|
165 CDevDiagPluginContainer* iContainer; |
|
166 |
|
167 // Diagnostics Engine. |
|
168 CDevDiagEngine& iEngine; |
|
169 |
|
170 // Main view UID. |
|
171 TUid iParentSuiteUid; |
|
172 }; |
|
173 |
|
174 #endif //DEVDIAGPLUGINVIEW_H |
|
175 |
|
176 // End of File |