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: Implementation of CApSettingsModel. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDE FILES |
|
20 #include "APSettingsHandlerUIVariant.hrh" |
|
21 |
|
22 #include <ActiveApDb.h> |
|
23 #include <ApListItemList.h> |
|
24 #include <ApListItem.h> |
|
25 #include <ApSelect.h> |
|
26 #include <apsetui.rsg> |
|
27 #include <VpnApEngine.h> |
|
28 #include <hlplch.h> |
|
29 #include <eikenv.h> |
|
30 #include <eikappui.h> |
|
31 #include <StringLoader.h> |
|
32 #include <featmgr.h> |
|
33 |
|
34 #include "ApSettingsHandlerUI.hrh" |
|
35 |
|
36 #include "ApSettingsModel.h" |
|
37 #include <ApSettingsHandlerCommons.h> |
|
38 #include "Apsettingsdeleteoperation.h" |
|
39 |
|
40 #include <sysutil.h> |
|
41 #include <ErrorUI.h> |
|
42 |
|
43 |
|
44 #include "ApNetworks.h" |
|
45 #include "FeatureManagerWrapper.h" |
|
46 |
|
47 #include <ApAccessPointItem.h> |
|
48 |
|
49 #include "ApSettingsHandlerLogger.h" |
|
50 |
|
51 //#define __TEST_PERFORMANCE |
|
52 |
|
53 // CONSTANTS |
|
54 |
|
55 |
|
56 |
|
57 |
|
58 /** |
|
59 * Estimated number of bytes in FFS for one writing operation. This amount |
|
60 * is checked to be available before each transaction which places write-lock. |
|
61 * Exact size is not known (because what happens in a transaction is unknown). |
|
62 * A typical access point is estimated to be less than ~2000 bytes; |
|
63 * so assuming the typical operation of adding one access point |
|
64 * (with database transaction overhead and safety) is estimated |
|
65 * to be 2000 bytes. This should be a safe guess. |
|
66 */ |
|
67 LOCAL_C const TInt KEstimatedFfsUsage = 2000; |
|
68 |
|
69 |
|
70 |
|
71 // ================= MEMBER FUNCTIONS ======================= |
|
72 |
|
73 // --------------------------------------------------------- |
|
74 // CApSettingsModel::NewL |
|
75 // --------------------------------------------------------- |
|
76 // |
|
77 CApSettingsModel* CApSettingsModel::NewL( TInt aIspFilter, TInt aBearerFilter, |
|
78 TInt aSortType, TInt aReqIpvType, |
|
79 TVpnFilterType aVpnFilterType, |
|
80 TInt aVariant, |
|
81 TBool aIncludeEasyWlan, |
|
82 TBool aNoEdit ) |
|
83 { |
|
84 return NULL; |
|
85 } |
|
86 |
|
87 |
|
88 |
|
89 // --------------------------------------------------------- |
|
90 // CApSettingsModel::NewL |
|
91 // --------------------------------------------------------- |
|
92 // |
|
93 CApSettingsModel* CApSettingsModel::NewL( CActiveApDb& aDb, TInt aIspFilter, |
|
94 TInt aBearerFilter, TInt aSortType, |
|
95 TInt aReqIpvType, |
|
96 TVpnFilterType aVpnFilterType, |
|
97 TInt aVariant, |
|
98 TBool aIncludeEasyWlan, |
|
99 TBool aNoEdit ) |
|
100 { |
|
101 return NULL; |
|
102 } |
|
103 |
|
104 |
|
105 /** |
|
106 * Destructor. |
|
107 */ |
|
108 CApSettingsModel::~CApSettingsModel( ) |
|
109 { |
|
110 } |
|
111 |
|
112 |
|
113 /** |
|
114 * Constructor |
|
115 */ |
|
116 CApSettingsModel::CApSettingsModel( TInt aIspFilter, TInt aBearerFilter, |
|
117 TInt aSortType, TInt aReqIpvType, |
|
118 TInt aVariant, |
|
119 TVpnFilterType aVpnFilterType, |
|
120 TBool aIncludeEasyWlan, |
|
121 TBool aNoEdit ) |
|
122 |
|
123 { |
|
124 } |
|
125 |
|
126 |
|
127 |
|
128 // --------------------------------------------------------- |
|
129 // CApSettingsModel::ConstructL |
|
130 // --------------------------------------------------------- |
|
131 // |
|
132 void CApSettingsModel::ConstructL( CActiveApDb* aDb ) |
|
133 { |
|
134 } |
|
135 |
|
136 |
|
137 |
|
138 // --------------------------------------------------------- |
|
139 // CApSettingsModel::Database |
|
140 // --------------------------------------------------------- |
|
141 // |
|
142 CActiveApDb* CApSettingsModel::Database() |
|
143 { |
|
144 return NULL; |
|
145 } |
|
146 |
|
147 |
|
148 |
|
149 |
|
150 // --------------------------------------------------------- |
|
151 // CApSettingsModel::AllListItemDataL |
|
152 // --------------------------------------------------------- |
|
153 // |
|
154 TInt CApSettingsModel::AllListItemDataL( TBool& aFailedLocked, |
|
155 CApListItemList& aList, |
|
156 TInt aIspFilter, TInt aBearerFilter, |
|
157 TInt aSortType, TInt aReqIpvType ) |
|
158 { |
|
159 return 0; |
|
160 } |
|
161 |
|
162 |
|
163 |
|
164 // --------------------------------------------------------- |
|
165 // CApSettingsModel::AllListItemDataL |
|
166 // --------------------------------------------------------- |
|
167 // |
|
168 TInt CApSettingsModel::AllListItemDataL( |
|
169 TBool& aFailedLocked, |
|
170 CApListItemList& aList, |
|
171 TInt aIspFilter, |
|
172 TInt aBearerFilter, |
|
173 TInt aSortType, |
|
174 TInt aReqIpvType, |
|
175 TVpnFilterType aVpnFilterType, |
|
176 TBool aIncludeEasyWlan |
|
177 ) |
|
178 { |
|
179 return 0; |
|
180 } |
|
181 |
|
182 |
|
183 |
|
184 // --------------------------------------------------------- |
|
185 // CApSettingsModel::AllListItemDataL |
|
186 // --------------------------------------------------------- |
|
187 // |
|
188 TInt CApSettingsModel::AllListItemDataL( TBool& aFailedLocked, |
|
189 CApListItemList& aList ) |
|
190 { |
|
191 return 0; |
|
192 } |
|
193 |
|
194 |
|
195 |
|
196 // --------------------------------------------------------- |
|
197 // CApSettingsModel::AccessPointDataL |
|
198 // --------------------------------------------------------- |
|
199 // |
|
200 void CApSettingsModel::AccessPointDataL( TUint32 aUid, |
|
201 CApAccessPointItem& aApItem ) |
|
202 { |
|
203 } |
|
204 |
|
205 |
|
206 |
|
207 // --------------------------------------------------------- |
|
208 // CApSettingsModel::UpdateAccessPointDataL |
|
209 // --------------------------------------------------------- |
|
210 // |
|
211 TBool CApSettingsModel::UpdateAccessPointDataL( CApAccessPointItem& aApItem ) |
|
212 { |
|
213 return EFalse; |
|
214 } |
|
215 |
|
216 |
|
217 |
|
218 |
|
219 // --------------------------------------------------------- |
|
220 // CApSettingsModel::DataHandler |
|
221 // --------------------------------------------------------- |
|
222 // |
|
223 CApDataHandler* CApSettingsModel::DataHandler() |
|
224 { |
|
225 return NULL; |
|
226 } |
|
227 |
|
228 |
|
229 |
|
230 // --------------------------------------------------------- |
|
231 // CApSettingsModel::ApUtils |
|
232 // --------------------------------------------------------- |
|
233 // |
|
234 CApUtils* CApSettingsModel::ApUtils() |
|
235 { |
|
236 return NULL; |
|
237 } |
|
238 |
|
239 |
|
240 // --------------------------------------------------------- |
|
241 // CApSettingsModel::SetParams |
|
242 // --------------------------------------------------------- |
|
243 // |
|
244 void CApSettingsModel::SetParams( TApSettingsParams aParams ) |
|
245 { |
|
246 } |
|
247 |
|
248 |
|
249 // --------------------------------------------------------- |
|
250 // CApSettingsModel::Params |
|
251 // --------------------------------------------------------- |
|
252 // |
|
253 TApSettingsParams CApSettingsModel::Params() |
|
254 { |
|
255 User::Leave( KErrNotSupported ); |
|
256 return iParams; |
|
257 } |
|
258 |
|
259 |
|
260 |
|
261 // --------------------------------------------------------- |
|
262 // CApSettingsModel::VpnEngine |
|
263 // --------------------------------------------------------- |
|
264 // |
|
265 CVpnApEngine* CApSettingsModel::VpnEngine() |
|
266 { |
|
267 return NULL; |
|
268 } |
|
269 |
|
270 |
|
271 // --------------------------------------------------------- |
|
272 // CApSettingsModel::LaunchHelpL |
|
273 // --------------------------------------------------------- |
|
274 // |
|
275 void CApSettingsModel::LaunchHelpL() |
|
276 { |
|
277 } |
|
278 |
|
279 |
|
280 // --------------------------------------------------------- |
|
281 // CApSettingsModel::RemoveApL |
|
282 // --------------------------------------------------------- |
|
283 // |
|
284 void CApSettingsModel::RemoveApL( TUint32 aUid ) |
|
285 { |
|
286 } |
|
287 |
|
288 |
|
289 |
|
290 |
|
291 // --------------------------------------------------------- |
|
292 // CApSettingsModel::StarTransactionLC |
|
293 // --------------------------------------------------------- |
|
294 // |
|
295 TTransactionResult CApSettingsModel::StartTransactionLC( |
|
296 TBool aWrite, TBool aShowNote, |
|
297 TBool aRetry, TBool aLFFSChecking /* ETrue */ ) |
|
298 { |
|
299 User::Leave( KErrNotSupported ); |
|
300 } |
|
301 |
|
302 |
|
303 // --------------------------------------------------------- |
|
304 // CApSettingsModel::GetWriteLockL |
|
305 // --------------------------------------------------------- |
|
306 // |
|
307 void CApSettingsModel::GetWriteLockL( ) |
|
308 { |
|
309 } |
|
310 |
|
311 // --------------------------------------------------------- |
|
312 // CApSettingsModel::RollbackTransactionOnLeave |
|
313 // --------------------------------------------------------- |
|
314 // |
|
315 void CApSettingsModel::RollbackTransactionOnLeave( TAny* aDb ) |
|
316 { |
|
317 } |
|
318 |
|
319 |
|
320 |
|
321 // --------------------------------------------------------- |
|
322 // CApSettingsModel::CommitTransaction |
|
323 // --------------------------------------------------------- |
|
324 // |
|
325 TInt CApSettingsModel::CommitTransaction() |
|
326 { |
|
327 return KErrNotSupported; |
|
328 } |
|
329 |
|
330 |
|
331 |
|
332 // --------------------------------------------------------- |
|
333 // CApSettingsModel::FFSSpaceBelowCriticalLevelL |
|
334 // --------------------------------------------------------- |
|
335 // |
|
336 TBool CApSettingsModel::FFSSpaceBelowCriticalLevelL |
|
337 ( TBool aShowErrorNote, TInt aBytesToWrite /*=0*/ ) |
|
338 { |
|
339 return EFalse; |
|
340 } |
|
341 |
|
342 |
|
343 |
|
344 |
|
345 // --------------------------------------------------------- |
|
346 // CApSettingsModel::NetWorkListDataL |
|
347 // --------------------------------------------------------- |
|
348 // |
|
349 TInt CApSettingsModel::NetWorkListDataL( TBool& aFailedLocked, |
|
350 CApNetworkItemList& aList ) |
|
351 { |
|
352 return KErrNotSupported; |
|
353 } |
|
354 |
|
355 |
|
356 |
|
357 // --------------------------------------------------------- |
|
358 // CApSettingsModel::RequestedIPvType |
|
359 // --------------------------------------------------------- |
|
360 // |
|
361 TInt CApSettingsModel::RequestedIPvType( ) |
|
362 { |
|
363 return 0; |
|
364 } |
|
365 |
|
366 |
|
367 |
|
368 |
|
369 // --------------------------------------------------------- |
|
370 // CApSettingsModel::Need2DeleteSelect |
|
371 // called when menu needs to be displayed |
|
372 // --------------------------------------------------------- |
|
373 // |
|
374 TBool CApSettingsModel::Need2DeleteSelect( TInt aResourceId, TInt aCount ) |
|
375 { |
|
376 return EFalse; |
|
377 } |
|
378 |
|
379 |
|
380 // --------------------------------------------------------- |
|
381 // CApSettingsModel::Need2DeleteOpen |
|
382 // called when menu needs to be displayed |
|
383 // --------------------------------------------------------- |
|
384 // |
|
385 TBool CApSettingsModel::Need2DeleteOpen( TInt aResourceId, TInt aCount, |
|
386 TUint32 aUid, TBool aNeedsNone ) |
|
387 { |
|
388 return EFalse; |
|
389 } |
|
390 |
|
391 |
|
392 // --------------------------------------------------------- |
|
393 // CApSettingsModel::Need2DeleteDeleteL |
|
394 // called when menu needs to be displayed |
|
395 // --------------------------------------------------------- |
|
396 // |
|
397 TBool CApSettingsModel::Need2DeleteDeleteL( TInt aResourceId, TInt aCount, |
|
398 TUint32 aUid, TBool aNeedsNone ) |
|
399 { |
|
400 return EFalse; |
|
401 } |
|
402 |
|
403 |
|
404 // --------------------------------------------------------- |
|
405 // CApSettingsModel::Need2DeleteNewUseExisting |
|
406 // called when menu needs to be displayed |
|
407 // --------------------------------------------------------- |
|
408 // |
|
409 TBool CApSettingsModel::Need2DeleteNewUseExisting( |
|
410 TInt aResourceId, |
|
411 TInt aCount ) |
|
412 { |
|
413 return EFalse; |
|
414 } |
|
415 |
|
416 |
|
417 // --------------------------------------------------------- |
|
418 // CApSettingsModel::Need2DeleteNewL |
|
419 // called when menu needs to be displayed |
|
420 // --------------------------------------------------------- |
|
421 // |
|
422 TBool CApSettingsModel::Need2DeleteNewL( TInt aResourceId ) |
|
423 { |
|
424 return EFalse; |
|
425 } |
|
426 |
|
427 |
|
428 |
|
429 // --------------------------------------------------------- |
|
430 // CApSettingsModel::Need2DeleteHelp |
|
431 // called when menu needs to be displayed |
|
432 // --------------------------------------------------------- |
|
433 // |
|
434 TBool CApSettingsModel::Need2DeleteHelp( TInt aResourceId ) |
|
435 { |
|
436 return EFalse; |
|
437 } |
|
438 |
|
439 |
|
440 |
|
441 |
|
442 |
|
443 |
|
444 |
|
445 |
|
446 |
|
447 // --------------------------------------------------------- |
|
448 // CApSettingsModel::GetLinkedVpnAccessPointLC |
|
449 // --------------------------------------------------------- |
|
450 // |
|
451 HBufC* CApSettingsModel::GetLinkedVpnAccessPointLC( TUint32 aUid ) |
|
452 { |
|
453 return NULL; |
|
454 } |
|
455 |
|
456 |
|
457 |
|
458 // --------------------------------------------------------- |
|
459 // CApSettingsModel::EikEnv |
|
460 // --------------------------------------------------------- |
|
461 // |
|
462 CEikonEnv* CApSettingsModel::EikEnv() |
|
463 { |
|
464 return NULL; |
|
465 } |
|
466 |
|
467 |
|
468 |
|
469 // --------------------------------------------------------- |
|
470 // CApSettingsModel::CreateFromDataL |
|
471 // --------------------------------------------------------- |
|
472 // |
|
473 TUint32 CApSettingsModel::CreateFromDataL( CApAccessPointItem& aApItem ) |
|
474 { |
|
475 return 0; |
|
476 } |
|
477 |
|
478 |
|
479 |
|
480 |
|
481 |
|
482 // --------------------------------------------------------- |
|
483 // CApSettingsModel::ChangeWepSettingsL |
|
484 // --------------------------------------------------------- |
|
485 // |
|
486 TInt CApSettingsModel::ChangeWepSettingsL( CApAccessPointItem* aApItem ) |
|
487 { |
|
488 return KErrNotSupported; |
|
489 } |
|
490 |
|
491 |
|
492 |
|
493 // --------------------------------------------------------- |
|
494 // CApSettingsModel::ChangeWpaSettingsL |
|
495 // --------------------------------------------------------- |
|
496 // |
|
497 TInt CApSettingsModel::ChangeWpaSettingsL( CApAccessPointItem* aApItem ) |
|
498 { |
|
499 return KErrNotSupported; |
|
500 } |
|
501 |
|
502 |
|
503 |
|
504 // --------------------------------------------------------- |
|
505 // CApSettingsModel::Change8021xSettingsL |
|
506 // --------------------------------------------------------- |
|
507 // |
|
508 TInt CApSettingsModel::Change8021xSettingsL( CApAccessPointItem* aApItem ) |
|
509 { |
|
510 return KErrNotSupported; |
|
511 } |
|
512 |
|
513 |
|
514 |
|
515 // --------------------------------------------------------- |
|
516 // CApSettingsModel::ClearWEPAndWPASettings |
|
517 // --------------------------------------------------------- |
|
518 // |
|
519 void CApSettingsModel::ClearWEPAndWPASettings() |
|
520 { |
|
521 } |
|
522 |
|
523 |
|
524 // --------------------------------------------------------- |
|
525 // CApSettingsModel::WriteWlanL |
|
526 // --------------------------------------------------------- |
|
527 // |
|
528 void CApSettingsModel::WriteWlanL( CApAccessPointItem& aApItem, |
|
529 TBool aIsNew ) |
|
530 { |
|
531 User::Leave( KErrNotSupported ); |
|
532 } |
|
533 |
|
534 |
|
535 // --------------------------------------------------------- |
|
536 // CApSettingsModel::LoadWlanL |
|
537 // --------------------------------------------------------- |
|
538 // |
|
539 void CApSettingsModel::LoadWlanL( CApAccessPointItem& aApItem ) |
|
540 { |
|
541 User::Leave( KErrNotSupported ); |
|
542 } |
|
543 |
|
544 |
|
545 //---------------------------------------------------------- |
|
546 // CApSettingsModel::HasWlanSecSettingsFilledL |
|
547 //---------------------------------------------------------- |
|
548 // |
|
549 TBool CApSettingsModel::HasWlanSecSettingsFilledL( CApAccessPointItem& aApItem ) |
|
550 { |
|
551 return EFalse; |
|
552 } |
|
553 |
|
554 |
|
555 //---------------------------------------------------------- |
|
556 // CApSettingsModel::UpdateSecurityModeL |
|
557 //---------------------------------------------------------- |
|
558 // |
|
559 void CApSettingsModel::UpdateSecurityModeL( CApAccessPointItem& aApItem ) |
|
560 { |
|
561 User::Leave( KErrNotSupported ); |
|
562 } |
|
563 |
|
564 // End of File |
|