|
1 /* |
|
2 * Copyright (c) 2002 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: |
|
15 * Main settings dialog for Sms. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 #ifndef SMUMSETTINGSDIALOGGSM_H |
|
22 #define SMUMSETTINGSDIALOGGSM_H |
|
23 |
|
24 // INCLUDES |
|
25 #include <smumsettingsdialog.h> // CSmumSettingsDialog |
|
26 |
|
27 // CONSTANTS |
|
28 const TInt KSmumStringLength = 50; |
|
29 |
|
30 // FORWARD DECLARATIONS |
|
31 class CAknNavigationControlContainer; |
|
32 class CRepository; |
|
33 |
|
34 // MACROS |
|
35 |
|
36 // DATA TYPES |
|
37 enum TSmumSettingsValidityPeriod |
|
38 { |
|
39 ESmumValidityPeriodHour = 0, |
|
40 ESmumValidityPeriodSixHours = 1, |
|
41 ESmumValidityPeriod24Hours = 2, |
|
42 ESmumValidityPeriod3Days = 3, |
|
43 ESmumValidityPeriodWeek = 4, |
|
44 ESmumValidityPeriodMaximum = 5 |
|
45 }; |
|
46 |
|
47 enum TSmumSettingsConversion |
|
48 { |
|
49 ESmumConversionNone = 0, |
|
50 ESmumConversionFax = 1, |
|
51 ESmumConversionPaging = 2 |
|
52 }; |
|
53 |
|
54 enum TSmumSettingsDelivery |
|
55 { |
|
56 ESmumDeliveryImmediately = 0, |
|
57 ESmumDeliveryUponRequest = 1 |
|
58 }; |
|
59 |
|
60 enum TSmumConnectionType |
|
61 { |
|
62 ESmumPreferGSMConnection = 0, |
|
63 ESmumPreferGPRSConnection = 1 |
|
64 }; |
|
65 |
|
66 // LBI = ListBoxIndex |
|
67 enum TSmumMainSmsSettingsSettingLBIndex |
|
68 { |
|
69 ESmumServiceCentresLBI, //= 0 |
|
70 ESmumServiceCentreInUseLBI, //= 1 |
|
71 ESmumEmailServiceCentreLBI, //= 2, |
|
72 ESmumCharSupportInUseLBI, //= 3 |
|
73 ESmumDeliveryReportLBI, //= 4 |
|
74 ESmumValidityPeriodLBI, //= 5 |
|
75 ESmumMessageConversionLBI, //= 6 |
|
76 ESmumPreferredConnectionLBI, //= 7 |
|
77 ESmumReplyViaSameCentreLBI //= 8 |
|
78 }; |
|
79 |
|
80 enum TSmumMainSmsSendingOptSettingLBIndex |
|
81 { |
|
82 ESmumSendOptServiceCentreInUseLBI, //= 0, |
|
83 ESmumSendOptCharSupportInUseLBI, //= 1, |
|
84 ESmumSendOptDeliveryReportLBI, //= 2, |
|
85 ESmumSendOptValidityPeriodLBI, //= 3, |
|
86 ESmumSendOptMessageConversionLBI, //= 4, |
|
87 ESmumSendOptReplyViaSameCentreLBI //= 5 |
|
88 }; |
|
89 |
|
90 |
|
91 // FUNCTION PROTOTYPES |
|
92 |
|
93 // FORWARD DECLARATIONS |
|
94 class CSmumSettingsArray; |
|
95 class CEikTextListBox; |
|
96 class CAknTitlePane; |
|
97 |
|
98 // CLASS DECLARATION |
|
99 |
|
100 /** |
|
101 * SMUM's main sms settings dialog. |
|
102 */ |
|
103 NONSHARABLE_CLASS( CSmumMainSettingsDialogGSM ) : public CSmumMainSettingsDialog |
|
104 { |
|
105 public: // Constructors and destructor |
|
106 |
|
107 /** |
|
108 * Two-phased constructor. |
|
109 */ |
|
110 static CSmumMainSettingsDialog* NewL( |
|
111 CSmsSettings& aSettings, |
|
112 TInt aTypeOfSettings, |
|
113 TInt& aExitCode, |
|
114 TInt& aCharSetSupportForSendingOptions, |
|
115 CSmsHeader* aSmsHeader = NULL ); |
|
116 |
|
117 /** |
|
118 * Destructor. |
|
119 */ |
|
120 ~CSmumMainSettingsDialogGSM(); |
|
121 |
|
122 protected: // Functions from base classes |
|
123 |
|
124 /** |
|
125 * From CAknDialog |
|
126 */ |
|
127 void ProcessCommandL(TInt aCommandId); |
|
128 |
|
129 /** |
|
130 * From CEikDialog |
|
131 */ |
|
132 void PreLayoutDynInitL(); |
|
133 |
|
134 /** |
|
135 * From CEikDialog |
|
136 */ |
|
137 TBool OkToExitL(TInt aButtonId); |
|
138 |
|
139 /** |
|
140 * From CEikDialog |
|
141 */ |
|
142 void DynInitMenuPaneL(TInt aMenuId, CEikMenuPane* aMenuPane); |
|
143 |
|
144 /** |
|
145 * From MEikListBoxObserver |
|
146 */ |
|
147 void HandleListBoxEventL( |
|
148 CEikListBox* aListBox, |
|
149 TListBoxEvent aEventType ); |
|
150 |
|
151 /** |
|
152 * From CAknDialog |
|
153 */ |
|
154 TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType); |
|
155 |
|
156 /** |
|
157 * From CCoeControl, returns help context |
|
158 */ |
|
159 void GetHelpContext(TCoeHelpContext& aContext) const; |
|
160 |
|
161 /** |
|
162 * From CEikDialog |
|
163 */ |
|
164 void HandleResourceChange( TInt aType ); |
|
165 |
|
166 private: // New functions |
|
167 enum TCSPSupportedSettings |
|
168 { |
|
169 // Support for validity period |
|
170 EValidityPeriodSupport = 0x0001, |
|
171 // Support for Protocol ID "Message conversion" |
|
172 EProtocolIDSupport = 0x0002, |
|
173 // Support for delivery repot |
|
174 EDeliveryReportSupport = 0x0004, |
|
175 // Support for Reply Path "Reply via same centre" |
|
176 EReplyPathSupport = 0x0008, |
|
177 }; |
|
178 |
|
179 /** |
|
180 * Initializing the values for listboxes in Sms Settings from Sms settings. |
|
181 * @param none |
|
182 * @return nothing |
|
183 */ |
|
184 void OpeningDialogL(); |
|
185 |
|
186 /** |
|
187 * Updating the values from listboxes to Sms settings. |
|
188 * @param none |
|
189 * @return nothing |
|
190 */ |
|
191 void ClosingDialogL(); |
|
192 |
|
193 /** |
|
194 * Launch Service Centres dialog. |
|
195 * @param none |
|
196 * @return TInt button id |
|
197 */ |
|
198 TInt LaunchServiceCentresDialogL(); |
|
199 |
|
200 /** |
|
201 * Updating "SC in use" dynamic array. |
|
202 * @param none |
|
203 * @return nothing |
|
204 */ |
|
205 void UpdateSCInUseArrayL(); |
|
206 |
|
207 /** |
|
208 * Check what to open depending the focus of listbox |
|
209 * @param TBool aEnterPressed |
|
210 * @return nothing |
|
211 */ |
|
212 void CheckOpeningListBoxItemL(TBool aEnterPressed); |
|
213 |
|
214 /** |
|
215 * Set item to listbox. |
|
216 * @param TInt aSettingLBIndex, TInt aValue |
|
217 * @return nothing |
|
218 */ |
|
219 void SetItem(TInt aSettingLBIndex, TInt aValue);// new method |
|
220 |
|
221 /** |
|
222 * Get item value from listbox. |
|
223 * @param TInt TInt aSettingLBIndex |
|
224 * @return TInt |
|
225 */ |
|
226 TInt Item(TInt aSettingLBIndex) const;// new method |
|
227 |
|
228 /** |
|
229 * Launches help application |
|
230 */ |
|
231 void LaunchHelpL(); |
|
232 |
|
233 /** |
|
234 * Returns the index of variated listbox selection |
|
235 * @since 2.6 |
|
236 * @param aListSelection, listbox selection |
|
237 * @return TInt, variated index of selection |
|
238 */ |
|
239 TInt GetVariatedSelectionIndex( |
|
240 const TInt aListSelection ) const; |
|
241 |
|
242 /** |
|
243 * Delete not supported settings according to CSP bits |
|
244 * and Email over sms feature |
|
245 * @since 2.6 |
|
246 */ |
|
247 void DeleteVariatedSettings(); |
|
248 |
|
249 /** |
|
250 * Deletes one single setting item from settings arrays |
|
251 * @since 2.6 |
|
252 * @param aIndex index of the setting in array that will be removed |
|
253 */ |
|
254 void DeleteSettingItemFromArrays( TInt aIndex ); |
|
255 |
|
256 /** |
|
257 * Read CSP bits from sim |
|
258 * @since 2.6 |
|
259 */ |
|
260 void ReadCspSupportBitsL(); |
|
261 |
|
262 /** |
|
263 * Reads the setting value and sets it to member variable |
|
264 * @since 3.0 |
|
265 * @return TInt, 0 for Full charset support, 1 for Reduced |
|
266 */ |
|
267 TInt ReadCharSetSupport(); |
|
268 |
|
269 /** |
|
270 * Displays the configuration page for |
|
271 * Email Over Sms settings(SMSC and Email Gateway) |
|
272 * @since 2.6 |
|
273 */ |
|
274 void DisplayEmailOverSmsSettingsL(); |
|
275 |
|
276 /** |
|
277 * Updates the Middle Softkey |
|
278 * @since 3.1 |
|
279 */ |
|
280 void UpdateMskL( ); |
|
281 |
|
282 /** |
|
283 * Does delayed exit after specified delay |
|
284 * @since S60 v5.0 |
|
285 * @param aDelayTime Requested delay in microseconds |
|
286 */ |
|
287 void DoDelayedExitL( const TInt aDelay ); |
|
288 |
|
289 /** |
|
290 * Used for exiting application properly |
|
291 * @since S60 v5.0 |
|
292 * param aThis Pointer to this AppUi |
|
293 */ |
|
294 static TInt DelayedExit( TAny* aThis ); |
|
295 |
|
296 private : |
|
297 |
|
298 /** |
|
299 * C++ default constructor. |
|
300 */ |
|
301 CSmumMainSettingsDialogGSM( |
|
302 CSmsSettings& aSettings, |
|
303 TInt aTypeOfSettings, |
|
304 TInt& aExitCode, |
|
305 TInt& aCharSetSupportForSendingOptions, |
|
306 CSmsHeader* aSmsHeader = NULL ); |
|
307 |
|
308 /** |
|
309 * By default Symbian 2nd phase constructor is private. |
|
310 */ |
|
311 void ConstructL(); |
|
312 |
|
313 private: // Data |
|
314 CSmumSettingsArray* iSettingsArray; |
|
315 CEikTextListBox* iListBox; |
|
316 CSmsSettings& iSettings; |
|
317 TInt iTypeOfSettings; // for knowing the type 0 = sms settings, 1 = send options, 2 = bio |
|
318 TInt& iExitCode; |
|
319 CSmsHeader* iSmsHeader; // for replypath handling |
|
320 CAknTitlePane* iTitlePane; // for handling titlepanes |
|
321 HBufC* iPreviousTitleText; // - " - |
|
322 TBool iHelpFeatureSupported; |
|
323 CAknNavigationControlContainer* iSmumNaviPane; //not owned |
|
324 TUint iCSPFeatures; |
|
325 CArrayFixFlat<TInt>* iSettingsArrayIndex; |
|
326 TInt& iCharacterSupport; |
|
327 CRepository* iCentralRapository; |
|
328 CPeriodic* iIdle; |
|
329 TBool iUseSimSCsOnly; |
|
330 TBool iEmailFeatureSupported; |
|
331 TInt iRemoveReplyScSetting; |
|
332 TInt iStoreSettingsIndex; |
|
333 TInt iMskId; |
|
334 }; |
|
335 |
|
336 #endif // SMUMSETTINGSDIALOGGSM_H |
|
337 |
|
338 // End of File |