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