|
1 /* |
|
2 * Copyright (c) 2006 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: Container for the Network sub-folder |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef GSNETWORKPLUGINCONTAINER_H |
|
20 #define GSNETWORKPLUGINCONTAINER_H |
|
21 |
|
22 // INCLUDES |
|
23 #include "GSNetworkPluginModel.h" |
|
24 #include "GsNetworkPlugin.hrh" |
|
25 #include "GSPhoneSettingConstants.h" //for GS & PS constants |
|
26 #include <bldvariant.hrh> |
|
27 #include <gsbasecontainer.h> |
|
28 #include <MPsetNetworkModeObs.h> |
|
29 #include "MGsFWMSKLabelObserver.h" |
|
30 |
|
31 // CONSTANTS |
|
32 |
|
33 // MACROS |
|
34 |
|
35 // DATA TYPES |
|
36 |
|
37 // FUNCTION PROTOTYPES |
|
38 |
|
39 // FORWARD DECLARATIONS |
|
40 class CPsetNetwork; |
|
41 class MEikListBoxObserver; |
|
42 class CGSListBoxItemTextArray; |
|
43 class CGSRadioButtonSettingPageItemTextArray; |
|
44 class CPsetContainer; |
|
45 class CGSNetworkPluginModel; |
|
46 class CGSNetworkPlugin; |
|
47 |
|
48 // CLASS DECLARATION |
|
49 |
|
50 /** |
|
51 * GSNetworkPluginContainer container class |
|
52 * |
|
53 * container class for Device settings view |
|
54 * @lib GSNetworkPlugin.lib |
|
55 * @since Series 60_3.1 |
|
56 */ |
|
57 class CGSNetworkPluginContainer : public CGSBaseContainer |
|
58 { |
|
59 public: |
|
60 enum { |
|
61 ENetFirstBit = 1, |
|
62 ENetSecondBit = 2 |
|
63 }; |
|
64 |
|
65 public: // Constructors and destructor |
|
66 |
|
67 |
|
68 /** C++ Constructor */ |
|
69 CGSNetworkPluginContainer( CGSNetworkPlugin* aPlugin ); |
|
70 |
|
71 /** |
|
72 * Symbian OS constructor. |
|
73 * @param aRect Listbox's rect. |
|
74 * |
|
75 */ |
|
76 void ConstructL( const TRect& aRect ); |
|
77 |
|
78 /** |
|
79 * Destructor. |
|
80 */ |
|
81 ~CGSNetworkPluginContainer(); |
|
82 |
|
83 public: //new |
|
84 |
|
85 /** |
|
86 * Updates listbox's item's value. |
|
87 * @since Series 60_3.1 |
|
88 * @param aItemId An item which is updated. |
|
89 */ |
|
90 void UpdateListBoxL( TInt aItemId, TInt aValue ); |
|
91 |
|
92 /** |
|
93 * Retrieves the currently selected listbox feature id |
|
94 * @since Series 60_3.1 |
|
95 * @return feature id. |
|
96 */ |
|
97 |
|
98 TInt CurrentFeatureId() const; |
|
99 /** |
|
100 * Gets currently active network selection mode. |
|
101 * @return currently active network selection mode |
|
102 */ |
|
103 TInt GetSelectionMode(); |
|
104 |
|
105 /** |
|
106 * Gets Mcn value from model. |
|
107 * @param aMcnValue MCN value read from shared data. |
|
108 */ |
|
109 void GetMcnValue( TInt &aMcnValue ); |
|
110 |
|
111 /** |
|
112 * Sets MCN value to model. |
|
113 * @param aMcnValue MCN value written to shared data. |
|
114 */ |
|
115 void SetMcnValue( TInt &aMcnValue ); |
|
116 |
|
117 /** |
|
118 * Trims non-supported variable options from the array |
|
119 * This array items are displayed as radio button setting page items |
|
120 * |
|
121 * @param aItemArray array contents to trim from |
|
122 */ |
|
123 void CheckAndAlterContentsL( CGSRadioButtonSettingPageItemTextArray& |
|
124 aItemArray ); |
|
125 |
|
126 /** |
|
127 * return the model pointer |
|
128 */ |
|
129 CGSNetworkPluginModel* NetPluginModel(); |
|
130 |
|
131 /** |
|
132 * Defines observer for the middle softkey label changes. |
|
133 * Can only be set once. Further attempts are ignored. |
|
134 * @since S60 v3.1 |
|
135 */ |
|
136 void SetMiddleSoftkeyObserver( MGsFWMSKObserver* aObserver ); |
|
137 |
|
138 /** |
|
139 * OfferKeyEvent to this Call Container class for updating the label |
|
140 * Up and Down rocker keys are handled |
|
141 * @since S60 v3.1 |
|
142 */ |
|
143 TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, |
|
144 TEventCode aType ); |
|
145 |
|
146 /** |
|
147 * Callback from model. |
|
148 */ |
|
149 void HandleNetworkModeChangeL(); |
|
150 |
|
151 /** |
|
152 * Returns the current selection of network mode. Note! network |
|
153 * selection can be unknow in case network is slow and actual data |
|
154 * has not yet been received... |
|
155 * @return current network selection. |
|
156 */ |
|
157 TGSNetworkModeItems GetCurrentNetworkModeSelectionL(); |
|
158 |
|
159 /** |
|
160 * Sets the current selection of network mode |
|
161 * @param aNetworkMode current selection |
|
162 */ |
|
163 void SetCurrentNetworkModeSelectionL( |
|
164 TGSNetworkModeItems aNetworkModeLbxItem ); |
|
165 |
|
166 protected: // from CGSBaseContainer |
|
167 /** |
|
168 * Creates list box. |
|
169 * |
|
170 * @param aResLbxId is resource number to create |
|
171 */ |
|
172 void ConstructListBoxL( TInt aResLbxId ); |
|
173 |
|
174 /** |
|
175 * Required for help. |
|
176 * |
|
177 */ |
|
178 void GetHelpContext(TCoeHelpContext& aContext) const; |
|
179 |
|
180 private: //new |
|
181 |
|
182 /** |
|
183 * Creates list box items. |
|
184 */ |
|
185 void CreateListBoxItemsL(); |
|
186 |
|
187 /** |
|
188 * Creates Network list box item. |
|
189 * @param aValue value of setting item. |
|
190 */ |
|
191 void MakeNwItemL( TInt aValue = -1 ); |
|
192 |
|
193 /** |
|
194 * Creates MCN list box item. |
|
195 */ |
|
196 void MakeMcnItemL(); |
|
197 |
|
198 /** |
|
199 * Creates Network mode UI list box item. |
|
200 */ |
|
201 void MakeNwModeUiItemL(); |
|
202 |
|
203 private: // Member variables |
|
204 |
|
205 // Resource based features |
|
206 CGSListBoxItemTextArray* iListboxItemArray; |
|
207 |
|
208 // CGSNetworkPluginModel is the model class of Network plugin. |
|
209 CGSNetworkPluginModel* iModel; |
|
210 |
|
211 // Currently active network item in listbox. |
|
212 TGSNetworkModeItems iSelectedNetworkModeLbxItem; |
|
213 |
|
214 /** |
|
215 * Middle softkey label observer. |
|
216 * Own. |
|
217 */ |
|
218 MGsFWMSKObserver* iMSKObserver; |
|
219 |
|
220 /** |
|
221 * Reference to container's owner. Not owned. |
|
222 */ |
|
223 CGSNetworkPlugin* iPlugin; |
|
224 |
|
225 }; |
|
226 |
|
227 #endif //GSNETWORKPLUGINCONTAINER_H |
|
228 |
|
229 //End of File |