|
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 * Service Centres dialog. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 #ifndef SMUMSERVICECENTRESDIALOG_H |
|
22 #define SMUMSERVICECENTRESDIALOG_H |
|
23 |
|
24 // INCLUDES |
|
25 #include <AknForm.h> // CAknDialog |
|
26 #include <eiklbo.h> // MEikListBoxObserver |
|
27 #include "SMSETDLG.H" // TSmumSCNameInfo, TSmsSettingSCNames, CSmumSCArray |
|
28 |
|
29 #include <bldvariant.hrh> |
|
30 |
|
31 // CONSTANTS |
|
32 |
|
33 // MACROS |
|
34 |
|
35 // DATA TYPES |
|
36 |
|
37 enum TSmumScDeletionValues |
|
38 { |
|
39 ESmumScNormalDelete = 0, |
|
40 ESmumScLastOne, |
|
41 ESmumScInUse |
|
42 }; |
|
43 |
|
44 // FUNCTION PROTOTYPES |
|
45 |
|
46 // FORWARD DECLARATIONS |
|
47 class CMuiuSettingsArray; |
|
48 class CEikTextListBox; |
|
49 class CSmsSettings; |
|
50 class CAknTitlePane; |
|
51 |
|
52 // CLASS DECLARATION |
|
53 |
|
54 /** |
|
55 * Message centre's general settings dialog. |
|
56 */ |
|
57 NONSHARABLE_CLASS( CSmumServiceCentresDialog ) : |
|
58 public CAknDialog, |
|
59 public MEikListBoxObserver |
|
60 { |
|
61 public: // Constructors and destructor |
|
62 |
|
63 /** |
|
64 * Constructor. |
|
65 */ |
|
66 static CSmumServiceCentresDialog* NewL( |
|
67 CSmsSettings& aSettings, |
|
68 TInt& aExitCode, |
|
69 TInt aMenuTitleResourceId, |
|
70 TBool aHelpFeatureSupported, |
|
71 TBool aSimSCsOnly = EFalse ); |
|
72 |
|
73 /** |
|
74 * Destructor. |
|
75 */ |
|
76 ~CSmumServiceCentresDialog(); |
|
77 |
|
78 protected: // Functions from base classes |
|
79 |
|
80 /** |
|
81 * From CAknDialog |
|
82 */ |
|
83 void ProcessCommandL(TInt aCommandId); |
|
84 |
|
85 /** |
|
86 * From CAknDialog |
|
87 */ |
|
88 void DynInitMenuPaneL(TInt aMenuId, CEikMenuPane* aMenuPane); |
|
89 |
|
90 /** |
|
91 * From CEikDialog |
|
92 */ |
|
93 void PreLayoutDynInitL(); |
|
94 |
|
95 /** |
|
96 * From CEikDialog |
|
97 */ |
|
98 TBool OkToExitL(TInt aButtonId); |
|
99 |
|
100 /** |
|
101 * From MEikListBoxObserver |
|
102 */ |
|
103 void HandleListBoxEventL( |
|
104 CEikListBox* aListBox, |
|
105 TListBoxEvent aEventType); |
|
106 |
|
107 /** |
|
108 * From CAknDialog |
|
109 */ |
|
110 TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType); |
|
111 |
|
112 /** |
|
113 * From CCoeControl, returns help context |
|
114 */ |
|
115 void GetHelpContext(TCoeHelpContext& aContext) const; |
|
116 |
|
117 private: // new functions |
|
118 |
|
119 /** |
|
120 * Launch add SC dialog. |
|
121 * @param none |
|
122 * @return nothing |
|
123 */ |
|
124 void AddServiceCentreL(); |
|
125 |
|
126 /** |
|
127 * Launch edit SC dialog. |
|
128 * @param none |
|
129 * @return nothing |
|
130 */ |
|
131 void EditServiceCentreL(); |
|
132 |
|
133 /** |
|
134 * Delete service centre. |
|
135 * @param none |
|
136 * @return nothing |
|
137 */ |
|
138 void DeleteServiceCentreL(); |
|
139 |
|
140 /** |
|
141 * Launch list query for the user to choose new SC in use. |
|
142 * @param none |
|
143 * @return nothing |
|
144 */ |
|
145 void LaunchScInUseListQueryL(); |
|
146 |
|
147 /** |
|
148 * Updates the service centre array to Sms Settings. |
|
149 * @param none |
|
150 * @return nothing |
|
151 */ |
|
152 void ClosingServiceCentresDialogL() const; |
|
153 |
|
154 /** |
|
155 * By default Symbian OS constructor is private. |
|
156 */ |
|
157 void ConstructL(TInt aMenuTitleResourceId); |
|
158 CSmumServiceCentresDialog( |
|
159 CSmsSettings& aSettings, |
|
160 TInt& aExitCode, |
|
161 TBool aHelpFeatureSupported, |
|
162 TBool aSimSCsOnly /*= EFalse*/); |
|
163 |
|
164 /** |
|
165 * Launches help application |
|
166 */ |
|
167 void LaunchHelpL(); |
|
168 |
|
169 /** |
|
170 * Updates Middle softkey visibility |
|
171 */ |
|
172 void UpdateButtonVisibility(); |
|
173 |
|
174 /** |
|
175 * Does delayed exit after specified delay |
|
176 * @since S60 v5.0 |
|
177 * @param aDelayTime Requested delay in microseconds |
|
178 */ |
|
179 void DoDelayedExitL( const TInt aDelay ); |
|
180 |
|
181 /** |
|
182 * Used for exiting application properly |
|
183 * @since S60 v5.0 |
|
184 * param aThis Pointer to this AppUi |
|
185 */ |
|
186 static TInt DelayedExit( TAny* aThis ); |
|
187 |
|
188 private: // Data |
|
189 CEikTextListBox* iListBox; |
|
190 CSmumSCArray* iSCAddressesList; |
|
191 CSmsSettings& iSettings; |
|
192 CAknTitlePane* iTitlePane; |
|
193 HBufC* iPreviousTitleText; |
|
194 TInt& iExitCode; |
|
195 TBool iHelpFeatureSupported; |
|
196 TBool iSimSCsOnly; |
|
197 TBool iMSKEnabledInPlatform; |
|
198 CPeriodic* iIdle; |
|
199 }; |
|
200 #endif // SMUMSERVICECENTRESDIALOG_H |
|
201 |
|
202 // End of File |