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: Header file for Connectivity Settings plugin. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef GSCONNSETTINGSPLUGIN_H |
|
20 #define GSCONNSETTINGSPLUGIN_H |
|
21 |
|
22 // Includes |
|
23 #include <gspluginloader.h> |
|
24 #include <gsbaseview.h> |
|
25 #include "gsconnsettingsmskobserver.h" |
|
26 |
|
27 #include <aknview.h> |
|
28 #include <eikclb.h> |
|
29 |
|
30 // Classes referenced |
|
31 class CAknViewAppUi; |
|
32 class RConeResourceLoader; |
|
33 class CGSConnSettingsPluginModel; |
|
34 class CGSConnSettingsPluginContainer; |
|
35 |
|
36 // Constants |
|
37 |
|
38 //Should we put these to .hrh |
|
39 // This UID is used for both the view UID |
|
40 // and the ECOM plugin implementation ID. |
|
41 const TUid KGSConnSettingsPluginUid = { 0x200255B9 }; |
|
42 const int KGConnSettingsPluginCount = 10; |
|
43 |
|
44 _LIT( KGSConnSettingsPluginResourceFileName, "z:gsconnsettingspluginrsc.rsc" ); |
|
45 _LIT( KGSConnSettingsPluginIconDirAndName, "z:gsconnsettingsplugin.mbm"); // Use KDC_BITMAP_DIR |
|
46 |
|
47 // CLASS DECLARATION |
|
48 |
|
49 /** |
|
50 * CConnSettingsPlugin view class. |
|
51 * |
|
52 * @since Series60_3.1 |
|
53 */ |
|
54 class CGSConnSettingsPlugin : public CGSBaseView, public MGSPluginLoadObserver, public MGSConnSettingsMskObserver |
|
55 { |
|
56 public: // Constructors and destructor |
|
57 |
|
58 /** |
|
59 * Symbian OS two-phased constructor |
|
60 * @return |
|
61 */ |
|
62 static CGSConnSettingsPlugin* NewL( TAny* aInitParams ); |
|
63 |
|
64 /** |
|
65 * Destructor. |
|
66 */ |
|
67 ~CGSConnSettingsPlugin(); |
|
68 |
|
69 // From CAknView |
|
70 |
|
71 /** |
|
72 * See base class. |
|
73 */ |
|
74 TUid Id() const; |
|
75 |
|
76 /** |
|
77 * Handles commands. |
|
78 * @param aCommand Command to be handled. |
|
79 * |
|
80 */ |
|
81 void HandleCommandL( TInt aCommand ); |
|
82 |
|
83 |
|
84 /** |
|
85 * See base class. |
|
86 */ |
|
87 void DoActivateL( const TVwsViewId& aPrevViewId, |
|
88 TUid aCustomMessageId, |
|
89 const TDesC8& aCustomMessage ); |
|
90 /** |
|
91 * See base class. |
|
92 */ |
|
93 void DoDeactivate(); |
|
94 |
|
95 /** |
|
96 * See base class. |
|
97 */ |
|
98 void HandleForegroundEventL( TBool aForeground ); |
|
99 |
|
100 |
|
101 /** |
|
102 * From MEikMenuObserver. |
|
103 * Changes MenuPane dynamically. |
|
104 */ |
|
105 void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ); |
|
106 |
|
107 // From CGSParentPlugin |
|
108 |
|
109 /** |
|
110 * See base class. |
|
111 */ |
|
112 TUid UpperLevelViewUid(); |
|
113 |
|
114 |
|
115 /** |
|
116 * See base class. |
|
117 */ |
|
118 void GetHelpContext( TCoeHelpContext& aContext ); |
|
119 |
|
120 // From CGSPluginInterface |
|
121 |
|
122 /** |
|
123 * See base class. |
|
124 */ |
|
125 void GetCaptionL( TDes& aCaption ) const; |
|
126 |
|
127 /** |
|
128 * See base class. |
|
129 */ |
|
130 CGulIcon* CreateIconL( const TUid aIconType ); |
|
131 |
|
132 /** |
|
133 * See base class. |
|
134 */ |
|
135 TInt PluginProviderCategory() const; |
|
136 |
|
137 /** |
|
138 * @see MGSPluginLoadObserver header file. |
|
139 */ |
|
140 void HandlePluginLoaded( KGSPluginLoaderStatus aStatus ); |
|
141 |
|
142 |
|
143 /** |
|
144 * Updates listbox's item's value. |
|
145 * @param aItemId An item which is updated. |
|
146 * |
|
147 */ |
|
148 void UpdateListBoxL( TInt aItemId ); |
|
149 |
|
150 /** |
|
151 * Get CGSConnSettingsPlugin's ccontainer. |
|
152 */ |
|
153 CGSConnSettingsPluginContainer* Container(); |
|
154 |
|
155 /** |
|
156 * From MGSSensorMskObserver. |
|
157 * Checks currently activated item in list and updates MSK label if needed |
|
158 */ |
|
159 void CheckMiddleSoftkeyLabelL(); |
|
160 |
|
161 /** |
|
162 * From MEikListBoxObserver (through CGSBaseView) |
|
163 */ |
|
164 void HandleListBoxEventL( CEikListBox* aListBox, |
|
165 TListBoxEvent aEventType ); |
|
166 |
|
167 |
|
168 protected: // New |
|
169 /** |
|
170 * C++ default constructor. |
|
171 */ |
|
172 CGSConnSettingsPlugin(); |
|
173 |
|
174 /** |
|
175 * Symbian OS default constructor. |
|
176 */ |
|
177 void ConstructL(); |
|
178 |
|
179 private: |
|
180 |
|
181 void NewContainerL(); |
|
182 |
|
183 /** |
|
184 * From CGSBaseView. Handles list box selection |
|
185 */ |
|
186 void HandleListBoxSelectionL(); |
|
187 |
|
188 /** |
|
189 * Show "Join new WLAN networks" setting page |
|
190 */ |
|
191 void ShowUsageOfWlanSettingPageL(); |
|
192 |
|
193 /** |
|
194 * Show "Cellular data usage abroad" setting page |
|
195 */ |
|
196 void ShowDataUsageAbroadSettingPageL(); |
|
197 |
|
198 /** |
|
199 * Show "Cellular data usage in home network" setting page |
|
200 */ |
|
201 void ShowDataUsageInHomeNwSettingPageL(); |
|
202 |
|
203 /** |
|
204 * Removes current label from MSK |
|
205 */ |
|
206 void RemoveCommandFromMSK(); |
|
207 |
|
208 /** |
|
209 * Adds new label for MSK |
|
210 * |
|
211 * @param aResourceId Text of the new label |
|
212 * @param aCommandId Command id of the MSK |
|
213 */ |
|
214 void SetMiddleSoftKeyLabelL( const TInt aResourceId, const TInt aCommandId ); |
|
215 |
|
216 |
|
217 private: //Private data |
|
218 |
|
219 /** |
|
220 * Resource loader |
|
221 */ |
|
222 RConeResourceLoader iResourceLoader; |
|
223 |
|
224 /** |
|
225 * Pointer to model. |
|
226 * Owned by CGSConnSettingsPluginContainer |
|
227 */ |
|
228 CGSConnSettingsPluginModel *iModel; |
|
229 |
|
230 /** |
|
231 * Asynchronous loader for the GS plug-ins. |
|
232 */ |
|
233 CGSPluginLoader* iPluginLoader; |
|
234 |
|
235 /** |
|
236 * Array of the child plugins |
|
237 */ |
|
238 CArrayPtrFlat<CGSPluginInterface>* iPluginArray; |
|
239 |
|
240 /** |
|
241 * Flag is set when wlan is supported |
|
242 */ |
|
243 TBool iIsWlanSupported; |
|
244 }; |
|
245 |
|
246 |
|
247 #endif // GSCONNSETTINGSPLUGIN_H |
|
248 // End of File |
|