|
1 /* |
|
2 * Copyright (c) 2002-2008 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 SMUMSETTINGSDIALOGCDMA_H |
|
22 #define SMUMSETTINGSDIALOGCDMA_H |
|
23 |
|
24 // INCLUDES |
|
25 #include <SmumSettingsDialog.h> // CSmumSettingsDialog |
|
26 #include <bldvariant.hrh> |
|
27 #include <CPbkContactEngine.h> // Phonebook Engine |
|
28 #include <CPbkContactItem.h> // Phonebook Contact |
|
29 #include <RPbkViewResourceFile.h> |
|
30 #include <CentralRepository.h> |
|
31 #include <MessagingInternalCRKeys.h> |
|
32 |
|
33 // DATA TYPES |
|
34 |
|
35 // LBI = ListBoxIndex |
|
36 |
|
37 enum TSmumMainSmsSettingsSettingLBIndexCDMA |
|
38 { |
|
39 ESmumPriorityLevelLBICDMA = 0, |
|
40 ESmumCallbackNumberLBICDMA = 1, |
|
41 ESmumMessageQueuingLBICDMA = 2, |
|
42 ESmumDeliveryReportLBICDMA = 3 |
|
43 }; |
|
44 |
|
45 enum TSmumMainSmsSendingOptSettingLBIndexCDMA |
|
46 { |
|
47 ESmumSendOptPriorityLevelLBICDMA = 0, |
|
48 ESmumSendOptCallbackNumberLBICDMA = 1, |
|
49 ESmumCdmaSendOptDeliveryReportLBICDMA = 2 |
|
50 }; |
|
51 |
|
52 enum TSmumSettingsPriorityCDMA |
|
53 { |
|
54 ESmumPriorityNormal = 0, |
|
55 ESmumPriorityUrgent = 1 |
|
56 }; |
|
57 |
|
58 enum TSmumCallbackNumberSettingsList |
|
59 { |
|
60 ESmumUseThisPhoneNumber = 0, |
|
61 ESmumAddFromContact = 1, |
|
62 ESmumEnterPhoneNumber = 2, |
|
63 ESmumNoCallbackNumber = 3 |
|
64 }; |
|
65 |
|
66 enum TSmumMessageQueuing |
|
67 { |
|
68 ESmumQueuingOn =0, |
|
69 ESmumQueuingOff =1 |
|
70 }; |
|
71 |
|
72 // FUNCTION PROTOTYPES |
|
73 |
|
74 // FORWARD DECLARATIONS |
|
75 NONSHARABLE_CLASS(CSmumSettingsArray); |
|
76 NONSHARABLE_CLASS(CEikTextListBox); |
|
77 NONSHARABLE_CLASS(CAknTitlePane); |
|
78 NONSHARABLE_CLASS(CSmsAccount); |
|
79 |
|
80 // CLASS DECLARATION |
|
81 |
|
82 /** |
|
83 * SMUM's main sms settings dialog. |
|
84 */ |
|
85 NONSHARABLE_CLASS(CSmumMainSettingsDialogCDMA) : public CSmumMainSettingsDialog |
|
86 { |
|
87 public: // Constructors and destructor |
|
88 |
|
89 /** |
|
90 * Two-phased constructor. |
|
91 */ |
|
92 static CSmumMainSettingsDialog* NewL( |
|
93 CSmsSettings& aSettings, |
|
94 TInt aTypeOfSettings, |
|
95 TInt& aExitCode, |
|
96 CSmsHeader* aSmsHeader = NULL ); |
|
97 |
|
98 /** |
|
99 * Destructor. |
|
100 */ |
|
101 ~CSmumMainSettingsDialogCDMA(); |
|
102 |
|
103 protected: // Functions from base classes |
|
104 |
|
105 /** |
|
106 * From CAknDialog |
|
107 */ |
|
108 void ProcessCommandL(TInt aCommandId); |
|
109 |
|
110 /** |
|
111 * From CEikDialog |
|
112 */ |
|
113 void PreLayoutDynInitL(); |
|
114 |
|
115 /** |
|
116 * From CEikDialog |
|
117 */ |
|
118 TBool OkToExitL(TInt aButtonId); |
|
119 |
|
120 /** |
|
121 * From CEikDialog |
|
122 */ |
|
123 void DynInitMenuPaneL(TInt aMenuId, CEikMenuPane* aMenuPane); |
|
124 |
|
125 /** |
|
126 * From MEikListBoxObserver |
|
127 */ |
|
128 void HandleListBoxEventL( |
|
129 CEikListBox* aListBox, |
|
130 TListBoxEvent aEventType ); |
|
131 |
|
132 /** |
|
133 * From CAknDialog |
|
134 */ |
|
135 TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType); |
|
136 |
|
137 /** |
|
138 * From CCoeControl, returns help context |
|
139 */ |
|
140 void GetHelpContext(TCoeHelpContext& aContext) const; |
|
141 |
|
142 private: // New functions |
|
143 |
|
144 /** |
|
145 * Initializing the values for listboxes in Sms Settings from Sms settings. |
|
146 * @param none |
|
147 * @return nothing |
|
148 */ |
|
149 void OpeningDialogL(); |
|
150 |
|
151 /** |
|
152 * Updating the values from listboxes to Sms settings. |
|
153 * @param none |
|
154 * @return nothing |
|
155 */ |
|
156 void ClosingDialogL() const; |
|
157 |
|
158 /** |
|
159 * Launch Service Centres dialog. |
|
160 * @param none |
|
161 * @return TInt button id |
|
162 */ |
|
163 TInt LaunchServiceCentresDialogL(); |
|
164 |
|
165 /** |
|
166 * Updating "SC in use" dynamic array. |
|
167 * @param none |
|
168 * @return nothing |
|
169 */ |
|
170 void UpdateSCInUseArrayL(); |
|
171 |
|
172 /** |
|
173 * Check what to open depending the focus of listbox |
|
174 * @param TBool aEnterPressed |
|
175 * @return nothing |
|
176 */ |
|
177 void CheckOpeningListBoxItemL(TBool aEnterPressed); |
|
178 |
|
179 |
|
180 /** |
|
181 * Reads the phone's won number from the NAM |
|
182 * @param TBuf<KSMSCallBackNumberLenght> ownNumber |
|
183 * @return nothing |
|
184 */ |
|
185 void ReadOwnNumberL(TDes& aOwnNumber); |
|
186 |
|
187 /** |
|
188 * Selects a callback number from the phonebook engine |
|
189 * @param TBuf<KSMSCallbackNumberLength> number |
|
190 * @return nothing |
|
191 */ |
|
192 void DoAddressBookDialogL(TDes& aNumber); |
|
193 |
|
194 |
|
195 /** |
|
196 * Set item to listbox. |
|
197 * @param TInt aSettingLBIndex, TInt aValue |
|
198 * @return nothing |
|
199 */ |
|
200 void SetItem(TInt aSettingLBIndex, TInt aValue);// new method |
|
201 |
|
202 /** |
|
203 * Get item value from listbox. |
|
204 * @param TInt TInt aSettingLBIndex |
|
205 * @return TInt |
|
206 */ |
|
207 TInt Item(TInt aSettingLBIndex) const;// new method |
|
208 |
|
209 /** |
|
210 * Launches help application |
|
211 */ |
|
212 void LaunchHelpL(); |
|
213 |
|
214 /* |
|
215 * Checks if message queuing is on |
|
216 * @returns true if queuing is On |
|
217 */ |
|
218 TBool IsMsgQueuingOnL(); |
|
219 |
|
220 /* |
|
221 * Sets Message Queuing On/Off |
|
222 * @param TBool aSetting On/Off setting |
|
223 */ |
|
224 void SetMsgQueuingOnL(TBool aSetting) const; |
|
225 |
|
226 private : |
|
227 |
|
228 /** |
|
229 * C++ default constructor. |
|
230 */ |
|
231 CSmumMainSettingsDialogCDMA( |
|
232 CSmsSettings& aSettings, |
|
233 TInt aTypeOfSettings, |
|
234 TInt& aExitCode, |
|
235 CSmsHeader* aSmsHeader = NULL ); |
|
236 |
|
237 /** |
|
238 * By default Symbian 2nd phase constructor is private. |
|
239 */ |
|
240 void ConstructL(); |
|
241 |
|
242 private: // Data |
|
243 CSmumSettingsArray* iSettingsArray; |
|
244 CEikTextListBox* iListBox; |
|
245 CSmsSettings& iSettings; |
|
246 TInt iTypeOfSettings; // for knowing the type 0 = sms settings, 1 = send options, 2 = bio |
|
247 TInt& iExitCode; |
|
248 CSmsHeader* iSmsHeader; // for replypath handling |
|
249 CAknTitlePane* iTitlePane; // for handling titlepanes |
|
250 HBufC* iPreviousTitleText; // - " - |
|
251 TBool iLaunchDialog; |
|
252 TBool iHelpFeatureSupported; |
|
253 HBufC* iNoCallbackNumber; // read from loc, to be displayed when there is no callback number set |
|
254 CPbkContactEngine* iPbkEngine; |
|
255 CSmsAccount* iSmsAccount; // For Queuing Settings |
|
256 RPbkViewResourceFile iPhonebookResource; |
|
257 TInt iMaxCallbackLength; // Maximum callback number length |
|
258 TBool iDeliveryAckSupport; // Support for delivery ack |
|
259 }; |
|
260 |
|
261 #endif // SMUMSETTINGSDIALOGCDMA_H |
|
262 |
|
263 // End of File |