|
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 * Defines the main handler, CApSettingsHandlerImpl for |
|
16 * the Access Point settings. |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 // INCLUDE FILES |
|
22 #include "APSettingsHandlerUIVariant.hrh" |
|
23 |
|
24 #include <bautils.h> |
|
25 #include <StringLoader.h> |
|
26 #include <apsetui.rsg> |
|
27 #include <ActiveApDb.h> |
|
28 |
|
29 #include "ApsettingshandleruiImpl.h" |
|
30 #include "ApSettingsHandlerUI.hrh" |
|
31 #include "ApSelectorDialog.h" |
|
32 |
|
33 #include "ApSettingsDlg.h" |
|
34 |
|
35 #include "TextOverrides.h" |
|
36 #include "ApSettingsModel.h" |
|
37 #include "ApSelPopupList.h" |
|
38 #include "ApSelQueryDialog.h" |
|
39 |
|
40 #include <aknnotedialog.h> |
|
41 #include <ApListItemList.h> |
|
42 |
|
43 #include <f32file.h> |
|
44 |
|
45 #include "ApSettingsHandlerLogger.h" |
|
46 #include <ApSettingsHandlerCommons.h> |
|
47 |
|
48 |
|
49 #include "ApSettingsHandlerUiPrivateCRKeys.h" |
|
50 #include <centralrepository.h> |
|
51 |
|
52 #include <sysutil.h> |
|
53 |
|
54 #include <ApNetworkItem.h> |
|
55 |
|
56 #include <featmgr.h> |
|
57 #include <VpnApEngine.h> |
|
58 |
|
59 #include <data_caging_path_literals.hrh> |
|
60 |
|
61 #include <shareddataclient.h> |
|
62 |
|
63 // UID of general settings app, in which help texts are included |
|
64 const TUid KHelpUidApSettingsHandler = { 0x100058EC }; |
|
65 |
|
66 |
|
67 //#define __TEST_PERFORMANCE |
|
68 /// ROM drive. |
|
69 _LIT( KApSettingsResDriveZ, "z:" ); |
|
70 /// Access point settings handler UI resource file name. |
|
71 _LIT( KApSettingsResFileName, "apsetui.rsc" ); |
|
72 |
|
73 |
|
74 |
|
75 /// Estimated FFS overhead for deleting (in bytes). |
|
76 LOCAL_C const TInt KEstimatedDeleteFfsOverhead = 48 * 1024; |
|
77 |
|
78 |
|
79 |
|
80 //KFeatureIdIPv6 |
|
81 // #define KFeatureIdIPv6 KOtherFeatureFirst+88 |
|
82 |
|
83 // ================= MEMBER FUNCTIONS ======================= |
|
84 |
|
85 // --------------------------------------------------------- |
|
86 // CApSettingsHandlerImpl::NewLC |
|
87 // --------------------------------------------------------- |
|
88 // |
|
89 CApSettingsHandlerImpl* CApSettingsHandlerImpl::NewLC( |
|
90 TBool aStartWithSelection, |
|
91 TSelectionListType aListType, |
|
92 TSelectionMenuType aSelMenuType, |
|
93 TInt aIspFilter, |
|
94 TInt aBearerFilter, |
|
95 TInt aSortType, |
|
96 TBool aNoEdit ) |
|
97 { |
|
98 return NULL; |
|
99 } |
|
100 |
|
101 |
|
102 |
|
103 |
|
104 // --------------------------------------------------------- |
|
105 // CApSettingsHandlerImplImpl::NewLC |
|
106 // --------------------------------------------------------- |
|
107 // |
|
108 CApSettingsHandlerImpl* CApSettingsHandlerImpl::NewLC( |
|
109 CActiveApDb& aDb, |
|
110 TBool aStartWithSelection, |
|
111 TSelectionListType aListType, |
|
112 TSelectionMenuType aSelMenuType, |
|
113 TInt aIspFilter, |
|
114 TInt aBearerFilter, |
|
115 TInt aSortType, |
|
116 TBool aNoEdit |
|
117 ) |
|
118 { |
|
119 return NULL; |
|
120 } |
|
121 |
|
122 |
|
123 |
|
124 // --------------------------------------------------------- |
|
125 // CApSettingsHandlerImpl::NewLC |
|
126 // --------------------------------------------------------- |
|
127 // |
|
128 CApSettingsHandlerImpl* CApSettingsHandlerImpl::NewLC( |
|
129 TBool aStartWithSelection, |
|
130 TSelectionListType aListType, |
|
131 TSelectionMenuType aSelMenuType, |
|
132 TInt aIspFilter, |
|
133 TInt aBearerFilter, |
|
134 TInt aSortType, |
|
135 TInt aReqIpvType, |
|
136 TBool aNoEdit |
|
137 ) |
|
138 { |
|
139 return NULL; |
|
140 } |
|
141 |
|
142 |
|
143 |
|
144 |
|
145 // --------------------------------------------------------- |
|
146 // CApSettingsHandlerImpl::NewLC |
|
147 // --------------------------------------------------------- |
|
148 // |
|
149 CApSettingsHandlerImpl* CApSettingsHandlerImpl::NewLC( |
|
150 CActiveApDb& aDb, |
|
151 TBool aStartWithSelection, |
|
152 TSelectionListType aListType, |
|
153 TSelectionMenuType aSelMenuType, |
|
154 TInt aIspFilter, |
|
155 TInt aBearerFilter, |
|
156 TInt aSortType, |
|
157 TInt aReqIpvType, |
|
158 TBool aNoEdit |
|
159 ) |
|
160 { |
|
161 return NULL; |
|
162 } |
|
163 |
|
164 |
|
165 |
|
166 |
|
167 |
|
168 // --------------------------------------------------------- |
|
169 // CApSettingsHandlerImpl::NewLC |
|
170 // --------------------------------------------------------- |
|
171 // |
|
172 CApSettingsHandlerImpl* CApSettingsHandlerImpl::NewLC( |
|
173 TBool aStartWithSelection, |
|
174 TSelectionListType aListType, |
|
175 TSelectionMenuType aSelMenuType, |
|
176 TInt aIspFilter, |
|
177 TInt aBearerFilter, |
|
178 TInt aSortType, |
|
179 TInt aReqIpvType, |
|
180 TVpnFilterType aVpnFilterType, |
|
181 TBool aNoEdit |
|
182 ) |
|
183 { |
|
184 return NULL; |
|
185 } |
|
186 |
|
187 |
|
188 // --------------------------------------------------------- |
|
189 // CApSettingsHandlerImpl::NewLC |
|
190 // --------------------------------------------------------- |
|
191 // |
|
192 CApSettingsHandlerImpl* CApSettingsHandlerImpl::NewLC( |
|
193 CActiveApDb& aDb, |
|
194 TBool aStartWithSelection, |
|
195 TSelectionListType aListType, |
|
196 TSelectionMenuType aSelMenuType, |
|
197 TInt aIspFilter, |
|
198 TInt aBearerFilter, |
|
199 TInt aSortType, |
|
200 TInt aReqIpvType, |
|
201 TVpnFilterType aVpnFilterType, |
|
202 TBool aNoEdit |
|
203 ) |
|
204 { |
|
205 return NULL; |
|
206 } |
|
207 |
|
208 |
|
209 |
|
210 |
|
211 |
|
212 |
|
213 // --------------------------------------------------------- |
|
214 // CApSettingsHandlerImpl::NewLC |
|
215 // --------------------------------------------------------- |
|
216 // |
|
217 CApSettingsHandlerImpl* CApSettingsHandlerImpl::NewLC( |
|
218 CActiveApDb& aDb, |
|
219 TBool aStartWithSelection, |
|
220 TSelectionListType aListType, |
|
221 TSelectionMenuType aSelMenuType, |
|
222 TInt aIspFilter, |
|
223 TInt aBearerFilter, |
|
224 TInt aSortType, |
|
225 TInt aReqIpvType, |
|
226 TVpnFilterType aVpnFilterType, |
|
227 TBool aIncludeEasyWlan, |
|
228 TBool aNoEdit |
|
229 ) |
|
230 { |
|
231 return NULL; |
|
232 } |
|
233 |
|
234 |
|
235 |
|
236 // Destructor |
|
237 CApSettingsHandlerImpl::~CApSettingsHandlerImpl() |
|
238 { |
|
239 } |
|
240 |
|
241 |
|
242 // Constructor |
|
243 CApSettingsHandlerImpl::CApSettingsHandlerImpl( TBool aStartWithSelection, |
|
244 TSelectionListType aListType, |
|
245 TSelectionMenuType aSelMenuType, |
|
246 TBool aNoEdit |
|
247 ) |
|
248 :iStartWithSelection( aStartWithSelection ), |
|
249 iListType( aListType ), |
|
250 iSelMenuType( aSelMenuType ), |
|
251 iIspFilter( KEApIspTypeAll ), |
|
252 iBearerFilter( EApBearerTypeAll ), |
|
253 iReqIpvType( EIPv4 ), |
|
254 iEventStore( KApUiEventNone ), |
|
255 iNoEdit( aNoEdit ) |
|
256 { |
|
257 } |
|
258 |
|
259 |
|
260 |
|
261 |
|
262 |
|
263 // Constructor |
|
264 CApSettingsHandlerImpl::CApSettingsHandlerImpl( TBool aStartWithSelection, |
|
265 TSelectionListType aListType, |
|
266 TSelectionMenuType aSelMenuType, |
|
267 TInt aReqIpvType, |
|
268 TBool aNoEdit |
|
269 ) |
|
270 :iStartWithSelection( aStartWithSelection ), |
|
271 iListType( aListType ), |
|
272 iSelMenuType( aSelMenuType ), |
|
273 iIspFilter( KEApIspTypeAll ), |
|
274 iBearerFilter( EApBearerTypeAll ), |
|
275 iReqIpvType( aReqIpvType ), |
|
276 iEventStore( KApUiEventNone ), |
|
277 iNoEdit( aNoEdit ) |
|
278 { |
|
279 } |
|
280 |
|
281 |
|
282 |
|
283 // --------------------------------------------------------- |
|
284 // CApSettingsHandlerImpl::ConstructL |
|
285 // --------------------------------------------------------- |
|
286 // |
|
287 void CApSettingsHandlerImpl::ConstructL( TInt aIspFilter, |
|
288 TInt aBearerFilter, |
|
289 TInt aSortType ) |
|
290 { |
|
291 } |
|
292 |
|
293 |
|
294 |
|
295 // --------------------------------------------------------- |
|
296 // CApSettingsHandlerImpl::ConstructL |
|
297 // --------------------------------------------------------- |
|
298 // |
|
299 void CApSettingsHandlerImpl::ConstructL( CActiveApDb& aDb, |
|
300 TInt aIspFilter, |
|
301 TInt aBearerFilter, |
|
302 TInt aSortType ) |
|
303 { |
|
304 } |
|
305 |
|
306 |
|
307 |
|
308 // --------------------------------------------------------- |
|
309 // CApSettingsHandlerImpl::ConstructL |
|
310 // --------------------------------------------------------- |
|
311 // |
|
312 void CApSettingsHandlerImpl::ConstructL( |
|
313 TInt aIspFilter, |
|
314 TInt aBearerFilter, |
|
315 TInt aSortType, |
|
316 TVpnFilterType aVpnFilterType |
|
317 ) |
|
318 { |
|
319 } |
|
320 |
|
321 |
|
322 |
|
323 // --------------------------------------------------------- |
|
324 // CApSettingsHandlerImpl::ConstructL |
|
325 // --------------------------------------------------------- |
|
326 // |
|
327 void CApSettingsHandlerImpl::ConstructL( |
|
328 CActiveApDb& aDb, |
|
329 TInt aIspFilter, |
|
330 TInt aBearerFilter, |
|
331 TInt aSortType, |
|
332 TVpnFilterType aVpnFilterType |
|
333 ) |
|
334 { |
|
335 } |
|
336 |
|
337 |
|
338 |
|
339 |
|
340 // --------------------------------------------------------- |
|
341 // CApSettingsHandlerImpl::ConstructL |
|
342 // --------------------------------------------------------- |
|
343 // |
|
344 void CApSettingsHandlerImpl::ConstructL( |
|
345 CActiveApDb& aDb, |
|
346 TInt aIspFilter, |
|
347 TInt aBearerFilter, |
|
348 TInt aSortType, |
|
349 TVpnFilterType aVpnFilterType, |
|
350 TBool aIncludeEasyWlan |
|
351 ) |
|
352 { |
|
353 } |
|
354 |
|
355 |
|
356 // --------------------------------------------------------- |
|
357 // CApSettingsHandlerImpl::SetFilter |
|
358 // --------------------------------------------------------- |
|
359 // |
|
360 void CApSettingsHandlerImpl::SetFilterL( TInt aIspFilter, |
|
361 TInt aBearerFilter, |
|
362 TInt aSortType ) |
|
363 { |
|
364 } |
|
365 |
|
366 |
|
367 |
|
368 |
|
369 // --------------------------------------------------------- |
|
370 // CApSettingsHandlerImpl::SetTextOverrideL |
|
371 // --------------------------------------------------------- |
|
372 // |
|
373 void CApSettingsHandlerImpl::SetTextOverrideL( TTextID aText2Change, |
|
374 const TDesC& aNewText ) |
|
375 { |
|
376 } |
|
377 |
|
378 |
|
379 // --------------------------------------------------------- |
|
380 // CApSettingsHandlerImpl::TextOverrideL |
|
381 // --------------------------------------------------------- |
|
382 // |
|
383 const TDesC& CApSettingsHandlerImpl::TextOverrideL( TTextID aTextId ) |
|
384 { |
|
385 User::Leave( KErrNotSupported ); |
|
386 } |
|
387 |
|
388 |
|
389 |
|
390 // --------------------------------------------------------- |
|
391 // CApSettingsHandlerImpl::RunSettingsL |
|
392 // --------------------------------------------------------- |
|
393 // |
|
394 TInt CApSettingsHandlerImpl::RunSettingsL( TUint32 aHighLight, |
|
395 TUint32& aSelected ) |
|
396 { |
|
397 return 0; |
|
398 } |
|
399 |
|
400 |
|
401 |
|
402 // --------------------------------------------------------- |
|
403 // CApSettingsHandlerImpl::Cvt() |
|
404 // --------------------------------------------------------- |
|
405 // |
|
406 TInt CApSettingsHandlerImpl::Cvt() |
|
407 { |
|
408 return KErrNotSupported; |
|
409 } |
|
410 |
|
411 |
|
412 // --------------------------------------------------------- |
|
413 // CApSettingsHandlerImpl::DoRunSettingsL |
|
414 // --------------------------------------------------------- |
|
415 // |
|
416 TInt CApSettingsHandlerImpl::DoRunSettingsL( TUint32 aHighLight, |
|
417 TUint32& aSelected ) |
|
418 { |
|
419 return 0; |
|
420 } |
|
421 |
|
422 |
|
423 // --------------------------------------------------------- |
|
424 // CApSettingsHandlerImpl::RunViewerL |
|
425 // --------------------------------------------------------- |
|
426 // |
|
427 TInt CApSettingsHandlerImpl::RunViewerL( TUint32 aUid ) |
|
428 { |
|
429 return 0; |
|
430 } |
|
431 |
|
432 |
|
433 |
|
434 // --------------------------------------------------------- |
|
435 // CApSettingsHandlerImpl::DoRunViewerL |
|
436 // --------------------------------------------------------- |
|
437 // |
|
438 TInt CApSettingsHandlerImpl::DoRunViewerL( TUint32 aUid ) |
|
439 { |
|
440 return 0; |
|
441 } |
|
442 |
|
443 |
|
444 |
|
445 //---------------------------------------------------------- |
|
446 // CApSettingsHandlerImpl::HandleApDeleteCmdL |
|
447 //---------------------------------------------------------- |
|
448 // |
|
449 void CApSettingsHandlerImpl::HandleApDeleteCmdL( TUint32 aUid, TBool aIsLast ) |
|
450 { |
|
451 } |
|
452 |
|
453 |
|
454 //---------------------------------------------------------- |
|
455 // CApSettingsHandlerImpl::HandleApBlankNewL |
|
456 //---------------------------------------------------------- |
|
457 // |
|
458 TUint32 CApSettingsHandlerImpl::HandleApBlankNewL( TInt aBearers, TInt aIsps ) |
|
459 { |
|
460 return 0; |
|
461 } |
|
462 |
|
463 |
|
464 |
|
465 |
|
466 //---------------------------------------------------------- |
|
467 // CApSettingsHandlerImpl::HandleApUseOldNewL |
|
468 //---------------------------------------------------------- |
|
469 // |
|
470 TUint32 CApSettingsHandlerImpl::HandleApUseOldNewL() |
|
471 { |
|
472 return 0; |
|
473 } |
|
474 |
|
475 |
|
476 |
|
477 //---------------------------------------------------------- |
|
478 // CApSettingsHandlerImpl::EditAfterCreateL |
|
479 //---------------------------------------------------------- |
|
480 // |
|
481 TUint32 CApSettingsHandlerImpl::EditAfterCreateL( TUint32 aUid, |
|
482 CApAccessPointItem* aItem ) |
|
483 { |
|
484 return 0; |
|
485 } |
|
486 |
|
487 |
|
488 |
|
489 //---------------------------------------------------------- |
|
490 // CApSettingsHandlerImpl::DoConstructL |
|
491 //---------------------------------------------------------- |
|
492 // |
|
493 void CApSettingsHandlerImpl::DoConstructL( CActiveApDb* aDb, |
|
494 TInt aIspFilter, |
|
495 TInt aBearerFilter, |
|
496 TInt aSortType, |
|
497 TVpnFilterType aVpnFilterType, |
|
498 TBool aIncludeEasyWlan ) |
|
499 { |
|
500 } |
|
501 |
|
502 |
|
503 |
|
504 |
|
505 //---------------------------------------------------------- |
|
506 // CApSettingsHandlerImpl::DoRunSetPageSettingsL |
|
507 //---------------------------------------------------------- |
|
508 // |
|
509 void CApSettingsHandlerImpl::DoRunSetPageSettingsL( TUint32 aHighLight, |
|
510 TUint32& aSelected ) |
|
511 { |
|
512 } |
|
513 |
|
514 |
|
515 |
|
516 //---------------------------------------------------------- |
|
517 // CApSettingsHandlerImpl::DoRunListSettingsL |
|
518 //---------------------------------------------------------- |
|
519 // |
|
520 void CApSettingsHandlerImpl::DoRunListSettingsL( TUint32 aHighLight, |
|
521 TUint32& aSelected ) |
|
522 { |
|
523 } |
|
524 |
|
525 |
|
526 |
|
527 //---------------------------------------------------------- |
|
528 // CApSettingsHandlerImpl::DoHandleApUseOldNewL |
|
529 //---------------------------------------------------------- |
|
530 // |
|
531 TUint32 CApSettingsHandlerImpl::DoHandleApUseOldNewL( TUint32 aSelected ) |
|
532 { |
|
533 return KErrNotSupported; |
|
534 } |
|
535 |
|
536 |
|
537 |
|
538 //---------------------------------------------------------- |
|
539 // CApSettingsHandlerImpl::SelectApToCopyL |
|
540 //---------------------------------------------------------- |
|
541 // |
|
542 TUint32 CApSettingsHandlerImpl::SelectApToCopyL() |
|
543 { |
|
544 return KErrNotSupported; |
|
545 } |
|
546 |
|
547 |
|
548 |
|
549 |
|
550 |
|
551 //---------------------------------------------------------- |
|
552 // CApSettingsHandlerImpl::DoHandleApBlankNewL |
|
553 //---------------------------------------------------------- |
|
554 // |
|
555 TUint32 CApSettingsHandlerImpl::DoHandleApBlankNewL( TInt aBearers, TInt aIsps ) |
|
556 { |
|
557 return 0; |
|
558 } |
|
559 |
|
560 |
|
561 |
|
562 |
|
563 //---------------------------------------------------------- |
|
564 // CApSettingsHandlerImpl::HandleNetworkDeleteCmdL |
|
565 //---------------------------------------------------------- |
|
566 // |
|
567 void CApSettingsHandlerImpl::HandleNetworkDeleteCmdL( TUint32 aUid ) |
|
568 { |
|
569 } |
|
570 |
|
571 |
|
572 |
|
573 //---------------------------------------------------------- |
|
574 // CApSettingsHandlerImpl::GetVariantL |
|
575 //---------------------------------------------------------- |
|
576 // |
|
577 TInt CApSettingsHandlerImpl::GetVariantL() |
|
578 { |
|
579 APSETUILOGGER_ENTERFN( EApImpl,"Impl::GetVariantL") |
|
580 |
|
581 TInt variant( 0 ); |
|
582 // Connecting and initialization: |
|
583 CRepository* repository = |
|
584 CRepository::NewL( KCRUidApSettingsHandlerUiLV ); |
|
585 repository->Get( KApSettingsHandlerUiLVFlags, variant ); |
|
586 delete repository; |
|
587 |
|
588 APSETUILOGGER_LEAVEFN( EApImpl,"Impl::GetVariantL") |
|
589 return variant; |
|
590 } |
|
591 |
|
592 |
|
593 //---------------------------------------------------------- |
|
594 // CApSettingsHandlerImpl::ConfirmDeleteL |
|
595 //---------------------------------------------------------- |
|
596 // |
|
597 TInt CApSettingsHandlerImpl::ConfirmDeleteL( TUint32 aUid, TBool aIsLast ) |
|
598 { |
|
599 return 0; |
|
600 } |
|
601 |
|
602 |
|
603 |
|
604 |
|
605 |
|
606 //---------------------------------------------------------- |
|
607 // CApSettingsHandlerImpl::HandleRunSettingsL |
|
608 //---------------------------------------------------------- |
|
609 // |
|
610 void CApSettingsHandlerImpl::HandleRunSettingsL( TUint32 aHighLight, |
|
611 TUint32& aSelected ) |
|
612 { |
|
613 } |
|
614 |
|
615 |
|
616 //---------------------------------------------------------- |
|
617 // CApSettingsHandlerImpl::ChooseBearerTypeL |
|
618 //---------------------------------------------------------- |
|
619 // |
|
620 void CApSettingsHandlerImpl::ChooseBearerTypeL( TInt aBearers, |
|
621 CApAccessPointItem& aItem ) |
|
622 { |
|
623 } |
|
624 |
|
625 |
|
626 |
|
627 |
|
628 //---------------------------------------------------------- |
|
629 // CApSettingsHandlerImpl::HandleDuplicateL |
|
630 //---------------------------------------------------------- |
|
631 // |
|
632 TUint32 CApSettingsHandlerImpl::HandleDuplicateL( TUint32 aUid ) |
|
633 { |
|
634 return KErrNotSupported; |
|
635 } |
|
636 |
|
637 |
|
638 // End of File |
|
639 |