2 * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
14 * Description: Declaration of class CApDataHandler
19 #ifndef APDATAHANDLER_H
20 #define APDATAHANDLER_H
22 // Deprecation warning
23 #warning This header file has been deprecated. Will be removed in one of the next SDK releases.
29 #include <ApEngineVer.h>
30 #include <ApEngineConsts.h>
33 // FORWARD DECLARATIONS
34 class CApAccessPointItem;
40 TInt iIsIpv6Supported; // Is Ipv6 Supported?
41 TBool iIsFeatureManagerInitialised;// Is FeatureManager Initialised?
44 * Indicates if HSCSD Access point is supported or not.
46 TBool iIsAppHscsdSupport;
48 TInt iVariant; /// Local variant value
56 * Representation of the access point handler.
57 * Encapsulates a session with the CommsDB
58 * Provides a way to access the database and manipulate its data.
60 class CApDataHandler :public CBase
62 public: // Constructors and destructor
65 * Two-phased constructor. Leaves on failure, places instance
67 * @param aDb a reference to a CCommsDataBase object.
68 * @return The constructed CApDataHandler.
72 IMPORT_C static CApDataHandler* NewLC( CCommsDatabase& aDb );
80 IMPORT_C virtual ~CApDataHandler();
83 protected: // Constructors
86 * C++ default constructor.
90 IMPORT_C CApDataHandler();
93 * Second-phase constructor.
97 IMPORT_C void ConstructL( CCommsDatabase& aDb );
103 public: // New functions
106 * Reads up one access point's data from the database.
107 * Expects that CApDataHandler has been created and the database had
109 * In case of error, function leaves with error code.
110 * <br>Error conditions:
111 * - Insufficient memory,
112 * - AP does not exists,
113 * - Server connection failure.
115 * @param aUid The Uid of the access point to be read
116 * @param aApItem A reference to a CApAccessPointItem to hold the data.
117 * @return no return value.
121 IMPORT_C void AccessPointDataL( TUint32 aUid,
122 CApAccessPointItem& aApItem );
127 * Updates data stored in an existing access point.
128 * Expects that CApDataHandler has been created and the database had
130 * In case of error, no data is stored.
131 * <br>Error conditions:
132 * - Insufficient memory
133 * - Server connection failure
134 * - Lock already present by other task
135 * - Uid does not exists.
136 * - Attempting to update read-only records will result
137 * in KErrAccessDenied
139 * @param aApItem A reference to a CApAccessPointItem holding the data
140 * @param aNameChanged a reference to a TBool that will indicate
141 * whether the name has changed or not.
142 * @return No return value.
146 IMPORT_C void UpdateAccessPointDataL( CApAccessPointItem& aApItem,
147 TBool& aNameChanged );
152 * Creates a copy of a previously existing access point.
153 * Expects that CApDataHandler has been created and the database had
155 * In case of error, no access point will be created.
156 * <br>Error conditions:
157 * - Insufficient memory
158 * - Server connection failure.
159 * - Lock already present by other task.
160 * - Access point does not exist.
161 * - Attempting to create new in protected tables will results
162 * in KErrAccessDenied
164 * @param aBaseId The UID of the existing access point to copy from.
165 * @return The Uid of the newly constructed and saved access point.
169 IMPORT_C TUint32 CreateCopyFromL( TUint32 aBaseId );
173 * Create a new access point from supplied data
174 * Expects that CApDataHandler has been created and the database had
176 * The name of the AP will be corrected to be unique if necessary and
177 * returned in the passed aApItem.
178 * In case of error, no access point will be created and the passed
179 * one will remain intact.
180 * <br>Error conditions:
181 * - Insufficient memory
182 * - Server connection failure.
183 * - Lock already present by other task.
184 * - Attempting to create new in protected tables will result
185 * in KErrAccessDenied
187 * @param aApItem Reference to a CApAccessPointItem holding the data
188 * @return The UID of the newly created and saved access point.
192 IMPORT_C TUint32 CreateFromDataL( CApAccessPointItem& aApItem );
197 * Removes the given access point from the database.
198 * Expects that CApDataHandler has been created and the database had
200 * In case of error, access point will not be removed.
201 * <br>Error conditions:
202 * - Insufficient memory,
203 * - Server connection failure.
204 * - Lock already present by other task.
205 * - Access point does not exist.
206 * - Attempting to remove read-only records will result
207 * in KErrAccessDenied
209 * @param aUid The UID of the access point to remove.
210 * @return no return value.
214 IMPORT_C void RemoveAPL( TUint32 aUid );
217 // Getting default access point
219 * Reads the UID of the default access point.
220 * Expects that CApDataHandler has been created and the database had
222 * In case of error, leaves with CommsDb or system error codes.
223 * <br>Error conditions:
224 * - Insufficient memory;
225 * - Server connection failure;
226 * - Lock already present;
227 * - Access point does not exists.
229 * @param aIsWAP A boolean indicating whether to read the default
230 * WAP or the default IAP/ISP (dep. on the database type) access point.
231 * @return The UID of the default access point.
235 IMPORT_C TUint32 DefaultL( TBool aIsWap ) const;
238 // Setting as default
240 * Sets the default access point.
241 * Expects that CApDataHandler has been created and the database had
243 * In case of error, leaves with CommsDb or system error codes.
244 * <br>Error conditions:
245 * - Insufficient memory;
246 * - Server connection failure;
247 * - Lock already present;
248 * - Access point does not exists.
249 * - Given Access Point is not of the desired type.
251 * @param aUid The UID of the access point to be set as default.
252 * @param aIntendedType The default type ( IAP, WAP, Both).
256 IMPORT_C void SetAsDefaultL(TUint32 aUid,
257 TCommsDbIspType aIntendedType );
261 // Setting preferences
263 * Sets the access point preference. Can be used only if the
264 * database type is IAP.
265 * Expects that CApDataHandler has been created and the database had
267 * In case of error, leaves with CommsDb or system error codes.
268 * <br>Error conditions:
269 * - Insufficient memory;
270 * - Server connection failure;
271 * - Lock already present;
272 * Can also leave with KErrAlreadyExists (if aOverWrite is EFalse ).
273 * @param aRank The ranking of the connection preference.
274 * @param aDircetion Specifies the direction of this connection
276 * @param aBearers The bearer set being valid for this connection
278 * @param aPrompt Enum value indicating whether or not the user
279 * should be prompted or warned on connection
280 * @param aIAP The identifier of the preferred IAP for this connection.
281 * @param aOverwrite Boolean value indicating that if a same record
282 * present, overwrite it or not.
286 IMPORT_C void SetPreferredIfDbIapTypeL
289 TCommDbConnectionDirection aDirection,
291 TCommDbDialogPref aPrompt,
297 * Sets the access point preference. Can be used only if the
298 * database type is ISP.
299 * Expects that CApDataHandler has been created and the database had
301 * In case of error, leaves with CommsDb or system error codes.
302 * <br>Error conditions:
303 * - Insufficient memory;
304 * - Server connection failure;
305 * - Lock already present;
306 * Can also leave with KErrAlreadyExists (if aOverWrite is EFalse ).
307 * @param aRank The ranking of the connection preference.
308 * @param aDircetion Specifies the direction of this connection
310 * @param aBearers The bearer set beeing valid for this connection
312 * @param aPrompt Enum value indicating whether or not the user
313 * should be prompted or warned on connection
314 * @param aISP The identifier of the preferred ISP for this connection.
315 * @param aChargeCard Identifier of the preferred chargecard for
317 * @param aServiceType The type of the service.
318 * @param aOverwrite Boolean value indicating that if a same record is
319 * present, overwrite it or not.
323 IMPORT_C void SetPreferredIfDbIspTypeL
326 TCommDbConnectionDirection aDirection,
328 TCommDbDialogPref aPrompt,
331 const TDesC& aServiceType,
338 * Gets the access point preference. Can be used only if the
339 * database type is IAP.
340 * Expects that CApDataHandler has been created and the database had
342 * In case of error, leaves with CommsDb or system error codes.
343 * <br>Error conditions:
344 * - Insufficient memory;
345 * - Server connection failure;
346 * - Lock already present;
347 * @param aRank The ranking of the desired connection preference.
348 * @param aDircetion Specifies the direction of the desired connection
350 * @param aBearers The bearer set beeing valid for this connection
352 * @param aPrompt Enum value indicating whether or not the user
353 * should be prompted or warned on connection
354 * @param aIAP The identifier of the preferred IAP for this
355 * connection preference.
359 IMPORT_C void GetPreferredIfDbIapTypeL
362 TCommDbConnectionDirection aDirection,
369 * Gets the access point preference. Can be used only if the
370 * database type is ISP.
371 * Expects that CApDataHandler has been created and the database had
373 * In case of error, leaves with CommsDb or system error codes.
374 * <br>Error conditions:
375 * - Insufficient memory;
376 * - Server connection failure;
377 * - Lock already present;
378 * @param aRank The ranking of the desired connection preference.
379 * @param aDircetion Specifies the direction of the desired connection
381 * @param aBearers The bearer set beeing valid for this connection
383 * @param aPrompt Enum value indicating whether or not the user
384 * should be prompted or warned on connection
385 * @param aISP The identifier of the preferred ISP for this
386 * connection preference.
387 * @param aChargeCard Identifier of the preferred chargecard for
388 * this connection preference.
389 * @return The type of the service.
393 IMPORT_C const TDesC& GetPreferredIfDbIspTypeL
396 TCommDbConnectionDirection aDirection,
404 // Getting default access point
406 * Reads the UID of the default access point.
407 * Expects that CApDataHandler has been created and the database had
409 * In case of error, leaves with CommsDb or system error codes.
410 * <br>Error conditions:
411 * - Insufficient memory;
412 * - Server connection failure;
413 * - Lock already present;
414 * - Access point does not exists.
416 * @param aIsWAP A boolean indicating whether to read the default
417 * WAP or the default IAP/ISP (dep. on the database type) access point.
418 * @param aReadOnly A TBool passed by reference to hold whether the
419 * the default access point record is read-only or not.
420 * @return The UID of the default access point.
424 IMPORT_C TUint32 DefaultL( TBool aIsWap, TBool& aReadOnly )const;
431 * Removes the given network group from the database.
432 * Expects that CApDataHandler has been created and the database had
434 * In case of error, network group will not be removed.
435 * <br>Error conditions:
436 * - Insufficient memory,
437 * - Server connection failure.
438 * - Lock already present by other task.
439 * - network group does not exist.
440 * - Attempting to remove read-only records will result
441 * in KErrAccessDenied
443 * @param aUid The UID of the network group to remove.
444 * @return no return value.
448 IMPORT_C void RemoveNetworkL( TUint32 aUid );
452 * Creates a network group from the data.
453 * Expects that CApDataHandler has been created and the database had
455 * In case of error, network group will not be created.
456 * <br>Error conditions:
457 * - Insufficient memory,
458 * - Server connection failure.
459 * - Lock already present by other task.
460 * - network group does not exist.
461 * - Attempting to remove read-only records will result
462 * in KErrAccessDenied
464 * @param aNetwork The network item to create/write into db.
465 * @return no return value.
469 IMPORT_C void CreateNetworkL( CApNetworkItem& aNetwork );
473 * Reads up a network part of the access point
474 * Network is identified by the iNetworkId of the passed access point
478 IMPORT_C void ReadNetworkPartL( CApAccessPointItem& aItem );
484 * Network is identified by passed uid
488 IMPORT_C void ReadNetworkL( TUint32 aUid, CApNetworkItem& aNetwork );
491 protected: // New functions
493 * Reads the WAP part of the data from the database.
494 * In case of error, leaves with CommDb error codes.
495 * @param aWapId The UID of the Access Point to read the data from.
496 * @param aApItem A reference to a CApAccessPointItem to hold the data
497 * @return No return value.
499 void ReadWapDataL( TUint32 aWapId, CApAccessPointItem& aApItem );
503 * Reads the IAP part of the data from the database.
504 * In case of error, leaves with CommDb error codes.
505 * @param aIapId The UID of the record in the IAP table to read
507 * @param aApItem A reference to a CApAccessPointItem to hold the data
508 * @return No return value.
510 void ReadIapDataL( TUint32 aIapId, CApAccessPointItem& aApItem );
514 * Reads the ISP part of the data from the database.
515 * In case of error, leaves with CommDb error codes.
516 * @param aIspId The UID of the record in the ISP table to
518 * @param aApItem A reference to a CApAccessPointItem to hold the data
519 * @return No return value.
521 void ReadIspDataL( TUint32 aIspId, CApAccessPointItem& aApItem );
525 * Reads the GPRS data from the database.
526 * In case of error, leaves with CommDb error codes.
527 * @param aIspId The UID of the record in the GPRS table to
528 * read the data from.
529 * @param aApItem A reference to a CApAccessPointItem to hold the data
530 * @return No return value.
532 void ReadGprsDataL( TUint32 aIspId, CApAccessPointItem& aApItem );
536 * Reads the CDMA data from the database.
537 * In case of error, leaves with CommDb error codes.
538 * @param aIspId The UID of the record in the CDMA table to
539 * read the data from.
540 * @param aApItem A reference to a CApAccessPointItem to hold the data
541 * @return No return value.
543 void ReadCdmaDataL( TUint32 aIspId, CApAccessPointItem& aApItem );
547 * Reads the LAN data from the database.
548 * In case of error, leaves with CommDb error codes.
549 * @param aIspId The UID of the record in the LAN table to
550 * read the data from.
551 * @param aApItem A reference to a CApAccessPointItem to hold the data
552 * @return No return value.
554 void ReadLanDataL( TUint32 aIspId, CApAccessPointItem& aApItem );
558 * Reads the DialIn/Out ISP data from the database.
559 * In case of error, leaves with CommDb error codes.
560 * @param aIspId The UID of the record in the Dialup table to
561 * read the data from.
562 * @param aApItem A reference to a CApAccessPointItem to hold the data
563 * @return No return value.
565 void ReadDialInOutDataL( TUint32 aIspId, CApAccessPointItem& aApItem );
569 * Reads up the VPN bearer type info in case of a VPN access point
570 * In case of error, leaves with CommDb error codes.
571 * @param aIspId The UID of the record in the VPN table to
572 * read the data from.
573 * @param aApItem A reference to a CApAccessPointItem to hold the data
574 * @return No return value.
576 void ReadVpnInfoL( TUint32 aIspId, CApAccessPointItem& aApItem);
580 * Writes the WAP bearer part of the data to the database.
581 * In case of error, leaves with CommDb error codes.
582 * @param aIsNew A Boolean indicating whether it is a new record or it
583 * is an update operation.
584 * @param aWapId The UID of the WAP Access Point record to update.
585 * Used only if aIsNew EFalse.
586 * @param aApItem Reference to a CApAccessPointItem which holds the data
587 * @return No return value.
589 void WriteWapBearerDataL
593 CApAccessPointItem& aApItem
598 * Writes the WAP AP part of the data to the database.
599 * In case of error, leaves with CommDb error codes.
600 * @param aIsNew A Boolean indicating whether it is a new record or it
601 * is an update operation.
602 * @param aWapId The UID of the WAP Access Point record to update.
603 * Used only if aIsNew EFalse.
604 * @param aApItem Reference to a CApAccessPointItem which holds the data
605 * @return No return value.
611 CApAccessPointItem& aApItem
617 * Writes the IAP part of the data to the database.
618 * In case of error, leaves with CommDb error codes.
619 * @param aIsNew A Boolean indicating whether it is a new record or it
620 * is an update operation.
621 * @param aIapId The UID of the IAP Access Point record to update.
622 * Used only if aIsNew EFalse.
623 * @param aApItem Reference to a CApAccessPointItem which holds the data
624 * @return No return value.
630 CApAccessPointItem& aApItem
634 * Writes the ISP part of the data to the database.
635 * In case of error, leaves with CommDb error codes.
636 * @param aIsNew A Boolean indicating whether it is a new record or it
637 * is an update operation.
638 * @param aIspId The UID of the ISP Access Point record to update.
639 * Used only if aIsNew EFalse.
640 * @param aApItem Reference to a CApAccessPointItem which holds the data
641 * @return No return value.
643 void WriteIspDataL( TBool aIsNew, TUint32 aIspId,
644 CApAccessPointItem& aApItem );
648 * Writes the Cdma data to the database.
649 * In case of error, leaves with CommDb error codes.
650 * @param aIsNew A Boolean indicating whether it is a new record or it
651 * is an update operation.
652 * @param aApItem Reference to a CApAccessPointItem which holds the data
653 * @return No return value.
655 void WriteCdmaDataL( TBool aIsNew,
656 CApAccessPointItem& aApItem );
661 * Writes the Gprs data to the database.
662 * In case of error, leaves with CommDb error codes.
663 * @param aIsNew A Boolean indicating whether it is a new record or it
664 * is an update operation.
665 * @param aApItem Reference to a CApAccessPointItem which holds the data
666 * @return No return value.
668 void WriteGprsDataL( TBool aIsNew,
669 CApAccessPointItem& aApItem );
672 * Writes the LAN data to the database.
673 * In case of error, leaves with CommDb error codes.
674 * @param aIsNew A Boolean indicating whether it is a new record or it
675 * is an update operation.
676 * @param aApItem Reference to a CApAccessPointItem which holds the data
677 * @return No return value.
679 void WriteLanDataL( TBool aIsNew,
680 CApAccessPointItem& aApItem );
684 * Writes the data to the database.
685 * In case of error, leaves with CommDb error codes.
686 * @param aApItem Reference to a CApAccessPointItem which holds the data
687 * @param aIsNew A Boolean indicating whether it is a new record or it
688 * is an update operation.
689 * @return No return value.
691 TUint32 DoUpdateAccessPointDataL( CApAccessPointItem& aApItem,
692 TBool aIsNew, TBool& aNameChanged );
696 * Sets the default IAP & ISP records in Global Settings.
697 * In case of error, leaves with CommDb error codes.
698 * @param aApItem A UID to the WAP Access Point record to
699 * be used as a default.
700 * @return No return value.
702 void SetDefaultIapIspL( TUint32 aUid );
706 * Removes the WAP_BEARER table part of the access point from
708 * Expects that CApDataHandler has been created and the database had
710 * In case of error, access point will not be removed.
711 * @param aUid The UID of the access point to remove.
712 * @return No return value.
714 void RemoveWapBearerApL( TUint32 aUid );
718 * Removes the WAP_ACCESS_POINT table part of the access point from
720 * Expects that CApDataHandler has been created and the database had
722 * In case of error, access point will not be removed.
723 * @param aUid The UID of the access point to remove.
724 * @return No return value.
726 void RemoveWapApL( TUint32 aUid );
730 * Removes the IAP part of the access point from the database.
731 * Expects that CApDataHandler has been created and the database had
733 * In case of error, access point will not be removed.
734 * @param aUid The UID of the IAP part of the access point to remove.
735 * @return No return value.
737 void RemoveIapL( TUint32 aUid );
741 * Removes the ISP part of the access point from the database.
742 * Expects that CApDataHandler has been created and the database had
744 * In case of error, access point will not be removed.
745 * @param aUid The UID of the ISP part of the access point to remove.
746 * @param aOut TBool indicating whether Dial out or dial in ISP.
747 * @return No return value.
749 void RemoveIspL( TUint32 aUid, TBool aOut );
753 * Removes the GPRS part of the access point from the database.
754 * Expects that CApDataHandler has been created and the database had
756 * In case of error, access point will not be removed.
757 * @param aUid The UID of the GPRS part of the access point to remove.
758 * @return No return value.
760 void RemoveGprsL( TUint32 aUid, TBool aOut );
764 * Removes the CDMA part of the access point from the database.
765 * Expects that CApDataHandler has been created and the database had
767 * In case of error, access point will not be removed.
768 * @param aUid The UID of the CDMA part of the access point to remove.
769 * @return No return value.
771 void RemoveCdmaL( TUint32 aUid );
776 * Removes the LAN part of the access point from the database.
777 * Expects that CApDataHandler has been created and the database had
779 * In case of error, access point will not be removed.
780 * @param aUid The UID of the LAN part of the access point to remove.
781 * @return No return value.
783 void RemoveLanL( TUint32 aUid );
787 * Removes the WLAN part of the access point from the database.
788 * Expects that CApDataHandler has been created and the database had
790 * In case of error, access point will not be removed.
791 * @param aUid The UID of the LAN part of the access point to remove.
792 * @return No return value.
794 void RemoveWlanL( TUint32 aUid );
798 * Handles the bearer change related things (deleting old links,
799 * inserting new ones if needed in the database).
800 * Expects that CApDataHandler has been created and the database had
802 * In case of error, access point data will not be changed.
803 * @param aApItem A reference to a CApAccessPointItem holding the
805 * @return Boolean indicating whether bearer has changed or not.
807 TBool HandleBearerChangeIfNeededL( CApAccessPointItem& aApItem );
812 * Reads up one access point's data from the database.
813 * Expects that CApDataHandler has been created and the database had
815 * In case of error, function leaves with error code.
816 * <br>Error conditions:
817 * - Insufficient memory,
818 * - AP does not exists,
819 * - Server connection failure.
821 * @param aUid The Uid of the access point to be read
822 * @param aApItem A reference to a CApAccessPointItem to hold the data.
823 * @return no return value.
825 void DoAccessPointDataL( TUint32 aUid, CApAccessPointItem& aApItem );
829 * Removes the given access point from the database.
830 * Expects that CApDataHandler has been created and the database had
832 * In case of error, access point will not be removed.
833 * <br>Error conditions:
834 * - Insufficient memory,
835 * - Server connection failure.
836 * - Lock already present by other task.
837 * - Access point does not exist.
838 * - Attempting to remove read-only records will result
839 * in KErrAccessDenied
841 * @param aUid The UID of the access point to remove.
842 * @return no return value.
844 void DoRemoveAPL( TUint32 aUid );
848 * Sets the default access point.
849 * Expects that CApDataHandler has been created and the database had
851 * In case of error, leaves with CommsDb or system error codes.
852 * <br>Error conditions:
853 * - Insufficient memory;
854 * - Server connection failure;
855 * - Lock already present;
856 * - Access point does not exists.
857 * - Given Access Point is not of the desired type.
859 * @param aUid The UID of the access point to be set as default.
860 * @param aIntendedType The default type ( IAP, WAP, Both).
862 void DoSetAsDefaultL(TUint32 aUid, TCommsDbIspType aIntendedType );
866 * Sets the access point preference. Can be used only if the
867 * database type is IAP.
868 * Expects that CApDataHandler has been created and the database had
870 * In case of error, leaves with CommsDb or system error codes.
871 * <br>Error conditions:
872 * - Insufficient memory;
873 * - Server connection failure;
874 * - Lock already present;
875 * Can also leave with KErrAlreadyExists (if aOverWrite is EFalse ).
876 * @param aRank The ranking of the connection preference.
877 * @param aDircetion Specifies the direction of this connection
879 * @param aBearers The bearer set beeing valid for this connection
881 * @param aPrompt Enum value indicating whether or not the user
882 * should be prompted or warned on connection
883 * @param aIAP The identifier of the preferred IAP for this connection.
884 * @param aOverwrite Boolean value indicating that if a same record
885 * present, overwrite it or not.
887 void DoSetPreferredIfDbIapTypeL
890 TCommDbConnectionDirection aDirection,
892 TCommDbDialogPref aPrompt,
899 * Sets the access point preference. Can be used only if the
900 * database type is ISP.
901 * Expects that CApDataHandler has been created and the database had
903 * In case of error, leaves with CommsDb or system error codes.
904 * <br>Error conditions:
905 * - Insufficient memory;
906 * - Server connection failure;
907 * - Lock already present;
908 * Can also leave with KErrAlreadyExists (if aOverWrite is EFalse ).
909 * @param aRank The ranking of the connection preference.
910 * @param aDircetion Specifies the direction of this connection
912 * @param aBearers The bearer set beeing valid for this connection
914 * @param aPrompt Enum value indicating whether or not the user
915 * should be prompted or warned on connection
916 * @param aISP The identifier of the preferred ISP for this connection.
917 * @param aChargeCard Identifier of the preferred chargecard for
919 * @param aServiceType The type of the service.
920 * @param aOverwrite Boolean value indicating that if a same record
921 * present, overwrite it or not.
923 void DoSetPreferredIfDbIspTypeL
926 TCommDbConnectionDirection aDirection,
928 TCommDbDialogPref aPrompt,
931 const TDesC& aServiceType,
937 * Converts setted AP speed from TApCallSpeed to commsdb values
938 * @param The access point item whose speed needs to be converted
939 * @return no return value
941 /*****************************************************
942 * Series 60 Customer / ETel
944 *****************************************************/
945 void ApSpeed2EtelL( CApAccessPointItem* aItem );
949 * Converts commsdb speed values to TApCallSpeed
950 * @param The access point item whose speed needs to be converted
951 * @return no return value
953 /*****************************************************
954 * Series 60 Customer / ETel
956 *****************************************************/
957 void EtelSpeed2ApL( CApAccessPointItem& aItem );
960 // Getting default access point
962 * Reads the UID of the default access point.
963 * Expects that CApDataHandler has been created and the database had
965 * In case of error, leaves with CommsDb or system error codes.
966 * <br>Error conditions:
967 * - Insufficient memory;
968 * - Server connection failure;
969 * - Lock already present;
970 * - Access point does not exists.
972 * @param aIsWAP A boolean indicating whether to read the default
973 * WAP or the default IAP/ISP (dep. on the database type) access point.
974 * @param TBool*: if not NULL, a holder for the read-only flag of
975 * the default access point. Prepared for future products but also used
976 * here through passing NULL ptr.
977 * @return The UID of the default access point.
979 TUint32 DoGetDefaultL( TBool aIsWap, TBool* aReadOnly ) const;
983 * Writes the proxy data of an access point
984 * @param aIsNew Boolean stating whether the access point is new
985 * @param aApItem A CApAccessPointItem passed by reference
986 * holding the current access point data. It's record ID's will be
987 * updated if needed (in case it is a new item )
989 void WriteProxyDataL( TBool aIsNew,
990 const CApAccessPointItem& aApItem );
994 * Reads up the proxy data of an access point
995 * @param aApItem A CApAccessPointItem passed by reference
996 * holding the current access point data.
998 void ReadProxyDataL( CApAccessPointItem& aApItem );
1002 * Removes a proxy data
1003 * @param aServiceType The service type to remove for
1004 * @param aIspId The service record ID
1006 void RemoveProxyDataL( HBufC* aServiceType, TUint32 aIspId );
1010 * Writes the network data of an access point
1011 * @param aIsNew Boolean stating whether the access point is new
1012 * @param aApItem A CApAccessPointItem passed by reference
1013 * holding the current access point data. It's record ID's will be
1014 * updated if needed (in case it is a new item )
1016 void WriteNetworkDataL( TBool aIsNew, CApAccessPointItem& aApItem );
1020 * Reads up the network data of an access point
1021 * @param aApItem A CApAccessPointItem passed by reference
1022 * holding the current access point data.
1024 void ReadNetworkDataL( CApAccessPointItem& aApItem );
1028 * Removes the network data
1029 * @param aIspId The record ID to remove
1031 void RemoveNetworkDataL( TUint32 aIspId );
1035 * Gets the location record ID
1036 * @return The UID of the location.
1038 TUint32 GetLocationIdL();
1042 * Gets the modem record ID
1043 * @return The UID of the modem record.
1045 TUint32 GetModemBearerIDL( CApAccessPointItem& aApItem );
1049 * Returns the protocol for the passed item
1050 * @param aApItem An access point item
1051 * @return The protocol of the passed item.
1053 TUint32 ProtocolL( CApAccessPointItem& aApItem );
1056 * Returns the commsdb speed for the passed item
1057 * @param aApItem An access point item
1058 * @return The speed of the passed item.
1060 TUint32 CommsDbSpeedL( CApAccessPointItem& aApItem );
1064 * Reads up common IP & PPP SERVICE data parts of an access point.
1065 * Leaves if it is not persent in the database
1066 * @param The table to read from
1067 * @param The CApAccessPointItem to store into
1069 void ReadServiceL( CCommsDbTableView& ispt,
1070 CApAccessPointItem& aApItem );
1074 * Reads up CSD/GPRS IPv6 parts of an access point.
1075 * Leaves if it is not persent in the database
1076 * @param The table to read from
1077 * @param The CApAccessPointItem to store into
1079 void ReadServiceIp6L( CCommsDbTableView& ispt,
1080 CApAccessPointItem& aApItem );
1084 * Writes common IP & PPP SERVICE data parts of an access point.
1085 * Leaves if it is not persent in the database
1086 * @param The table to write into
1087 * @param The CApAccessPointItem holding the data to store
1089 void WriteServiceL( CCommsDbTableView& aTable,
1090 CApAccessPointItem& aApItem );
1094 * Writes the IPv6 parts of an access point.
1095 * Leaves if it is not persent in the database
1096 * @param The table to write to
1097 * @param The CApAccessPointItem to read the data from
1099 void WriteServiceIp6L( CCommsDbTableView& ispt,
1100 CApAccessPointItem& aApItem );
1104 * Writes the CSD isp data to the database.
1105 * In case of error, leaves with CommDb error codes.
1106 * Leaves with KErrNotSupported if (HS)CSD bearer type is not supported.
1107 * @param aIsNew A Boolean indicating whether it is a new record or it
1108 * is an update operation.
1109 * @param aApItem Reference to a CApAccessPointItem which holds the data
1110 * @return No return value.
1112 void WriteCsdDataL( TBool aIsNew, CApAccessPointItem& aApItem );
1116 * Gets the local variant value
1117 * @return A TInt stating the variant
1119 // TInt GetVariantL();
1123 * Reads up WLAN data parts of an access point.
1124 * Leaves if it is not persent in the database
1125 * @param The table to read from
1126 * @param The CApAccessPointItem to store into
1128 void ReadWlanL( CCommsDbTableView& lant,
1129 CApAccessPointItem& aApItem );
1133 * Writes the WLAN parts of an access point.
1134 * Leaves if it is not persent in the database
1135 * @param The table to write to
1136 * @param The CApAccessPointItem to read the data from
1138 void WriteWlanL( CCommsDbTableView& aTable,
1139 CApAccessPointItem& aApItem );
1142 * Creates a new record in the LANBearer table if there is none for WLAN
1143 * @return The UID of the LANBEarer record.
1145 TUint32 CreateLanBearerIfNeededL();
1150 * Reads up the name of the LAN/Modem bearer record
1152 void ReadModemBearerNameL( CApAccessPointItem& aApItem );
1156 CCommsDatabase* iDb;
1157 // TCommDbDatabaseType iDbType; // deprecated and not used but kept
1158 // to maintain class size for BC
1159 // no change in size as deprecated removed,
1160 // new added, with the same size...
1161 THandlerExtra* iExt;
1166 #endif // APDATAHANDLER_H