|
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: Class declaration for CDiagRootSuite |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef DIAGROOTSUITE_H |
|
20 #define DIAGROOTSUITE_H |
|
21 |
|
22 |
|
23 // SYSTEM INCLUDES |
|
24 #include <DiagSuitePlugin.h> // MDiagSuitePlugin |
|
25 |
|
26 // USER INCLUDES |
|
27 |
|
28 // fORWARD DECLARATIONS |
|
29 |
|
30 namespace DiagFwInternal |
|
31 { |
|
32 /** |
|
33 * Diagnostics Root Suite |
|
34 * |
|
35 * This class implements root suite. This provides a container for ALL suites |
|
36 * that can be loaded via Plug-in Pool. |
|
37 * |
|
38 * @since S60 v5.0 |
|
39 */ |
|
40 NONSHARABLE_CLASS( CDiagRootSuite ) : public CBase, |
|
41 public MDiagSuitePlugin |
|
42 { |
|
43 public: |
|
44 |
|
45 /** |
|
46 * Two-phased constructors. |
|
47 * |
|
48 * @return New instance of CDiagRootSuite* |
|
49 */ |
|
50 static CDiagRootSuite* NewL(); |
|
51 static CDiagRootSuite* NewLC(); |
|
52 |
|
53 /** |
|
54 * Destructor. |
|
55 */ |
|
56 virtual ~CDiagRootSuite(); |
|
57 |
|
58 public: // from MDiagPlugin |
|
59 /** |
|
60 * Get name of the plug-in |
|
61 * @see MDiagPlugin::GetPluginNameL |
|
62 */ |
|
63 virtual HBufC* GetPluginNameL( TNameLayoutType aLayoutType ) const; |
|
64 |
|
65 /** |
|
66 * Get name of the service it provides. |
|
67 * @see MDiagPlugin::ServiceLogicalName |
|
68 */ |
|
69 virtual const TDesC& ServiceLogicalName() const; |
|
70 |
|
71 /** |
|
72 * Get list af dependencies it requires. |
|
73 * @see MDiagPlugin::GetLogicalDependenciesL |
|
74 */ |
|
75 virtual void GetLogicalDependenciesL( CPtrCArray& aArray ) const; |
|
76 |
|
77 /** |
|
78 * Get Type of plug-in |
|
79 * @see MDiagPlugin::Type |
|
80 */ |
|
81 virtual TPluginType Type() const; |
|
82 |
|
83 /** |
|
84 * Create an icon for this plug-in. |
|
85 * @see MDiagPlugin::CreateIconL |
|
86 */ |
|
87 virtual CGulIcon* CreateIconL() const; |
|
88 |
|
89 /** |
|
90 * Whether this plug-in should be visible to user or not. |
|
91 * @see MDiagPlugin::IsVisible |
|
92 */ |
|
93 virtual TBool IsVisible() const; |
|
94 |
|
95 /** |
|
96 * Whether this plug-in is supported in this build or not. |
|
97 * @see MDiagPlugin::IsSupported |
|
98 */ |
|
99 virtual TBool IsSupported() const; |
|
100 |
|
101 /** |
|
102 * Get localized title of the plug-in |
|
103 * @see MDiagPlugin::GetTitleL |
|
104 */ |
|
105 virtual HBufC* GetTitleL() const; |
|
106 |
|
107 /** |
|
108 * Get localized description of the plug-in |
|
109 * @see MDiagPlugin::GetDescriptionL |
|
110 */ |
|
111 virtual HBufC* GetDescriptionL() const; |
|
112 |
|
113 /** |
|
114 * Uid of the plug-in |
|
115 * @see MDiagPlugin::Uid |
|
116 */ |
|
117 virtual TUid Uid() const; |
|
118 |
|
119 /** |
|
120 * Uid of the parent plug-in |
|
121 * @see MDiagPlugin::ParentUid |
|
122 */ |
|
123 virtual TUid ParentUid() const; |
|
124 |
|
125 /** |
|
126 * Set destructor key for ECOM plug-in |
|
127 * @see MDiagPlugin::SetDtorIdKey |
|
128 */ |
|
129 virtual void SetDtorIdKey( TUid aDtorIdKey ); |
|
130 |
|
131 /** |
|
132 * Custom operation |
|
133 * @see MDiagPlugin::CustomOperationL |
|
134 */ |
|
135 virtual TAny* CustomOperationL( TUid aUid, TAny* aParam ); |
|
136 |
|
137 /** |
|
138 * Custom operation |
|
139 * @see MDiagPlugin::GetCustomL |
|
140 */ |
|
141 virtual TAny* GetCustomL( TUid aUid, TAny* aParam ); |
|
142 |
|
143 /** |
|
144 * Order to appear in the parent |
|
145 * @see MDiagPlugin::Order |
|
146 */ |
|
147 virtual TUint Order() const; |
|
148 |
|
149 /** |
|
150 * Initialize the plug-in for execution. |
|
151 * @see MDiagPlugin::TestSessionBeginL |
|
152 */ |
|
153 virtual void TestSessionBeginL( MDiagEngineCommon& aEngine, |
|
154 TBool aSkipDependencyCheck, |
|
155 TAny* aCustomParams ); |
|
156 |
|
157 /** |
|
158 * Cleanup the plug-in after execution. |
|
159 * @see MDiagPlugin::TestSessionEndL |
|
160 */ |
|
161 virtual void TestSessionEndL( MDiagEngineCommon& aEngine, |
|
162 TBool aSkipDependencyCheck, |
|
163 TAny* aCustomParams ); |
|
164 |
|
165 public: // from MDiagSuitePlugin |
|
166 /** |
|
167 * Get list of children in the specified order. |
|
168 * @see MDiagSuitePlugin::GetChildrenL |
|
169 */ |
|
170 virtual void GetChildrenL( RPointerArray<MDiagPlugin>& aChildren, |
|
171 TSortOrder aOrder ) const; |
|
172 |
|
173 /** |
|
174 * Add child |
|
175 * @see MDiagSuitePlugin::AddChildL |
|
176 */ |
|
177 virtual void AddChildL( MDiagPlugin* aChild ); |
|
178 |
|
179 /** |
|
180 * Prepare suite entering one of its children. |
|
181 * @see MDiagSuitePlugin::PrepareExecutionL |
|
182 */ |
|
183 virtual void PrepareChildrenExecutionL( TDiagSuiteExecParam* aParam, |
|
184 TBool aSkipDependencyCheck, |
|
185 TBool aDependencyExecution ); |
|
186 |
|
187 /** |
|
188 * Finalize suite for exiting one of its children. |
|
189 * @see MDiagSuitePlugin::FinalizeExecutionL |
|
190 */ |
|
191 virtual void FinalizeChildrenExecutionL( TDiagSuiteExecParam* aParam, |
|
192 TBool aSkipDependencyCheck, |
|
193 TBool aDependencyExecution ); |
|
194 |
|
195 /** |
|
196 * Get list of uids of its children it the specified order. |
|
197 * @see MDiagSuitePlugin::GetChildrenUidsL |
|
198 */ |
|
199 virtual void GetChildrenUidsL( RArray<TUid>& aUids, |
|
200 TSortOrder aOrder ) const; |
|
201 |
|
202 /** |
|
203 * Stop execution of PrepareExecutionL or FinalizeExecutionL |
|
204 * @see MDiagSuitePlugin::ExecutionStopL |
|
205 */ |
|
206 virtual void ExecutionStopL( TStopReason aReason ); |
|
207 |
|
208 |
|
209 private: // private constructors |
|
210 |
|
211 /** |
|
212 * C++ Constructor. |
|
213 **/ |
|
214 CDiagRootSuite(); |
|
215 |
|
216 /** |
|
217 * 2nd phase constructor |
|
218 */ |
|
219 void ConstructL(); |
|
220 |
|
221 |
|
222 private: // data |
|
223 |
|
224 /** |
|
225 * iChildren - list of plug-ins it owns. |
|
226 */ |
|
227 RPointerArray<MDiagPlugin> iChildren; |
|
228 }; |
|
229 } // namespace DiagFwInternal |
|
230 #endif // DIAGROOTSUITE_H |
|
231 |
|
232 // End of File |
|
233 |