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