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 "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".
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 LAN data from the database.
537 * In case of error, leaves with CommDb error codes.
538 * @param aIspId The UID of the record in the LAN 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 ReadLanDataL( TUint32 aIspId, CApAccessPointItem& aApItem );
547 * Reads the DialIn/Out ISP data from the database.
548 * In case of error, leaves with CommDb error codes.
549 * @param aIspId The UID of the record in the Dialup 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 ReadDialInOutDataL( TUint32 aIspId, CApAccessPointItem& aApItem );
558 * Reads up the VPN bearer type info in case of a VPN access point
559 * In case of error, leaves with CommDb error codes.
560 * @param aIspId The UID of the record in the VPN 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 ReadVpnInfoL( TUint32 aIspId, CApAccessPointItem& aApItem);
569 * Writes the WAP bearer part of the data to the database.
570 * In case of error, leaves with CommDb error codes.
571 * @param aIsNew A Boolean indicating whether it is a new record or it
572 * is an update operation.
573 * @param aWapId The UID of the WAP Access Point record to update.
574 * Used only if aIsNew EFalse.
575 * @param aApItem Reference to a CApAccessPointItem which holds the data
576 * @return No return value.
578 void WriteWapBearerDataL
582 CApAccessPointItem& aApItem
587 * Writes the WAP AP part of the data to the database.
588 * In case of error, leaves with CommDb error codes.
589 * @param aIsNew A Boolean indicating whether it is a new record or it
590 * is an update operation.
591 * @param aWapId The UID of the WAP Access Point record to update.
592 * Used only if aIsNew EFalse.
593 * @param aApItem Reference to a CApAccessPointItem which holds the data
594 * @return No return value.
600 CApAccessPointItem& aApItem
606 * Writes the IAP part of the data to the database.
607 * In case of error, leaves with CommDb error codes.
608 * @param aIsNew A Boolean indicating whether it is a new record or it
609 * is an update operation.
610 * @param aIapId The UID of the IAP Access Point record to update.
611 * Used only if aIsNew EFalse.
612 * @param aApItem Reference to a CApAccessPointItem which holds the data
613 * @return No return value.
619 CApAccessPointItem& aApItem
623 * Writes the ISP part of the data to the database.
624 * In case of error, leaves with CommDb error codes.
625 * @param aIsNew A Boolean indicating whether it is a new record or it
626 * is an update operation.
627 * @param aIspId The UID of the ISP Access Point record to update.
628 * Used only if aIsNew EFalse.
629 * @param aApItem Reference to a CApAccessPointItem which holds the data
630 * @return No return value.
632 void WriteIspDataL( TBool aIsNew, TUint32 aIspId,
633 CApAccessPointItem& aApItem );
636 * Writes the Gprs data to the database.
637 * In case of error, leaves with CommDb error codes.
638 * @param aIsNew A Boolean indicating whether it is a new record or it
639 * is an update operation.
640 * @param aApItem Reference to a CApAccessPointItem which holds the data
641 * @return No return value.
643 void WriteGprsDataL( TBool aIsNew,
644 CApAccessPointItem& aApItem );
647 * Writes the LAN data to the database.
648 * In case of error, leaves with CommDb error codes.
649 * @param aIsNew A Boolean indicating whether it is a new record or it
650 * is an update operation.
651 * @param aApItem Reference to a CApAccessPointItem which holds the data
652 * @return No return value.
654 void WriteLanDataL( TBool aIsNew,
655 CApAccessPointItem& aApItem );
659 * Writes the data to the database.
660 * In case of error, leaves with CommDb error codes.
661 * @param aApItem Reference to a CApAccessPointItem which holds the data
662 * @param aIsNew A Boolean indicating whether it is a new record or it
663 * is an update operation.
664 * @return No return value.
666 TUint32 DoUpdateAccessPointDataL( CApAccessPointItem& aApItem,
667 TBool aIsNew, TBool& aNameChanged );
671 * Sets the default IAP & ISP records in Global Settings.
672 * In case of error, leaves with CommDb error codes.
673 * @param aApItem A UID to the WAP Access Point record to
674 * be used as a default.
675 * @return No return value.
677 void SetDefaultIapIspL( TUint32 aUid );
681 * Removes the WAP_BEARER table part of the access point from
683 * Expects that CApDataHandler has been created and the database had
685 * In case of error, access point will not be removed.
686 * @param aUid The UID of the access point to remove.
687 * @return No return value.
689 void RemoveWapBearerApL( TUint32 aUid );
693 * Removes the WAP_ACCESS_POINT table part of the access point from
695 * Expects that CApDataHandler has been created and the database had
697 * In case of error, access point will not be removed.
698 * @param aUid The UID of the access point to remove.
699 * @return No return value.
701 void RemoveWapApL( TUint32 aUid );
705 * Removes the IAP part of the access point from the database.
706 * Expects that CApDataHandler has been created and the database had
708 * In case of error, access point will not be removed.
709 * @param aUid The UID of the IAP part of the access point to remove.
710 * @return No return value.
712 void RemoveIapL( TUint32 aUid );
716 * Removes the ISP part of the access point from the database.
717 * Expects that CApDataHandler has been created and the database had
719 * In case of error, access point will not be removed.
720 * @param aUid The UID of the ISP part of the access point to remove.
721 * @param aOut TBool indicating whether Dial out or dial in ISP.
722 * @return No return value.
724 void RemoveIspL( TUint32 aUid, TBool aOut );
728 * Removes the GPRS part of the access point from the database.
729 * Expects that CApDataHandler has been created and the database had
731 * In case of error, access point will not be removed.
732 * @param aUid The UID of the GPRS part of the access point to remove.
733 * @return No return value.
735 void RemoveGprsL( TUint32 aUid, TBool aOut );
739 * Removes the LAN part of the access point from the database.
740 * Expects that CApDataHandler has been created and the database had
742 * In case of error, access point will not be removed.
743 * @param aUid The UID of the LAN part of the access point to remove.
744 * @return No return value.
746 void RemoveLanL( TUint32 aUid );
750 * Removes the WLAN part of the access point from the database.
751 * Expects that CApDataHandler has been created and the database had
753 * In case of error, access point will not be removed.
754 * @param aUid The UID of the LAN part of the access point to remove.
755 * @return No return value.
757 void RemoveWlanL( TUint32 aUid );
761 * Handles the bearer change related things (deleting old links,
762 * inserting new ones if needed in the database).
763 * Expects that CApDataHandler has been created and the database had
765 * In case of error, access point data will not be changed.
766 * @param aApItem A reference to a CApAccessPointItem holding the
768 * @return Boolean indicating whether bearer has changed or not.
770 TBool HandleBearerChangeIfNeededL( CApAccessPointItem& aApItem );
775 * Reads up one access point's data from the database.
776 * Expects that CApDataHandler has been created and the database had
778 * In case of error, function leaves with error code.
779 * <br>Error conditions:
780 * - Insufficient memory,
781 * - AP does not exists,
782 * - Server connection failure.
784 * @param aUid The Uid of the access point to be read
785 * @param aApItem A reference to a CApAccessPointItem to hold the data.
786 * @return no return value.
788 void DoAccessPointDataL( TUint32 aUid, CApAccessPointItem& aApItem );
792 * Removes the given access point from the database.
793 * Expects that CApDataHandler has been created and the database had
795 * In case of error, access point will not be removed.
796 * <br>Error conditions:
797 * - Insufficient memory,
798 * - Server connection failure.
799 * - Lock already present by other task.
800 * - Access point does not exist.
801 * - Attempting to remove read-only records will result
802 * in KErrAccessDenied
804 * @param aUid The UID of the access point to remove.
805 * @return no return value.
807 void DoRemoveAPL( TUint32 aUid );
811 * Sets the default access point.
812 * Expects that CApDataHandler has been created and the database had
814 * In case of error, leaves with CommsDb or system error codes.
815 * <br>Error conditions:
816 * - Insufficient memory;
817 * - Server connection failure;
818 * - Lock already present;
819 * - Access point does not exists.
820 * - Given Access Point is not of the desired type.
822 * @param aUid The UID of the access point to be set as default.
823 * @param aIntendedType The default type ( IAP, WAP, Both).
825 void DoSetAsDefaultL(TUint32 aUid, TCommsDbIspType aIntendedType );
829 * Sets the access point preference. Can be used only if the
830 * database type is IAP.
831 * Expects that CApDataHandler has been created and the database had
833 * In case of error, leaves with CommsDb or system error codes.
834 * <br>Error conditions:
835 * - Insufficient memory;
836 * - Server connection failure;
837 * - Lock already present;
838 * Can also leave with KErrAlreadyExists (if aOverWrite is EFalse ).
839 * @param aRank The ranking of the connection preference.
840 * @param aDircetion Specifies the direction of this connection
842 * @param aBearers The bearer set beeing valid for this connection
844 * @param aPrompt Enum value indicating whether or not the user
845 * should be prompted or warned on connection
846 * @param aIAP The identifier of the preferred IAP for this connection.
847 * @param aOverwrite Boolean value indicating that if a same record
848 * present, overwrite it or not.
850 void DoSetPreferredIfDbIapTypeL
853 TCommDbConnectionDirection aDirection,
855 TCommDbDialogPref aPrompt,
862 * Sets the access point preference. Can be used only if the
863 * database type is ISP.
864 * Expects that CApDataHandler has been created and the database had
866 * In case of error, leaves with CommsDb or system error codes.
867 * <br>Error conditions:
868 * - Insufficient memory;
869 * - Server connection failure;
870 * - Lock already present;
871 * Can also leave with KErrAlreadyExists (if aOverWrite is EFalse ).
872 * @param aRank The ranking of the connection preference.
873 * @param aDircetion Specifies the direction of this connection
875 * @param aBearers The bearer set beeing valid for this connection
877 * @param aPrompt Enum value indicating whether or not the user
878 * should be prompted or warned on connection
879 * @param aISP The identifier of the preferred ISP for this connection.
880 * @param aChargeCard Identifier of the preferred chargecard for
882 * @param aServiceType The type of the service.
883 * @param aOverwrite Boolean value indicating that if a same record
884 * present, overwrite it or not.
886 void DoSetPreferredIfDbIspTypeL
889 TCommDbConnectionDirection aDirection,
891 TCommDbDialogPref aPrompt,
894 const TDesC& aServiceType,
900 * Converts setted AP speed from TApCallSpeed to commsdb values
901 * @param The access point item whose speed needs to be converted
902 * @return no return value
904 /*****************************************************
905 * Series 60 Customer / ETel
907 *****************************************************/
908 void ApSpeed2EtelL( CApAccessPointItem* aItem );
912 * Converts commsdb speed values to TApCallSpeed
913 * @param The access point item whose speed needs to be converted
914 * @return no return value
916 /*****************************************************
917 * Series 60 Customer / ETel
919 *****************************************************/
920 void EtelSpeed2ApL( CApAccessPointItem& aItem );
923 // Getting default access point
925 * Reads the UID of the default access point.
926 * Expects that CApDataHandler has been created and the database had
928 * In case of error, leaves with CommsDb or system error codes.
929 * <br>Error conditions:
930 * - Insufficient memory;
931 * - Server connection failure;
932 * - Lock already present;
933 * - Access point does not exists.
935 * @param aIsWAP A boolean indicating whether to read the default
936 * WAP or the default IAP/ISP (dep. on the database type) access point.
937 * @param TBool*: if not NULL, a holder for the read-only flag of
938 * the default access point. Prepared for future products but also used
939 * here through passing NULL ptr.
940 * @return The UID of the default access point.
942 TUint32 DoGetDefaultL( TBool aIsWap, TBool* aReadOnly ) const;
946 * Writes the proxy data of an access point
947 * @param aIsNew Boolean stating whether the access point is new
948 * @param aApItem A CApAccessPointItem passed by reference
949 * holding the current access point data. It's record ID's will be
950 * updated if needed (in case it is a new item )
952 void WriteProxyDataL( TBool aIsNew,
953 const CApAccessPointItem& aApItem );
957 * Reads up the proxy data of an access point
958 * @param aApItem A CApAccessPointItem passed by reference
959 * holding the current access point data.
961 void ReadProxyDataL( CApAccessPointItem& aApItem );
965 * Removes a proxy data
966 * @param aServiceType The service type to remove for
967 * @param aIspId The service record ID
969 void RemoveProxyDataL( HBufC* aServiceType, TUint32 aIspId );
973 * Writes the network data of an access point
974 * @param aIsNew Boolean stating whether the access point is new
975 * @param aApItem A CApAccessPointItem passed by reference
976 * holding the current access point data. It's record ID's will be
977 * updated if needed (in case it is a new item )
979 void WriteNetworkDataL( TBool aIsNew, CApAccessPointItem& aApItem );
983 * Reads up the network data of an access point
984 * @param aApItem A CApAccessPointItem passed by reference
985 * holding the current access point data.
987 void ReadNetworkDataL( CApAccessPointItem& aApItem );
991 * Removes the network data
992 * @param aIspId The record ID to remove
994 void RemoveNetworkDataL( TUint32 aIspId );
998 * Gets the location record ID
999 * @return The UID of the location.
1001 TUint32 GetLocationIdL();
1005 * Gets the modem record ID
1006 * @return The UID of the modem record.
1008 TUint32 GetModemBearerIDL( CApAccessPointItem& aApItem );
1012 * Returns the protocol for the passed item
1013 * @param aApItem An access point item
1014 * @return The protocol of the passed item.
1016 TUint32 ProtocolL( CApAccessPointItem& aApItem );
1019 * Returns the commsdb speed for the passed item
1020 * @param aApItem An access point item
1021 * @return The speed of the passed item.
1023 TUint32 CommsDbSpeedL( CApAccessPointItem& aApItem );
1027 * Reads up common IP & PPP SERVICE data parts of an access point.
1028 * Leaves if it is not persent in the database
1029 * @param The table to read from
1030 * @param The CApAccessPointItem to store into
1032 void ReadServiceL( CCommsDbTableView& ispt,
1033 CApAccessPointItem& aApItem );
1037 * Reads up CSD/GPRS IPv6 parts of an access point.
1038 * Leaves if it is not persent in the database
1039 * @param The table to read from
1040 * @param The CApAccessPointItem to store into
1042 void ReadServiceIp6L( CCommsDbTableView& ispt,
1043 CApAccessPointItem& aApItem );
1047 * Writes common IP & PPP SERVICE data parts of an access point.
1048 * Leaves if it is not persent in the database
1049 * @param The table to write into
1050 * @param The CApAccessPointItem holding the data to store
1052 void WriteServiceL( CCommsDbTableView& aTable,
1053 CApAccessPointItem& aApItem );
1057 * Writes the IPv6 parts of an access point.
1058 * Leaves if it is not persent in the database
1059 * @param The table to write to
1060 * @param The CApAccessPointItem to read the data from
1062 void WriteServiceIp6L( CCommsDbTableView& ispt,
1063 CApAccessPointItem& aApItem );
1067 * Writes the CSD isp data to the database.
1068 * In case of error, leaves with CommDb error codes.
1069 * Leaves with KErrNotSupported if (HS)CSD bearer type is not supported.
1070 * @param aIsNew A Boolean indicating whether it is a new record or it
1071 * is an update operation.
1072 * @param aApItem Reference to a CApAccessPointItem which holds the data
1073 * @return No return value.
1075 void WriteCsdDataL( TBool aIsNew, CApAccessPointItem& aApItem );
1079 * Gets the local variant value
1080 * @return A TInt stating the variant
1082 // TInt GetVariantL();
1086 * Reads up WLAN data parts of an access point.
1087 * Leaves if it is not persent in the database
1088 * @param The table to read from
1089 * @param The CApAccessPointItem to store into
1091 void ReadWlanL( CCommsDbTableView& lant,
1092 CApAccessPointItem& aApItem );
1096 * Writes the WLAN parts of an access point.
1097 * Leaves if it is not persent in the database
1098 * @param The table to write to
1099 * @param The CApAccessPointItem to read the data from
1101 void WriteWlanL( CCommsDbTableView& aTable,
1102 CApAccessPointItem& aApItem );
1105 * Creates a new record in the LANBearer table if there is none for WLAN
1106 * @return The UID of the LANBEarer record.
1108 TUint32 CreateLanBearerIfNeededL();
1113 * Reads up the name of the LAN/Modem bearer record
1115 void ReadModemBearerNameL( CApAccessPointItem& aApItem );
1119 CCommsDatabase* iDb;
1120 // TCommDbDatabaseType iDbType; // deprecated and not used but kept
1121 // to maintain class size for BC
1122 // no change in size as deprecated removed,
1123 // new added, with the same size...
1124 THandlerExtra* iExt;
1129 #endif // APDATAHANDLER_H