|
1 /* |
|
2 * Copyright (c) 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: SUPL server UI view |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef C_LOCSUPLSERVERVIEW_H_ |
|
19 #define C_LOCSUPLSERVERVIEW_H_ |
|
20 |
|
21 // System Includes |
|
22 #include <data_caging_path_literals.hrh> |
|
23 #include <e32base.h> |
|
24 #include <aknview.h> |
|
25 #include <ConeResLoader.h> |
|
26 |
|
27 // User Includes |
|
28 #include "locsuplsettingsuid.hrh" |
|
29 #include "locsuplsettingseventhandler.h" |
|
30 |
|
31 // Forward Declarations |
|
32 class CLocSUPLServerContainer; |
|
33 class MLocSUPLSettingsEventHandler; |
|
34 class CLocSUPLSettingsUiEngine; |
|
35 class CLocSUPLServerEditor; |
|
36 |
|
37 // Constant Declarations |
|
38 const TUid KLocSUPLServerUiViewId = { KLOCSUPLSERVERUIUID3 }; |
|
39 |
|
40 // Class Declaration |
|
41 |
|
42 /** |
|
43 * SUPL server UI View. |
|
44 */ |
|
45 class CLocSUPLServerView : public CAknView |
|
46 { |
|
47 public: |
|
48 /** |
|
49 * Creates new SUPL server UI View. |
|
50 * |
|
51 * @param aEngine Reference to the SUPL Settings |
|
52 * engine |
|
53 * @param aEventHandler Reference to the Event Handler |
|
54 * @return CLocSUPLServerView* Reference to the application view |
|
55 */ |
|
56 static CLocSUPLServerView* NewL( |
|
57 CLocSUPLSettingsUiEngine& aEngine, |
|
58 MLocSUPLSettingsEventHandler& aEventHandler ); |
|
59 |
|
60 /** |
|
61 * Creates new SUPL Settings UI View. Leaves the object on the |
|
62 * Clean up stack |
|
63 * |
|
64 * @param aEngine Reference to the SUPL Settings |
|
65 * engine |
|
66 * @param aEventHandler Pointer to the Event Handler |
|
67 * @return CLocSUPLServerView* Reference to the application view |
|
68 */ |
|
69 static CLocSUPLServerView* NewLC( |
|
70 CLocSUPLSettingsUiEngine& aEngine, |
|
71 MLocSUPLSettingsEventHandler& aEventHandler ); |
|
72 |
|
73 /** |
|
74 * Destructor |
|
75 */ |
|
76 ~CLocSUPLServerView (); |
|
77 |
|
78 /** |
|
79 * Handles the Screen Size update |
|
80 */ |
|
81 void HandleScreenSizeChange(); |
|
82 |
|
83 /** |
|
84 * Updates the View |
|
85 */ |
|
86 void UpdateView(); |
|
87 |
|
88 /** |
|
89 * Returns the Selected element. The list box model defines the |
|
90 * enumeration that would determine the current element that has been |
|
91 * selected |
|
92 * |
|
93 * @return TInt Index of the item selected |
|
94 */ |
|
95 TInt SelectedItemIndex(); |
|
96 |
|
97 /** |
|
98 * From CAknView. |
|
99 */ |
|
100 void DoActivateL( const TVwsViewId& aPrevViewId, |
|
101 TUid aCustomMessageId, |
|
102 const TDesC8& aCustomMessage); |
|
103 |
|
104 /** |
|
105 * From CAknView. |
|
106 */ |
|
107 void DoDeactivate(); |
|
108 |
|
109 /** |
|
110 * From CAknView. Returns the View Id. Should be chosen to reflect |
|
111 * the Implementation UID of the Plugin |
|
112 */ |
|
113 TUid Id() const; |
|
114 |
|
115 /** |
|
116 * From CAknView. |
|
117 */ |
|
118 void HandleCommandL( TInt aCommand ); |
|
119 |
|
120 /** |
|
121 * From MEikMenuObserver |
|
122 */ |
|
123 void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ); |
|
124 |
|
125 private: |
|
126 /** |
|
127 * C++ Overloaded Constructor |
|
128 */ |
|
129 CLocSUPLServerView( CLocSUPLSettingsUiEngine& aEngine, |
|
130 MLocSUPLSettingsEventHandler& aEventHandler ); |
|
131 |
|
132 /** |
|
133 * Second Phase Constructor |
|
134 */ |
|
135 void ConstructL(); |
|
136 |
|
137 /** |
|
138 * Shows or dims help option, depending wheather help feature |
|
139 * is supported or not. |
|
140 * @param aMenuPane |
|
141 */ |
|
142 void HandleHelpFeature( CEikMenuPane& aMenuPane ) const; |
|
143 |
|
144 /** |
|
145 * Second Phase Constructor |
|
146 */ |
|
147 TInt DeletionConfirmationQueryL( const TInt aAmount ); |
|
148 |
|
149 /** |
|
150 * Deletes the selected server/s |
|
151 */ |
|
152 void DeleteServerL(); |
|
153 |
|
154 /** |
|
155 * Sets the selected server/s as disable |
|
156 */ |
|
157 void DisableServerL(); |
|
158 |
|
159 /** |
|
160 * Sets the selected server/s as enable |
|
161 */ |
|
162 void EnableServerL(); |
|
163 |
|
164 /** |
|
165 * Sets MSK Button Group |
|
166 */ |
|
167 void ChangeMSKL(); |
|
168 |
|
169 /** |
|
170 * Gets the ids for selected items |
|
171 */ |
|
172 void GetSelectedItemIdsL( |
|
173 RArray<TInt64>& aSelectedItems, |
|
174 const CArrayFix<TInt>& aSelectedIndexes ) const; |
|
175 |
|
176 /** |
|
177 * Gets the count for disabled servers |
|
178 */ |
|
179 TInt SelectedDisabledServerCountL(); |
|
180 |
|
181 private: |
|
182 /** |
|
183 * Reference to the event Handler for handling UI events |
|
184 */ |
|
185 MLocSUPLSettingsEventHandler& iEventHandler; |
|
186 |
|
187 /** |
|
188 * Reference to the SUPL Settings engine |
|
189 */ |
|
190 CLocSUPLSettingsUiEngine& iEngine; |
|
191 |
|
192 /** |
|
193 * Container Object |
|
194 * Owns |
|
195 */ |
|
196 CLocSUPLServerContainer* iContainer; |
|
197 |
|
198 /** |
|
199 * Container Object used while prioritizing the servers |
|
200 * TC Id: ou1cimx1#219289 |
|
201 * Owns |
|
202 */ |
|
203 CLocSUPLServerContainer* iNewContainer; |
|
204 /** |
|
205 * Boolean value to indicate that the SUPL settings UI is |
|
206 * started from the settings UI server. |
|
207 */ |
|
208 TBool iStartedFromServer; |
|
209 |
|
210 /** |
|
211 * Boolean value to start the prioritize operation |
|
212 */ |
|
213 TBool iStartedPrioritize; |
|
214 |
|
215 /** |
|
216 * Value to store the selected server index |
|
217 * for prioritize operation |
|
218 */ |
|
219 TInt iSelectedIndex; |
|
220 |
|
221 /** |
|
222 * Value to store the selected server's slpId |
|
223 * for prioritize operation |
|
224 */ |
|
225 TInt64 iSelectedSlpId; |
|
226 }; |
|
227 |
|
228 #endif // C_LOCSUPLSERVERVIEW_H_ |
|
229 |