|
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 /** |
|
97 * From MEikMenuObserver. |
|
98 * Changes MenuPane dynamically. |
|
99 */ |
|
100 void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ); |
|
101 |
|
102 // From CGSParentPlugin |
|
103 |
|
104 /** |
|
105 * See base class. |
|
106 */ |
|
107 TUid UpperLevelViewUid(); |
|
108 |
|
109 |
|
110 /** |
|
111 * See base class. |
|
112 */ |
|
113 void GetHelpContext( TCoeHelpContext& aContext ); |
|
114 |
|
115 // From CGSPluginInterface |
|
116 |
|
117 /** |
|
118 * See base class. |
|
119 */ |
|
120 void GetCaptionL( TDes& aCaption ) const; |
|
121 |
|
122 /** |
|
123 * See base class. |
|
124 */ |
|
125 CGulIcon* CreateIconL( const TUid aIconType ); |
|
126 |
|
127 /** |
|
128 * See base class. |
|
129 */ |
|
130 TInt PluginProviderCategory() const; |
|
131 |
|
132 /** |
|
133 * @see MGSPluginLoadObserver header file. |
|
134 */ |
|
135 void HandlePluginLoaded( KGSPluginLoaderStatus aStatus ); |
|
136 |
|
137 |
|
138 /** |
|
139 * Updates listbox's item's value. |
|
140 * @param aItemId An item which is updated. |
|
141 * |
|
142 */ |
|
143 void UpdateListBoxL( TInt aItemId ); |
|
144 |
|
145 /** |
|
146 * Get CGSConnSettingsPlugin's ccontainer. |
|
147 */ |
|
148 CGSConnSettingsPluginContainer* Container(); |
|
149 |
|
150 /** |
|
151 * From MGSSensorMskObserver. |
|
152 * Checks currently activated item in list and updates MSK label if needed |
|
153 */ |
|
154 void CheckMiddleSoftkeyLabelL(); |
|
155 |
|
156 /** |
|
157 * From MEikListBoxObserver (through CGSBaseView) |
|
158 */ |
|
159 void HandleListBoxEventL( CEikListBox* aListBox, |
|
160 TListBoxEvent aEventType ); |
|
161 |
|
162 |
|
163 protected: // New |
|
164 /** |
|
165 * C++ default constructor. |
|
166 */ |
|
167 CGSConnSettingsPlugin(); |
|
168 |
|
169 /** |
|
170 * Symbian OS default constructor. |
|
171 */ |
|
172 void ConstructL(); |
|
173 |
|
174 private: |
|
175 |
|
176 void NewContainerL(); |
|
177 |
|
178 /** |
|
179 * From CGSBaseView. Handles list box selection |
|
180 */ |
|
181 void HandleListBoxSelectionL(); |
|
182 |
|
183 /** |
|
184 * Show "Join new WLAN networks" setting page |
|
185 */ |
|
186 void ShowUsageOfWlanSettingPageL(); |
|
187 |
|
188 /** |
|
189 * Show "Cellular data usage abroad" setting page |
|
190 */ |
|
191 void ShowDataUsageAbroadSettingPageL(); |
|
192 |
|
193 /** |
|
194 * Show "Cellular data usage in home network" setting page |
|
195 */ |
|
196 void ShowDataUsageInHomeNwSettingPageL(); |
|
197 |
|
198 /** |
|
199 * Removes current label from MSK |
|
200 */ |
|
201 void RemoveCommandFromMSK(); |
|
202 |
|
203 /** |
|
204 * Adds new label for MSK |
|
205 * |
|
206 * @param aResourceId Text of the new label |
|
207 * @param aCommandId Command id of the MSK |
|
208 */ |
|
209 void SetMiddleSoftKeyLabelL( const TInt aResourceId, const TInt aCommandId ); |
|
210 |
|
211 |
|
212 private: //Private data |
|
213 |
|
214 /** |
|
215 * Resource loader |
|
216 */ |
|
217 RConeResourceLoader iResourceLoader; |
|
218 |
|
219 /** |
|
220 * Pointer to model. |
|
221 * Owned by CGSConnSettingsPluginContainer |
|
222 */ |
|
223 CGSConnSettingsPluginModel *iModel; |
|
224 |
|
225 /** |
|
226 * Asynchronous loader for the GS plug-ins. |
|
227 */ |
|
228 CGSPluginLoader* iPluginLoader; |
|
229 |
|
230 /** |
|
231 * Array of the child plugins |
|
232 */ |
|
233 CArrayPtrFlat<CGSPluginInterface>* iPluginArray; |
|
234 |
|
235 /** |
|
236 * Flag is set when wlan is supported |
|
237 */ |
|
238 TBool iIsWlanSupported; |
|
239 }; |
|
240 |
|
241 |
|
242 #endif // GSCONNSETTINGSPLUGIN_H |
|
243 // End of File |