# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1286142222 -10800 # Node ID ed07dcc726924bca52592642ee4a4f38bd9947ad # Parent 84c6623982f6064ea886612622877d996f16309a Revision: 201038 Kit: 201039 diff -r 84c6623982f6 -r ed07dcc72692 apengine/apeng/src/APAccessPointItem.cpp --- a/apengine/apeng/src/APAccessPointItem.cpp Fri Sep 17 08:32:43 2010 +0300 +++ b/apengine/apeng/src/APAccessPointItem.cpp Mon Oct 04 00:43:42 2010 +0300 @@ -142,17 +142,7 @@ // CApItemExtra* CApItemExtra::NewL() { - CLOG( ( EApItem, 0, _L( "-> CApItemExtra::NewL" ) ) ); - - CApItemExtra* self = new ( ELeave ) CApItemExtra; - CleanupStack::PushL( self ); - self->ConstructL(); - - CleanupStack::Pop( self ); - - CLOG( ( EApItem, 1, _L( "<- CApItemExtra::NewL" ) ) ); - - return self; + return NULL; } @@ -163,14 +153,6 @@ // CApItemExtra::~CApItemExtra() { - CLOG( ( EApItem, 0, _L( "-> CApItemExtra::~CApItemExtra" ) ) ); - - delete iCdmaData; - delete iWlanData; - delete iIpv6PrimaryDNS; - delete iIpv6SecondaryDNS; - delete iLanBearerModemName; - delete iIapBearerType; } @@ -197,27 +179,6 @@ // void CApItemExtra::ConstructL() { - CLOG( ( EApItem, 0, _L( "-> CApItemExtra::ConstructL" ) ) ); - - iIpv6PrimaryDNS = HBufC::NewL( KApItemInitialTxtBufSize ); - iIpv6SecondaryDNS = HBufC::NewL( KApItemInitialTxtBufSize ); - iLanBearerModemName = HBufC::NewL( KApItemInitialTxtBufSize ); - iIapBearerType = HBufC::NewL( KApItemInitialTxtBufSize ); - -#ifdef __TEST_USE_SHARED_DATA - iIsAppHscsdSupport = - ApCommons::IsGivenSharedDataSupportL( KGeneralSettingsUid, - KGSHSCSDAccessPoints ); -#else - iIsAppHscsdSupport = ETrue; -#endif // __TEST_USE_SHARED_DATA - - -#ifdef __TEST_HSCSD_SUPPORT - iIsAppHscsdSupport = ETrue; -#endif // __TEST_HSCSD_SUPPORT - - CLOG( ( EApItem, 1, _L( "<- CApItemExtra::ConstructL" ) ) ); } @@ -235,16 +196,7 @@ // CApItemCdmaData* CApItemCdmaData::NewL() { - CLOG( ( EApItem, 0, _L( "-> CApItemCdmaData::NewL" ) ) ); - - CApItemCdmaData* self = new ( ELeave ) CApItemCdmaData; - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop( self ); - - CLOG( ( EApItem, 1, _L( "<- CApItemCdmaData::NewL" ) ) ); - - return self; + return NULL; } @@ -255,14 +207,6 @@ // CApItemCdmaData::~CApItemCdmaData() { - CLOG( ( EApItem, 0, _L( "-> CApItemCdmaData::~CApItemCdmaData" ) ) ); - - delete iIwfName; - delete iPdpAddress; - delete iHomeAgentAddress; - delete iMipHomeAddress; - delete iMipPrimaryHomeAgent; - delete iMipSecondaryHomeAgent; } @@ -317,16 +261,6 @@ // void CApItemCdmaData::ConstructL() { - CLOG( ( EApItem, 0, _L( "-> CApItemCdmaData::ConstructL" ) ) ); - - iIwfName = HBufC::NewL( KApItemInitialTxtBufSize ); - iPdpAddress = HBufC::NewL( KApItemInitialTxtBufSize ); - iHomeAgentAddress = HBufC::NewL( KApItemInitialTxtBufSize ); - iMipHomeAddress = HBufC::NewL( KApItemInitialTxtBufSize ); - iMipPrimaryHomeAgent = HBufC::NewL( KApItemInitialTxtBufSize ); - iMipSecondaryHomeAgent = HBufC::NewL( KApItemInitialTxtBufSize ); - - CLOG( ( EApItem, 1, _L( "<- CApItemCdmaData::ConstructL" ) ) ); } @@ -349,16 +283,7 @@ // CApItemWlanData* CApItemWlanData::NewL() { - CLOG( ( EApItem, 0, _L( "-> CApItemWlanData::NewL" ) ) ); - - CApItemWlanData* self = new ( ELeave ) CApItemWlanData; - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop( self ); - - CLOG( ( EApItem, 1, _L( "<- CApItemWlanData::NewL" ) ) ); - - return self; + return NULL; } @@ -369,8 +294,6 @@ // CApItemWlanData::~CApItemWlanData() { - CLOG( ( EApItem, 0, _L( "-> CApItemWlanData::~CApItemWlanData" ) ) ); - delete iWlanNetworkName; } @@ -394,11 +317,6 @@ // void CApItemWlanData::ConstructL() { - CLOG( ( EApItem, 0, _L( "-> CApItemWlanData::ConstructL" ) ) ); - - iWlanNetworkName = HBufC::NewL( KApItemInitialTxtBufSize ); - - CLOG( ( EApItem, 1, _L( "<- CApItemWlanData::ConstructL" ) ) ); } @@ -425,14 +343,7 @@ // EXPORT_C CApAccessPointItem* CApAccessPointItem::NewLC() { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::NewLC" ) ) ); - - CApAccessPointItem* self = new ( ELeave ) CApAccessPointItem; - CleanupStack::PushL( self ); - self->ConstructL(); - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::NewLC" ) ) ); - return self; + return NULL; } @@ -443,52 +354,6 @@ // EXPORT_C CApAccessPointItem::~CApAccessPointItem() { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::~CApAccessPointItem" ) ) ); - - if ( iExt ) - { - if ( iExt->iIsFeatureManagerInitialised ) - { - FeatureManager::UnInitializeLib(); - } - } - - delete iExt; - delete iSpecified; - delete iWapAccessPointName; - delete iWapBearer; - delete iStartingPage; - delete iWapGatewayAddress; - delete iIapName; - delete iIspName; - delete iIspDescription; - delete iIspDefaultTelNumber; - delete iLoginScript; - delete iUserName; - delete iPassword; - delete iIspIfName; - delete iIspIfParams; - delete iIspIfNetworks; - delete iIspIfAuthName; - delete iIspIfAuthPass; - delete iIspIfCallbackInfo; - delete iIspIPAddr; - delete iIspIPNetMask; - delete iIspGateway; - delete iPrimaryDNS; - delete iSecondaryDNS; - delete iIspInitString; - delete iIapServiceType; - delete iGprsAccessPointName; - delete iGprsPdpAddress; - delete iApProxyProtocolName; - delete iApProxyServerAddress; - delete iApProxyExceptions; - delete iNetworkName; - delete iWapProxyLoginName; - delete iWapProxyLoginPass; - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::~CApAccessPointItem" ) ) ); } @@ -499,224 +364,6 @@ EXPORT_C void CApAccessPointItem::CopyFromL( const CApAccessPointItem& aCopyFrom ) { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::CopyFromL" ) ) ); - - WriteTextL( EApWapAccessPointName, *aCopyFrom.iWapAccessPointName ); - WriteTextL( EApWapCurrentBearer, *aCopyFrom.iWapBearer ); - WriteLongTextL( EApWapStartPage, *aCopyFrom.iStartingPage ); - // The WAP gateway address - WriteTextL( EApWapGatewayAddress, *aCopyFrom.iWapGatewayAddress ); - - iIsWTLSSecurityOn = aCopyFrom.iIsWTLSSecurityOn; - iIsConnectionTypeContinuous = aCopyFrom.iIsConnectionTypeContinuous; - iChargeCard = aCopyFrom.iChargeCard; - iWapIap = aCopyFrom.iWapIap; - - WriteTextL( EApIapName, *aCopyFrom.iIapName ); - iIapServiceId = aCopyFrom.iIapServiceId; - WriteTextL( EApIapServiceType, *aCopyFrom.iIapServiceType ); - - - iIapChargeCardId = aCopyFrom.iIapChargeCardId; - - WriteTextL( EApIspName, *aCopyFrom.iIspName ); - WriteTextL( EApIspDescription, *aCopyFrom.iIspDescription ); - - iIspType = aCopyFrom.iIspType; - - WriteTextL( EApIspDefaultTelNumber, *aCopyFrom.iIspDefaultTelNumber ); - - iIspDialResolution = aCopyFrom.iIspDialResolution; - iUseLoginScript = aCopyFrom.iUseLoginScript; - - WriteLongTextL( EApIspLoginScript, *aCopyFrom.iLoginScript ); - - iPromptPassword = aCopyFrom.iPromptPassword; - - WriteTextL( EApIspLoginName, *aCopyFrom.iUserName ); - WriteTextL( EApIspLoginPass, *aCopyFrom.iPassword ); - - iDisplayTerminalWindow = aCopyFrom.iDisplayTerminalWindow; - - WriteTextL( EApIspIfName, *aCopyFrom.iIspIfName ); - WriteTextL( EApIspIfParams, *aCopyFrom.iIspIfParams ); - WriteTextL( EApIspIfNetworks, *aCopyFrom.iIspIfNetworks ); - - iIspIfPromptForAuth = aCopyFrom.iIspIfPromptForAuth; - - WriteTextL( EApIspIfAuthName, *aCopyFrom.iIspIfAuthName ); - WriteTextL( EApIspIfAuthPass, *aCopyFrom.iIspIfAuthPass ); - - iIspIfAuthRetries = aCopyFrom.iIspIfAuthRetries; - iUseCallBack = aCopyFrom.iUseCallBack; - iCallBackTypeIsServerNum = aCopyFrom.iCallBackTypeIsServerNum; - - WriteTextL( EApIspIfCallbackInfo, *aCopyFrom.iIspIfCallbackInfo ); - - iIspCallbackTimeOut = aCopyFrom.iIspCallbackTimeOut; - iIspIPAddrFromServer = aCopyFrom.iIspIPAddrFromServer; - - WriteTextL( EApIspIPAddr, *aCopyFrom.iIspIPAddr ); - WriteTextL( EApIspIPNetMask, *aCopyFrom.iIspIPNetMask ); - WriteTextL( EApIspIPGateway, *aCopyFrom.iIspGateway ); - - iGetDNSIPFromServer = aCopyFrom.iGetDNSIPFromServer; - - WriteTextL( EApIspIPNameServer1, *aCopyFrom.iPrimaryDNS ); - WriteTextL( EApIspIPNameServer2, *aCopyFrom.iSecondaryDNS ); - - iEnablePPPCompression = aCopyFrom.iEnablePPPCompression; - iIspEnableLCPExtensions = aCopyFrom.iIspEnableLCPExtensions; - iIsPasswordAuthenticationSecure = - aCopyFrom.iIsPasswordAuthenticationSecure; - iIspEnableSwCompression = aCopyFrom.iIspEnableSwCompression; - iIspBearerName = aCopyFrom.iIspBearerName; - iMaxConnSpeed = aCopyFrom.iMaxConnSpeed; - iIspBearerCE = aCopyFrom.iIspBearerCE; - iApIapBearerService = aCopyFrom.iApIapBearerService; - iBearerCallTypeIsdn = aCopyFrom.iBearerCallTypeIsdn; - - WriteTextL( EApIspInitString, *aCopyFrom.iIspInitString ); - - iIspBearerType = aCopyFrom.iIspBearerType; - iIspChannelCoding = aCopyFrom.iIspChannelCoding; - iIspAIUR = aCopyFrom.iIspAIUR; - iIspRequestedTimeSlots = aCopyFrom.iIspRequestedTimeSlots; - iIspMaximumTimeSlots = aCopyFrom.iIspMaximumTimeSlots; - - WriteLongTextL( EApGprsAccessPointName, *aCopyFrom.iGprsAccessPointName ); - - WriteTextL( EApGprsPdpAddress, *aCopyFrom.iGprsPdpAddress ); - - iGprsPdpType = aCopyFrom.iGprsPdpType; - iGprsReqPrecedence = aCopyFrom.iGprsReqPrecedence; - iGprsReqDelay = aCopyFrom.iGprsReqDelay; - iGprsReqReliability = aCopyFrom.iGprsReqReliability; - iGprsReqPeakThroughput = aCopyFrom.iGprsReqPeakThroughput; - iGprsReqMeanPeakThroughput = aCopyFrom.iGprsReqMeanPeakThroughput; - iGprsMinPrecedence = aCopyFrom.iGprsMinPrecedence; - - iGprsMinDelay = aCopyFrom.iGprsMinDelay; - iGprsMinReliability = aCopyFrom.iGprsMinReliability; - iGprsMinPeakThroughput = aCopyFrom.iGprsMinPeakThroughput; - iGprsMinMeanThroughput = aCopyFrom.iGprsMinMeanThroughput; - - iGprsUseAnonymAccess = aCopyFrom.iGprsUseAnonymAccess; - WriteTextL( EApProxyProtocolName, *aCopyFrom.iApProxyProtocolName ); - WriteLongTextL( EApProxyServerAddress, *aCopyFrom.iApProxyServerAddress ); - WriteLongTextL( EApProxyExceptions, *aCopyFrom.iApProxyExceptions); - iApProxyPortNumber = aCopyFrom.iApProxyPortNumber; - iApProxyUseProxy = aCopyFrom.iApProxyUseProxy; - iApHasProxySettings = aCopyFrom.iApHasProxySettings; - WriteTextL( EApNetworkName, *aCopyFrom.iNetworkName ); - WriteTextL( EApProxyLoginName, *aCopyFrom.iWapProxyLoginName ); - WriteTextL( EApProxyLoginPass, *aCopyFrom.iWapProxyLoginPass ); - - iNetworkId = aCopyFrom.iNetworkId; - WriteTextL( EApLanBearerName, *aCopyFrom.iExt->iLanBearerModemName ); - WriteTextL( EApIapBearerType, *aCopyFrom.iExt->iIapBearerType ); - - - // Copying of WLAN data must be before Ipv6 support handling as that - // requires the knowledge of the bearer type!!!!! - if ( iExt->iWlanData ) - { - iExt->iWlanData->iWlanNetworkMode = - aCopyFrom.iExt->iWlanData->iWlanNetworkMode; - iExt->iWlanData->iWlanSecurityMode = - aCopyFrom.iExt->iWlanData->iWlanSecurityMode; - ReAllocL( iExt->iWlanData->iWlanNetworkName, - *aCopyFrom.iExt->iWlanData->iWlanNetworkName ); - iExt->iWlanData->iWlanId = aCopyFrom.iExt->iWlanData->iWlanId; - iExt->iWlanData->iIsWlan = aCopyFrom.iExt->iWlanData->iIsWlan; - iExt->iWlanData->iScanSSID = aCopyFrom.iExt->iWlanData->iScanSSID; - iExt->iWlanData->iChannelId = aCopyFrom.iExt->iWlanData->iChannelId; - } - - if ( iExt->iIsIpv6Supported ) - { - iExt->iIpv6GetDNSIPFromServer = - aCopyFrom.iExt->iIpv6GetDNSIPFromServer; - WriteTextL( EApIP6NameServer1, *aCopyFrom.iExt->iIpv6PrimaryDNS ); - WriteTextL( EApIP6NameServer2, *aCopyFrom.iExt->iIpv6SecondaryDNS ); - } - - if( iExt->iCdmaData ) - { - // CDMA2000 - ReAllocL( iExt->iCdmaData->iIwfName, - *aCopyFrom.iExt->iCdmaData->iIwfName ); - iExt->iCdmaData->iServiceOption = - aCopyFrom.iExt->iCdmaData->iServiceOption; - iExt->iCdmaData->iPdpType = aCopyFrom.iExt->iCdmaData->iPdpType; - ReAllocL( iExt->iCdmaData->iPdpAddress, - *aCopyFrom.iExt->iCdmaData->iPdpAddress ); - iExt->iCdmaData->iReqFwdPriority = - aCopyFrom.iExt->iCdmaData->iReqFwdPriority; - iExt->iCdmaData->iReqRevPriority = - aCopyFrom.iExt->iCdmaData->iReqRevPriority; - iExt->iCdmaData->iReqFwdBitrate = - aCopyFrom.iExt->iCdmaData->iReqFwdBitrate; - iExt->iCdmaData->iReqRevBitrate = - aCopyFrom.iExt->iCdmaData->iReqRevBitrate; - iExt->iCdmaData->iReqFwdLoss = aCopyFrom.iExt->iCdmaData->iReqFwdLoss; - iExt->iCdmaData->iReqRevLoss = aCopyFrom.iExt->iCdmaData->iReqRevLoss; - iExt->iCdmaData->iReqFwdMaxDelay = - aCopyFrom.iExt->iCdmaData->iReqFwdMaxDelay; - iExt->iCdmaData->iReqRevMaxDelay = - aCopyFrom.iExt->iCdmaData->iReqRevMaxDelay; - iExt->iCdmaData->iMinFwdBitrate = - aCopyFrom.iExt->iCdmaData->iMinFwdBitrate; - iExt->iCdmaData->iMinRevBitrate = - aCopyFrom.iExt->iCdmaData->iMinRevBitrate; - iExt->iCdmaData->iAccptFwdLoss = - aCopyFrom.iExt->iCdmaData->iAccptFwdLoss; - iExt->iCdmaData->iAccptRevLoss = - aCopyFrom.iExt->iCdmaData->iAccptRevLoss; - iExt->iCdmaData->iAccptFwdMaxDelay = - aCopyFrom.iExt->iCdmaData->iAccptFwdMaxDelay; - iExt->iCdmaData->iAccptRevMaxDelay = - aCopyFrom.iExt->iCdmaData->iAccptRevMaxDelay; - iExt->iCdmaData->iQosWarningTimeout = - aCopyFrom.iExt->iCdmaData->iQosWarningTimeout; - iExt->iCdmaData->iRlpMode = aCopyFrom.iExt->iCdmaData->iRlpMode; - // CDMA2000 deprecated Mobile IP fields - iExt->iCdmaData->iMip = aCopyFrom.iExt->iCdmaData->iMip; - ReAllocL( iExt->iCdmaData->iHomeAgentAddress, - *aCopyFrom.iExt->iCdmaData->iHomeAgentAddress ); - iExt->iCdmaData->iMipTimeout = aCopyFrom.iExt->iCdmaData->iMipTimeout; - // CDMA2000 specific CDMA parameters provisioned through OTA - iExt->iCdmaData->iNaiType = aCopyFrom.iExt->iCdmaData->iNaiType; - iExt->iCdmaData->iSimpleIpAuthAlgorithm = - aCopyFrom.iExt->iCdmaData->iSimpleIpAuthAlgorithm; - iExt->iCdmaData->iSimpleIpPapSsHandle = - aCopyFrom.iExt->iCdmaData->iSimpleIpPapSsHandle; - iExt->iCdmaData->iSimpleIpChapSsHandle = - aCopyFrom.iExt->iCdmaData->iSimpleIpChapSsHandle; - iExt->iCdmaData->iMipTBit = aCopyFrom.iExt->iCdmaData->iMipTBit; - ReAllocL( iExt->iCdmaData->iMipHomeAddress, - *aCopyFrom.iExt->iCdmaData->iMipHomeAddress ); - ReAllocL( iExt->iCdmaData->iMipPrimaryHomeAgent, - *aCopyFrom.iExt->iCdmaData->iMipPrimaryHomeAgent ); - ReAllocL( iExt->iCdmaData->iMipSecondaryHomeAgent, - *aCopyFrom.iExt->iCdmaData->iMipSecondaryHomeAgent ); - iExt->iCdmaData->iMipMnAaaAuthAlgorithm = - aCopyFrom.iExt->iCdmaData->iMipMnAaaAuthAlgorithm; - iExt->iCdmaData->iMipMnAaaSpi = - aCopyFrom.iExt->iCdmaData->iMipMnAaaSpi; - iExt->iCdmaData->iMipMnAaaSsHandle = - aCopyFrom.iExt->iCdmaData->iMipMnAaaSsHandle; - iExt->iCdmaData->iMipMnHaAuthAlgorithm = - aCopyFrom.iExt->iCdmaData->iMipMnHaAuthAlgorithm; - iExt->iCdmaData->iMipMnHaSpi = aCopyFrom.iExt->iCdmaData->iMipMnHaSpi; - iExt->iCdmaData->iMipMnHaSsHandle = - aCopyFrom.iExt->iCdmaData->iMipMnHaSsHandle; - } - - - SetIfNetworksL(); - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::CopyFromL" ) ) ); } @@ -729,17 +376,7 @@ const CApAccessPointItem& aItem ) const { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::operator==" ) ) ); - - TBool retval( EFalse ); - TRAPD( err, retval = DoCompareApL( aItem ) ); - if ( err ) - { - retval = EFalse; - } - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::operator==" ) ) ); - return retval; + return EFalse; } @@ -752,12 +389,7 @@ const CApAccessPointItem& aItem ) const { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::operator!=" ) ) ); - - TBool ret = ( *this == aItem ); - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::operator!=" ) ) ); - return ( !ret ); + return EFalse; } @@ -799,150 +431,6 @@ // EXPORT_C void CApAccessPointItem::ConstructL() { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::ConstructL" ) ) ); - - iExt = CApItemExtra::NewL(); - - FeatureManager::InitializeLibL(); - iExt->iIsFeatureManagerInitialised = ETrue; - - iExt->iIsWcdma = - FeatureManager::FeatureSupported( KFeatureIdProtocolWcdma ); - - iExt->iIsAppCsdSupport = - FeatureManager::FeatureSupported( KFeatureIdAppCsdSupport ); -#ifdef __TEST_CSD_SUPPORT - iExt->iIsAppCsdSupport = ETrue; -#endif // __TEST_CSD_SUPPORT - - - iExt->iIsIpv6Supported = - FeatureManager::FeatureSupported( KFeatureIdIPv6 ); -#ifdef __TEST_IPV6_SUPPORT - iExt->iIsIpv6Supported = ETrue; -#endif // __TEST_IPV6_SUPPORT - if( FeatureManager::FeatureSupported( KFeatureIdProtocolCdma ) ) - { - iExt->iCdmaData = CApItemCdmaData::NewL(); - } -#ifdef __TEST_CDMA_SUPPORT - if( !iExt->iCdmaData ) - { - iExt->iCdmaData = CApItemCdmaData::NewL(); - } -#endif // __TEST_CDMA_SUPPORT - - if( FeatureManager::FeatureSupported( KFeatureIdProtocolWlan ) ) - { - iExt->iWlanData = CApItemWlanData::NewL(); - } -#ifdef __TEST_WLAN_SUPPORT - iExt->iWlanData = CApItemWlanData::NewL(); -#endif // __TEST_WLAN_SUPPORT - - iSpecified = new (ELeave) CArrayFixFlat( KApMembers ); - for (TInt i=0; i< KApMembers; i++) - { - iSpecified->AppendL( EFalse ); - } - // as we are in ConstructL called from NewLC, - // 'this' is already on the CleanupStack, - // so do not push members onto it! - iWapAccessPointName = HBufC::NewL( KApItemInitialTxtBufSize ); - iWapBearer = HBufC::NewL( KApItemInitialTxtBufSize ); - iStartingPage = HBufC::NewL( KApItemInitialTxtBufSize ); - iWapGatewayAddress = HBufC::NewL( KApItemInitialTxtBufSize ); - iIapName = HBufC::NewL( KApItemInitialTxtBufSize ); - iIspName = HBufC::NewL( KApItemInitialTxtBufSize ); - iIspDescription = HBufC::NewL( KApItemInitialTxtBufSize ); - iLoginScript = HBufC::NewL( KApItemInitialTxtBufSize ); - iUserName = HBufC::NewL( KApItemInitialTxtBufSize ); - - iPassword = HBufC::NewL( KApItemInitialTxtBufSize ); - iIspIfName = HBufC::NewL( KApItemInitialTxtBufSize ); - iIspIfParams = HBufC::NewL( KApItemInitialTxtBufSize ); - iIspIfNetworks = HBufC::NewL( KApItemInitialTxtBufSize ); - iIspIfAuthName = HBufC::NewL( KApItemInitialTxtBufSize ); - iIspIfAuthPass = HBufC::NewL( KApItemInitialTxtBufSize ); - iIspIfCallbackInfo = HBufC8::NewL( KApItemInitialTxtBufSize ); - iIspIPAddr = HBufC::NewL( KApItemInitialTxtBufSize ); - iIspIPNetMask = HBufC::NewL( KApItemInitialTxtBufSize ); - iIspGateway = HBufC::NewL( KApItemInitialTxtBufSize ); - - iPrimaryDNS = HBufC::NewL( KApItemInitialTxtBufSize ); - iSecondaryDNS = HBufC::NewL( KApItemInitialTxtBufSize ); - iIspInitString = HBufC8::NewL( KApItemInitialTxtBufSize ); - iIspDefaultTelNumber = HBufC::NewL( KApItemInitialTxtBufSize ); - - - iIapServiceType = HBufC::NewL( KApItemInitialTxtBufSize ); - iGprsAccessPointName = HBufC::NewL( KApItemInitialTxtBufSize ); - iGprsPdpAddress = HBufC::NewL( KApItemInitialTxtBufSize ); - - - iApProxyProtocolName = HBufC::NewL( KApItemInitialTxtBufSize ); - iApProxyServerAddress = HBufC::NewL( KApItemInitialTxtBufSize ); - iApProxyExceptions = HBufC::NewL( KApItemInitialTxtBufSize ); - iNetworkName = HBufC::NewL( KApItemInitialTxtBufSize ); - - iWapProxyLoginName = HBufC::NewL( KApItemInitialTxtBufSize ); - iWapProxyLoginPass = HBufC::NewL( KApItemInitialTxtBufSize ); - - RFs fs; - CleanupClosePushL( fs ); - User::LeaveIfError( fs.Connect() ); - - // can't use resource here because it is not added yet.... - TFileName resourceFile; - resourceFile.Append( KApEngineResDriveZ ); - resourceFile.Append( KDC_RESOURCE_FILES_DIR ); - resourceFile.Append( KApEngineResFileName ); - BaflUtils::NearestLanguageFile( fs, resourceFile ); - - RResourceFile rf; - CleanupClosePushL( rf ); - rf.OpenL( fs, resourceFile ); - rf.ConfirmSignatureL( 0 ); - HBufC8* readBuffer = rf.AllocReadLC( R_APNG_DEFAULT_AP_NAME ); - // as we are expecting HBufC16... - __ASSERT_DEBUG( ( readBuffer->Length()%2 ) == 0, - ApCommons::Panic( EWrongResourceFormat ) ); - const TPtrC16 ptrReadBuffer( (TText16*) readBuffer->Ptr(), - ( readBuffer->Length() + 1 ) >> 1 ); - HBufC16* textBuffer=HBufC16::NewL( ptrReadBuffer.Length() ); - *textBuffer=ptrReadBuffer; - CleanupStack::PopAndDestroy( readBuffer ); // readBuffer - CleanupStack::PushL( textBuffer ); - - SetNamesL( *textBuffer ); - - CleanupStack::PopAndDestroy( 3 ); // textbuffer, fs, rf - - WriteTextL( EApWapCurrentBearer, TPtrC(WAP_IP_BEARER) ); // required ! - - WriteTextL( EApIapServiceType, TPtrC(OUTGOING_WCDMA) ); // required ! - - - WriteTextL( EApIspIfName, KDefGprsIfName ); // required ! - WriteTextL( EApIspIfParams, KDefGprsIfParams ); // required ! - WriteTextL( EApIspIPGateway, KDefIspGateway ); - - WriteTextL( EApWapGatewayAddress, KDefWapGatewayIpAddress ); - WriteTextL( EApIspIPAddr, KDefPhoneIpAddress ); - WriteTextL( EApIspIPNameServer1, KDefPrimaryNameServer ); - WriteTextL( EApIspIPNameServer2, KDefSecondaryNameServer ); - - if ( iExt->iIsIpv6Supported ) - { - WriteTextL( EApIP6NameServer1, KDefIp6PrimaryNameServer ); - WriteTextL( EApIP6NameServer2, KDefIp6SecondaryNameServer ); - } - - SetIfNetworksL(); - - WriteTextL( EApProxyProtocolName, KDefProxyProtocolName ); - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::ConstructL" ) ) ); } @@ -953,35 +441,6 @@ EXPORT_C void CApAccessPointItem::ReadTextL( const TApMember aColumn, TDes8& aValue ) { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::ReadTextL8" ) ) ); - - LeaveIfUnsupportedL( aColumn ); - - switch ( aColumn ) - { - case EApIspIfCallbackInfo: - { - // make it large enough to hold - aValue.SetLength( iIspIfCallbackInfo->Length() ); - aValue.Format( KFormat8, iIspIfCallbackInfo ); - break; - } - case EApIspInitString: - { - // make it large enough to hold - aValue.SetLength( iIspInitString->Length() ); - aValue.Format( KFormat8, iIspInitString ); - break; - } - default: - { - __ASSERT_DEBUG( EFalse, ApCommons::Panic( EInvalidColumn ) ); - User::Leave( KErrInvalidColumn ); - break; - } - } - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::ReadTextL8" ) ) ); } @@ -993,324 +452,6 @@ EXPORT_C void CApAccessPointItem::ReadTextL( const TApMember aColumn, TDes16& aValue ) { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::ReadTextL" ) ) ); - - LeaveIfUnsupportedL( aColumn ); - - switch ( aColumn ) - { - case EApWapAccessPointName: - { - aValue.SetLength( iWapAccessPointName->Length() ); - aValue.Format( KFormat, iWapAccessPointName ); - break; - } - case EApWapCurrentBearer: - { - // make it large enough to hold - aValue.SetLength( iWapBearer->Length() ); - aValue.Format( KFormat, iWapBearer ); - break; - } - case EApWapGatewayAddress: - { - // make it large enough to hold - aValue.SetLength( iWapGatewayAddress->Length() ); - aValue.Format( KFormat, iWapGatewayAddress ); - break; - } - case EApIapName: - { - // make it large enough to hold - aValue.SetLength( iIapName->Length() ); - aValue.Format( KFormat, iIapName ); - break; - } - case EApIapServiceType: - { - // make it large enough to hold - aValue.SetLength( iIapServiceType->Length() ); - aValue.Format( KFormat, iIapServiceType ); - break; - } - case EApIspName: - { - // make it large enough to hold - aValue.SetLength( iIspName->Length() ); - aValue.Format( KFormat, iIspName ); - break; - } - case EApIspDescription: - { - // make it large enough to hold - aValue.SetLength( iIspDescription->Length() ); - aValue.Format( KFormat, iIspDescription ); - break; - } - case EApIspDefaultTelNumber: - { - // make it large enough to hold - aValue.SetLength( iIspDefaultTelNumber->Length() ); - aValue.Format( KFormat, iIspDefaultTelNumber ); - break; - } - case EApIspLoginName: - { - // make it large enough to hold - aValue.SetLength( iUserName->Length() ); - aValue.Format( KFormat, iUserName ); - break; - } - case EApIspLoginPass: - { - // make it large enough to hold - aValue.SetLength( iPassword->Length() ); - aValue.Format( KFormat, iPassword ); - break; - } - case EApIspIfName: - case EApGprsIfName: - case EApCdmaIfName: - { - // make it large enough to hold - aValue.SetLength( iIspIfName->Length() ); - aValue.Format( KFormat, iIspIfName ); - break; - } - case EApIspIfParams: - case EApGprsIfParams: - case EApCdmaIfParams: - { - // make it large enough to hold - aValue.SetLength( iIspIfParams->Length() ); - aValue.Format( KFormat, iIspIfParams ); - break; - } - case EApIspIfNetworks: - case EApGprsIfNetworks: - case EApCdmaIfNetworks: - case EApWlanIfNetworks: - { - // make it large enough to hold - aValue.SetLength( iIspIfNetworks->Length() ); - aValue.Format( KFormat, iIspIfNetworks ); - break; - } - case EApIspIfAuthName: - case EApGprsIfAuthName: - case EApCdmaIfAuthName: - case EApWlanIfAuthName: - { - // make it large enough to hold - aValue.SetLength( iIspIfAuthName->Length() ); - aValue.Format( KFormat, iIspIfAuthName ); - break; - } - case EApIspIfAuthPass: - case EApGprsIfAuthPassword: - case EApCdmaIfAuthPassword: - case EApWlanIfAuthPassword: - { - // make it large enough to hold - aValue.SetLength( iIspIfAuthPass->Length() ); - aValue.Format( KFormat, iIspIfAuthPass ); - break; - } - case EApIspIPAddr: - case EApGprsIpAddr: - case EApCdmaIpAddr: - case EApWlanIpAddr: - { - // make it large enough to hold - aValue.SetLength( iIspIPAddr->Length() ); - aValue.Format( KFormat, iIspIPAddr ); - break; - } - case EApIspIPNetMask: - case EApGprsIpNetMask: - case EApCdmaIpNetMask: - case EApWlanIpNetMask: - { - // make it large enough to hold - aValue.SetLength( iIspIPNetMask->Length() ); - aValue.Format( KFormat, iIspIPNetMask ); - break; - } - case EApIspIPGateway: - case EApGprsIpGateway: - case EApCdmaIpGateway: - case EApWlanIpGateway: - { - // make it large enough to hold - aValue.SetLength( iIspGateway->Length() ); - aValue.Format( KFormat, iIspGateway ); - break; - } - case EApIspIPNameServer1: - case EApGprsIPNameServer1: - case EApCdmaIPNameServer1: - case EApWlanIPNameServer1: - { - // make it large enough to hold - aValue.SetLength( iPrimaryDNS->Length() ); - aValue.Format( KFormat, iPrimaryDNS ); - break; - } - case EApIspIPNameServer2: - case EApGprsIPNameServer2: - case EApCdmaIPNameServer2: - case EApWlanIPNameServer2: - { - // make it large enough to hold - aValue.SetLength( iSecondaryDNS->Length() ); - aValue.Format( KFormat, iSecondaryDNS ); - break; - } - case EApGprsPdpAddress: - { - // make it large enough to hold - aValue.SetLength( iGprsPdpAddress->Length() ); - aValue.Format( KFormat, iGprsPdpAddress ); - break; - } - case EApProxyProtocolName: - { - aValue.SetLength( iApProxyProtocolName->Length() ); - aValue.Format( KFormat, iApProxyProtocolName ); - break; - } - case EApProxyLoginName: - { - aValue.SetLength( iWapProxyLoginName->Length() ); - aValue.Format( KFormat, iWapProxyLoginName ); - break; - } - case EApProxyLoginPass: - { - aValue.SetLength( iWapProxyLoginPass->Length() ); - aValue.Format( KFormat, iWapProxyLoginPass ); - break; - } - case EApNetworkName: - { - aValue.SetLength( iNetworkName->Length() ); - aValue.Format( KFormat, iNetworkName ); - break; - } - case EApIP6NameServer1: - { - // make it large enough to hold - if ( iExt->iIsIpv6Supported ) - { - aValue.SetLength( iExt->iIpv6PrimaryDNS->Length() ); - aValue.Format( KFormat, iExt->iIpv6PrimaryDNS ); - } - else - { - User::Leave( KErrNotSupported ); - } - break; - } - case EApIP6NameServer2: - { - // make it large enough to hold - if ( iExt->iIsIpv6Supported ) - { - aValue.SetLength( iExt->iIpv6SecondaryDNS->Length() ); - aValue.Format( KFormat, iExt->iIpv6SecondaryDNS ); - } - else - { - User::Leave( KErrNotSupported ); - } - break; - } - // CDMA2000 - case EApCdmaIwfName: - { - // LeaveIfUnsupported prevents getting here with no CDMA support. - __ASSERT_ALWAYS \ - ( iExt->iCdmaData, ApCommons::Panic( ESanityCheckFailed ) ); - aValue.SetLength( iExt->iCdmaData->iIwfName->Length() ); - aValue.Format( KFormat, iExt->iCdmaData->iIwfName ); - break; - } - case EApCdmaPdpAddress: - { - // LeaveIfUnsupported prevents getting here with no CDMA support. - __ASSERT_ALWAYS \ - ( iExt->iCdmaData, ApCommons::Panic( ESanityCheckFailed ) ); - aValue.SetLength( iExt->iCdmaData->iPdpAddress->Length() ); - aValue.Format( KFormat, iExt->iCdmaData->iPdpAddress ); - break; - } - case EApCdmaHomeAgentAddress: - { - // LeaveIfUnsupported prevents getting here with no CDMA support. - __ASSERT_ALWAYS \ - ( iExt->iCdmaData, ApCommons::Panic( ESanityCheckFailed ) ); - aValue.SetLength( iExt->iCdmaData->iHomeAgentAddress->Length() ); - aValue.Format( KFormat, iExt->iCdmaData->iHomeAgentAddress ); - break; - } - case EApCdmaMipPrimaryHomeAgent: - { - // LeaveIfUnsupported prevents getting here with no CDMA support. - __ASSERT_ALWAYS \ - ( iExt->iCdmaData, ApCommons::Panic( ESanityCheckFailed ) ); - aValue.SetLength - ( iExt->iCdmaData->iMipPrimaryHomeAgent->Length() ); - aValue.Format - ( KFormat, iExt->iCdmaData->iMipPrimaryHomeAgent ); - break; - } - case EApCdmaMipSecondaryHomeAgent: - { - // LeaveIfUnsupported prevents getting here with no CDMA support. - __ASSERT_ALWAYS \ - ( iExt->iCdmaData, ApCommons::Panic( ESanityCheckFailed ) ); - aValue.SetLength - ( iExt->iCdmaData->iMipSecondaryHomeAgent->Length() ); - aValue.Format - ( KFormat, iExt->iCdmaData->iMipSecondaryHomeAgent ); - break; - } - // END CDMA2000 - // WLAN - case EApWlanNetworkName: - { - // LeaveIfUnsupported prevents getting here with no WLAN support. - __ASSERT_ALWAYS \ - ( iExt->iWlanData, ApCommons::Panic( ESanityCheckFailed ) ); - aValue.SetLength - ( iExt->iWlanData->iWlanNetworkName->Length() ); - aValue.Format - ( KFormat, iExt->iWlanData->iWlanNetworkName ); - break; - } - // END WLAN - // LANModem - case EApLanBearerName: - { - aValue.SetLength( iExt->iLanBearerModemName->Length() ); - aValue.Format( KFormat, iExt->iLanBearerModemName ); - break; - } - // END LANModem - case EApIapBearerType: - { - aValue.SetLength( iExt->iIapBearerType->Length() ); - aValue.Format( KFormat, iExt->iIapBearerType ); - break; - } - default: - { - __ASSERT_DEBUG( EFalse, ApCommons::Panic( EInvalidColumn ) ); - User::Leave( KErrInvalidColumn ); - } - } - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::ReadTextL" ) ) ); } @@ -1320,48 +461,7 @@ // EXPORT_C HBufC* CApAccessPointItem::ReadLongTextL( const TApMember aColumn ) { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::ReadLongTextL" ) ) ); - - LeaveIfUnsupportedL( aColumn ); - - HBufC* retval = NULL; - switch ( aColumn ) - { - case EApWapStartPage: - { - retval = iStartingPage; - break; - } - case EApIspLoginScript: - { - retval = iLoginScript; - break; - } - case EApGprsAccessPointName: - { - retval = iGprsAccessPointName; - break; - } - case EApProxyServerAddress: - { - retval = iApProxyServerAddress; - break; - } - case EApProxyExceptions: - { - retval = iApProxyExceptions; - break; - } - default: - { - __ASSERT_DEBUG( EFalse, ApCommons::Panic( EInvalidColumn ) ); - User::Leave( KErrInvalidColumn ); - break; - } - } - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::ReadLongTextL" ) ) ); - return retval; + return NULL; } @@ -1374,48 +474,7 @@ EXPORT_C const HBufC* CApAccessPointItem::ReadConstLongTextL ( const TApMember aColumn ) { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::ReadConstLongTextL" ) ) ); - - LeaveIfUnsupportedL( aColumn ); - - HBufC* retval = NULL; - switch ( aColumn ) - { - case EApWapStartPage: - { - retval = iStartingPage; - break; - } - case EApIspLoginScript: - { - retval = iLoginScript; - break; - } - case EApGprsAccessPointName: - { - retval = iGprsAccessPointName; - break; - } - case EApProxyServerAddress: - { - retval = iApProxyServerAddress; - break; - } - case EApProxyExceptions: - { - retval = iApProxyExceptions; - break; - } - default: - { - __ASSERT_DEBUG( EFalse, ApCommons::Panic( EInvalidColumn ) ); - User::Leave( KErrInvalidColumn ); - break; - } - } - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::ReadConstLongTextL" ) ) ); - return retval; + return NULL; } @@ -1425,288 +484,7 @@ // EXPORT_C TUint32 CApAccessPointItem::ReadTextLengthL( const TApMember aColumn ) { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::ReadTextLengthL" ) ) ); - - LeaveIfUnsupportedL( aColumn ); - - TUint32 l( 0 ); - switch ( aColumn ) - { // 16 first - case EApWapAccessPointName: - { - l = iWapAccessPointName->Length(); - break; - } - case EApWapStartPage: - { - l = iStartingPage->Length(); - break; - } - case EApWapCurrentBearer: - { - l = iWapBearer->Length(); - break; - } - case EApWapGatewayAddress: - { - l = iWapGatewayAddress->Length(); - break; - } - case EApIapName: - { - l = iIapName->Length(); - break; - } - case EApIapServiceType: - { - l = iIapServiceType->Length(); - break; - } - case EApIspName: - { - l = iIspName->Length(); - break; - } - case EApIspDescription: - { - l = iIspDescription->Length(); - break; - } - case EApIspDefaultTelNumber: - { - l = iIspDefaultTelNumber->Length(); - break; - } - case EApIspLoginName: - { - l = iUserName->Length(); - break; - } - case EApIspLoginPass: - { - l = iPassword->Length(); - break; - } - case EApIspIfName: - case EApGprsIfName: - case EApCdmaIfName: - { - l = iIspIfName->Length(); - break; - } - case EApIspIfParams: - case EApGprsIfParams: - case EApCdmaIfParams: - { - l = iIspIfParams->Length(); - break; - } - case EApIspIfNetworks: - case EApGprsIfNetworks: - case EApCdmaIfNetworks: - case EApWlanIfNetworks: - { - l = iIspIfNetworks->Length(); - break; - } - case EApIspIfAuthName: - case EApGprsIfAuthName: - case EApCdmaIfAuthName: - case EApWlanIfAuthName: - { - l = iIspIfAuthName->Length(); - break; - } - case EApIspIfAuthPass: - case EApGprsIfAuthPassword: - case EApCdmaIfAuthPassword: - case EApWlanIfAuthPassword: - { - l = iIspIfAuthPass->Length(); - break; - } - case EApIspIPAddr: - case EApGprsIpAddr: - case EApCdmaIpAddr: - case EApWlanIpAddr: - { - l = iIspIPAddr->Length(); - break; - } - case EApIspIPNetMask: - case EApGprsIpNetMask: - case EApCdmaIpNetMask: - case EApWlanIpNetMask: - { - l = iIspIPNetMask->Length(); - break; - } - case EApIspIPGateway: - case EApGprsIpGateway: - case EApCdmaIpGateway: - case EApWlanIpGateway: - { - l = iIspGateway->Length(); - break; - } - case EApIspIPNameServer1: - case EApGprsIPNameServer1: - case EApCdmaIPNameServer1: - case EApWlanIPNameServer1: - { - l = iPrimaryDNS->Length(); - break; - } - case EApIspIPNameServer2: - case EApGprsIPNameServer2: - case EApCdmaIPNameServer2: - case EApWlanIPNameServer2: - { - l = iSecondaryDNS->Length(); - break; - } - case EApGprsAccessPointName: - { - l = iGprsAccessPointName->Length(); - break; - } - case EApGprsPdpAddress: - { - l = iGprsPdpAddress->Length(); - break; - } - // 8 bit ones - case EApIspIfCallbackInfo: - { - l = iIspIfCallbackInfo->Length(); - break; - } - case EApIspInitString: - { - l = iIspInitString->Length(); - break; - } - // Login script - case EApIspLoginScript: - { - l = iLoginScript->Length(); - break; - } - case EApProxyProtocolName: - { - l = iApProxyProtocolName->Length(); - break; - } - case EApProxyServerAddress: - { - l = iApProxyServerAddress->Length(); - break; - } - case EApProxyExceptions: - { - l = iApProxyExceptions->Length(); - break; - } - case EApProxyLoginName: - { - l = iWapProxyLoginName->Length(); - break; - } - case EApProxyLoginPass: - { - l = iWapProxyLoginPass->Length(); - break; - } - case EApNetworkName: - { - l = iNetworkName->Length(); - break; - } - case EApIP6NameServer1: - { - if ( iExt->iIsIpv6Supported ) - { - l = iExt->iIpv6PrimaryDNS->Length(); - } - else - { - User::Leave( KErrNotSupported ); - } - break; - } - case EApIP6NameServer2: - { - if ( iExt->iIsIpv6Supported ) - { - l = iExt->iIpv6SecondaryDNS->Length(); - } - else - { - User::Leave( KErrNotSupported ); - } - break; - } - // CDMA2000 - case EApCdmaIwfName: - { - // LeaveIfUnsupported prevents getting here with no CDMA support. - __ASSERT_ALWAYS \ - ( iExt->iCdmaData, ApCommons::Panic( ESanityCheckFailed ) ); - l = iExt->iCdmaData->iIwfName->Length(); - break; - } - case EApCdmaPdpAddress: - { - // LeaveIfUnsupported prevents getting here with no CDMA support. - __ASSERT_ALWAYS \ - ( iExt->iCdmaData, ApCommons::Panic( ESanityCheckFailed ) ); - l = iExt->iCdmaData->iPdpAddress->Length(); - break; - } - case EApCdmaHomeAgentAddress: - { - // LeaveIfUnsupported prevents getting here with no CDMA support. - __ASSERT_ALWAYS \ - ( iExt->iCdmaData, ApCommons::Panic( ESanityCheckFailed ) ); - l = iExt->iCdmaData->iHomeAgentAddress->Length(); - break; - } - case EApCdmaMipPrimaryHomeAgent: - { - // LeaveIfUnsupported prevents getting here with no CDMA support. - __ASSERT_ALWAYS \ - ( iExt->iCdmaData, ApCommons::Panic( ESanityCheckFailed ) ); - l = iExt->iCdmaData->iMipPrimaryHomeAgent->Length(); - break; - } - case EApCdmaMipSecondaryHomeAgent: - { - // LeaveIfUnsupported prevents getting here with no CDMA support. - __ASSERT_ALWAYS \ - ( iExt->iCdmaData, ApCommons::Panic( ESanityCheckFailed ) ); - l = iExt->iCdmaData->iMipSecondaryHomeAgent->Length(); - break; - } - // END CDMA2000 - // WLAN - case EApWlanNetworkName: - { - // LeaveIfUnsupported prevents getting here with no WLAN support. - __ASSERT_ALWAYS \ - ( iExt->iWlanData, ApCommons::Panic( ESanityCheckFailed ) ); - l = iExt->iWlanData->iWlanNetworkName->Length(); - break; - } - // END WLAN - default: - { - __ASSERT_DEBUG( EFalse, ApCommons::Panic( EInvalidColumn ) ); - User::Leave( KErrInvalidColumn ); - } - } - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::ReadTextLengthL" ) ) ); - return l; + return 0; } @@ -1717,493 +495,7 @@ EXPORT_C TInt CApAccessPointItem::ReadUint( const TApMember aColumn, TUint32& aValue ) { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::ReadUint" ) ) ); - - TInt retval ( KErrNone ); - - if( !IsSupported( aColumn ) ) - { - retval = KErrNotSupported; - } - else - { - switch ( aColumn ) - { - case EApWapAccessPointID: - { - aValue = iWapUid; - break; - } - case EApWapIap: - { - aValue = iWapIap; - break; - } - case EApIapServiceId: - { - aValue = iIapServiceId; - break; - } - case EApIapChargecard: - { - aValue = iIapChargeCardId; - break; - } - case EApIspIspType: - case EApCdmaApType: - { - aValue = iIspType; - break; - } - case EApIspAuthRetries: - case EApGprsIfAuthRetries: - case EApCdmaIfAuthRetries: - case EApWlanIfAuthRetries: - { - aValue = iIspIfAuthRetries; - break; - } - case EApIspIfCallbackType: - { - aValue = iCallBackTypeIsServerNum; - break; - } - case EApIspCallBackTimeOut: - { - aValue = iIspCallbackTimeOut; - break; - } - case EApIspBearerName: - { - aValue = iIspBearerName; - break; - } - case EApIspBearerSpeed: - { - aValue = iMaxConnSpeed; - break; - } - case EApIspBearerCE: - { - aValue = iIspBearerCE; - break; - } - case EApIspBearerCallTypeIsdn: - { - aValue = iBearerCallTypeIsdn; - break; - } - case EApIspBearerType: - { - aValue = iIspBearerType; - break; - } - case EApIspChannelCoding: - { - aValue = iIspChannelCoding; - break; - } - case EApIspAIUR: - { - aValue = iIspAIUR; - break; - } - case EApIspRequestedTimeSlots: - { - aValue = iIspRequestedTimeSlots; - break; - } - case EApIspMaximumTimeSlots: - { - aValue = iIspMaximumTimeSlots; - break; - } - case EApGprsPdpType: - { - aValue = iGprsPdpType; - break; - } - case EApGprsReqPrecedence: - { - aValue = iGprsReqPrecedence; - break; - } - case EApGprsReqDelay: - { - aValue = iGprsReqDelay; - break; - } - case EApGprsReqReliability: - { - aValue = iGprsReqReliability; - break; - } - case EApGprsReqPeakThroughput: - { - aValue = iGprsReqPeakThroughput; - break; - } - case EApGprsReqMeanPeakThroughput: - { - aValue = iGprsReqMeanPeakThroughput; - break; - } - case EApGprsMinPrecedence: - { - aValue = iGprsMinPrecedence; - break; - } - case EApGprsMinDelay: - { - aValue = iGprsMinDelay; - break; - } - case EApGprsMinReliability: - { - aValue = iGprsMinReliability; - break; - } - case EApGprsMinPeakThroughput: - { - aValue = iGprsMinPeakThroughput; - break; - } - case EApGprsMinMeanThroughput: - { - aValue = iGprsMinMeanThroughput; - break; - } - case EApWapWspOption: - { - aValue = iIsConnectionTypeContinuous; - break; - } - case EApProxyPortNumber: - { - aValue = iApProxyPortNumber; - break; - } - case EApWapProxyPort: - { - aValue = iWapProxyPort; - break; - } - case EApNetworkID: - { - aValue = iNetworkId; - break; - } - case EApIapBearerService: - { - aValue = iApIapBearerService; - break; - } - - //* DEPRECATED !!! - case EApWapIsp: - case EApWapChargecard: - case EApWapIspType: - { - __ASSERT_DEBUG( EFalse, \ - User::Panic( kApSet, KErrNotSupported ) ); - retval = KErrNotSupported; - break; - } - //* Deprecated ends - // CDMA2000 - case EApCdmaServiceOption: - { - // IsSupported() check prevents getting here with no CDMA supp. - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iCdmaData->iServiceOption; - break; - } - case EApCdmaPdpType: - { - // IsSupported() check prevents getting here with no CDMA supp. - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iCdmaData->iPdpType; - break; - } - case EApCdmaReqFwdPriority: - { - // IsSupported() check prevents getting here with no CDMA supp. - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iCdmaData->iReqFwdPriority; - break; - } - case EApCdmaReqRevPriority: - { - // IsSupported() check prevents getting here with no CDMA supp. - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iCdmaData->iReqRevPriority; - break; - } - case EApCdmaReqFwdBitrate: - { - // IsSupported() check prevents getting here with no CDMA supp. - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iCdmaData->iReqFwdBitrate; - break; - } - case EApCdmaReqRevBitrate: - { - // IsSupported() check prevents getting here with no CDMA supp. - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iCdmaData->iReqRevBitrate; - break; - } - case EApCdmaReqFwdLoss: - { - // IsSupported() check prevents getting here with no CDMA supp. - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iCdmaData->iReqFwdLoss; - break; - } - case EApCdmaReqRevLoss: - { - // IsSupported() check prevents getting here with no CDMA supp. - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iCdmaData->iReqRevLoss; - break; - } - case EApCdmaReqFwdMaxDelay: - { - // IsSupported() check prevents getting here with no CDMA supp. - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iCdmaData->iReqFwdMaxDelay; - break; - } - case EApCdmaReqRevMaxDelay: - { - // IsSupported() check prevents getting here with no CDMA supp. - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iCdmaData->iReqRevMaxDelay; - break; - } - case EApCdmaMinFwdBitrate: - { - // IsSupported() check prevents getting here with no CDMA supp. - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iCdmaData->iMinFwdBitrate; - break; - } - case EApCdmaMinRevBitrate: - { - // IsSupported() check prevents getting here with no CDMA supp. - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iCdmaData->iMinRevBitrate; - break; - } - case EApCdmaAccptFwdLoss: - { - // IsSupported() check prevents getting here with no CDMA supp. - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iCdmaData->iAccptFwdLoss; - break; - } - case EApCdmaAccptRevLoss: - { - // IsSupported() check prevents getting here with no CDMA supp. - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iCdmaData->iAccptRevLoss; - break; - } - case EApCdmaAccptFwdMaxDelay: - { - // IsSupported() check prevents getting here with no CDMA supp. - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iCdmaData->iAccptFwdMaxDelay; - break; - } - case EApCdmaAccptRevMaxDelay: - { - // IsSupported() check prevents getting here with no CDMA supp. - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iCdmaData->iAccptRevMaxDelay; - break; - } - case EApCdmaQosWarningTimeout: - { - // IsSupported() check prevents getting here with no CDMA supp. - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iCdmaData->iQosWarningTimeout; - break; - } - case EApCdmaRlpMode: - { - // IsSupported() check prevents getting here with no CDMA supp. - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iCdmaData->iRlpMode; - break; - } - case EApCdmaMipTimeout: - { - // IsSupported() check prevents getting here with no CDMA supp. - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iCdmaData->iMipTimeout; - break; - } - case EApCdmaNaiType: - { - // IsSupported() check prevents getting here with no CDMA supp. - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iCdmaData->iNaiType; - break; - } - case EApCdmaSimpleIpAuthAlgorithm: - { - // IsSupported() check prevents getting here with no CDMA supp. - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iCdmaData->iSimpleIpAuthAlgorithm; - break; - } - case EApCdmaSimpleIpPapSsHandle: - { - // IsSupported() check prevents getting here with no CDMA supp. - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iCdmaData->iSimpleIpPapSsHandle; - break; - } - case EApCdmaSimpleIpChapSsHandle: - { - // IsSupported() check prevents getting here with no CDMA supp. - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iCdmaData->iSimpleIpChapSsHandle; - break; - } - case EApCdmaMipTBit: - { - // IsSupported() check prevents getting here with no CDMA supp. - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iCdmaData->iMipTBit; - break; - } - case EApCdmaMipMnAaaAuthAlgorithm: - { - // IsSupported() check prevents getting here with no CDMA supp. - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iCdmaData->iMipMnAaaAuthAlgorithm; - break; - } - case EApCdmaMipMnAaaSpi: - { - // IsSupported() check prevents getting here with no CDMA supp. - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iCdmaData->iMipMnAaaSpi; - break; - } - case EApCdmaMipMnAaaSsHandle: - { - // IsSupported() check prevents getting here with no CDMA supp. - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iCdmaData->iMipMnAaaSsHandle; - break; - } - case EApCdmaMipMnHaAuthAlgorithm: - { - // IsSupported() check prevents getting here with no CDMA supp. - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iCdmaData->iMipMnHaAuthAlgorithm; - break; - } - case EApCdmaMipMnHaSpi: - { - // IsSupported() check prevents getting here with no CDMA supp. - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iCdmaData->iMipMnHaSpi; - break; - } - case EApCdmaMipMnHaSsHandle: - { - // IsSupported() check prevents getting here with no CDMA supp. - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iCdmaData->iMipMnHaSsHandle; - break; - } - // END CDMA2000 - // WLAN - case EApWlanNetworkMode: - { - // IsSupported() check prevents getting here with no WLAN supp. - __ASSERT_ALWAYS ( iExt->iWlanData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iWlanData->iWlanNetworkMode; - break; - } - case EApWlanSecurityMode: - { - // IsSupported() check prevents getting here with no WLAN supp. - __ASSERT_ALWAYS ( iExt->iWlanData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iWlanData->iWlanSecurityMode; - break; - } - case EApWlanSettingsId: - { - // IsSupported() check prevents getting here with no WLAN supp. - __ASSERT_ALWAYS ( iExt->iWlanData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iWlanData->iWlanId; - break; - } - case EApWlanChannelId: - { - // IsSupported() check prevents getting here with no WLAN supp. - __ASSERT_ALWAYS ( iExt->iWlanData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iWlanData->iChannelId; - break; - } - // END WLAN - // LANModem - case EApIapBearerID: - { - aValue = iExt->iIapBearerID; - break; - } - // END LANModem - default : - { - __ASSERT_DEBUG( EFalse, ApCommons::Panic( EInvalidColumn ) ); - retval = KErrInvalidColumn; - break; - } - } - } - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::ReadUint" ) ) ); - return retval; + return KErrNotSupported; } @@ -2215,169 +507,7 @@ EXPORT_C TInt CApAccessPointItem::ReadBool( const TApMember aColumn, TBool& aValue ) { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::ReadBool" ) ) ); - - TInt retval ( KErrNone ); - - if( !IsSupported( aColumn ) ) - { - retval = KErrNotSupported; - } - else - { - switch ( aColumn ) - { - case EApWapSecurity: - { - aValue = iIsWTLSSecurityOn; - break; - } - case EApIspDialResolution: - { - aValue = iIspDialResolution; - break; - } - case EApIspUseLoginScript: - { - aValue = iUseLoginScript; - break; - } - case EApIspPromptForLogin: - { - aValue = iPromptPassword; - break; - } - case EApIspDisplayPCT: - { - aValue = iDisplayTerminalWindow; - break; - } - case EApIspIfPromptForAuth: - case EApGprsIfPromptForAuth: - case EApCdmaIfPromptForAuth: - case EApWlanIfPromptForAuth: - { - aValue = iIspIfPromptForAuth; - break; - } - case EApIspIfCallbackEnabled: - { - aValue = iUseCallBack; - break; - } - case EApIspIPAddrFromServer: - case EApGprsIpAddrFromServer: - case EApCdmaIpAddrFromServer: - case EApWlanIpAddrFromServer: - { - aValue = iIspIPAddrFromServer; - break; - } - case EApIspIPDnsAddrFromServer: - case EApGprsIpDnsAddrFromServer: - case EApCdmaIpDnsAddrFromServer: - case EApWlanIpDnsAddrFromServer: - { - aValue = iGetDNSIPFromServer; - break; - } - case EApIspEnableIpHeaderComp: - case EApGprsHeaderCompression: - case EApCdmaHeaderCompression: - { - aValue = iEnablePPPCompression; - break; - } - case EApIspEnableLCPExtensions: - case EApGprsEnableLCPExtensions: - case EApCdmaEnableLCPExtensions: - { - aValue = iIspEnableLCPExtensions; - break; - } - case EApIspDisablePlainTextAuth: - case EApGprsDisablePlainTextAuth: - case EApCdmaDisablePlainTextAuth: - { - aValue = iIsPasswordAuthenticationSecure; - break; - } - case EApIspEnableSWCompression: - case EApGprsDataCompression: - case EApCdmaDataCompression: - { - aValue = iIspEnableSwCompression; - break; - } -// NOTE! This has been deprecated. - case EApIspBearerCallTypeIsdn: - { - aValue = ( iBearerCallTypeIsdn != ECallTypeAnalogue ); - break; - } - case EApGprsUseAnonymAccess: - case EApCdmaAnonymousAccess: - { - aValue = iGprsUseAnonymAccess; - break; - } - case EApIsReadOnly: - { - aValue = iIsReadOnly; - break; - } - case EApProxyUseProxy: - { - aValue = iApProxyUseProxy; - break; - } - case EApHasProxySettings: - { - aValue = iApHasProxySettings; - break; - } - case EApIP6DNSAddrFromServer: - { - if ( iExt->iIsIpv6Supported ) - { - aValue = iExt->iIpv6GetDNSIPFromServer; - } - else - { - retval = KErrNotSupported; - } - break; - } - // CDMA2000 - case EApCdmaMip: - { - // IsSupported() check prevents getting here with no CDMA supp. - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iCdmaData->iMip; - break; - } - // END CDMA2000 - // WLAN - case EApWlanScanSSID: - { - // IsSupported() check prevents getting here with no WLAN supp. - __ASSERT_ALWAYS ( iExt->iWlanData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - aValue = iExt->iWlanData->iScanSSID; - break; - } - // END WLAN - default : - { - __ASSERT_DEBUG( EFalse, ApCommons::Panic( EInvalidColumn ) ); - return KErrInvalidColumn; - } - } - } - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::ReadBool" ) ) ); - return retval; + return KErrNotSupported; } @@ -2389,34 +519,7 @@ EXPORT_C TInt CApAccessPointItem::WriteTextL( const TApMember aColumn, const TDesC8& aValue ) { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::WriteTextL8" ) ) ); - - LeaveIfUnsupportedL( aColumn ); - - TInt ret = KErrNone; - - switch ( aColumn ) - { - case EApIspIfCallbackInfo: - { - ReAllocL( iIspIfCallbackInfo, aValue ); - break; - } - case EApIspInitString: - { - ReAllocL( iIspInitString, aValue ); - break; - } - default: - { - __ASSERT_DEBUG( EFalse, ApCommons::Panic( EInvalidColumn ) ); - ret = KErrInvalidColumn; - break; - } - } - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::WriteTextL8" ) ) ); - return ret; + return KErrNotSupported; } @@ -2428,290 +531,7 @@ EXPORT_C TInt CApAccessPointItem::WriteTextL( const TApMember aColumn, const TDesC16& aValue ) { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::WriteTextL" ) ) ); - - LeaveIfUnsupportedL( aColumn ); - - TInt retval( KErrNone ); - switch ( aColumn ) - { - case EApWapAccessPointName: - { - HBufC* sgd = aValue.AllocLC(); - sgd->Des().Trim(); - ReAllocL( iWapAccessPointName, *sgd); - CleanupStack::PopAndDestroy( sgd ); // sgd - break; - } - case EApWapCurrentBearer: - { - ReAllocL( iWapBearer, aValue); - break; - } - case EApWapGatewayAddress: - { - // this is an IP Address, must remove leading 0s from - // the numbers - HBufC *tmp = GetCleanIpAddressLC( aValue ); - ReAllocL( iWapGatewayAddress, *tmp ); - CleanupStack::PopAndDestroy( tmp ); - break; - } - case EApIapName: - { - ReAllocL( iIapName, aValue); - break; - } - case EApIspName: - { - ReAllocL( iIspName, aValue); - break; - } - case EApIapServiceType: - { - ReAllocL( iIapServiceType, aValue); - //Check if ISP/GPRS has changed , update lfname &/or lfnetworks.! - if ( ( *iIapServiceType == TPtrC(DIAL_IN_ISP) ) || - ( *iIapServiceType == TPtrC(DIAL_OUT_ISP) ) ) - { - WriteTextL( EApIspIfName, KDefIspIfName ); - } - else if ( ( *iIapServiceType == TPtrC(OUTGOING_GPRS) ) || - ( *iIapServiceType == TPtrC(INCOMING_GPRS) ) ) - { - WriteTextL( EApIspIfName, KDefGprsIfName ); - } - else - { // unknown ISP type, do not know what to write, - // simply ignore it.... - } - break; - } - case EApIspDescription: - { - ReAllocL( iIspDescription, aValue); - break; - } - case EApIspDefaultTelNumber: - { - ReAllocL( iIspDefaultTelNumber, aValue); - break; - } - case EApIspLoginName: - { - ReAllocL( iUserName, aValue); - ReAllocL( iIspIfAuthName, aValue); - break; - } - case EApIspLoginPass: - { - ReAllocL( iPassword, aValue); - ReAllocL( iIspIfAuthPass, aValue); - break; - } - case EApIspIfName: - case EApGprsIfName: - case EApCdmaIfName: - { - ReAllocL( iIspIfName, aValue); - break; - } - case EApIspIfParams: - case EApGprsIfParams: - case EApCdmaIfParams: - { - ReAllocL( iIspIfParams, aValue); - break; - } - case EApIspIfNetworks: - case EApGprsIfNetworks: - case EApCdmaIfNetworks: - case EApWlanIfNetworks: - { - ReAllocL( iIspIfNetworks, aValue); // CAN NOT BE CHANGED - break; - } - case EApIspIfAuthName: - case EApGprsIfAuthName: - case EApCdmaIfAuthName: - case EApWlanIfAuthName: - { - ReAllocL( iIspIfAuthName, aValue); - ReAllocL( iUserName, aValue); - break; - } - case EApIspIfAuthPass: - case EApGprsIfAuthPassword: - case EApCdmaIfAuthPassword: - case EApWlanIfAuthPassword: - { - ReAllocL( iIspIfAuthPass, aValue); - ReAllocL( iPassword, aValue); - break; - } - case EApIspIPAddr: - case EApGprsIpAddr: - case EApCdmaIpAddr: - case EApWlanIpAddr: - { - ReAllocL( iIspIPAddr, aValue); - SetIpFromServer(); - break; - } - case EApIspIPNetMask: - case EApGprsIpNetMask: - case EApCdmaIpNetMask: - case EApWlanIpNetMask: - { - ReAllocL( iIspIPNetMask, aValue); - break; - } - case EApIspIPGateway: - case EApGprsIpGateway: - case EApCdmaIpGateway: - case EApWlanIpGateway: - { - ReAllocL( iIspGateway, aValue); - break; - } - case EApIspIPNameServer1: - case EApGprsIPNameServer1: - case EApCdmaIPNameServer1: - case EApWlanIPNameServer1: - { - ReAllocL( iPrimaryDNS, aValue); - SetDnsIpFromServer(); - break; - } - case EApIspIPNameServer2: - case EApGprsIPNameServer2: - case EApCdmaIPNameServer2: - case EApWlanIPNameServer2: - { - ReAllocL( iSecondaryDNS, aValue); - SetDnsIpFromServer(); - break; - } - case EApGprsPdpAddress: - { - ReAllocL( iGprsPdpAddress, aValue ); - break; - } - case EApProxyProtocolName: - { - ReAllocL( iApProxyProtocolName, aValue ); - SetProxyFlag(); - break; - } - case EApNetworkName: - { - ReAllocL( iNetworkName, aValue ); - break; - } - case EApProxyLoginName: - { - ReAllocL( iWapProxyLoginName, aValue ); - break; - } - case EApProxyLoginPass: - { - ReAllocL( iWapProxyLoginPass, aValue ); - break; - } - case EApIP6NameServer1: - { - if ( iExt->iIsIpv6Supported ) - { - ReAllocL( iExt->iIpv6PrimaryDNS, aValue); - SetDns6IpFromServer(); - } - else - { - User::Leave( KErrNotSupported ); - } - break; - } - case EApIP6NameServer2: - { - if ( iExt->iIsIpv6Supported ) - { - ReAllocL( iExt->iIpv6SecondaryDNS, aValue); - SetDns6IpFromServer(); - } - else - { - User::Leave( KErrNotSupported ); - } - break; - } - // CDMA2000 - case EApCdmaIwfName: - { - __ASSERT_ALWAYS \ - ( iExt->iCdmaData, ApCommons::Panic( ESanityCheckFailed ) ); - ReAllocL( iExt->iCdmaData->iIwfName, aValue ); - break; - } - case EApCdmaPdpAddress: - { - __ASSERT_ALWAYS \ - ( iExt->iCdmaData, ApCommons::Panic( ESanityCheckFailed ) ); - ReAllocL( iExt->iCdmaData->iPdpAddress, aValue ); - break; - } - case EApCdmaHomeAgentAddress: - { - __ASSERT_ALWAYS \ - ( iExt->iCdmaData, ApCommons::Panic( ESanityCheckFailed ) ); - ReAllocL( iExt->iCdmaData->iHomeAgentAddress, aValue ); - break; - } - case EApCdmaMipPrimaryHomeAgent: - { - __ASSERT_ALWAYS \ - ( iExt->iCdmaData, ApCommons::Panic( ESanityCheckFailed ) ); - ReAllocL( iExt->iCdmaData->iMipPrimaryHomeAgent, aValue ); - break; - } - case EApCdmaMipSecondaryHomeAgent: - { - __ASSERT_ALWAYS \ - ( iExt->iCdmaData, ApCommons::Panic( ESanityCheckFailed ) ); - ReAllocL( iExt->iCdmaData->iMipSecondaryHomeAgent, aValue ); - break; - } - // END CDMA2000 - // WLAN - case EApWlanNetworkName: - { - __ASSERT_ALWAYS \ - ( iExt->iWlanData, ApCommons::Panic( ESanityCheckFailed ) ); - ReAllocL( iExt->iWlanData->iWlanNetworkName, aValue ); - break; - } - // END WLAN - // LANModem - case EApLanBearerName: - { - ReAllocL( iExt->iLanBearerModemName, aValue ); - break; - } - // END LANModem - case EApIapBearerType: - { - ReAllocL( iExt->iIapBearerType, aValue ); - break; - } - default: - { - __ASSERT_DEBUG( EFalse, ApCommons::Panic( EInvalidColumn ) ); - retval = KErrInvalidColumn; - break; - } - } - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::WriteTextL" ) ) ); - return retval; + return KErrNotSupported; } @@ -2722,51 +542,7 @@ EXPORT_C TInt CApAccessPointItem::WriteLongTextL( const TApMember aColumn, const TDesC& aValue ) { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::WriteLongTextL" ) ) ); - - LeaveIfUnsupportedL( aColumn ); - - TInt retval( KErrNone ); - switch ( aColumn ) - { - case EApGprsAccessPointName: - { - ReAllocL( iGprsAccessPointName, aValue); - break; - } - case EApWapStartPage: - { - ReAllocL( iStartingPage, aValue); - break; - } - case EApIspLoginScript: - { - ReAllocL( iLoginScript, aValue ); - break; - } - case EApProxyServerAddress: - { - ReAllocL( iApProxyServerAddress, aValue ); - SetProxyFlag(); - break; - } - case EApProxyExceptions: - { - ReAllocL( iApProxyExceptions, aValue ); - SetProxyFlag(); - break; - } - default: - { - // unknown column... - __ASSERT_DEBUG( EFalse, ApCommons::Panic( EInvalidColumn ) ); - retval = KErrInvalidColumn; - break; - } - } - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::WriteLongTextL" ) ) ); - return retval; + return KErrNotSupported; } @@ -2777,475 +553,7 @@ EXPORT_C TInt CApAccessPointItem::WriteUint( const TApMember aColumn, const TUint32& aValue ) { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::WriteUint" ) ) ); - - /***************************************************** - * Series 60 Customer / ETel - * Series 60 ETel API - *****************************************************/ - TInt retval( KErrNone ); - - if ( !IsSupported( aColumn ) ) - { - retval = KErrNotSupported; - } - else - { - switch ( aColumn ) - { - case EApWapAccessPointID: - { - iWapUid = aValue; - break; - } - case EApWapIap: - { - iWapIap = aValue; - break; - } - case EApIapServiceId: - { - iIapServiceId = aValue; - break; - } - case EApIapChargecard: - { - iIapChargeCardId = aValue; - break; - } - case EApIspIspType: - case EApCdmaApType: - { - iIspType = (TCommsDbIspType)aValue; - break; - } - case EApIspAuthRetries: - case EApGprsIfAuthRetries: - case EApCdmaIfAuthRetries: - case EApWlanIfAuthRetries: - { - iIspIfAuthRetries = aValue; - break; - } - case EApIspIfCallbackType: - { - iCallBackTypeIsServerNum = TCallbackAction( aValue ); - break; - } - case EApIspCallBackTimeOut: - { - iIspCallbackTimeOut = aValue; - break; - } - case EApIspBearerName: - { - iIspBearerName = - RMobileCall::TMobileCallDataServiceCaps( aValue ); - break; - } - case EApIspBearerSpeed: - { - iMaxConnSpeed = TApCallSpeed( aValue ); - break; - } - case EApIspBearerCE: - { - //iIspBearerCE = RMobileCall::TMobileCallDataQoSCaps( aValue ); - iIspBearerCE = RMobileCall::TMobileCallDataQoS( aValue ); - break; - } - case EApIspBearerCallTypeIsdn: - { - /* - // DO NOT CHECK VALIDITY HERE AS COMMSDB STORES IT DIFFERENTLY - // AFTER READED FROM THE DB, IT WILL BE CHECKED!!!!! - // ensure it is in the valid range - TUint32 tempint = aValue; - tempint = Min( tempint, TUint32(ECallTypeISDNv120) ); - tempint = Max( tempint, TUint32(ECallTypeAnalogue) ); - */ - iBearerCallTypeIsdn = (TApCallType)aValue; - break; - } - case EApIspBearerType: - { - iIspBearerType = aValue; - break; - } - case EApIspChannelCoding: - { - iIspChannelCoding = aValue; - break; - } - case EApIspAIUR: - { - iIspAIUR = aValue; - break; - } - case EApIspRequestedTimeSlots: - { - iIspRequestedTimeSlots = aValue; - break; - } - case EApIspMaximumTimeSlots: - { - iIspMaximumTimeSlots = aValue; - break; - } - - case EApGprsPdpType: - { - iGprsPdpType = aValue; - TRAP_IGNORE( SetIfNetworksL() ); - break; - } - case EApGprsReqPrecedence: - { - iGprsReqPrecedence = aValue; - break; - } - case EApGprsReqDelay: - { - iGprsReqDelay = aValue; - break; - } - case EApGprsReqReliability: - { - iGprsReqReliability = aValue; - break; - } - case EApGprsReqPeakThroughput: - { - iGprsReqPeakThroughput = aValue; - break; - } - case EApGprsReqMeanPeakThroughput: - { - iGprsReqMeanPeakThroughput = aValue; - break; - } - case EApGprsMinPrecedence: - { - iGprsMinPrecedence = aValue; - break; - } - case EApGprsMinDelay: - { - iGprsMinDelay = aValue; - break; - } - case EApGprsMinReliability: - { - iGprsMinReliability = aValue; - break; - } - case EApGprsMinPeakThroughput: - { - iGprsMinPeakThroughput = aValue; - break; - } - case EApGprsMinMeanThroughput: - { - iGprsMinMeanThroughput = aValue; - break; - } - case EApWapWspOption: - { - iIsConnectionTypeContinuous = aValue; - break; - } - case EApProxyPortNumber: - { - iApProxyPortNumber = aValue; - SetProxyFlag(); - break; - } - case EApWapProxyPort: - { - iWapProxyPort = aValue; - break; - } - case EApNetworkID: - { // now it is supported to set it from the outside... - iNetworkId = aValue; - break; - } - case EApIapBearerService: - { - iApIapBearerService = aValue; - break; - } - - // DEPRECATED !!! - case EApWapIsp: - case EApWapChargecard: - case EApWapIspType: - { - __ASSERT_DEBUG( EFalse, \ - User::Panic( kApSet, KErrNotSupported ) ); - retval = KErrNotSupported; - break; - } - // CDMA2000 - case EApCdmaServiceOption: - { - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iCdmaData->iServiceOption = aValue; - break; - } - case EApCdmaPdpType: - { - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iCdmaData->iPdpType = aValue; - TRAP_IGNORE( SetIfNetworksL() ); - break; - } - case EApCdmaReqFwdPriority: - { - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iCdmaData->iReqFwdPriority = aValue; - break; - } - case EApCdmaReqRevPriority: - { - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iCdmaData->iReqRevPriority = aValue; - break; - } - case EApCdmaReqFwdBitrate: - { - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iCdmaData->iReqFwdBitrate = aValue; - break; - } - case EApCdmaReqRevBitrate: - { - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iCdmaData->iReqRevBitrate = aValue; - break; - } - case EApCdmaReqFwdLoss: - { - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iCdmaData->iReqFwdLoss = aValue; - break; - } - case EApCdmaReqRevLoss: - { - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iCdmaData->iReqRevLoss = aValue; - break; - } - case EApCdmaReqFwdMaxDelay: - { - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iCdmaData->iReqFwdMaxDelay = aValue; - break; - } - case EApCdmaReqRevMaxDelay: - { - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iCdmaData->iReqRevMaxDelay = aValue; - break; - } - case EApCdmaMinFwdBitrate: - { - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iCdmaData->iMinFwdBitrate = aValue; - break; - } - case EApCdmaMinRevBitrate: - { - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iCdmaData->iMinRevBitrate = aValue; - break; - } - case EApCdmaAccptFwdLoss: - { - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iCdmaData->iAccptFwdLoss = aValue; - break; - } - case EApCdmaAccptRevLoss: - { - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iCdmaData->iAccptRevLoss = aValue; - break; - } - case EApCdmaAccptFwdMaxDelay: - { - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iCdmaData->iAccptFwdMaxDelay = aValue; - break; - } - case EApCdmaAccptRevMaxDelay: - { - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iCdmaData->iAccptRevMaxDelay = aValue; - break; - } - case EApCdmaQosWarningTimeout: - { - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iCdmaData->iQosWarningTimeout = aValue; - break; - } - case EApCdmaRlpMode: - { - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iCdmaData->iRlpMode = aValue; - break; - } - case EApCdmaMipTimeout: - { - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iCdmaData->iMipTimeout = aValue; - break; - } - case EApCdmaNaiType: - { - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iCdmaData->iNaiType = aValue; - break; - } - case EApCdmaSimpleIpAuthAlgorithm: - { - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iCdmaData->iSimpleIpAuthAlgorithm = aValue; - break; - } - case EApCdmaSimpleIpPapSsHandle: - { - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iCdmaData->iSimpleIpPapSsHandle = aValue; - break; - } - case EApCdmaSimpleIpChapSsHandle: - { - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iCdmaData->iSimpleIpChapSsHandle = aValue; - break; - } - case EApCdmaMipTBit: - { - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iCdmaData->iMipTBit = aValue; - break; - } - case EApCdmaMipMnAaaAuthAlgorithm: - { - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iCdmaData->iMipMnAaaAuthAlgorithm = aValue; - break; - } - case EApCdmaMipMnAaaSpi: - { - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iCdmaData->iMipMnAaaSpi = aValue; - break; - } - case EApCdmaMipMnAaaSsHandle: - { - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iCdmaData->iMipMnAaaSsHandle = aValue; - break; - } - case EApCdmaMipMnHaAuthAlgorithm: - { - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iCdmaData->iMipMnHaAuthAlgorithm = aValue; - break; - } - case EApCdmaMipMnHaSpi: - { - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iCdmaData->iMipMnHaSpi = aValue; - break; - } - case EApCdmaMipMnHaSsHandle: - { - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iCdmaData->iMipMnHaSsHandle = aValue; - break; - } - // END CDMA2000 - // WLAN - case EApWlanNetworkMode: - { - __ASSERT_ALWAYS ( iExt->iWlanData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iWlanData->iWlanNetworkMode = aValue; - break; - } - case EApWlanSecurityMode: - { - __ASSERT_ALWAYS ( iExt->iWlanData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iWlanData->iWlanSecurityMode = aValue; - break; - } - case EApWlanSettingsId: - { - __ASSERT_ALWAYS ( iExt->iWlanData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iWlanData->iWlanId = aValue; - break; - } - case EApWlanChannelId: - { - __ASSERT_ALWAYS ( iExt->iWlanData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iWlanData->iChannelId = aValue; - break; - } - // END WLAN - // LANModem - case EApIapBearerID: - { - iExt->iIapBearerID = aValue; - break; - } - // END LANModem - default : - { - __ASSERT_DEBUG( EFalse, ApCommons::Panic( EInvalidColumn ) ); - retval = KErrInvalidColumn; - } - } - } - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::WriteUint" ) ) ); - return retval; + return KErrNotSupported; } @@ -3257,174 +565,7 @@ EXPORT_C TInt CApAccessPointItem::WriteBool( const TApMember aColumn, const TBool& aValue ) { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::WriteBool" ) ) ); - - TInt retval( KErrNone ); - - if ( !IsSupported( aColumn ) ) - { - retval = KErrNotSupported; - } - else - { - switch ( aColumn ) - { - case EApWapSecurity: - { - iIsWTLSSecurityOn = aValue; - break; - } - case EApIspDialResolution: - { - iIspDialResolution = aValue; - break; - } - case EApIspUseLoginScript: - { - iUseLoginScript = aValue; - break; - } - case EApIspPromptForLogin: - { - iPromptPassword = aValue; - iIspIfPromptForAuth = aValue; - break; - } - case EApIspDisplayPCT: - { - iDisplayTerminalWindow = EFalse; - break; - } - case EApIspIfPromptForAuth: - case EApGprsIfPromptForAuth: - case EApCdmaIfPromptForAuth: - case EApWlanIfPromptForAuth: - { - iIspIfPromptForAuth = aValue; - iPromptPassword = aValue; - break; - } - case EApIspIfCallbackEnabled: - { - iUseCallBack = aValue; - break; - } - case EApIspIPAddrFromServer: - case EApGprsIpAddrFromServer: - case EApCdmaIpAddrFromServer: - case EApWlanIpAddrFromServer: - { - iIspIPAddrFromServer = aValue; - break; - } - case EApIspIPDnsAddrFromServer: - case EApGprsIpDnsAddrFromServer: - case EApCdmaIpDnsAddrFromServer: - case EApWlanIpDnsAddrFromServer: - { - iGetDNSIPFromServer = aValue; - break; - } - case EApIspEnableIpHeaderComp: - case EApGprsHeaderCompression: - case EApCdmaHeaderCompression: - { - iEnablePPPCompression = aValue; - break; - } - case EApIspEnableLCPExtensions: - case EApGprsEnableLCPExtensions: - case EApCdmaEnableLCPExtensions: - { - iIspEnableLCPExtensions = aValue; - break; - } - case EApIspDisablePlainTextAuth: - case EApGprsDisablePlainTextAuth: - case EApCdmaDisablePlainTextAuth: - { - iIsPasswordAuthenticationSecure = aValue; - break; - } - case EApIspEnableSWCompression: - case EApGprsDataCompression: - case EApCdmaDataCompression: - { - iIspEnableSwCompression = aValue; - break; - } - // NOTE! This is deprecated. - case EApIspBearerCallTypeIsdn: - { - iBearerCallTypeIsdn = - TApCallType( aValue != ECallTypeAnalogue ); - break; - } - case EApGprsUseAnonymAccess: - case EApCdmaAnonymousAccess: - { - iGprsUseAnonymAccess = aValue; - break; - } - case EApIsReadOnly: - { - __ASSERT_DEBUG( EFalse, ApCommons::Panic( EInvalidColumn ) ); - retval = KErrInvalidColumn; - break; - } - case EApProxyUseProxy: - { - iApProxyUseProxy = aValue; - SetProxyFlag(); - break; - } - case EApHasProxySettings: - { - __ASSERT_DEBUG( EFalse, ApCommons::Panic( EInvalidColumn ) ); - retval = KErrNotSupported; - break; - } - case EApIP6DNSAddrFromServer: - { - if ( iExt->iIsIpv6Supported ) - { - iExt->iIpv6GetDNSIPFromServer = aValue; - } - else - { - retval = KErrNotSupported; - } - break; - } - // CDMA2000 - case EApCdmaMip: - { - __ASSERT_ALWAYS ( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iCdmaData->iMip = aValue; - break; - } - // END CDMA2000 - // WLAN - case EApWlanScanSSID: - { - __ASSERT_ALWAYS ( iExt->iWlanData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - iExt->iWlanData->iScanSSID = aValue; - break; - } - // END WLAN - default : - { - __ASSERT_DEBUG( EFalse, ApCommons::Panic( EInvalidColumn ) ); - retval = KErrInvalidColumn; - break; - } - } - } - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::WriteBool" ) ) ); - return retval; + return KErrNotSupported; } @@ -3438,9 +579,7 @@ // EXPORT_C TUint32 CApAccessPointItem::WapUid() const { - CLOG( ( EApItem, 0, _L( "<-> CApAccessPointItem::WapUid" ) ) ); - - return iWapUid; + return 0; } @@ -3450,9 +589,7 @@ // EXPORT_C const TDesC& CApAccessPointItem::ConnectionName() const { - CLOG( ( EApItem, 0, _L( "<-> CApAccessPointItem::ConnectionName" ) ) ); - - return *iWapAccessPointName; + User::Leave( KErrNotSupported ); } @@ -3463,9 +600,7 @@ // EXPORT_C const TDesC& CApAccessPointItem::WapBearer() const { - CLOG( ( EApItem, 0, _L( "<-> CApAccessPointItem::WapBearer" ) ) ); - - return *iWapBearer; + User::Leave( KErrNotSupported ); } @@ -3477,110 +612,7 @@ // EXPORT_C TApBearerType CApAccessPointItem::BearerTypeL() { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::BearerTypeL" ) ) ); - - TApBearerType retval( EApBearerTypeAllBearers ); - // decide which bearer, read bearer spec. data. - if ( *iWapBearer == TPtrC(WAP_IP_BEARER) ) - { - if ( ( *iIapServiceType == TPtrC(DIAL_OUT_ISP) ) || - ( *iIapServiceType == TPtrC(DIAL_IN_ISP) ) ) - { - // now check speed - if ( iIspBearerType == EBearerTypeCSD ) - { - retval = EApBearerTypeCSD; - } - else - { - if ( iIspBearerType == EBearerTypeHSCSD ) - { - retval = EApBearerTypeHSCSD; - } - else - { - User::Leave( KErrInvalidBearer ); - } - } - } - else - { - if ( ( *iIapServiceType == TPtrC(OUTGOING_WCDMA) ) || - ( *iIapServiceType == TPtrC(INCOMING_WCDMA) ) ) - { - retval = EApBearerTypeGPRS; - } - else - { // some other bearer, currently only VPN... - if ( iExt->iIsVpnAp ) - { - // in this case get REAL IAP's bearer type... - retval = iExt->iVPnRealIapBearerType; - } - else - { - if ( iExt->iWlanData ) - { - // check if it is WLAN... - if ( *iIapServiceType == TPtrC(LAN_SERVICE) ) - { - if ( IsWlan() ) - { - retval = EApBearerTypeWLAN; - } - else - { - if ( *iExt->iLanBearerModemName == - KModemBearerLANModem ) - {// IPPass Through - retval = EApBearerTypeLANModem; - } - else - { - #ifdef __TEST_LAN_BEARER - retval = EApBearerTypeLAN; - #else - User::Leave( KErrInvalidBearer ); - #endif // __TEST_LAN_BEARER - } - } - } - else - { // otherwise, it is not known, invalid... - User::Leave( KErrInvalidBearer ); - } - } - else - { - if ( *iExt->iLanBearerModemName == - KModemBearerLANModem ) - {// IPPass Through - retval = EApBearerTypeLANModem; - } - else - { - #ifdef __TEST_LAN_BEARER - retval = EApBearerTypeLAN; - #else // __TEST_LAN_BEARER - User::Leave( KErrInvalidBearer ); - #endif // __TEST_LAN_BEARER - } - } - } - } - } - } - else - { - User::Leave( KErrInvalidBearer ); - } - if ( retval == EApBearerTypeAllBearers ) - { - User::Leave( KErrInvalidBearer ); - } - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::BearerTypeL" ) ) ); - return retval; + User::Leave( KErrNotSupported ); } @@ -3591,122 +623,6 @@ // EXPORT_C void CApAccessPointItem::SetBearerTypeL( TApBearerType aBearer ) { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::SetBearerTypeL" ) ) ); - - HBufC* tmpbuf; - switch ( aBearer ) - { - case EApBearerTypeGPRS: // GPRS - { - tmpbuf = TPtrC(WAP_IP_BEARER).AllocL(); - delete iWapBearer; - iWapBearer = tmpbuf; - WriteTextL( EApIapServiceType, TPtrC(OUTGOING_WCDMA) ); - WriteTextL( EApIspIfParams, KDefGprsIfParams ); // required ! - if( iExt->iWlanData ) - { - iExt->iWlanData->iIsWlan = EFalse; - } - WriteTextL( EApLanBearerName, KModemBearerGPRS ); - break; - } - case EApBearerTypeCSD: // CSD - { - if ( !iExt->iIsAppCsdSupport ) - { - User::Leave( KErrNotSupported ); - } - - tmpbuf = TPtrC(WAP_IP_BEARER).AllocL(); - delete iWapBearer; - iWapBearer = tmpbuf; - WriteTextL( EApIapServiceType, TPtrC(DIAL_OUT_ISP) ); - WriteTextL( EApIspIfParams, KEmpty ); // required ! - iIspBearerType = EBearerTypeCSD; - if( iExt->iWlanData ) - { - iExt->iWlanData->iIsWlan = EFalse; - } - WriteTextL( EApLanBearerName, KModemBearerCSD ); - LimitIp6DNSL(); - break; - } - case EApBearerTypeHSCSD: // HSCSD - { - if ( !iExt->iIsAppHscsdSupport || !iExt->iIsAppCsdSupport ) - { - User::Leave( KErrNotSupported ); - } - tmpbuf = TPtrC(WAP_IP_BEARER).AllocL(); - delete iWapBearer; - iWapBearer = tmpbuf; - WriteTextL( EApIapServiceType, TPtrC(DIAL_OUT_ISP) ); - WriteTextL( EApIspIfParams, KEmpty ); // required ! - iIspBearerType = EBearerTypeHSCSD; - if( iExt->iWlanData ) - { - iExt->iWlanData->iIsWlan = EFalse; - } - WriteTextL( EApLanBearerName, KModemBearerCSD ); - LimitIp6DNSL(); - break; - } - case EApBearerTypeWLAN: // WLAN - { - if( !iExt->iWlanData ) - { - User::Leave( KErrNotSupported ); - } - tmpbuf = TPtrC(WAP_IP_BEARER).AllocL(); - delete iWapBearer; - iWapBearer = tmpbuf; - WriteTextL( EApIapServiceType, TPtrC(LAN_SERVICE) ); - WriteTextL( EApIspIfParams, KEmpty ); // required ! - WriteTextL( EApLanBearerName, KModemBearerWLAN ); - iExt->iWlanData->iIsWlan = ETrue; - break; - } -#ifdef __TEST_LAN_BEARER - case EApBearerTypeLAN: // LAN - { - tmpbuf = TPtrC(WAP_IP_BEARER).AllocL(); - delete iWapBearer; - iWapBearer = tmpbuf; - WriteTextL( EApIapServiceType, TPtrC(LAN_SERVICE) ); - WriteTextL( EApIspIfParams, KEmpty ); // required ! - if( iExt->iWlanData ) - { - iExt->iWlanData->iIsWlan = EFalse; - } - WriteTextL( EApLanBearerName, KModemBearerLAN ); - break; - } -#endif // __TEST_LAN_BEARER - case EApBearerTypeLANModem: // LAN modem - { - tmpbuf = TPtrC(WAP_IP_BEARER).AllocL(); - delete iWapBearer; - iWapBearer = tmpbuf; - WriteTextL( EApIapServiceType, TPtrC(LAN_SERVICE) ); - WriteTextL( EApIspIfParams, KEmpty ); // required ! - if( iExt->iWlanData ) - { - iExt->iWlanData->iIsWlan = EFalse; - } - WriteTextL( EApLanBearerName, KModemBearerLANModem ); - break; - } - default: - { - User::Leave( KErrInvalidBearer ); - break; - } - } - LimitSpeedL(); - - SetIfNetworksL(); - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::SetBearerTypeL" ) ) ); } @@ -3717,14 +633,6 @@ // EXPORT_C void CApAccessPointItem::SetNamesL( const TDesC16& aValue ) { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::SetNamesL" ) ) ); - - WriteTextL( EApWapAccessPointName, aValue ); - WriteTextL( EApIapName, aValue ); - WriteTextL( EApIspName, aValue ); - WriteTextL( EApNetworkName, aValue ); - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::SetNamesL" ) ) ); } @@ -3735,11 +643,7 @@ // EXPORT_C TBool CApAccessPointItem::SanityCheckOk() { - CLOG( ( EApItem, 0, _L( "<-> CApAccessPointItem::SanityCheckOk" ) ) ); - - TBool retval( ETrue ); - // as iWApIspType had been deprecated, this method also... - return retval; + return EFalse; } @@ -3751,97 +655,7 @@ EXPORT_C TBool CApAccessPointItem::HasSameIspAndBearerL( CApAccessPointItem& aItem ) { - CLOG( ( EApItem, 0, - _L( "-> CApAccessPointItem::HasSameIspAndBearerL" ) ) ); - - TBool retval( EFalse ); - TApBearerType bearer = BearerTypeL(); - if ( bearer == aItem.BearerTypeL() ) - { - switch ( bearer ) - { - case EApBearerTypeCSD: - case EApBearerTypeHSCSD: - { - // compare phone number, username, pwd - // first compare phone numbers - if ( IsSamePhoneNumberL( aItem ) ) - { - TBool pwd1; - ReadBool( EApIspPromptForLogin, pwd1 ); - TBool pwd2; - aItem.ReadBool( EApIspPromptForLogin, pwd2 ); - if ( ( !pwd1 ) && ( !pwd2 ) ) - { - HBufC* tmpuser = HBufC::NewLC( - aItem.ReadTextLengthL( EApIspLoginName ) ); - HBufC* tmppwd = HBufC::NewLC( - aItem.ReadTextLengthL( EApIspLoginPass ) ); - TPtr16 tmpptruser( tmpuser->Des() ); - TPtr16 tmpptrpwd( tmppwd->Des() ); - aItem.ReadTextL( EApIspLoginName, tmpptruser ); - aItem.ReadTextL( EApIspLoginPass, tmpptrpwd ); - if ( ( iUserName->Compare( *tmpuser ) == 0 ) - && (iPassword->Compare( *tmppwd ) == 0 ) ) - { - retval = ETrue; - } - // tmpuser, tmppw - CleanupStack::PopAndDestroy( 2, tmpuser ); - } - } - break; - } - case EApBearerTypeGPRS: - { - // compare APN, (username/pwd?) - if ( aItem.ReadConstLongTextL( EApGprsAccessPointName ) - ->Compare( *iGprsAccessPointName ) == 0 ) - { - retval = ETrue; - } - break; - } - case EApBearerTypeCDMA: - { - retval = ETrue; - break; - } - case EApBearerTypeWLAN: - { - if( iExt->iWlanData ) - { - retval = ETrue; - } - else - { - User::Leave( KErrNotSupported ); - } - break; - } -#ifdef __TEST_LAN_BEARER - case EApBearerTypeLAN: - { - retval = ETrue; - break; - } -#endif // __TEST_LAN_BEARER - case EApBearerTypeLANModem: - { - retval = ETrue; - break; - } - default: - { - User::Leave( KErrInvalidBearer ); - break; - } - } - } - - CLOG( ( EApItem, 1, - _L( "<- CApAccessPointItem::HasSameIspAndBearerL" ) ) ); - return retval; + return EFalse; } @@ -3851,9 +665,7 @@ // EXPORT_C TBool CApAccessPointItem::IsReadOnly() const { - CLOG( ( EApItem, 0, _L( "<-> CApAccessPointItem::IsReadOnly" ) ) ); - - return iIsReadOnly; + return EFalse; } @@ -3869,7 +681,7 @@ // TBool CApAccessPointItem::IsVpnAp() const { - return iExt->iIsVpnAp; + return EFalse; } @@ -3879,7 +691,6 @@ // void CApAccessPointItem::SetVpnAp( TBool aIsVpn ) { - iExt->iIsVpnAp = aIsVpn; } // --------------------------------------------------------- @@ -3888,9 +699,7 @@ // TBool CApAccessPointItem::Specified( TApMember aMember ) { - CLOG( ( EApItem, 0, _L( "<-> CApAccessPointItem::Specified" ) ) ); - - return iSpecified->At( aMember ); + return EFalse; } @@ -3900,9 +709,6 @@ // void CApAccessPointItem::Specify( TApMember aMember, TBool aOn ) { - CLOG( ( EApItem, 0, _L( "<-> CApAccessPointItem::Specify" ) ) ); - - iSpecified->At( aMember ) = aOn; } @@ -3912,14 +718,6 @@ // void CApAccessPointItem::SpecifyAll( TBool aOn ) { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::SpecifyAll" ) ) ); - - for( TInt i=0; i< KApMembers; i++ ) - { - iSpecified->At( i ) = aOn; - } - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::SpecifyAll" ) ) ); } @@ -3930,17 +728,6 @@ // void CApAccessPointItem::SpecifyWap( TBool aOn ) { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::SpecifyWap" ) ) ); - - iSpecified->At( EApWapAccessPointID ) = aOn; - iSpecified->At( EApWapAccessPointName ) = aOn; - iSpecified->At( EApWapCurrentBearer ) = aOn; - iSpecified->At( EApWapStartPage ) = aOn; - iSpecified->At( EApWapGatewayAddress ) = aOn; - iSpecified->At( EApWapWspOption ) = aOn; - iSpecified->At( EApWapSecurity ) = aOn; - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::SpecifyWap" ) ) ); } @@ -3951,17 +738,6 @@ // void CApAccessPointItem::SpecifyIpBearer( TBool aOn ) { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::SpecifyIpBearer" ) ) ); - -//* DEPRECATED - iSpecified->At( EApWapIsp ) = EFalse; -//* DEPRECATED - iSpecified->At( EApWapChargecard ) = EFalse; - iSpecified->At( EApWapIap ) = aOn; -//* DEPRECATED - iSpecified->At( EApWapIspType ) = EFalse; - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::SpecifyIpBearer" ) ) ); } @@ -3971,15 +747,6 @@ // void CApAccessPointItem::SpecifyIAP( TBool aOn ) { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::SpecifyIAP" ) ) ); - - iSpecified->At( EApWapIap ) = aOn; - iSpecified->At( EApIapName ) = aOn; - iSpecified->At( EApIapServiceType ) = aOn; - iSpecified->At( EApIapServiceId ) = aOn; - iSpecified->At( EApIapChargecard ) = aOn; - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::SpecifyIAP" ) ) ); } @@ -3989,61 +756,6 @@ // void CApAccessPointItem::SpecifyISP( TBool aOn ) { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::SpecifyISP" ) ) ); - - iSpecified->At( EApIspName ) = aOn; - iSpecified->At( EApIspDescription ) = aOn; - iSpecified->At( EApIspIspType ) = aOn; - - iSpecified->At( EApIspDefaultTelNumber ) = aOn; - iSpecified->At( EApIspDialResolution ) = aOn; - iSpecified->At( EApIspUseLoginScript ) = aOn; - iSpecified->At( EApIspLoginScript ) = aOn; - iSpecified->At( EApIspPromptForLogin ) = aOn; - iSpecified->At( EApIspLoginName ) = aOn; - iSpecified->At( EApIspLoginPass ) = aOn; - iSpecified->At( EApIspDisplayPCT ) = aOn; - iSpecified->At( EApIspIfName ) = aOn; - iSpecified->At( EApIspIfParams ) = aOn; - iSpecified->At( EApIspIfNetworks ) = aOn; - iSpecified->At( EApIspIfPromptForAuth ) = aOn; - iSpecified->At( EApIspIfAuthName ) = aOn; - iSpecified->At( EApIspIfAuthPass ) = aOn; - iSpecified->At( EApIspAuthRetries ) = aOn; - iSpecified->At( EApIspIfCallbackEnabled ) = aOn; - iSpecified->At( EApIspIfCallbackType ) = aOn; - iSpecified->At( EApIspIfCallbackInfo ) = aOn; - iSpecified->At( EApIspCallBackTimeOut ) = aOn; - iSpecified->At( EApIspIPAddrFromServer ) = aOn; - iSpecified->At( EApIspIPAddr ) = aOn; - iSpecified->At( EApIspIPNetMask ) = aOn; - iSpecified->At( EApIspIPGateway ) = aOn; - iSpecified->At( EApIspIPDnsAddrFromServer ) = aOn; - iSpecified->At( EApIspIPNameServer1 ) = aOn; - iSpecified->At( EApIspIPNameServer2 ) = aOn; - iSpecified->At( EApIspEnableIpHeaderComp ) = aOn; - iSpecified->At( EApIspEnableLCPExtensions ) = aOn; - iSpecified->At( EApIspDisablePlainTextAuth ) = aOn; - iSpecified->At( EApIspEnableSWCompression ) = aOn; - iSpecified->At( EApIspBearerName ) = aOn; - iSpecified->At( EApIspBearerSpeed ) = aOn; - iSpecified->At( EApIspBearerCallTypeIsdn ) = aOn; - iSpecified->At( EApIspBearerCE ) = aOn; - iSpecified->At( EApIspInitString ) = aOn; - iSpecified->At( EApIspBearerType ) = aOn; - iSpecified->At( EApIspChannelCoding ) = aOn; - iSpecified->At( EApIspAIUR ) = aOn; - iSpecified->At( EApIspRequestedTimeSlots ) = aOn; - iSpecified->At( EApIspMaximumTimeSlots ) = aOn; - - if ( iExt->iIsIpv6Supported ) - { - iSpecified->At( EApIP6DNSAddrFromServer ) = aOn; - iSpecified->At( EApIP6NameServer1 ) = aOn; - iSpecified->At( EApIP6NameServer2 ) = aOn; - } - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::SpecifyISP" ) ) ); } @@ -4053,44 +765,6 @@ // void CApAccessPointItem::SpecifyGPRS( TBool aOn ) { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::SpecifyGPRS" ) ) ); - - iSpecified->At( EApGprsAccessPointName ) = aOn; - iSpecified->At( EApGprsPdpType ) = aOn; - iSpecified->At( EApGprsPdpAddress ) = aOn; - iSpecified->At( EApGprsReqPrecedence ) = aOn; - iSpecified->At( EApGprsReqDelay ) = aOn; - iSpecified->At( EApGprsReqReliability ) = aOn; - iSpecified->At( EApGprsReqPeakThroughput ) = aOn; - iSpecified->At( EApGprsReqMeanPeakThroughput ) = aOn; - iSpecified->At( EApGprsMinPrecedence ) = aOn; - iSpecified->At( EApGprsMinDelay ) = aOn; - iSpecified->At( EApGprsMinReliability ) = aOn; - iSpecified->At( EApGprsMinPeakThroughput ) = aOn; - iSpecified->At( EApGprsMinMeanThroughput ) = aOn; - iSpecified->At( EApGprsUseAnonymAccess ) = aOn; - - // followings are mapped to ISP... fields - iSpecified->At( EApGprsDataCompression ) = aOn; - iSpecified->At( EApGprsHeaderCompression ) = aOn; - iSpecified->At( EApGprsIfName ) = aOn; - iSpecified->At( EApGprsIfParams ) = aOn; - iSpecified->At( EApGprsIfNetworks ) = aOn; - iSpecified->At( EApGprsIfPromptForAuth ) = aOn; - iSpecified->At( EApGprsIfAuthName ) = aOn; - iSpecified->At( EApGprsIfAuthPassword ) = aOn; - iSpecified->At( EApGprsIfAuthRetries ) = aOn; - iSpecified->At( EApGprsIpNetMask ) = aOn; - iSpecified->At( EApGprsIpGateway ) = aOn; - iSpecified->At( EApGprsIpAddrFromServer ) = aOn; - iSpecified->At( EApGprsIpAddr ) = aOn; - iSpecified->At( EApGprsIpDnsAddrFromServer ) = aOn; - iSpecified->At( EApGprsIPNameServer1 ) = aOn; - iSpecified->At( EApGprsIPNameServer2 ) = aOn; - iSpecified->At( EApGprsEnableLCPExtensions ) = aOn; - iSpecified->At( EApGprsDisablePlainTextAuth ) = aOn; - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::SpecifyGPRS" ) ) ); } @@ -4100,73 +774,6 @@ // void CApAccessPointItem::SpecifyCDMA( TBool aOn ) { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::SpecifyCDMA" ) ) ); - - __ASSERT_DEBUG( iExt->iCdmaData, ApCommons::Panic( ESanityCheckFailed ) ); - - iSpecified->At( EApCdmaIwfName ) = aOn; - iSpecified->At( EApCdmaServiceOption ) = aOn; - iSpecified->At( EApCdmaPdpType ) = aOn; - iSpecified->At( EApCdmaPdpAddress ) = aOn; - iSpecified->At( EApCdmaReqFwdPriority ) = aOn; - iSpecified->At( EApCdmaReqRevPriority ) = aOn; - iSpecified->At( EApCdmaReqFwdBitrate ) = aOn; - iSpecified->At( EApCdmaReqRevBitrate ) = aOn; - iSpecified->At( EApCdmaReqFwdLoss ) = aOn; - iSpecified->At( EApCdmaReqRevLoss ) = aOn; - iSpecified->At( EApCdmaReqFwdMaxDelay ) = aOn; - iSpecified->At( EApCdmaReqRevMaxDelay ) = aOn; - iSpecified->At( EApCdmaMinFwdBitrate ) = aOn; - iSpecified->At( EApCdmaMinRevBitrate ) = aOn; - iSpecified->At( EApCdmaAccptFwdLoss ) = aOn; - iSpecified->At( EApCdmaAccptRevLoss ) = aOn; - iSpecified->At( EApCdmaAccptFwdMaxDelay ) = aOn; - iSpecified->At( EApCdmaAccptRevMaxDelay ) = aOn; - // CDMA2000, mapped to ISP... fields - iSpecified->At( EApCdmaDataCompression ) = aOn; - iSpecified->At( EApCdmaHeaderCompression ) = aOn; - iSpecified->At( EApCdmaAnonymousAccess ) = aOn; - iSpecified->At( EApCdmaIfName ) = aOn; - iSpecified->At( EApCdmaIfParams ) = aOn; - iSpecified->At( EApCdmaIfNetworks ) = aOn; - iSpecified->At( EApCdmaIfPromptForAuth ) = aOn; - iSpecified->At( EApCdmaIfAuthName ) = aOn; - iSpecified->At( EApCdmaIfAuthPassword ) = aOn; - iSpecified->At( EApCdmaIfAuthRetries ) = aOn; - iSpecified->At( EApCdmaIpNetMask ) = aOn; - iSpecified->At( EApCdmaIpGateway ) = aOn; - iSpecified->At( EApCdmaIpAddrFromServer ) = aOn; - iSpecified->At( EApCdmaIpAddr ) = aOn; - iSpecified->At( EApCdmaIpDnsAddrFromServer ) = aOn; - iSpecified->At( EApCdmaIPNameServer1 ) = aOn; - iSpecified->At( EApCdmaIPNameServer2 ) = aOn; - iSpecified->At( EApCdmaEnableLCPExtensions ) = aOn; - iSpecified->At( EApCdmaDisablePlainTextAuth ) = aOn; - // CDMA2000 - iSpecified->At( EApCdmaApType ) = aOn; - iSpecified->At( EApCdmaQosWarningTimeout ) = aOn; - iSpecified->At( EApCdmaRlpMode ) = aOn; - // CDMA2000 deprecated Mobile IP fields - iSpecified->At( EApCdmaMip ) = aOn; - iSpecified->At( EApCdmaHomeAgentAddress ) = aOn; - iSpecified->At( EApCdmaMipTimeout ) = aOn; - // CDMA2000 specific CDMA parameters provisioned through OTA - iSpecified->At( EApCdmaNaiType ) = aOn; - iSpecified->At( EApCdmaSimpleIpAuthAlgorithm ) = aOn; - iSpecified->At( EApCdmaSimpleIpPapSsHandle ) = aOn; - iSpecified->At( EApCdmaSimpleIpChapSsHandle ) = aOn; - iSpecified->At( EApCdmaMipTBit ) = aOn; - iSpecified->At( EApCdmaMipHomeAddress ) = aOn; - iSpecified->At( EApCdmaMipPrimaryHomeAgent ) = aOn; - iSpecified->At( EApCdmaMipSecondaryHomeAgent ) = aOn; - iSpecified->At( EApCdmaMipMnAaaAuthAlgorithm ) = aOn; - iSpecified->At( EApCdmaMipMnAaaSpi ) = aOn; - iSpecified->At( EApCdmaMipMnAaaSsHandle ) = aOn; - iSpecified->At( EApCdmaMipMnHaAuthAlgorithm ) = aOn; - iSpecified->At( EApCdmaMipMnHaSpi ) = aOn; - iSpecified->At( EApCdmaMipMnHaSsHandle ) = aOn; - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::SpecifyCDMA" ) ) ); } @@ -4176,25 +783,6 @@ // void CApAccessPointItem::SpecifyWLAN( TBool aOn ) { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::SpecifyWLAN" ) ) ); - - __ASSERT_DEBUG( iExt->iWlanData, ApCommons::Panic( ESanityCheckFailed ) ); - - // WLAN, mapped to ISP... fields - iSpecified->At( EApWlanIfNetworks ) = aOn; - iSpecified->At( EApWlanIfPromptForAuth ) = aOn; - iSpecified->At( EApWlanIfAuthName ) = aOn; - iSpecified->At( EApWlanIfAuthPassword ) = aOn; - iSpecified->At( EApWlanIfAuthRetries ) = aOn; - iSpecified->At( EApWlanIpNetMask ) = aOn; - iSpecified->At( EApWlanIpGateway ) = aOn; - iSpecified->At( EApWlanIpAddrFromServer ) = aOn; - iSpecified->At( EApWlanIpAddr ) = aOn; - iSpecified->At( EApWlanIpDnsAddrFromServer ) = aOn; - iSpecified->At( EApWlanIPNameServer1 ) = aOn; - iSpecified->At( EApWlanIPNameServer2 ) = aOn; - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::SpecifyWLAN" ) ) ); } @@ -4204,19 +792,6 @@ // void CApAccessPointItem::SetDnsIpFromServer() { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::SetDnsIpFromServer" ) ) ); - - if ( ( iPrimaryDNS->Compare( KDynIpAddress ) == 0 ) && - ( iSecondaryDNS->Compare( KDynIpAddress ) == 0 ) ) - { - iGetDNSIPFromServer = ETrue; - } - else - { - iGetDNSIPFromServer = EFalse; - } - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::SetDnsIpFromServer" ) ) ); } @@ -4227,18 +802,6 @@ // void CApAccessPointItem::SetIpFromServer() { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::SetIpFromServer" ) ) ); - - if ( iIspIPAddr->Compare( KDynIpAddress ) == 0 ) - { - iIspIPAddrFromServer = ETrue; - } - else - { - iIspIPAddrFromServer = EFalse; - } - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::SetIpFromServer" ) ) ); } @@ -4249,42 +812,6 @@ // void CApAccessPointItem::SetDns6IpFromServer() { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::SetDns6IpFromServer" ) ) ); - - if ( iExt->iIsIpv6Supported ) - { - if ( ( iExt->iIpv6PrimaryDNS->Compare( KDynIpv6Address ) == 0 ) && - ( iExt->iIpv6SecondaryDNS->Compare( KDynIpv6Address ) == 0 ) ) - { - - TApBearerType bt(EApBearerTypeGPRS); - TInt err(KErrNone); - TRAP( err, bt = BearerTypeL() ); - if ( err == KErrNone ) - { - switch (bt) - { - case EApBearerTypeCSD: - case EApBearerTypeHSCSD: - { // consider it user defined - iExt->iIpv6GetDNSIPFromServer = EFalse; - break; - } - default: - { - iExt->iIpv6GetDNSIPFromServer = ETrue; - break; - } - } - } - } - else - { - iExt->iIpv6GetDNSIPFromServer = EFalse; - } - } - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::SetDns6IpFromServer" ) ) ); } @@ -4294,16 +821,6 @@ // void CApAccessPointItem::ReAllocL(HBufC8*& aDes, const TDesC8& aValue) { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::ReAllocL8" ) ) ); - - // now remove 'invalid' chars (TABs) as they cause problems - // in other places, like listboxes... - HBufC8* tmp = RemoveInvalidCharsLC( aValue ); - delete aDes; - aDes = tmp; - CleanupStack::Pop( tmp ); - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::ReAllocL8" ) ) ); } @@ -4313,16 +830,6 @@ // void CApAccessPointItem::ReAllocL(HBufC*& aDes, const TDesC16& aValue) { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::ReAllocL" ) ) ); - - // now remove 'invalid' chars (TABs) as they cause problems - // in other places, like listboxes... - HBufC* tmp = RemoveInvalidCharsLC( aValue ); - delete aDes; - aDes = tmp; - CleanupStack::Pop( tmp ); - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::ReAllocL" ) ) ); } @@ -4333,109 +840,7 @@ // TBool CApAccessPointItem::DoCompareApL( const CApAccessPointItem& aItem )const { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::DoCompareApL" ) ) ); - - TBool retval( EFalse ); - // sorry for those CONST_CASTS, but could not do it otherwise - // without API breask.... - CApAccessPointItem* thisitem = CONST_CAST( CApAccessPointItem*, this ); - CApAccessPointItem* otheritem = CONST_CAST( CApAccessPointItem*, &aItem ); - - TApBearerType thisbearer = thisitem->BearerTypeL(); - if ( thisbearer == otheritem->BearerTypeL() ) - { // if diff. bearers, compareing might give false results - // compare WAP: - // expect IAP ID - if ( CompareWap( aItem ) ) - { - switch ( thisbearer ) - { - case EApBearerTypeCSD: - case EApBearerTypeHSCSD: - { - // compare IAP - if ( CompareIap( aItem ) ) - { - // compare ISP - if ( CompareIsp( aItem ) ) - { - if ( CompareProxy( aItem ) ) - { - retval = ETrue; - } - } - } - break; - } - case EApBearerTypeGPRS: - { - // compare IAP - if ( CompareIap( aItem ) ) - { - // comapre GPRS - if ( CompareGprs( aItem ) ) - { - if ( CompareProxy( aItem ) ) - { - retval = ETrue; - } - } - } - break; - } - case EApBearerTypeCDMA: - { - // compare IAP - if ( CompareIap( aItem ) ) - { - // comapre CDMA - if ( CompareCdma( aItem ) ) - { - if ( CompareProxy( aItem ) ) - { - retval = ETrue; - } - } - } - break; - } - case EApBearerTypeWLAN: - { - if ( iExt->iWlanData ) - { - // Compare Iap - if ( CompareIap( aItem ) ) - { - // Check compareing for WLAN and LAN!!! - // Compare WLAN - if ( CompareWlan( aItem ) ) - { - if ( CompareProxy( aItem ) ) - { - retval = ETrue; - } - } - } - } - else - { - User::Leave( KErrNotSupported ); - } - break; - } - default: - { - // KErrInvalidBearer, but can not Leave here, - // so just return False - // retval is already False, nothing to do - break; - } - } - } - } - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::DoCompareApL" ) ) ); - return retval; + return EFalse; } @@ -4446,48 +851,7 @@ // TBool CApAccessPointItem::CompareWap( const CApAccessPointItem& aItem ) const { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::CompareWap" ) ) ); - - TBool retval( EFalse ); -// WAP AP Table -/* -WAP_CURRENT_BEARER -WAP_START_PAGE -*/ - -// WAP IP Bearer Table -/* - -- WAP_ACCESS_POINT_ID -WAP_GATEWAY_ADDRESS - -- WAP_IAP - -- WAP_ISP - -- WAP_CHARGECARD -WAP_ISP_TYPE -WAP_WSP_OPTION -WAP_SECURITY -*/ - - if ( BOOL_COMPARE( iIsWTLSSecurityOn, aItem.iIsWTLSSecurityOn ) - && ( iIsConnectionTypeContinuous == aItem.iIsConnectionTypeContinuous ) - ) - { - if ( - ( iWapAccessPointName->Compare( *aItem.iWapAccessPointName ) == 0 ) - && ( iWapBearer->Compare( *aItem.iWapBearer ) == 0 ) - && ( iStartingPage->Compare( *aItem.iStartingPage ) == 0 ) - && ( iWapGatewayAddress->Compare( *aItem.iWapGatewayAddress ) == 0 ) - && ( iWapProxyLoginName->Compare( - *aItem.iWapProxyLoginName ) == 0 ) - && ( iWapProxyLoginPass->Compare( - *aItem.iWapProxyLoginPass ) == 0 ) - ) - { - retval = ETrue; - } - } - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::CompareWap" ) ) ); - return retval; + return EFalse; } @@ -4498,28 +862,7 @@ // TBool CApAccessPointItem::CompareIap( const CApAccessPointItem& aItem ) const { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::CompareIap" ) ) ); - - TBool retval( EFalse ); -// WAP IAP Table -/* -COMMDB_NAME --- IAP_SERVICE _S("IAPService") -IAP_SERVICE_TYPE _S("IAPServiceType") --- IAP_CHARGECARD _S("Chargecard") -*/ - if ( - ( iIapName->Compare( *aItem.iIapName ) == 0 ) - && ( iIapServiceType->Compare( *aItem.iIapServiceType ) == 0 ) - && ( iNetworkName->Compare( *aItem.iNetworkName ) == 0 ) - && ( iNetworkId == aItem.iNetworkId ) - ) - { - retval = ETrue; - } - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::CompareIap" ) ) ); - return retval; + return EFalse; } @@ -4531,86 +874,7 @@ // TBool CApAccessPointItem::CompareIsp( const CApAccessPointItem& aItem ) const { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::CompareIsp" ) ) ); - - TBool retval( EFalse ); - if ( - BOOL_COMPARE( iIspDialResolution , aItem.iIspDialResolution ) - && BOOL_COMPARE( iUseLoginScript, aItem.iUseLoginScript ) - && BOOL_COMPARE( iPromptPassword, aItem.iPromptPassword ) - && BOOL_COMPARE( iDisplayTerminalWindow, aItem.iDisplayTerminalWindow ) - && BOOL_COMPARE( iIspIfPromptForAuth, aItem.iIspIfPromptForAuth ) - && iIspIfAuthRetries == aItem.iIspIfAuthRetries - && BOOL_COMPARE( iUseCallBack, aItem.iUseCallBack ) - && iCallBackTypeIsServerNum == aItem.iCallBackTypeIsServerNum - && iIspCallbackTimeOut == aItem.iIspCallbackTimeOut - && BOOL_COMPARE( iIspIPAddrFromServer, aItem.iIspIPAddrFromServer ) - && BOOL_COMPARE( iGetDNSIPFromServer, aItem.iGetDNSIPFromServer ) - && BOOL_COMPARE( iEnablePPPCompression, aItem.iEnablePPPCompression ) - && BOOL_COMPARE( iIspEnableLCPExtensions, - aItem.iIspEnableLCPExtensions ) - && BOOL_COMPARE( iIsPasswordAuthenticationSecure, - aItem.iIsPasswordAuthenticationSecure ) - && BOOL_COMPARE( iIspEnableSwCompression, - aItem.iIspEnableSwCompression ) - && iIspBearerName == aItem.iIspBearerName - && iMaxConnSpeed == aItem.iMaxConnSpeed - && iIspBearerCE == aItem.iIspBearerCE - && iApIapBearerService == aItem.iApIapBearerService - && iIspBearerType == aItem.iIspBearerType - && iBearerCallTypeIsdn == aItem.iBearerCallTypeIsdn - && iIspChannelCoding == aItem.iIspChannelCoding - && iIspAIUR == aItem.iIspAIUR - && iIspRequestedTimeSlots == aItem.iIspRequestedTimeSlots - && iIspMaximumTimeSlots == aItem.iIspMaximumTimeSlots - && ( - ( iExt->iIsIpv6Supported - && ( BOOL_COMPARE( iExt->iIpv6GetDNSIPFromServer, - aItem.iExt->iIpv6GetDNSIPFromServer ) ) ) - || !iExt->iIsIpv6Supported ) - ) - { - if ( - ( iIspName->Compare( *aItem.iIspName ) == 0 ) - && ( iIspDescription->Compare( *aItem.iIspDescription ) == 0 ) - && - ( iIspDefaultTelNumber->Compare( - *aItem.iIspDefaultTelNumber ) == 0 ) - && ( iLoginScript->Compare( *aItem.iLoginScript ) == 0 ) - && ( iUserName->Compare( *aItem.iUserName ) == 0 ) - && ( iPassword->Compare( *aItem.iPassword ) == 0 ) - && ( iIspIfName->Compare( *aItem.iIspIfName ) == 0 ) - && ( iIspIfParams->Compare( *aItem.iIspIfParams ) == 0 ) - && ( iIspIfNetworks->Compare( *aItem.iIspIfNetworks ) == 0 ) - && ( iIspIfAuthName->Compare( *aItem.iIspIfAuthName ) == 0 ) - && ( iIspIfAuthPass->Compare( *aItem.iIspIfAuthPass ) == 0 ) - && - ( iIspIfCallbackInfo->Compare( *aItem.iIspIfCallbackInfo ) == 0 ) - && ( iIspIPAddr->Compare( *aItem.iIspIPAddr ) == 0 ) - && ( iIspIPNetMask->Compare( *aItem.iIspIPNetMask ) == 0 ) - && ( iIspGateway->Compare( *aItem.iIspGateway ) == 0 ) - && ( iPrimaryDNS->Compare( *aItem.iPrimaryDNS ) == 0 ) - && ( iSecondaryDNS->Compare( *aItem.iSecondaryDNS ) == 0 ) - && ( iIspInitString->Compare( *aItem.iIspInitString ) == 0 ) - && ( - ( iExt->iIsIpv6Supported && - ( - ( iExt->iIpv6PrimaryDNS->Compare( - *aItem.iExt->iIpv6PrimaryDNS ) == 0 ) - && - ( iExt->iIpv6SecondaryDNS->Compare( - *aItem.iExt->iIpv6SecondaryDNS ) == 0 ) - ) - || !iExt->iIsIpv6Supported ) - ) - ) - { - retval = ETrue; - } - } - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::CompareIsp" ) ) ); - return retval; + return EFalse; } @@ -4622,78 +886,7 @@ // TBool CApAccessPointItem::CompareGprs( const CApAccessPointItem& aItem ) const { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::CompareGprs" ) ) ); - - TBool retval( EFalse ); - - if ( - iGprsPdpType == aItem.iGprsPdpType -// - && BOOL_COMPARE( iIspIfPromptForAuth, aItem.iIspIfPromptForAuth ) - && iIspIfAuthRetries == aItem.iIspIfAuthRetries - && BOOL_COMPARE( iIspIPAddrFromServer, aItem.iIspIPAddrFromServer ) - && BOOL_COMPARE( iGetDNSIPFromServer, aItem.iGetDNSIPFromServer ) - && BOOL_COMPARE( iEnablePPPCompression, aItem.iEnablePPPCompression ) - && BOOL_COMPARE( iIspEnableLCPExtensions, - aItem.iIspEnableLCPExtensions ) - && BOOL_COMPARE( iIsPasswordAuthenticationSecure, - aItem.iIsPasswordAuthenticationSecure ) - && BOOL_COMPARE( iIspEnableSwCompression, - aItem.iIspEnableSwCompression ) -// - && iGprsReqPrecedence == aItem.iGprsReqPrecedence - && iGprsReqDelay == aItem.iGprsReqDelay - && iGprsReqReliability == aItem.iGprsReqReliability - && iGprsReqPeakThroughput == aItem.iGprsReqPeakThroughput - && iGprsReqMeanPeakThroughput == aItem.iGprsReqMeanPeakThroughput - && iGprsMinPrecedence == aItem.iGprsMinPrecedence - && iGprsMinDelay == aItem.iGprsMinDelay - && iGprsMinReliability == aItem.iGprsMinReliability - && iGprsMinPeakThroughput == aItem.iGprsMinPeakThroughput - && iGprsMinMeanThroughput == aItem.iGprsMinMeanThroughput - && BOOL_COMPARE( iGprsUseAnonymAccess, aItem.iGprsUseAnonymAccess ) - && ( - ( iExt->iIsIpv6Supported - && (BOOL_COMPARE( iExt->iIpv6GetDNSIPFromServer, - aItem.iExt->iIpv6GetDNSIPFromServer ) ) ) - || ( !iExt->iIsIpv6Supported ) ) - ) - { - if ( - ( iGprsAccessPointName->Compare( - *aItem.iGprsAccessPointName ) == 0 ) -// - && ( iIspIfName->Compare( *aItem.iIspIfName ) == 0 ) - && ( iIspIfParams->Compare( *aItem.iIspIfParams ) == 0 ) - && ( iIspIfNetworks->Compare( *aItem.iIspIfNetworks ) == 0 ) - && ( iIspIfAuthName->Compare( *aItem.iIspIfAuthName ) == 0 ) - && ( iIspIfAuthPass->Compare( *aItem.iIspIfAuthPass ) == 0 ) - && ( iIspIPAddr->Compare( *aItem.iIspIPAddr ) == 0 ) - && ( iIspIPNetMask->Compare( *aItem.iIspIPNetMask ) == 0 ) - && ( iIspGateway->Compare( *aItem.iIspGateway ) == 0 ) - && ( iPrimaryDNS->Compare( *aItem.iPrimaryDNS ) == 0 ) - && ( iSecondaryDNS->Compare( *aItem.iSecondaryDNS ) == 0 ) -// - && ( iGprsPdpAddress->Compare( *aItem.iGprsPdpAddress ) == 0 ) - && ( - ( iExt->iIsIpv6Supported && - ( - ( iExt->iIpv6PrimaryDNS->Compare( - *aItem.iExt->iIpv6PrimaryDNS ) == 0 ) - && - ( iExt->iIpv6SecondaryDNS->Compare( - *aItem.iExt->iIpv6SecondaryDNS ) == 0 ) - ) - || !iExt->iIsIpv6Supported ) - ) - ) - { - retval = ETrue; - } - } - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::CompareGprs" ) ) ); - return retval; + return EFalse; } @@ -4704,133 +897,7 @@ // TBool CApAccessPointItem::CompareCdma( const CApAccessPointItem& aItem ) const { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::CompareCdma" ) ) ); - - TBool retval( EFalse ); - - __ASSERT_ALWAYS( iExt->iCdmaData, ApCommons::Panic( ESanityCheckFailed ) ); - - if ( - iExt->iCdmaData->iServiceOption == - aItem.iExt->iCdmaData->iServiceOption - && iExt->iCdmaData->iPdpType == aItem.iExt->iCdmaData->iPdpType - && iExt->iCdmaData->iReqFwdPriority == - aItem.iExt->iCdmaData->iReqFwdPriority - && iExt->iCdmaData->iReqRevPriority == - aItem.iExt->iCdmaData->iReqRevPriority - && iExt->iCdmaData->iReqFwdBitrate == - aItem.iExt->iCdmaData->iReqFwdBitrate - && iExt->iCdmaData->iReqRevBitrate == - aItem.iExt->iCdmaData->iReqRevBitrate - && iExt->iCdmaData->iReqFwdLoss == aItem.iExt->iCdmaData->iReqFwdLoss - && iExt->iCdmaData->iReqRevLoss == aItem.iExt->iCdmaData->iReqRevLoss - && iExt->iCdmaData->iReqFwdMaxDelay == - aItem.iExt->iCdmaData->iReqFwdMaxDelay - && iExt->iCdmaData->iReqRevMaxDelay == - aItem.iExt->iCdmaData->iReqRevMaxDelay - && iExt->iCdmaData->iMinFwdBitrate == - aItem.iExt->iCdmaData->iMinFwdBitrate - && iExt->iCdmaData->iMinRevBitrate == - aItem.iExt->iCdmaData->iMinRevBitrate - && iExt->iCdmaData->iAccptFwdLoss == - aItem.iExt->iCdmaData->iAccptFwdLoss - && iExt->iCdmaData->iAccptRevLoss == - aItem.iExt->iCdmaData->iAccptRevLoss - && iExt->iCdmaData->iAccptFwdMaxDelay == - aItem.iExt->iCdmaData->iAccptFwdMaxDelay - && iExt->iCdmaData->iAccptRevMaxDelay == - aItem.iExt->iCdmaData->iAccptRevMaxDelay -// - && BOOL_COMPARE( iIspIfPromptForAuth, aItem.iIspIfPromptForAuth ) - && iIspIfAuthRetries == aItem.iIspIfAuthRetries - && BOOL_COMPARE( iIspIPAddrFromServer, aItem.iIspIPAddrFromServer ) - && BOOL_COMPARE( iGetDNSIPFromServer, aItem.iGetDNSIPFromServer ) - && BOOL_COMPARE( iEnablePPPCompression, aItem.iEnablePPPCompression ) - && BOOL_COMPARE( iIspEnableLCPExtensions, - aItem.iIspEnableLCPExtensions ) - && BOOL_COMPARE( iIsPasswordAuthenticationSecure, - aItem.iIsPasswordAuthenticationSecure ) - && BOOL_COMPARE( iIspEnableSwCompression, - aItem.iIspEnableSwCompression ) -// - && iIspType == aItem.iIspType - && iExt->iCdmaData->iQosWarningTimeout == - aItem.iExt->iCdmaData->iQosWarningTimeout - && iExt->iCdmaData->iRlpMode == aItem.iExt->iCdmaData->iRlpMode - && BOOL_COMPARE( iExt->iCdmaData->iMip, aItem.iExt->iCdmaData->iMip ) - && iExt->iCdmaData->iMipTimeout == aItem.iExt->iCdmaData->iMipTimeout - && iExt->iCdmaData->iNaiType == aItem.iExt->iCdmaData->iNaiType - && iExt->iCdmaData->iSimpleIpAuthAlgorithm == - aItem.iExt->iCdmaData->iSimpleIpAuthAlgorithm - && iExt->iCdmaData->iSimpleIpPapSsHandle == - aItem.iExt->iCdmaData->iSimpleIpPapSsHandle - && iExt->iCdmaData->iSimpleIpChapSsHandle == - aItem.iExt->iCdmaData->iSimpleIpChapSsHandle - && iExt->iCdmaData->iMipTBit == aItem.iExt->iCdmaData->iMipTBit - && iExt->iCdmaData->iMipMnAaaAuthAlgorithm == - aItem.iExt->iCdmaData->iMipMnAaaAuthAlgorithm - && iExt->iCdmaData->iMipMnAaaSpi == - aItem.iExt->iCdmaData->iMipMnAaaSpi - && iExt->iCdmaData->iMipMnAaaSsHandle == - aItem.iExt->iCdmaData->iMipMnAaaSsHandle - && iExt->iCdmaData->iMipMnHaAuthAlgorithm == - aItem.iExt->iCdmaData->iMipMnHaAuthAlgorithm - && iExt->iCdmaData->iMipMnHaSpi == aItem.iExt->iCdmaData->iMipMnHaSpi - && iExt->iCdmaData->iMipMnHaSsHandle == - aItem.iExt->iCdmaData->iMipMnHaSsHandle -// - && BOOL_COMPARE( iGprsUseAnonymAccess, aItem.iGprsUseAnonymAccess ) - && ( - ( iExt->iIsIpv6Supported - && ( BOOL_COMPARE( iExt->iIpv6GetDNSIPFromServer, - aItem.iExt->iIpv6GetDNSIPFromServer ) ) ) - || ( !iExt->iIsIpv6Supported ) ) - ) - { - if ( - ( iExt->iCdmaData->iIwfName->Compare( - *aItem.iExt->iCdmaData->iIwfName ) == 0 ) - && ( iExt->iCdmaData->iPdpAddress->Compare( - *aItem.iExt->iCdmaData->iPdpAddress ) == 0 ) - && ( iExt->iCdmaData->iHomeAgentAddress->Compare( - *aItem.iExt->iCdmaData->iHomeAgentAddress ) == 0 ) - && ( iExt->iCdmaData->iMipHomeAddress->Compare( - *aItem.iExt->iCdmaData->iMipHomeAddress ) == 0 ) - && ( iExt->iCdmaData->iMipPrimaryHomeAgent->Compare( - *aItem.iExt->iCdmaData->iMipPrimaryHomeAgent ) == 0 ) - && ( iExt->iCdmaData->iMipSecondaryHomeAgent->Compare( - *aItem.iExt->iCdmaData->iMipSecondaryHomeAgent ) == 0 ) -// - && ( iIspIfName->Compare( *aItem.iIspIfName ) == 0 ) - && ( iIspIfParams->Compare( *aItem.iIspIfParams ) == 0 ) - && ( iIspIfNetworks->Compare( *aItem.iIspIfNetworks ) == 0 ) - && ( iIspIfAuthName->Compare( *aItem.iIspIfAuthName ) == 0 ) - && ( iIspIfAuthPass->Compare( *aItem.iIspIfAuthPass ) == 0 ) - && ( iIspIPAddr->Compare( *aItem.iIspIPAddr ) == 0 ) - && ( iIspIPNetMask->Compare( *aItem.iIspIPNetMask ) == 0 ) - && ( iIspGateway->Compare( *aItem.iIspGateway ) == 0 ) - && ( iPrimaryDNS->Compare( *aItem.iPrimaryDNS ) == 0 ) - && ( iSecondaryDNS->Compare( *aItem.iSecondaryDNS ) == 0 ) -// - && ( - ( iExt->iIsIpv6Supported && - ( - ( iExt->iIpv6PrimaryDNS->Compare( - *aItem.iExt->iIpv6PrimaryDNS ) == 0 ) - && - ( iExt->iIpv6SecondaryDNS->Compare( - *aItem.iExt->iIpv6SecondaryDNS ) == 0 ) - ) - || !iExt->iIsIpv6Supported ) - ) - ) - { - retval = ETrue; - } - } - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::CompareCdma" ) ) ); - return retval; + return EFalse; } @@ -4841,42 +908,7 @@ // TBool CApAccessPointItem::CompareWlan( const CApAccessPointItem& aItem ) const { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::CompareWlan" ) ) ); - - TBool retval( EFalse ); - - __ASSERT_ALWAYS( iExt->iWlanData, ApCommons::Panic( ESanityCheckFailed ) ); - __ASSERT_ALWAYS( aItem.iExt->iWlanData, - ApCommons::Panic( ESanityCheckFailed ) ); - - if ( - iExt->iWlanData->iWlanNetworkMode == - aItem.iExt->iWlanData->iWlanNetworkMode - && iExt->iWlanData->iScanSSID == aItem.iExt->iWlanData->iScanSSID - && iExt->iWlanData->iWlanSecurityMode == - aItem.iExt->iWlanData->iWlanSecurityMode - && iExt->iWlanData->iChannelId == - aItem.iExt->iWlanData->iChannelId - && BOOL_COMPARE( iGetDNSIPFromServer, aItem.iGetDNSIPFromServer ) - ) - { - if ( ( iExt->iWlanData->iWlanNetworkName->Compare( - *aItem.iExt->iWlanData->iWlanNetworkName ) == 0 ) - && ( iIspIPAddr->Compare( *aItem.iIspIPAddr ) == 0 ) - && ( iIspIPNetMask->Compare( *aItem.iIspIPNetMask ) == 0 ) - && ( iIspGateway->Compare( *aItem.iIspGateway ) == 0 ) - && ( iPrimaryDNS->Compare( *aItem.iPrimaryDNS ) == 0 ) - && ( iSecondaryDNS->Compare( *aItem.iSecondaryDNS ) == 0 ) -// Check if AuthName is needed or not -// && ( iIspIfAuthName->Compare( *aItem.iIspIfAuthName ) == 0 ) - ) - { - retval = ETrue; - } - } - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::CompareWlan" ) ) ); - return retval; + return EFalse; } @@ -4886,15 +918,7 @@ // HBufC* CApAccessPointItem::GetCleanIpAddressLC( const TDesC& aValue ) { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::GetCleanIpAddressLC" ) ) ); - - TBuf<256> buf; - TInetAddr in; - User::LeaveIfError( in.Input( aValue ) ); - in.Output( buf ); - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::GetCleanIpAddressLC" ) ) ); - return buf.AllocLC(); + return NULL; } @@ -4905,101 +929,7 @@ // HBufC* CApAccessPointItem::GetPlainPhoneNumberLC( const TDesC& aNumber ) { - CLOG( ( EApItem, 0, - _L( "-> CApAccessPointItem::GetPlainPhoneNumberLC" ) ) ); - - // Removes invalid chars e.g. space, () from the passed phone number. - // (valid are 0,1,2,..9,p,w,+,*,#) - // Strips pre- and postfixes, prefix separator is#, - // postfix separators are p, w or + - HBufC* retval = NULL; - - HBufC* numbuf = RemoveInvalidPhoneCharsLC( aNumber ); - TPtr16 num( numbuf->Des() ); - - TInt prefixpos( 0 ); - TInt postfixpos( 0 ); - TInt lasthashmark = num.LocateReverse('#'); - if ( lasthashmark != KErrNotFound ) - { // has prefix - prefixpos = ++lasthashmark; - } - else - { // no prefix - prefixpos = 0; - } - // now get postfixes, if any - // be carefull not to say postfix for the international code... - // as can be more than one postfix, get each postfix-separator type's - // position and use the lowest one - TInt ppos( 0 ); - TInt wpos( 0 ); - TInt pluspos( 0 ); - TInt tmppos( 0 ); - - tmppos = num.Locate( '+' ); - if ( tmppos != KErrNotFound ) - { - pluspos = tmppos; - if ( tmppos == 0 ) - { // possibly country code comes, get next if any - // also inc. prefixpos - prefixpos++; - num = num.Right( num.Length() - 1 ); - tmppos = num.Locate( '+' ); - if ( tmppos != KErrNotFound ) - { - tmppos = pluspos; - } - } - } - - tmppos = num.Locate( 'p' ); - if ( tmppos != KErrNotFound ) - { - ppos = tmppos; - num = num.Left( num.Length() - ppos ); - } - tmppos = num.LocateReverse( 'w' ); - if ( tmppos != KErrNotFound ) - { - wpos = tmppos; - num = num.Left( num.Length() - wpos ); - } - // now we have 3 positions, - // decide which is the smallest but greater than 0 - // if all is 0, it is 0... - if ( wpos ) - { - postfixpos = wpos; - } - else - { - if ( ppos ) - { - postfixpos = ppos; - } - else - { - if ( pluspos ) - { - postfixpos = pluspos; - } - } - } - // now we have pre- and postfix positions, get the resulting string - if ( postfixpos == 0 ) - { - postfixpos = aNumber.Length(); - } - retval = aNumber.Mid( prefixpos, postfixpos-prefixpos ).AllocLC(); - CleanupStack::Pop( retval ); // retval - CleanupStack::PopAndDestroy( numbuf ); // numbuf - CleanupStack::PushL( retval ); - - CLOG( ( EApItem, 1, - _L( "<- CApAccessPointItem::GetPlainPhoneNumberLC" ) ) ); - return retval; + return NULL; } @@ -5012,30 +942,7 @@ // TBool CApAccessPointItem::IsSamePhoneNumberL( CApAccessPointItem& aItem ) { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::IsSamePhoneNumberL" ) ) ); - - TBool retval( EFalse ); - - HBufC* tmpphone = - HBufC::NewLC( aItem.ReadTextLengthL( EApIspDefaultTelNumber ) ); - TPtr16 tmpptr( tmpphone->Des() ); - aItem.ReadTextL( EApIspDefaultTelNumber, tmpptr ); - - HBufC* ph1 = GetPlainPhoneNumberLC( *iIspDefaultTelNumber ); - HBufC* ph2 = GetPlainPhoneNumberLC( tmpptr ); - TInt cl ( 7 ); - cl = Min( cl, ph1->Length() ); - cl = Min( cl, ph2->Length() ); - TPtrC16 ptr1 = ph1->Right( cl ); - TPtrC16 ptr2 = ph2->Right( cl ); - if ( ptr1.Compare( ptr2 ) == 0 ) - { - retval = ETrue; - } - CleanupStack::PopAndDestroy( 3, tmpphone ); // ph1, ph2, tmpphone - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::IsSamePhoneNumberL" ) ) ); - return retval; + return EFalse; } @@ -5046,32 +953,7 @@ // HBufC* CApAccessPointItem::RemoveInvalidPhoneCharsLC( const TDesC16& aInText ) { - CLOG( ( EApItem, 0, - _L( "-> CApAccessPointItem::RemoveInvalidPhoneCharsLC" ) ) ); - - // valid are 0,1,2,..9,p,w,+,*,# - TInt size = aInText.Length(); - HBufC* aOutText = HBufC::NewLC( size ); - TPtr ptr = aOutText->Des(); - - for(TInt i = 0; i< size; i++) - { - //TText ch = aInText[i]; - TChar ch = aInText[i]; - if ( ( ch == 'p' ) || ( ch == 'P' ) || ( ch == 'W' ) || ( ch == 'W' ) - || ( ch == '+' ) || ( ch == '0' ) || ( ch == '1' ) || ( ch == '2' ) - || ( ch == '3' ) || ( ch == '4' ) || ( ch == '5' ) || ( ch == '6' ) - || ( ch == '7' ) || ( ch == '8' ) || ( ch == '9' ) || ( ch == '*' ) - || ( ch == '#' ) - ) - { - ptr.Append( ch ); - } - } - - CLOG( ( EApItem, 1, - _L( "<- CApAccessPointItem::RemoveInvalidPhoneCharsLC" ) ) ); - return aOutText; + return NULL; } @@ -5082,26 +964,7 @@ // HBufC* CApAccessPointItem::RemoveInvalidCharsLC( const TDesC16& aInText ) { - CLOG( ( EApItem, 0, - _L( "-> CApAccessPointItem::RemoveInvalidCharsLC" ) ) ); - - TInt size = aInText.Length(); - HBufC* aOutText = HBufC::NewLC( size ); - TPtr ptr = aOutText->Des(); - - for ( TInt ii=0; ii CApAccessPointItem::RemoveInvalidCharsLC8" ) ) ); - - TInt size = aInText.Length(); - HBufC8* aOutText = HBufC8::NewLC( size ); - TPtr8 ptr = aOutText->Des(); - - for ( TInt ii=0; ii CApAccessPointItem::CompareProxy" ) ) ); - - TBool retval( EFalse ); - if ( BOOL_COMPARE( iApHasProxySettings, aItem.iApHasProxySettings ) - && iApProxyPortNumber == aItem.iApProxyPortNumber - && BOOL_COMPARE( iApProxyUseProxy, iApProxyUseProxy ) - && ( iApProxyProtocolName->Compare( - *aItem.iApProxyProtocolName ) == 0 ) - && ( iApProxyServerAddress->Compare( - *aItem.iApProxyServerAddress ) == 0 ) - && ( iApProxyExceptions->Compare( *aItem.iApProxyExceptions ) == 0 ) ) - { - retval = ETrue; - } - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::CompareProxy" ) ) ); - return retval; + return EFalse; } @@ -5167,9 +995,7 @@ // TBool CApAccessPointItem::HasProxy() const { - CLOG( ( EApItem, 0, _L( "<-> CApAccessPointItem::HasProxy" ) ) ); - - return iApHasProxySettings; + return EFalse; } @@ -5180,23 +1006,6 @@ // void CApAccessPointItem::SetProxyFlag() { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::SetProxyFlag" ) ) ); - - if ( ( iApProxyServerAddress->Compare( KDynIpAddress ) - && iApProxyServerAddress->Compare( KEmpty ) ) - || ( iApProxyPortNumber != 0 ) ) - { - iApHasProxySettings = ETrue; - } - else - { - iApHasProxySettings = EFalse; - } - // BY DEFAULT, as it is not accessible on the UI, - // we set the USE PROXY flag if ANY proxy setting is defined... - iApProxyUseProxy = iApHasProxySettings; - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::SetProxyFlag" ) ) ); } @@ -5208,84 +1017,6 @@ // void CApAccessPointItem::LimitSpeedL() { - CLOG( ( EApItem, 0, _L( "-> CApAccessPointItem::LimitSpeedL" ) ) ); - - TBool isWcdma = iExt->iIsWcdma; - TApBearerType bearer = BearerTypeL(); - const TInt* actSpeeds = NULL; - switch ( bearer ) - { - case EApBearerTypeCSD: - { - switch ( iBearerCallTypeIsdn ) - { - case ECallTypeISDNv110: - { - isWcdma ? actSpeeds = KCsdIsdn110Wcdma : - actSpeeds = KCsdIsdn110; - break; - } - case ECallTypeISDNv120: - { - isWcdma ? actSpeeds = KCsdIsdn120Wcdma : - actSpeeds = KCsdIsdn120; - break; - } - case ECallTypeAnalogue: - default: - { - isWcdma ? actSpeeds = KCsdAnalogueWcdma : - actSpeeds = KCsdAnalogue; - break; - } - } - break; - } - case EApBearerTypeHSCSD: - { - switch ( iBearerCallTypeIsdn ) - { - case ECallTypeISDNv110: - { - actSpeeds = KHcsdIsdn110; - break; - } - case ECallTypeISDNv120: - { - actSpeeds = KHcsdIsdn120; - break; - } - case ECallTypeAnalogue: - default: - { - actSpeeds = KHcsdAnal; - break; - } - } - break; - } - default: - { - break; - } - } - - - if( actSpeeds ) - { - TInt tempSpeed = *actSpeeds; - TInt nextSpeed = *( actSpeeds + 1); - while ( ( nextSpeed != KEndOfArray ) - && ( tempSpeed < ( TInt )iMaxConnSpeed ) - && ( nextSpeed <= ( TInt )iMaxConnSpeed ) ) - { - tempSpeed = *( ++actSpeeds ); - nextSpeed = *( actSpeeds + 1); - } - iMaxConnSpeed = ( TApCallSpeed )tempSpeed ; - } - - CLOG( ( EApItem, 1, _L( "<- CApAccessPointItem::LimitSpeedL" ) ) ); } @@ -5296,58 +1027,6 @@ // void CApAccessPointItem::SetIfNetworksL() { - // Check if Wlan affects this one!!! - // Check if Lan affects this one!!! - TApBearerType bearertype = BearerTypeL(); - if ( iExt->iIsIpv6Supported ) - { - if ( bearertype == EApBearerTypeGPRS ) - { - if ( iGprsPdpType == EIPv6 ) - { - WriteTextL( EApIspIfNetworks, KDefIspIfNetworksIPv6 ); - } - else - { - WriteTextL( EApIspIfNetworks, KDefIspIfNetworksIPv4 ); - } - } - else if ( bearertype == EApBearerTypeCDMA ) - { - __ASSERT_ALWAYS( iExt->iCdmaData, \ - ApCommons::Panic( ESanityCheckFailed ) ); - if ( iExt->iCdmaData->iPdpType == EIPv6 ) - { - WriteTextL( EApIspIfNetworks, KDefIspIfNetworksIPv6 ); - } - else - { - WriteTextL( EApIspIfNetworks, KDefIspIfNetworksIPv4 ); - } - } - else - { -#ifdef __TEST_LAN_BEARER - if ( bearertype == EApBearerTypeLAN ) - { - WriteTextL( EApIspIfNetworks, KDefIspIfNetworksIPv4IPv6LAN ); - } -#endif// __TEST_LAN_BEARER - if ( ( bearertype == EApBearerTypeWLAN ) - || ( bearertype == EApBearerTypeLANModem ) ) - { - WriteTextL( EApIspIfNetworks, KDefIspIfNetworksIPv4IPv6LAN ); - } - else - { // CSD, HSCSD - WriteTextL( EApIspIfNetworks, KDefIspIfNetworksIPv4IPv6 ); - } - } - } - else - { - WriteTextL( EApIspIfNetworks, KDefIspIfNetworksIPv4 ); - } } @@ -5357,88 +1036,7 @@ // TBool CApAccessPointItem::IsSupported( TApMember aColumn ) { - TBool ret( ETrue ); - - switch ( aColumn ) - { - case EApCdmaIwfName: - case EApCdmaServiceOption: - case EApCdmaPdpType: - case EApCdmaPdpAddress: - case EApCdmaReqFwdPriority: - case EApCdmaReqRevPriority: - case EApCdmaReqFwdBitrate: - case EApCdmaReqRevBitrate: - case EApCdmaReqFwdLoss: - case EApCdmaReqRevLoss: - case EApCdmaReqFwdMaxDelay: - case EApCdmaReqRevMaxDelay: - case EApCdmaMinFwdBitrate: - case EApCdmaMinRevBitrate: - case EApCdmaAccptFwdLoss: - case EApCdmaAccptRevLoss: - case EApCdmaAccptFwdMaxDelay: - case EApCdmaAccptRevMaxDelay: - case EApCdmaDataCompression: - case EApCdmaHeaderCompression: - case EApCdmaAnonymousAccess: - case EApCdmaIfName: - case EApCdmaIfParams: - case EApCdmaIfNetworks: - case EApCdmaIfPromptForAuth: - case EApCdmaIfAuthName: - case EApCdmaIfAuthPassword: - case EApCdmaIfAuthRetries: - case EApCdmaIpNetMask: - case EApCdmaIpGateway: - case EApCdmaIpAddrFromServer: - case EApCdmaIpAddr: - case EApCdmaIpDnsAddrFromServer: - case EApCdmaIPNameServer1: - case EApCdmaIPNameServer2: - case EApCdmaEnableLCPExtensions: - case EApCdmaDisablePlainTextAuth: - case EApCdmaApType: - case EApCdmaQosWarningTimeout: - case EApCdmaRlpMode: - case EApCdmaMip: - case EApCdmaHomeAgentAddress: - case EApCdmaMipTimeout: - case EApCdmaNaiType: - case EApCdmaSimpleIpAuthAlgorithm: - case EApCdmaSimpleIpPapSsHandle: - case EApCdmaSimpleIpChapSsHandle: - case EApCdmaMipTBit: - case EApCdmaMipHomeAddress: - case EApCdmaMipPrimaryHomeAgent: - case EApCdmaMipSecondaryHomeAgent: - case EApCdmaMipMnAaaAuthAlgorithm: - case EApCdmaMipMnAaaSpi: - case EApCdmaMipMnAaaSsHandle: - case EApCdmaMipMnHaAuthAlgorithm: - case EApCdmaMipMnHaSpi: - case EApCdmaMipMnHaSsHandle: - { - ret = iExt->iCdmaData != NULL; - break; - } - case EApWlanNetworkName: - case EApWlanNetworkMode: - case EApWlanSecurityMode: - case EApWlanScanSSID: - case EApWlanChannelId: - { - ret = iExt->iWlanData != NULL; - break; - } - - default: - { - break; - } - } - - return ret; + return EFalse; } //---------------------------------------------------------- @@ -5447,10 +1045,6 @@ // void CApAccessPointItem::LeaveIfUnsupportedL( TApMember aColumn ) { - if( !IsSupported( aColumn ) ) - { - User::Leave( KErrNotSupported ); - } } @@ -5462,12 +1056,7 @@ // TBool CApAccessPointItem::IsWlan() { - TBool retval( EFalse ); - if ( iExt->iWlanData ) - { - retval = iExt->iWlanData->iIsWlan; - } - return retval; + return EFalse; } @@ -5477,16 +1066,6 @@ // void CApAccessPointItem::LimitIp6DNSL() { - if ( iExt->iIsIpv6Supported ) - { - if ( ( iExt->iIpv6PrimaryDNS->Compare( KDynIpv6Address ) == 0 ) && - ( iExt->iIpv6SecondaryDNS->Compare( KDynIpv6Address ) == 0 ) ) - { - WriteTextL( EApIP6NameServer1, KWellKnownIp6PrimaryNameServer ); - WriteTextL( EApIP6NameServer2, KWellKnownIp6SecondaryNameServer ); - } - } - } // End of File diff -r 84c6623982f6 -r ed07dcc72692 apengine/apeng/src/APDataHandler.cpp --- a/apengine/apeng/src/APDataHandler.cpp Fri Sep 17 08:32:43 2010 +0300 +++ b/apengine/apeng/src/APDataHandler.cpp Mon Oct 04 00:43:42 2010 +0300 @@ -100,14 +100,7 @@ // EXPORT_C CApDataHandler* CApDataHandler::NewLC( CCommsDatabase& aDb ) { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::NewLC" ) ) ); - - CApDataHandler* db = new( ELeave ) CApDataHandler; - CleanupStack::PushL( db ); - db->ConstructL( aDb ); - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::NewLC" ) ) ); - - return db; + return NULL; } @@ -118,14 +111,6 @@ // EXPORT_C CApDataHandler::~CApDataHandler() { - if ( iExt ) - { - if ( iExt->iIsFeatureManagerInitialised ) - { - FeatureManager::UnInitializeLib(); - } - } - delete iExt; } @@ -135,7 +120,6 @@ // EXPORT_C CApDataHandler::CApDataHandler( ) { - iDb = NULL; } @@ -145,44 +129,6 @@ // EXPORT_C void CApDataHandler::ConstructL( CCommsDatabase& aDb ) { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::ConstructL" ) ) ); - - iExt = new ( ELeave )THandlerExtra; - iExt->iIsFeatureManagerInitialised = EFalse; - iExt->iIsIpv6Supported = EFalse; - - FeatureManager::InitializeLibL(); - iExt->iIsFeatureManagerInitialised = ETrue; - - iExt->iIsIpv6Supported = - FeatureManager::FeatureSupported( KFeatureIdIPv6 ); -#ifdef __TEST_IPV6_SUPPORT - iExt->iIsIpv6Supported = ETrue; -#endif // __TEST_IPV6_SUPPORT - - iDb = &aDb; - -#ifdef __TEST_USE_SHARED_DATA - iExt->iIsAppHscsdSupport = - ApCommons::IsGivenSharedDataSupportL( KGeneralSettingsUid, - KGSHSCSDAccessPoints ); -#else - iExt->iIsAppHscsdSupport = ETrue; -#endif // __TEST_USE_SHARED_DATA - - -#ifdef __TEST_HSCSD_SUPPORT - iExt->iIsAppHscsdSupport = ETrue; -#endif // __TEST_HSCSD_SUPPORT - - iExt->iVariant = ApCommons::GetVariantL(); - -#ifdef __TEST_CDMA_WRITE_PROTECT - iExt->iVariant |= KApUiEditOnlyVPNs; -#endif // __TEST_CDMA_WRITE_PROTECT - - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::ConstructL" ) ) ); } @@ -194,19 +140,6 @@ EXPORT_C void CApDataHandler::AccessPointDataL( TUint32 aUid, CApAccessPointItem& aApItem ) { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::AccessPointDataL" ) ) ); - - // returns the AP data of the record with the UID aUid - TBool ownTransaction = ApCommons::StartPushedTransactionLC( *iDb ); - DoAccessPointDataL( aUid, aApItem ); - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *iDb ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - aApItem.SanityCheckOk(); - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::AccessPointDataL" ) ) ); } @@ -222,25 +155,6 @@ TBool& aNameChanged ) { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::UpdateAccessPointDataL" ) ) ); - - if ( iExt->iVariant & KApUiEditOnlyVPNs ) - { - User::Leave( KErrNotSupported ); - } - - // update access point data. - aApItem.SanityCheckOk(); - - TBool ownTransaction = ApCommons::StartPushedTransactionLC( *iDb ); - DoUpdateAccessPointDataL( aApItem, EFalse, aNameChanged ); - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *iDb ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::UpdateAccessPointDataL" ) ) ); } @@ -252,7 +166,6 @@ // EXPORT_C TUint32 CApDataHandler::CreateCopyFromL( TUint32 aBaseId ) { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::CreateCopyFromL - ERROR: not suported" ) ) ); User::Leave( KErrNotSupported ); } @@ -264,26 +177,7 @@ // EXPORT_C TUint32 CApDataHandler::CreateFromDataL( CApAccessPointItem& aApItem ) { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::CreateFromDataL" ) ) ); - - if ( iExt->iVariant & KApUiEditOnlyVPNs ) - { - User::Leave( KErrNotSupported ); - } - - aApItem.SanityCheckOk(); - - TBool aNameChanged( EFalse ); - TBool ownTransaction = ApCommons::StartPushedTransactionLC( *iDb ); - TUint32 retval = DoUpdateAccessPointDataL( aApItem, ETrue, aNameChanged ); - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *iDb ); - CleanupStack::Pop(); // RollbackTransaction - } - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::CreateFromDataL" ) ) ); - return retval; + User::Leave( KErrNotSupported ); } @@ -295,22 +189,7 @@ // EXPORT_C void CApDataHandler::RemoveAPL( TUint32 aUid ) { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::RemoveAPL" ) ) ); - - if ( iExt->iVariant & KApUiEditOnlyVPNs ) - { - User::Leave( KErrNotSupported ); - } - - TBool ownTransaction = ApCommons::StartPushedTransactionLC( *iDb ); - DoRemoveAPL( aUid ); - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *iDb ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::RemoveAPL" ) ) ); + User::Leave( KErrNotSupported ); } @@ -321,20 +200,7 @@ // EXPORT_C TUint32 CApDataHandler::DefaultL( TBool aIsWap ) const { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::DefaultL" ) ) ); - - // get default AP... - // first get global settings... - TBool ownTransaction = ApCommons::StartPushedTransactionLC( *iDb ); - TUint32 value = DoGetDefaultL( aIsWap, NULL ); - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *iDb ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::DefaultL" ) ) ); - return value; + return 0; } @@ -347,22 +213,7 @@ EXPORT_C void CApDataHandler::SetAsDefaultL( TUint32 aUid, TCommsDbIspType aIntendedType ) { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::SetAsDefaultL" ) ) ); - - if ( iExt->iVariant & KApUiEditOnlyVPNs ) - { - User::Leave( KErrNotSupported ); - } - - TBool ownTransaction = ApCommons::StartPushedTransactionLC( *iDb ); - DoSetAsDefaultL( aUid, aIntendedType ); - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *iDb ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::SetAsDefaultL" ) ) ); + User::Leave( KErrNotSupported ); } @@ -387,30 +238,10 @@ TBool aOverwrite ) { - CLOG( ( EHandler, 0, - _L( "-> CApDataHandler::SetPreferredIfDbIapTypeL" ) ) ); - - if ( iExt->iVariant & KApUiEditOnlyVPNs ) - { - User::Leave( KErrNotSupported ); - } - - TBool ownTransaction = ApCommons::StartPushedTransactionLC( *iDb ); - DoSetPreferredIfDbIapTypeL( aRank, aDirection, aBearers, - aPrompt, aIAP, aOverwrite); - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *iDb ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - CLOG( ( EHandler, 1, - _L( "<- CApDataHandler::SetPreferredIfDbIapTypeL" ) ) ); + User::Leave( KErrNotSupported ); } - - // --------------------------------------------------------- // CApDataHandler::SetPreferredIfDbIspTypeL // --------------------------------------------------------- @@ -427,29 +258,10 @@ TBool aOverwrite ) { - CLOG( ( EHandler, 0, - _L( "-> CApDataHandler::SetPreferredIfDbIspTypeL" ) ) ); - - if ( iExt->iVariant & KApUiEditOnlyVPNs ) - { - User::Leave( KErrNotSupported ); - } - - TBool ownTransaction = ApCommons::StartPushedTransactionLC( *iDb ); - DoSetPreferredIfDbIspTypeL( aRank, aDirection, aBearers, aPrompt, - aISP, aChargeCard, aServiceType, aOverwrite); - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *iDb ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - CLOG( ( EHandler, 1, - _L( "<- CApDataHandler::SetPreferredIfDbIspTypeL" ) ) ); + User::Leave( KErrNotSupported ); } - // --------------------------------------------------------- // CApDataHandler::GetPreferredIfDbIapTypeL // --------------------------------------------------------- @@ -463,35 +275,6 @@ TUint32& aIAP ) { - CLOG( ( EHandler, 0, - _L( "-> CApDataHandler::GetPreferredIfDbIapTypeL" ) ) ); - - TBool ownTransaction = ApCommons::StartPushedTransactionLC( *iDb ); - CCommsDbConnectionPrefTableView* preft = - iDb->OpenConnectionPrefTableViewOnRankLC( aDirection, aRank ); - TInt err = preft->GotoFirstRecord(); // OK. - if ( err == KErrNone ) - { // record has been found - CCommsDbConnectionPrefTableView::TCommDbIapConnectionPref pref; - preft->ReadConnectionPreferenceL( pref ); - aBearers = pref.iBearer.iBearerSet; - aPrompt = pref.iDialogPref; - aIAP = pref.iBearer.iIapId; - } - else - { - User::Leave( err ); - } - CleanupStack::PopAndDestroy( preft ); // preft - - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *iDb ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - CLOG( ( EHandler, 1, - _L( "<- CApDataHandler::GetPreferredIfDbIapTypeL" ) ) ); } @@ -510,13 +293,7 @@ TUint32& /*aChargeCard*/ ) { - CLOG( ( EHandler, 0, - _L( "<-> CApDataHandler::GetPreferredIfDbIspTypeL" ) ) ); - User::Leave( KErrNotSupported ); - - return KErrNoSuchCase; - } @@ -528,20 +305,7 @@ EXPORT_C TUint32 CApDataHandler::DefaultL( TBool aIsWap, TBool& aReadOnly ) const { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::DefaultL" ) ) ); - - // get default AP... - // first get global settings... - TBool ownTransaction = ApCommons::StartPushedTransactionLC( *iDb ); - TUint32 value = DoGetDefaultL( aIsWap, &aReadOnly ); - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *iDb ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::DefaultL" ) ) ); - return value; + return 0; } @@ -553,38 +317,7 @@ // EXPORT_C void CApDataHandler::RemoveNetworkL( TUint32 aUid ) { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::RemoveNetworkL" ) ) ); - - if ( iExt->iVariant & KApUiEditOnlyVPNs ) - { - User::Leave( KErrNotSupported ); - } - - TBool ownTransaction = ApCommons::StartPushedTransactionLC( *iDb ); - CCommsDbTableView* nettable = - iDb->OpenViewMatchingUintLC( TPtrC(NETWORK), - TPtrC(COMMDB_ID), - aUid ); - TInt err = nettable->GotoFirstRecord(); - if ( err == KErrNone ) - { - nettable->DeleteRecord(); - } - else - { - if ( err != KErrNotFound ) - { - User::Leave( err ); - } - } - CleanupStack::PopAndDestroy( nettable ); // RollbackTransactionOnLeave - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *iDb ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::RemoveNetworkL" ) ) ); + User::Leave( KErrNotSupported ); } @@ -594,22 +327,7 @@ // EXPORT_C void CApDataHandler::CreateNetworkL( CApNetworkItem& aNetwork ) { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::CreateNetworkL" ) ) ); - - if ( iExt->iVariant & KApUiEditOnlyVPNs ) - { - User::Leave( KErrNotSupported ); - } - - CApAccessPointItem* aApItem = CApAccessPointItem::NewLC(); - aApItem->WriteTextL( EApNetworkName, aNetwork.Name() ); - WriteNetworkDataL( ETrue, *aApItem ); - TUint32 tempuint( 0 ); - aApItem->ReadUint( EApNetworkID, tempuint ); - aNetwork.SetUid( tempuint ); - CleanupStack::PopAndDestroy( aApItem ); - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::CreateNetworkL" ) ) ); + User::Leave( KErrNotSupported ); } @@ -619,11 +337,6 @@ // EXPORT_C void CApDataHandler::ReadNetworkPartL( CApAccessPointItem& aItem ) { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::ReadNetworkPartL" ) ) ); - - ReadNetworkDataL( aItem ); - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::ReadNetworkPartL" ) ) ); } @@ -634,21 +347,6 @@ EXPORT_C void CApDataHandler::ReadNetworkL( TUint32 aUid, CApNetworkItem& aNetwork ) { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::ReadNetworkL" ) ) ); - - CApAccessPointItem* aItem = CApAccessPointItem::NewLC(); - aItem->WriteUint( EApNetworkID, aUid ); - ReadNetworkDataL( *aItem ); - TUint32 length = aItem->ReadTextLengthL( EApNetworkName ); - HBufC* buf = HBufC::NewLC( length ); - TPtr16 ptr = buf->Des(); - aItem->ReadTextL( EApNetworkName, ptr ); - aNetwork.SetUid( aUid ); - aNetwork.SetNameL( ptr ); - CleanupStack::PopAndDestroy( buf ); - CleanupStack::PopAndDestroy( aItem ); - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::ReadNetworkL" ) ) ); } @@ -664,97 +362,6 @@ void CApDataHandler::ReadWapDataL( TUint32 aWapId, CApAccessPointItem& aApItem ) { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::ReadWapDataL" ) ) ); - - // internal function, caller MUST initiate a transaction, WE WILL NOT. - CCommsDbTableView* wapt; - wapt = iDb->OpenViewMatchingUintLC( TPtrC(WAP_ACCESS_POINT), - TPtrC(COMMDB_ID), aWapId ); - - - User::LeaveIfError( wapt->GotoFirstRecord() ); - - aApItem.WriteUint( EApWapAccessPointID, aWapId ); - - TInt err; - HBufC* buf = ApCommons::ReadLongTextLC( wapt, - TPtrC(WAP_START_PAGE), - err ); - if ( err != KErrUnknown ) - { - aApItem.WriteLongTextL( EApWapStartPage, *buf ); - CleanupStack::PopAndDestroy( buf ); - } - - buf = ApCommons::ReadText16ValueLC( wapt, TPtrC(WAP_CURRENT_BEARER) ); - aApItem.WriteTextL( EApWapCurrentBearer, *buf ); - CleanupStack::PopAndDestroy( buf ); - - buf = ApCommons::ReadText16ValueLC( wapt, TPtrC(COMMDB_NAME) ); - aApItem.WriteTextL( EApWapAccessPointName, *buf ); - CleanupStack::PopAndDestroy( buf ); - - - TBool readonly = ApCommons::DoGetReadOnlyL( *wapt ); - // not WriteBool, as it is 'write protected'... - aApItem.iIsReadOnly = readonly; - - CCommsDbTableView* bearert; - bearert = iDb->OpenViewMatchingUintLC( *aApItem.iWapBearer, - TPtrC(WAP_ACCESS_POINT_ID), aWapId ); - - User::LeaveIfError( bearert->GotoFirstRecord() ); - // now we can read common data - buf = ApCommons::ReadText16ValueLC( bearert, - TPtrC( WAP_GATEWAY_ADDRESS ) ); - aApItem.WriteTextL( EApWapGatewayAddress, *buf ); - CleanupStack::PopAndDestroy( buf ); - - - TUint32 tempint( 0 ); - TBool tempbool( EFalse ); - - ApCommons::ReadUintL( bearert, TPtrC(WAP_WSP_OPTION), tempint ); - aApItem.WriteUint( EApWapWspOption, tempint ); - - ApCommons::ReadBoolL( bearert, TPtrC(WAP_SECURITY), tempbool ); - aApItem.WriteBool( EApWapSecurity, tempbool ); - - aApItem.SpecifyWap( ETrue ); - // decide which bearer, read bearer spec. data. - if ( *aApItem.iWapBearer == TPtrC(WAP_IP_BEARER) ) - { - // init it, if it is specified in IAP, will override this... - aApItem.WriteUint( EApIapServiceId, tempint ); - - ApCommons::ReadUintL( bearert, TPtrC(WAP_IAP), tempint ); - aApItem.WriteUint( EApWapIap, tempint ); - - ApCommons::ReadUintL( bearert, TPtrC(WAP_PROXY_PORT), tempint ); - aApItem.WriteUint( EApWapProxyPort, tempint ); - - buf = ApCommons::ReadText16ValueLC( bearert, - TPtrC(WAP_PROXY_LOGIN_NAME) ); - aApItem.WriteTextL( EApProxyLoginName, *buf ); - CleanupStack::PopAndDestroy( buf ); - - - buf = ApCommons::ReadText16ValueLC( bearert, - TPtrC(WAP_PROXY_LOGIN_PASS) ); - aApItem.WriteTextL( EApProxyLoginPass, *buf ); - CleanupStack::PopAndDestroy( buf ); - - - - aApItem.SpecifyIpBearer( ETrue ); - } - else - { - User::Leave( KErrInvalidBearer ); - } - CleanupStack::PopAndDestroy( 2, wapt ); // bearert, wapt - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::ReadWapDataL" ) ) ); } @@ -765,58 +372,6 @@ void CApDataHandler::ReadIapDataL( TUint32 aIapId, CApAccessPointItem& aApItem ) { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::ReadIapDataL" ) ) ); - - // internal function, caller MUST initiate a transaction, WE WILL NOT. - CCommsDbTableView* iapt = iDb->OpenViewMatchingUintLC( TPtrC(IAP), - TPtrC(COMMDB_ID), aIapId ); - - User::LeaveIfError( iapt->GotoFirstRecord() ); - // can not be more than one record, - // because we are looking up about UID! - aApItem.WriteUint( EApWapIap, aIapId ); - - HBufC* buf = ApCommons::ReadText16ValueLC( iapt, TPtrC(COMMDB_NAME) ); - aApItem.WriteTextL( EApIapName, *buf ); - CleanupStack::PopAndDestroy( buf ); - - TUint32 tempint; - - ApCommons::ReadUintL( iapt, TPtrC(IAP_SERVICE), tempint ); - aApItem.WriteUint( EApIapServiceId, tempint ); - - - buf = ApCommons::ReadText16ValueLC( iapt, TPtrC(IAP_SERVICE_TYPE) ); - aApItem.WriteTextL( EApIapServiceType, *buf ); - CleanupStack::PopAndDestroy( buf ); - - - ApCommons::ReadUintL( iapt, TPtrC(IAP_BEARER), tempint ); - aApItem.WriteUint( EApIapBearerID, tempint ); - - buf = ApCommons::ReadText16ValueLC( iapt, TPtrC(IAP_BEARER_TYPE) ); - aApItem.WriteTextL( EApIapBearerType, *buf ); - CleanupStack::PopAndDestroy( buf ); - - ReadModemBearerNameL( aApItem ); - - ApCommons::ReadUintL( iapt, TPtrC(IAP_NETWORK), tempint ); - aApItem.iNetworkId = tempint; - - // Network weighting! - ApCommons::ReadUintL( iapt, TPtrC(IAP_NETWORK_WEIGHTING), tempint ); - -/* - // seems that location is fixed so no read... - ApCommons::ReadUintL( iapt, TPtrC(IAP_LOCATION), tempint ); - aApItem.i = tempint; -*/ - - - aApItem.SpecifyIAP( ETrue ); - CleanupStack::PopAndDestroy( iapt ); // iapt - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::ReadIapDataL" ) ) ); } @@ -830,54 +385,6 @@ void CApDataHandler::ReadIspDataL( TUint32 aIspId, CApAccessPointItem& aApItem ) { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::ReadIspDataL" ) ) ); - - /***************************************************** - * Series 60 Customer / ETel - * Series 60 ETel API - *****************************************************/ - // internal function, caller MUST initiate a transaction, WE WILL NOT. - HBufC* buf = HBufC::NewLC( KModifiableTextLength ); - TPtr16 ptr = buf->Des(); - aApItem.ReadTextL( EApIapServiceType, ptr ); - - if ( ( buf->Compare( TPtrC(OUTGOING_WCDMA ) ) == 0 ) || - ( buf->Compare( TPtrC(INCOMING_WCDMA ) ) == 0 ) ) - { - ReadGprsDataL( aIspId, aApItem ); - } - else - { - if ( ( buf->Compare( TPtrC(DIAL_OUT_ISP ) ) == 0 ) || - ( buf->Compare( TPtrC(DIAL_IN_ISP ) ) == 0 ) ) - { - ReadDialInOutDataL( aIspId, aApItem ); - } - else - { // e.g. vpn... - if ( buf->Compare( TPtrC(VPN_SERVICE) ) == 0 ) - { // VPN - aApItem.iExt->iIsVpnAp = ETrue; - // get vpn bearer type - ReadVpnInfoL( aIspId, aApItem ); - } - else - { - if ( buf->Compare( TPtrC(LAN_SERVICE) ) == 0 ) - { // LAN - // get LAN data (WLAN) - ReadLanDataL( aIspId, aApItem ); - } - else - { - User::Leave( KErrInvalidBearer ); - } - } - } - } - CleanupStack::PopAndDestroy( buf ); // buf - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::ReadIspDataL" ) ) ); } @@ -889,178 +396,6 @@ void CApDataHandler::ReadGprsDataL( TUint32 aIspId, CApAccessPointItem& aApItem ) { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::ReadGprsDataL" ) ) ); - - // internal function, caller MUST initiate a transaction, WE WILL NOT. - CCommsDbTableView* ispt = NULL; - - HBufC* servtype = HBufC::NewLC( KModifiableTextLength ); - TPtr16 ptr = servtype->Des(); - aApItem.ReadTextL( EApIapServiceType, ptr ); - - if ( servtype->Compare( TPtrC(OUTGOING_WCDMA ) ) == 0 ) - { - ispt = iDb->OpenViewMatchingUintLC( TPtrC(OUTGOING_WCDMA), - TPtrC(COMMDB_ID), - aIspId ); - } - else - { - if ( servtype->Compare( TPtrC(INCOMING_WCDMA ) ) == 0 ) - { - ispt = iDb->OpenViewMatchingUintLC( TPtrC(INCOMING_WCDMA), - TPtrC(COMMDB_ID), - aIspId ); - } - else - { - User::Leave( KErrInvalidBearer ); - } - } - - - User::LeaveIfError( ispt->GotoFirstRecord() ); - - // now read record data - HBufC* buf = ApCommons::ReadText16ValueLC( ispt, TPtrC(COMMDB_NAME) ); - aApItem.WriteTextL( EApIspName, *buf ); - CleanupStack::PopAndDestroy( buf ); - - TInt err( KErrNone ); - buf = ApCommons::ReadLongTextLC( ispt, TPtrC(GPRS_APN), err ); - if ( err != KErrUnknown ) - { - aApItem.WriteLongTextL( EApGprsAccessPointName, *buf ); - CleanupStack::PopAndDestroy( buf ); - } - - TUint32 tempint( 0 ); - TBool tempbool( EFalse ); - - ApCommons::ReadUintL( ispt, TPtrC(GPRS_PDP_TYPE), tempint ); - if ( tempint == RPacketContext::EPdpTypeIPv6 ) - { - aApItem.WriteUint( EApGprsPdpType, EIPv6 ); - } - else - { - aApItem.WriteUint( EApGprsPdpType, EIPv4 ); - } - - buf = ApCommons::ReadText16ValueLC( ispt, TPtrC(GPRS_PDP_ADDRESS) ); - aApItem.WriteTextL( EApGprsPdpAddress, *buf ); - CleanupStack::PopAndDestroy( buf ); - - ApCommons::ReadUintL( ispt, TPtrC(GPRS_REQ_PRECEDENCE), tempint ); - aApItem.WriteUint( EApGprsReqPrecedence, tempint); - - ApCommons::ReadUintL( ispt, TPtrC(GPRS_REQ_DELAY), tempint ); - aApItem.WriteUint( EApGprsReqDelay, tempint); - - ApCommons::ReadUintL( ispt, TPtrC(GPRS_REQ_RELIABILITY), tempint ); - aApItem.WriteUint( EApGprsReqReliability, tempint); - - ApCommons::ReadUintL( ispt, TPtrC(GPRS_REQ_PEAK_THROUGHPUT), tempint ); - aApItem.WriteUint( EApGprsReqPeakThroughput, tempint); - - ApCommons::ReadUintL( ispt, TPtrC(GPRS_REQ_MEAN_THROUGHPUT), tempint ); - aApItem.WriteUint( EApGprsReqMeanPeakThroughput, tempint); - - ApCommons::ReadUintL( ispt, TPtrC(GPRS_MIN_PRECEDENCE), tempint ); - aApItem.WriteUint( EApGprsMinPrecedence, tempint); - - ApCommons::ReadUintL( ispt, TPtrC(GPRS_MIN_DELAY), tempint ); - aApItem.WriteUint( EApGprsMinDelay, tempint); - - ApCommons::ReadUintL( ispt, TPtrC(GPRS_MIN_RELIABILITY), tempint ); - aApItem.WriteUint( EApGprsMinReliability, tempint); - - ApCommons::ReadUintL( ispt, TPtrC(GPRS_MIN_PEAK_THROUGHPUT), tempint ); - aApItem.WriteUint( EApGprsMinPeakThroughput, tempint); - - ApCommons::ReadUintL( ispt, TPtrC(GPRS_MIN_MEAN_THROUGHPUT), tempint ); - aApItem.WriteUint( EApGprsMinMeanThroughput, tempint); - - ApCommons::ReadBoolL( ispt, TPtrC(GPRS_DATA_COMPRESSION), tempbool ); - aApItem.WriteBool( EApGprsDataCompression, tempbool ); - - ApCommons::ReadBoolL( ispt, TPtrC(GPRS_HEADER_COMPRESSION), tempbool ); - aApItem.WriteBool( EApGprsHeaderCompression, tempbool ); - - ApCommons::ReadBoolL( ispt, TPtrC(GPRS_ANONYMOUS_ACCESS), tempbool ); - aApItem.WriteBool( EApGprsUseAnonymAccess, tempbool ); - - - buf = ApCommons::ReadText16ValueLC( ispt, TPtrC(GPRS_IF_PARAMS) ); - aApItem.WriteTextL( EApGprsIfParams, *buf ); - CleanupStack::PopAndDestroy( buf ); - - buf = ApCommons::ReadText16ValueLC( ispt, TPtrC(GPRS_IF_NETWORKS) ); - aApItem.WriteTextL( EApGprsIfNetworks, *buf ); - CleanupStack::PopAndDestroy( buf ); - - ApCommons::ReadBoolL( ispt, TPtrC(GPRS_IF_PROMPT_FOR_AUTH), tempbool ); - aApItem.WriteBool( EApGprsIfPromptForAuth, tempbool ); - - - buf = ApCommons::ReadText16ValueLC( ispt, TPtrC(GPRS_IF_AUTH_NAME) ); - aApItem.WriteTextL( EApGprsIfAuthName, *buf ); - CleanupStack::PopAndDestroy( buf ); - - buf = ApCommons::ReadText16ValueLC( ispt, TPtrC(GPRS_IF_AUTH_PASS) ); - aApItem.WriteTextL( EApGprsIfAuthPassword, *buf ); - CleanupStack::PopAndDestroy( buf ); - - ApCommons::ReadUintL( ispt, TPtrC(GPRS_IF_AUTH_RETRIES), tempint ); - aApItem.WriteUint( EApGprsIfAuthRetries, tempint ); - - buf = ApCommons::ReadText16ValueLC( ispt, TPtrC(GPRS_IP_NETMASK) ); - aApItem.WriteTextL( EApGprsIpNetMask, *buf ); - CleanupStack::PopAndDestroy( buf ); - - buf = ApCommons::ReadText16ValueLC( ispt, TPtrC(GPRS_IP_GATEWAY) ); - aApItem.WriteTextL( EApGprsIpGateway, *buf ); - CleanupStack::PopAndDestroy( buf ); - - ApCommons::ReadBoolL( ispt, TPtrC(GPRS_IP_ADDR_FROM_SERVER), tempbool ); - aApItem.WriteBool( EApGprsIpAddrFromServer, tempbool ); - - buf = ApCommons::ReadText16ValueLC( ispt, TPtrC(GPRS_IP_ADDR) ); - aApItem.WriteTextL( EApGprsIpAddr, *buf ); - CleanupStack::PopAndDestroy( buf ); - - ApCommons::ReadBoolL( ispt, TPtrC(GPRS_IP_DNS_ADDR_FROM_SERVER), - tempbool ); - aApItem.WriteBool( EApGprsIpDnsAddrFromServer, tempbool ); - - buf = ApCommons::ReadText16ValueLC( ispt, TPtrC(GPRS_IP_NAME_SERVER1) ); - aApItem.WriteTextL( EApGprsIPNameServer1, *buf ); - CleanupStack::PopAndDestroy( buf ); - - buf = ApCommons::ReadText16ValueLC( ispt, TPtrC(GPRS_IP_NAME_SERVER2) ); - aApItem.WriteTextL( EApGprsIPNameServer2, *buf ); - CleanupStack::PopAndDestroy( buf ); - - ApCommons::ReadBoolL( ispt, TPtrC(GPRS_ENABLE_LCP_EXTENSIONS), tempbool ); - aApItem.WriteBool( EApGprsEnableLCPExtensions, tempbool ); - - - ApCommons::ReadBoolL( ispt, TPtrC(GPRS_DISABLE_PLAIN_TEXT_AUTH), - tempbool ); - aApItem.WriteBool( EApGprsDisablePlainTextAuth, tempbool ); - - ApCommons::ReadUintL( ispt, TPtrC(GPRS_AP_TYPE), tempint ); - aApItem.WriteUint( EApIspIspType, TCommsDbIspType( tempint ) ); - - if ( iExt->iIsIpv6Supported ) - { - ReadServiceIp6L( *ispt, aApItem ); - } - - aApItem.SpecifyGPRS( ETrue ); - CleanupStack::PopAndDestroy( 2, servtype ); // ispt, servtype - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::ReadGprsDataL" ) ) ); } @@ -1072,62 +407,6 @@ void CApDataHandler::ReadLanDataL( TUint32 aIspId, CApAccessPointItem& aApItem ) { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::ReadLanDataL" ) ) ); - - // internal function, caller MUST initiate a transaction, WE WILL NOT. - CCommsDbTableView* ispt = NULL; - - ispt = iDb->OpenViewMatchingUintLC( TPtrC(LAN_SERVICE), - TPtrC(COMMDB_ID), - aIspId ); - User::LeaveIfError( ispt->GotoFirstRecord() ); - - // now read record data - ReadServiceL( *ispt, aApItem ); - - CCommsDbTableView* lant = NULL; - // now see if it is WLAN - - if ( aApItem.iExt->iWlanData ) - { // WLAN is supported - lant = iDb->OpenViewMatchingUintLC( TPtrC(WLAN_SERVICE ), - TPtrC(WLAN_SERVICE_ID), - aIspId ); - - TInt err = lant->GotoFirstRecord(); - // it can be Ethernet Lan, WLAN and LanModem, - // from those, only WLAN has these fields, - // so if we can read them, it is wlan. If not, it is something else... - if ( err == KErrNone ) - { - // now read record data - ReadWlanL( *lant, aApItem ); - aApItem.iExt->iWlanData->iIsWlan = ETrue; - } - else - { - if ( err != KErrNotFound ) - { - User::LeaveIfError( err ); - } - // can not leave on not found error, as it still might be - // a valid bearer after all... - aApItem.iExt->iWlanData->iIsWlan = EFalse; - } - aApItem.SpecifyWLAN( ETrue ); - CleanupStack::PopAndDestroy( lant ); - } - - if ( iExt->iIsIpv6Supported ) - { - ReadServiceIp6L( *ispt, aApItem ); - } - - - - CleanupStack::PopAndDestroy( ispt ); - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::ReadLanDataL" ) ) ); } @@ -1139,241 +418,6 @@ void CApDataHandler::ReadDialInOutDataL( TUint32 aIspId, CApAccessPointItem& aApItem ) { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::ReadDialInOutDataL" ) ) ); - /***************************************************** - * Series 60 Customer / ETel - * Series 60 ETel API - *****************************************************/ - - // internal function, caller MUST initiate a transaction, WE WILL NOT. - CCommsDbTableView* ispt = NULL; - - HBufC* servtype = HBufC::NewLC( KModifiableTextLength ); - TPtr16 ptr = servtype->Des(); - aApItem.ReadTextL( EApIapServiceType, ptr ); - - if ( servtype->Compare( TPtrC(DIAL_OUT_ISP) ) == 0 ) - { - ispt = iDb->OpenViewMatchingUintLC( TPtrC(DIAL_OUT_ISP), - TPtrC(COMMDB_ID), aIspId ); - } - else - { - ispt = iDb->OpenViewMatchingUintLC( TPtrC(DIAL_IN_ISP), - TPtrC(COMMDB_ID), aIspId ); - } - - User::LeaveIfError( ispt->GotoFirstRecord() ); - - TUint32 tempint( 0 ); - TBool tempbool( EFalse ); - - HBufC* buf = NULL; - - aApItem.WriteUint( EApIapServiceId, aIspId ); - - - buf = ApCommons::ReadText16ValueLC( ispt, TPtrC(COMMDB_NAME) ); - aApItem.WriteTextL( EApIspName, *buf ); - CleanupStack::PopAndDestroy( buf ); - - buf = ApCommons::ReadText16ValueLC( ispt, TPtrC(ISP_DESCRIPTION) ); - aApItem.WriteTextL( EApIspDescription, *buf ); - CleanupStack::PopAndDestroy( buf ); - - - ApCommons::ReadUintL( ispt, TPtrC(ISP_TYPE), tempint ); - aApItem.WriteUint( EApIspIspType, TCommsDbIspType( tempint ) ); - - buf = ApCommons::ReadText16ValueLC( ispt, - TPtrC(ISP_DEFAULT_TEL_NUM) ); - aApItem.WriteTextL( EApIspDefaultTelNumber, *buf ); - CleanupStack::PopAndDestroy( buf ); - - - ApCommons::ReadBoolL( ispt, TPtrC(ISP_DIAL_RESOLUTION), tempbool ); - aApItem.WriteBool( EApIspDialResolution, tempbool ); - - ApCommons::ReadBoolL( ispt, TPtrC(ISP_USE_LOGIN_SCRIPT), tempbool ); - aApItem.WriteBool( EApIspUseLoginScript, tempbool ); - - TInt err; - buf = ApCommons::ReadLongTextLC( ispt, TPtrC(ISP_LOGIN_SCRIPT), err ); - aApItem.WriteLongTextL( EApIspLoginScript, *buf ); - CleanupStack::PopAndDestroy( buf ); - - - ApCommons::ReadBoolL( ispt, TPtrC(ISP_PROMPT_FOR_LOGIN), tempbool ); - aApItem.WriteBool( EApIspPromptForLogin, tempbool ); - - buf = ApCommons::ReadText16ValueLC( ispt, TPtrC(ISP_LOGIN_NAME) ); - // as same UserName & AuthName is required, it is readed from username - aApItem.WriteTextL( EApIspLoginName, *buf ); - aApItem.WriteTextL( EApIspIfAuthName, *buf ); - CleanupStack::PopAndDestroy( buf ); - - - buf = ApCommons::ReadText16ValueLC( ispt, TPtrC(ISP_LOGIN_PASS) ); - // as same Login_pass & AuthPassword is required, - // it is readed from login_pass - aApItem.WriteTextL( EApIspLoginPass, *buf ); - aApItem.WriteTextL( EApIspIfAuthPass, *buf ); - CleanupStack::PopAndDestroy( buf ); - - - ApCommons::ReadBoolL( ispt, TPtrC(ISP_DISPLAY_PCT), tempbool ); - aApItem.WriteBool( EApIspDisplayPCT, tempbool ); - - - buf = ApCommons::ReadText16ValueLC( ispt, TPtrC(ISP_IF_PARAMS) ); - aApItem.WriteTextL( EApIspIfParams, *buf ); - CleanupStack::PopAndDestroy( buf ); - - buf = ApCommons::ReadText16ValueLC( ispt, TPtrC(ISP_IF_NETWORKS) ); - aApItem.WriteTextL( EApIspIfNetworks, *buf ); - CleanupStack::PopAndDestroy( buf ); - - ApCommons::ReadBoolL( ispt, TPtrC(ISP_IF_PROMPT_FOR_AUTH), tempbool ); - aApItem.WriteBool( EApIspIfPromptForAuth, tempbool ); - - - ApCommons::ReadUintL( ispt, TPtrC(ISP_IF_AUTH_RETRIES), tempint ); - aApItem.WriteUint( EApIspAuthRetries, tempint ); - - ApCommons::ReadBoolL( ispt, - TPtrC(ISP_IF_CALLBACK_ENABLED), tempbool ); - - aApItem.WriteBool( EApIspIfCallbackEnabled, tempbool ); - - - ApCommons::ReadUintL( ispt, TPtrC(ISP_IF_CALLBACK_TYPE), tempint ); - aApItem.WriteUint( EApIspIfCallbackType, ( TCallbackAction )tempint ); - - - HBufC8* buf8 = ApCommons::ReadText8ValueLC - ( - ispt, - TPtrC(ISP_IF_CALLBACK_INFO) - ); - aApItem.WriteTextL( EApIspIfCallbackInfo, *buf8 ); - CleanupStack::PopAndDestroy( buf8 ); - - ApCommons::ReadUintL( ispt, TPtrC(ISP_CALLBACK_TIMEOUT), tempint ); - aApItem.WriteUint( EApIspCallBackTimeOut, tempint ); - - - ApCommons::ReadBoolL( ispt, - TPtrC(ISP_IP_ADDR_FROM_SERVER), tempbool ); - - aApItem.WriteBool( EApIspIPAddrFromServer, tempbool ); - - buf = ApCommons::ReadText16ValueLC( ispt, TPtrC(ISP_IP_ADDR) ); - aApItem.WriteTextL( EApIspIPAddr, *buf ); - CleanupStack::PopAndDestroy( buf ); - - buf = ApCommons::ReadText16ValueLC( ispt, TPtrC(ISP_IP_NETMASK) ); - aApItem.WriteTextL( EApIspIPNetMask, *buf ); - CleanupStack::PopAndDestroy( buf ); - - buf = ApCommons::ReadText16ValueLC( ispt, TPtrC(ISP_IP_GATEWAY) ); - aApItem.WriteTextL( EApIspIPGateway, *buf ); - CleanupStack::PopAndDestroy( buf ); - - ApCommons::ReadBoolL( ispt, TPtrC(ISP_IP_DNS_ADDR_FROM_SERVER), - tempbool ); - - aApItem.WriteBool( EApIspIPDnsAddrFromServer, tempbool ); - - buf = ApCommons::ReadText16ValueLC( ispt, - TPtrC(ISP_IP_NAME_SERVER1) ); - - aApItem.WriteTextL( EApIspIPNameServer1, *buf ); - CleanupStack::PopAndDestroy( buf ); - - buf = ApCommons::ReadText16ValueLC( ispt, - TPtrC(ISP_IP_NAME_SERVER2) ); - - aApItem.WriteTextL( EApIspIPNameServer2, *buf ); - CleanupStack::PopAndDestroy( buf ); - - - ApCommons::ReadBoolL( ispt, TPtrC(ISP_ENABLE_IP_HEADER_COMP), - tempbool ); - - aApItem.WriteBool( EApIspEnableIpHeaderComp, tempbool ); - - - ApCommons::ReadBoolL( ispt, TPtrC(ISP_ENABLE_LCP_EXTENSIONS), - tempbool ); - - aApItem.WriteBool( EApIspEnableLCPExtensions, tempbool ); - - - ApCommons::ReadBoolL( ispt, TPtrC(ISP_DISABLE_PLAIN_TEXT_AUTH), - tempbool ); - - aApItem.WriteBool( EApIspDisablePlainTextAuth, tempbool ); - - - ApCommons::ReadBoolL( ispt, TPtrC(ISP_ENABLE_SW_COMP), tempbool ); - - aApItem.WriteBool( EApIspEnableSWCompression, tempbool ); - - - ApCommons::ReadUintL( ispt, TPtrC(ISP_BEARER_NAME), tempint ); - aApItem.WriteUint( EApIspBearerName, - (RMobileCall::TMobileCallDataServiceCaps)tempint ); - - ApCommons::ReadUintL( ispt, TPtrC(ISP_BEARER_SPEED), tempint ); - aApItem.iExt->iBearerSpeed = tempint; - - ApCommons::ReadUintL( ispt, TPtrC(ISP_BEARER_PROTOCOL), tempint ); - aApItem.iExt->iBearerProtocol = tempint; - - ApCommons::ReadUintL( ispt, TPtrC(ISP_BEARER_CE), tempint ); - aApItem.WriteUint( EApIspBearerCE, - (RMobileCall::TMobileCallDataQoSCaps) tempint ); - - ApCommons::ReadUintL( ispt, TPtrC(ISP_BEARER_SERVICE), tempint ); - aApItem.WriteUint( EApIapBearerService, tempint ); - - - - buf8 = ApCommons::ReadText8ValueLC( ispt, - TPtrC(ISP_INIT_STRING) ); - - aApItem.WriteTextL( EApIspInitString, *buf8 ); - CleanupStack::PopAndDestroy( buf8 ); - - ApCommons::ReadUintL( ispt, TPtrC(ISP_BEARER_TYPE), tempint ); - aApItem.WriteUint( EApIspBearerType, tempint); - - ApCommons::ReadUintL( ispt, TPtrC(ISP_CHANNEL_CODING), tempint ); - aApItem.WriteUint( EApIspChannelCoding, tempint); - - ApCommons::ReadUintL( ispt, TPtrC(ISP_AIUR), tempint ); - aApItem.WriteUint( EApIspAIUR, tempint); - - ApCommons::ReadUintL( ispt, - TPtrC(ISP_REQUESTED_TIME_SLOTS), - tempint ); - aApItem.WriteUint( EApIspRequestedTimeSlots, tempint); - - ApCommons::ReadUintL( ispt, TPtrC(ISP_MAXIMUM_TIME_SLOTS), tempint ); - aApItem.WriteUint( EApIspMaximumTimeSlots, tempint); - - - if ( iExt->iIsIpv6Supported ) - { - ReadServiceIp6L( *ispt, aApItem ); - } - - EtelSpeed2ApL( aApItem ); - - aApItem.SpecifyISP( ETrue ); - CleanupStack::PopAndDestroy( 2, servtype ); // ispt, servtype - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::ReadDialInOutDataL" ) ) ); } @@ -1385,77 +429,6 @@ void CApDataHandler::ReadVpnInfoL( TUint32 aIspId, CApAccessPointItem& aApItem) { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::ReadVpnInfoL" ) ) ); - - // internal function, caller MUST initiate a transaction, WE WILL NOT. - CCommsDbTableView* ispt = NULL; - - ispt = iDb->OpenViewMatchingUintLC( TPtrC(VPN_SERVICE), - TPtrC(COMMDB_ID), aIspId ); - User::LeaveIfError( ispt->GotoFirstRecord() ); - - TUint32 tempint; - - HBufC* buf = NULL; - // get the real iap - ApCommons::ReadUintL( ispt, TPtrC(VPN_SERVICE_IAP), tempint ); - - CCommsDbTableView* iapt = NULL; - iapt = iDb->OpenViewMatchingUintLC( TPtrC(IAP), - TPtrC(COMMDB_ID), tempint ); - - User::LeaveIfError( iapt->GotoFirstRecord() ); - - TUint32 iapservice; - ApCommons::ReadUintL( iapt, TPtrC(IAP_SERVICE), iapservice ); - - buf = ApCommons::ReadText16ValueLC( iapt, TPtrC(IAP_SERVICE_TYPE) ); - - if ( ( buf->Compare( TPtrC(OUTGOING_WCDMA ) ) == 0 ) || - ( buf->Compare( TPtrC(INCOMING_WCDMA ) ) == 0 ) ) - { - aApItem.iExt->iVPnRealIapBearerType = EApBearerTypeGPRS; - } - else - { - if ( ( buf->Compare( TPtrC(DIAL_OUT_ISP ) ) == 0 ) || - ( buf->Compare( TPtrC(DIAL_IN_ISP ) ) == 0 ) ) - { - // need to get ISP, - CCommsDbTableView* doutt = NULL; - doutt = iDb->OpenViewMatchingUintLC( *buf, - TPtrC(COMMDB_ID), - iapservice ); - User::LeaveIfError( doutt->GotoFirstRecord() ); - ApCommons::ReadUintL( doutt , TPtrC(ISP_BEARER_TYPE), tempint ); - if ( tempint == EBearerTypeCSD ) - { - aApItem.iExt->iVPnRealIapBearerType = EApBearerTypeCSD; - } - else - { - aApItem.iExt->iVPnRealIapBearerType = EApBearerTypeHSCSD; - } - CleanupStack::PopAndDestroy( doutt ); // doutt - } - else - { - // VPN, having a bearer something else than CSD, HSCSD, - // GPRS & CDMA? - if ( buf->Compare( TPtrC(LAN_SERVICE) ) == 0 ) - { // LAN - ReadLanDataL( aIspId, aApItem ); - } - else - { // otherwise, error - User::Leave( KErrInvalidBearer ); - } - } - } - - CleanupStack::PopAndDestroy( 3, ispt ); // buf, iapt, ispt - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::ReadVpnInfoL" ) ) ); } @@ -1467,52 +440,6 @@ void CApDataHandler::WriteWapBearerDataL( TBool aIsNew, TUint32 aWapId, CApAccessPointItem& aApItem ) { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::WriteWapBearerDataL" ) ) ); - - // internal function, caller MUST initiate a transaction, WE WILL NOT. - CCommsDbTableView* bearert; - if ( aIsNew ) - { - bearert = iDb->OpenTableLC( TPtrC(*aApItem.iWapBearer) ); - // CommDB's back-link makes returned UID value unusable, - // variable needed just to be able to make the call... - TUint32 dummy; - User::LeaveIfError( bearert->InsertRecord( dummy ) ); - } - else - { - bearert = iDb->OpenViewMatchingUintLC( TPtrC(*aApItem.iWapBearer), - TPtrC(WAP_ACCESS_POINT_ID), - aWapId ); - User::LeaveIfError( bearert->GotoFirstRecord() ); - User::LeaveIfError( bearert->UpdateRecord() ); - } - bearert->WriteTextL( TPtrC(WAP_GATEWAY_ADDRESS), - *aApItem.iWapGatewayAddress ); - bearert->WriteUintL( TPtrC(WAP_WSP_OPTION), - aApItem.iIsConnectionTypeContinuous ); - bearert->WriteBoolL( TPtrC(WAP_SECURITY), aApItem.iIsWTLSSecurityOn ); - bearert->WriteUintL( TPtrC(WAP_ACCESS_POINT_ID), aWapId ); - - if ( *aApItem.iWapBearer == TPtrC(WAP_IP_BEARER) ) - { - bearert->WriteUintL( TPtrC(WAP_IAP), aApItem.iWapIap ); - bearert->WriteUintL( TPtrC(WAP_PROXY_PORT), aApItem.iWapProxyPort ); - bearert->WriteTextL( TPtrC(WAP_PROXY_LOGIN_NAME), - *aApItem.iWapProxyLoginName ); - bearert->WriteTextL( TPtrC(WAP_PROXY_LOGIN_PASS), - *aApItem.iWapProxyLoginPass ); - } - else - { - User::Leave( KErrInvalidBearer ); - } - - User::LeaveIfError( bearert->PutRecordChanges( EFalse, EFalse ) ); - - CleanupStack::PopAndDestroy( bearert ); // bearert - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::WriteWapBearerDataL" ) ) ); } @@ -1525,40 +452,6 @@ void CApDataHandler::WriteWapApDataL( TBool aIsNew, TUint32 aWapId, CApAccessPointItem& aApItem ) { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::WriteWapApDataL" ) ) ); - - // internal function, caller MUST initiate a transaction, WE WILL NOT. - CCommsDbTableView* wapt; - - if ( aIsNew ) - { - wapt = iDb->OpenTableLC( TPtrC(WAP_ACCESS_POINT) ); - TInt err = wapt->InsertRecord( aApItem.iWapUid ); - if ( err ) - { - User::LeaveIfError( err ); - } - // CommDB's back-link makes returned UID value unusable, - // variable needed just to be able to make the call... - } - else - { - wapt = iDb->OpenViewMatchingUintLC( TPtrC(WAP_ACCESS_POINT), - TPtrC(COMMDB_ID), aWapId ); - User::LeaveIfError( wapt->GotoFirstRecord() ); - User::LeaveIfError( wapt->UpdateRecord() ); - } - - wapt->WriteTextL( TPtrC(WAP_CURRENT_BEARER), *aApItem.iWapBearer ); - wapt->WriteTextL( TPtrC(COMMDB_NAME), *aApItem.iWapAccessPointName ); - - wapt->WriteLongTextL( TPtrC(WAP_START_PAGE), *aApItem.iStartingPage ); - - User::LeaveIfError( wapt->PutRecordChanges( EFalse, EFalse ) ); - - CleanupStack::PopAndDestroy( wapt ); // wapt - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::WriteWapApDataL" ) ) ); } @@ -1570,122 +463,6 @@ void CApDataHandler::WriteIapDataL( TBool aIsNew, TUint32 aIapId, CApAccessPointItem& aApItem ) { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::WriteIapDataL" ) ) ); - - CCommsDbTableView* iapt; - // internal function, caller MUST initiate a transaction, WE WILL NOT. - if ( aIsNew ) - { - iapt = iDb->OpenTableLC( TPtrC(IAP) ); - User::LeaveIfError( iapt->InsertRecord( aApItem.iWapIap ) ); - } - else - { - iapt = iDb->OpenViewMatchingUintLC( TPtrC(IAP), - TPtrC(COMMDB_ID), aIapId ); - User::LeaveIfError( iapt->GotoFirstRecord() ); - User::LeaveIfError( iapt->UpdateRecord() ); - } - - iapt->WriteTextL( TPtrC(COMMDB_NAME), *aApItem.iIapName ); - iapt->WriteUintL( TPtrC(IAP_SERVICE), aApItem.iIapServiceId ); - iapt->WriteTextL( TPtrC(IAP_SERVICE_TYPE), *aApItem.iIapServiceType ); - - // hardcoded... - TApBearerType bearer = aApItem.BearerTypeL(); - switch ( bearer ) - { - case EApBearerTypeWLAN: - { - if ( aApItem.iExt->iWlanData ) - { - iapt->WriteTextL( TPtrC(IAP_BEARER_TYPE), TPtrC(LAN_BEARER) ); - } - else - { - User::Leave( KErrNotSupported ); - } - break; - } -#ifdef __TEST_LAN_BEARER - case EApBearerTypeLAN: - { - iapt->WriteTextL( TPtrC(IAP_BEARER_TYPE), TPtrC(LAN_BEARER) ); - break; - } -#endif // __TEST_LAN_BEARER - case EApBearerTypeLANModem: - { - iapt->WriteTextL( TPtrC(IAP_BEARER_TYPE), TPtrC(LAN_BEARER) ); - break; - } - default: - { - iapt->WriteTextL( TPtrC(IAP_BEARER_TYPE), TPtrC(MODEM_BEARER) ); - break; - } - } - - TUint32 id = GetModemBearerIDL( aApItem ); - iapt->WriteUintL( TPtrC(IAP_BEARER), id ); - - iapt->WriteUintL( TPtrC(IAP_NETWORK), aApItem.iNetworkId ); - // Network weighting! - iapt->WriteUintL( TPtrC(IAP_NETWORK_WEIGHTING), 0 ); - - TUint32 loc = GetLocationIdL(); - iapt->WriteUintL( TPtrC(IAP_LOCATION), loc ); - - // now put changes - User::LeaveIfError( iapt->PutRecordChanges( EFalse, EFalse ) ); - - CleanupStack::PopAndDestroy( iapt ); // iapt - - if ( aIsNew ) - { - CCommsDbConnectionPrefTableView* view = - iDb->OpenConnectionPrefTableViewOnRankLC( - ECommDbConnectionDirectionOutgoing, 1 ); - - TInt ret = view->GotoFirstRecord(); - - CCommsDbConnectionPrefTableView::TCommDbIapConnectionPref tablePref; - - if ( ret == KErrNone ) - { - view->ReadConnectionPreferenceL( tablePref ); - - TUint32 iapId = tablePref.iBearer.iIapId; - - // Check if iap exists - CCommsDbTableView* view2 = - iDb->OpenViewMatchingUintLC( TPtrC(IAP), - TPtrC(COMMDB_ID), - iapId ); - - TInt exists = view2->GotoFirstRecord(); - CleanupStack::PopAndDestroy(); // view2 - - if ( iapId == 0 || exists != KErrNone ) - { - if ( bearer & - ( EApBearerTypeCSD - + EApBearerTypeHSCSD - + EApBearerTypeGPRS - + EApBearerTypeCDMA ) ) - { - // Get the current settings and then overwrite with the Iap - tablePref.iBearer.iIapId = aApItem.iWapIap; - tablePref.iBearer.iBearerSet = - KCommDbBearerCSD | KCommDbBearerWcdma; - view->UpdateBearerL( tablePref.iBearer ); - } - } - } - CleanupStack::PopAndDestroy(); // view - } - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::WriteIapDataL" ) ) ); } @@ -1697,45 +474,6 @@ void CApDataHandler::WriteIspDataL( TBool aIsNew, TUint32 aIspId, CApAccessPointItem& aApItem ) { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::WriteIspDataL" ) ) ); - - aApItem.WriteUint( EApIapServiceId, aIspId ); - // internal function, caller MUST initiate a transaction, WE WILL NOT. - if ( ( aApItem.iIapServiceType->Compare( TPtrC(OUTGOING_WCDMA ) ) == 0 ) || - ( aApItem.iIapServiceType->Compare( TPtrC(INCOMING_WCDMA ) ) == 0 ) ) - { - WriteGprsDataL( aIsNew, aApItem ); - } - else - { - if ( ( aApItem.iIapServiceType->Compare( TPtrC(DIAL_IN_ISP) ) == 0 ) || - ( aApItem.iIapServiceType->Compare( TPtrC(DIAL_OUT_ISP) ) == 0 ) ) - { - WriteCsdDataL( aIsNew, aApItem ); - } - else - { // check if VPN - if ( aApItem.iIapServiceType->Compare( TPtrC(VPN_SERVICE) ) == 0 ) - { // currently, KErrNotSupported - User::Leave( KErrNotSupported ); - } - else - { - if ( aApItem.iIapServiceType->Compare( - TPtrC(LAN_SERVICE) ) == 0 ) - { - WriteLanDataL( aIsNew, aApItem ); - } - else - { - // something unknown, - User::Leave( KErrInvalidBearer ); - } - } - } - } - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::WriteIspDataL" ) ) ); } @@ -1748,164 +486,6 @@ void CApDataHandler::WriteGprsDataL( TBool aIsNew, CApAccessPointItem& aApItem ) { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::WriteGprsDataL" ) ) ); - - CCommsDbTableView* table; - - if ( aIsNew ) - { - table = iDb->OpenTableLC( *aApItem.iIapServiceType ); - User::LeaveIfError( table->InsertRecord( aApItem.iIapServiceId ) ); - } - else - { - table = iDb->OpenViewMatchingUintLC( *aApItem.iIapServiceType, - TPtrC(COMMDB_ID), - aApItem.iIapServiceId ); - User::LeaveIfError( table->GotoFirstRecord() ); - User::LeaveIfError( table->UpdateRecord() ); - } - // now write record data - table->WriteTextL( TPtrC(COMMDB_NAME), *aApItem.iIspName ); - - table->WriteLongTextL( TPtrC(GPRS_APN), *aApItem.iGprsAccessPointName ); - - - if ( aApItem.iGprsPdpType == EIPv6 ) - { - table->WriteUintL( TPtrC(GPRS_PDP_TYPE), - RPacketContext::EPdpTypeIPv6 ); - } - else - { - table->WriteUintL( TPtrC(GPRS_PDP_TYPE), - RPacketContext::EPdpTypeIPv4 ); - } - - table->WriteTextL( TPtrC(GPRS_PDP_ADDRESS), *aApItem.iGprsPdpAddress ); - - table->WriteUintL( TPtrC(GPRS_REQ_PRECEDENCE), - aApItem.iGprsReqPrecedence ); - - table->WriteUintL( TPtrC(GPRS_REQ_DELAY), aApItem.iGprsReqDelay ); - - table->WriteUintL( TPtrC(GPRS_REQ_RELIABILITY), - aApItem.iGprsReqReliability ); - - table->WriteUintL( TPtrC(GPRS_REQ_PEAK_THROUGHPUT), - aApItem.iGprsReqPeakThroughput ); - - table->WriteUintL( TPtrC(GPRS_REQ_MEAN_THROUGHPUT), - aApItem.iGprsReqMeanPeakThroughput ); - - table->WriteUintL( TPtrC(GPRS_MIN_PRECEDENCE), - aApItem.iGprsMinPrecedence ); - - table->WriteUintL( TPtrC(GPRS_MIN_DELAY), aApItem.iGprsMinDelay ); - - table->WriteUintL( TPtrC(GPRS_MIN_RELIABILITY), - aApItem.iGprsMinReliability ); - - table->WriteUintL( TPtrC(GPRS_MIN_PEAK_THROUGHPUT), - aApItem.iGprsMinPeakThroughput ); - - table->WriteUintL( TPtrC(GPRS_MIN_MEAN_THROUGHPUT), - aApItem.iGprsMinMeanThroughput ); - - table->WriteBoolL( TPtrC(GPRS_DATA_COMPRESSION), - aApItem.iIspEnableSwCompression ); - - table->WriteBoolL( TPtrC(GPRS_HEADER_COMPRESSION), - aApItem.iEnablePPPCompression ); - - table->WriteBoolL( TPtrC(GPRS_ANONYMOUS_ACCESS), - aApItem.iGprsUseAnonymAccess ); - -/* -// Keep as long as replacing IF_NAME does not works as specified - table->WriteTextL( TPtrC(IF_NAME), *aApItem.iIspIfName ); -*/ - - table->WriteTextL( TPtrC(GPRS_IF_PARAMS), *aApItem.iIspIfParams ); - - table->WriteTextL( TPtrC(GPRS_IF_NETWORKS), *aApItem.iIspIfNetworks ); - - table->WriteBoolL( TPtrC(GPRS_IF_PROMPT_FOR_AUTH), - aApItem.iIspIfPromptForAuth ); - - table->WriteTextL( TPtrC(GPRS_IF_AUTH_NAME), *aApItem.iIspIfAuthName ); - - table->WriteTextL( TPtrC(GPRS_IF_AUTH_PASS), *aApItem.iIspIfAuthPass ); - - table->WriteUintL( TPtrC(GPRS_IF_AUTH_RETRIES), - aApItem.iIspIfAuthRetries ); - - table->WriteTextL( TPtrC(GPRS_IP_NETMASK), *aApItem.iIspIPNetMask ); - - table->WriteTextL( TPtrC(GPRS_IP_GATEWAY), *aApItem.iIspGateway ); - - table->WriteBoolL( TPtrC(GPRS_IP_ADDR_FROM_SERVER), - aApItem.iIspIPAddrFromServer ); - - table->WriteTextL( TPtrC(GPRS_IP_ADDR), *aApItem.iIspIPAddr ); - - table->WriteBoolL( TPtrC(GPRS_IP_DNS_ADDR_FROM_SERVER), - aApItem.iGetDNSIPFromServer ); - - table->WriteTextL( TPtrC(GPRS_IP_NAME_SERVER1), *aApItem.iPrimaryDNS ); - - table->WriteTextL( TPtrC(GPRS_IP_NAME_SERVER2), *aApItem.iSecondaryDNS ); - - table->WriteBoolL( TPtrC(GPRS_ENABLE_LCP_EXTENSIONS), - aApItem.iIspEnableLCPExtensions ); - - table->WriteBoolL( TPtrC(GPRS_DISABLE_PLAIN_TEXT_AUTH), - aApItem.iIsPasswordAuthenticationSecure ); - - table->WriteUintL( TPtrC(GPRS_AP_TYPE), aApItem.iIspType ); - - - // Agreed to use const... - table->WriteUintL( TPtrC(GPRS_QOS_WARNING_TIMEOUT), - TUint32(KGprsOsTimeout) ); - - if ( iExt->iIsIpv6Supported ) - { - WriteServiceIp6L( *table, aApItem ); - } - -// WriteDaemonL( *table, aApItem ); starts here - if ( aApItem.iIspIPAddrFromServer ) - { - table->WriteTextL( TPtrC(SERVICE_CONFIG_DAEMON_MANAGER_NAME), - KDaemonManagerName ); - table->WriteTextL( TPtrC(SERVICE_CONFIG_DAEMON_NAME), - KConfigDaemonName ); - } - else - { - // 3.1 it is changed!! - if ( FeatureManager::FeatureSupported( KFeatureIdIPv6 ) ) - { - table->WriteTextL( TPtrC(SERVICE_CONFIG_DAEMON_MANAGER_NAME), - KDaemonManagerName ); - table->WriteTextL( TPtrC(SERVICE_CONFIG_DAEMON_NAME), - KConfigDaemonName ); - } - else - { - table->WriteTextL( TPtrC(SERVICE_CONFIG_DAEMON_MANAGER_NAME), KEmpty ); - table->WriteTextL( TPtrC(SERVICE_CONFIG_DAEMON_NAME), KEmpty ); - } - } -// WriteDaemonL() Ends here - - // now put changes - User::LeaveIfError( table->PutRecordChanges( EFalse, EFalse ) ); - - CleanupStack::PopAndDestroy( table ); // table - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::WriteGprsDataL" ) ) ); } @@ -1917,80 +497,6 @@ void CApDataHandler::WriteLanDataL( TBool aIsNew, CApAccessPointItem& aApItem ) { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::WriteLanDataL" ) ) ); - - CCommsDbTableView* table; - - if ( aIsNew ) - { - table = iDb->OpenTableLC( *aApItem.iIapServiceType ); - User::LeaveIfError( table->InsertRecord( aApItem.iIapServiceId ) ); - } - else - { - table = iDb->OpenViewMatchingUintLC( *aApItem.iIapServiceType, - TPtrC(COMMDB_ID), - aApItem.iIapServiceId ); - User::LeaveIfError( table->GotoFirstRecord() ); - User::LeaveIfError( table->UpdateRecord() ); - } - - // now write record data - WriteServiceL( *table, aApItem ); - - TApBearerType bearer = aApItem.BearerTypeL(); - - - if ( bearer == EApBearerTypeWLAN ) - { - if ( aApItem.iExt->iWlanData ) - { - - CCommsDbTableView* wlantable = NULL; - - if ( aIsNew ) - { - TUint32 dummy; - wlantable = iDb->OpenTableLC( TPtrC(WLAN_SERVICE) ); - User::LeaveIfError( wlantable->InsertRecord( dummy ) ); - aApItem.iExt->iWlanData->iWlanId = dummy; - } - else - { - // WLAN settings table backlinks to LAN service, - // so we query WLAN settings for a record - // where WLAN_SERVICE_ID is LAN_SERVICE's COMMDB_ID, - // which is aApItem.iIapServiceId... - wlantable = iDb->OpenViewMatchingUintLC( TPtrC(WLAN_SERVICE), - TPtrC(WLAN_SERVICE_ID), - aApItem.iIapServiceId ); - User::LeaveIfError( wlantable->GotoFirstRecord() ); - User::LeaveIfError( wlantable->UpdateRecord() ); - } - - // Add WLAN specific data storage - WriteWlanL( *wlantable, aApItem ); - User::LeaveIfError( wlantable->PutRecordChanges( EFalse, EFalse ) ); - CleanupStack::PopAndDestroy( wlantable ); // wlantable - } - else - { - // WLAN not supported, do not try to write it.... - User::Leave( KErrInvalidBearer ); - } - - } - - if ( iExt->iIsIpv6Supported ) - { - WriteServiceIp6L( *table, aApItem ); - } - - // now put changes - User::LeaveIfError( table->PutRecordChanges( EFalse, EFalse ) ); - CleanupStack::PopAndDestroy( table ); // table - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::WriteLanDataL" ) ) ); } @@ -2006,114 +512,7 @@ TBool& aNameChanged ) { - CLOG( ( EHandler, 0, - _L( "-> CApDataHandler::DoUpdateAccessPointDataL" ) ) ); - - // internal function, caller MUST initiate a transaction, WE WILL NOT. - if ( aApItem.iWapAccessPointName->Length() == 0 ) - { - User::Leave( KErrInvalidName ); - } - - if ( aIsNew ) - { - HBufC* sgd = ApCommons::DoMakeValidNameL - ( - *iDb, - aNameChanged, - aApItem.iWapAccessPointName, - aApItem.iWapUid, - aIsNew - ); - if ( aNameChanged ) - { - CleanupStack::PushL( sgd ); - aApItem.SetNamesL( *sgd ); - CleanupStack::Pop( sgd ); - } - delete sgd; - } - else - { - // first check the existence of the access point, - // just to be on the sure side... - CCommsDbTableView* wapt; - wapt = iDb->OpenViewMatchingUintLC( TPtrC(WAP_ACCESS_POINT), - TPtrC(COMMDB_ID), aApItem.iWapUid ); - // if no other problem, will return KErrNone if it exists - // so we will go through to the next step. - // if returns KErrNotFound or any other problem, leave here. - User::LeaveIfError( wapt->GotoFirstRecord() ); - // now we need to destroy to create a new 'view' - CleanupStack::PopAndDestroy( wapt ); // wapt - - // now we can go on with the real stuff here... - // check if a record with the currently given name exists. - // No problem, if the UID is the same as ours, - // otherwise, leave because name already exists... - wapt = iDb->OpenViewMatchingTextLC( TPtrC(WAP_ACCESS_POINT), - TPtrC(COMMDB_NAME), - *aApItem.iWapAccessPointName ); - TInt res = wapt->GotoFirstRecord(); - if ( res == KErrNotFound ) - { // no such name - aNameChanged = EFalse; - } - else - { - if ( res == KErrNone ) - { - TUint32 id; - wapt->ReadUintL( TPtrC(COMMDB_ID), id ); - if ( id != aApItem.iWapUid ) - { - User::Leave( KErrAlreadyExists ); - } - } - else - { - User::LeaveIfError( res ); - } - } - CleanupStack::PopAndDestroy( wapt ); // wapt - } - - TBool NeedManualUpdate( ETrue ); - - // additional code for managing bearer-change starts here... - if ( !aIsNew ) - { // only check if update op. - // if bearer changed, it also UPDATES everything ! - // if no change, update MUST BE DONE HERE MANUALLY! - if ( HandleBearerChangeIfNeededL( aApItem ) ) - { - NeedManualUpdate = EFalse; - } - } - if ( NeedManualUpdate ) - { - WriteIspDataL( aIsNew, aApItem.iIapServiceId, aApItem ); - WriteNetworkDataL( aIsNew, aApItem ); - WriteIapDataL( aIsNew, aApItem.iWapIap, aApItem ); - WriteWapApDataL( aIsNew, aApItem.iWapUid, aApItem ); - WriteWapBearerDataL( aIsNew, aApItem.iWapUid, aApItem ); - if ( aApItem.HasProxy() ) - { - WriteProxyDataL( aIsNew, aApItem ); - } - else - { - if ( !aIsNew ) - { - TRAP_IGNORE( RemoveProxyDataL( aApItem.iIapServiceType, - aApItem.iIapServiceId ) ); - } - } - } - - CLOG( ( EHandler, 1, - _L( "<- CApDataHandler::DoUpdateAccessPointDataL" ) ) ); - return aApItem.iWapUid; + return 0; } @@ -2124,46 +523,6 @@ // void CApDataHandler::SetDefaultIapIspL( TUint32 aUid ) { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::SetDefaultIapIspL" ) ) ); - - CApAccessPointItem* ap = CApAccessPointItem::NewLC(); - AccessPointDataL( aUid, *ap ); - // Get IAP uid from aUid record - // ap.iWapIap - // Dial In or Dial Out? - // ap.iWapIspType - // store it accordingly - switch ( ap->BearerTypeL() ) - { - case EApBearerTypeCSD: - case EApBearerTypeHSCSD: - { -// iDb->SetGlobalSettingL( TPtrC(DIAL_OUT_IAP), ap->iWapIap ); - SetPreferredIfDbIapTypeL - ( 1, // aRank, - ECommDbConnectionDirectionOutgoing, //aDirection, - KCommDbBearerCSD, // aBearers, - ECommDbDialogPrefDoNotPrompt, //aPrompt, - ap->iWapIap, //aIAP, - ETrue //aOverwrite - ); - break; - } - case EApBearerTypeGPRS: - case EApBearerTypeCDMA: - { - // Not applicable ! - User::Leave( KErrArgument ); - break; - } - default: - { - User::Leave( KErrInvalidIspRequest ); - } - } - CleanupStack::PopAndDestroy( ap ); // ap - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::SetDefaultIapIspL" ) ) ); } @@ -2176,29 +535,6 @@ // void CApDataHandler::RemoveWapBearerApL( TUint32 aUid ) { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::RemoveWapBearerApL" ) ) ); - - CCommsDbTableView* bearert; - bearert = iDb->OpenViewMatchingUintLC( TPtrC(WAP_IP_BEARER), - TPtrC(WAP_ACCESS_POINT_ID), aUid ); - - TInt res = bearert->GotoFirstRecord(); // OK. - if ( res == KErrNone ) - { // exists, delete it - User::LeaveIfError( bearert->DeleteRecord() ); - } - else - { - // silently ignore KErrNotFound. It is caused by incorrect DB, - // we are 'repairing it' this way. - if ( res != KErrNotFound ) - { - User::LeaveIfError( res ); - } - } - CleanupStack::PopAndDestroy( bearert ); // bearert - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::RemoveWapBearerApL" ) ) ); } @@ -2209,28 +545,6 @@ // void CApDataHandler::RemoveWapApL( TUint32 aUid ) { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::RemoveWapApL" ) ) ); - - CCommsDbTableView* wapt = iDb->OpenViewMatchingUintLC( - TPtrC(WAP_ACCESS_POINT), - TPtrC(COMMDB_ID), aUid ); - TInt res = wapt->GotoFirstRecord(); // OK. - if ( res == KErrNone ) - { // exists, delete it - User::LeaveIfError( wapt->DeleteRecord() ); - } - else - { - // silently ignore KErrNotFound. It is caused by incorrect DB, - // we are 'repairing it' this way. - if ( res != KErrNotFound ) - { - User::Leave( res ); - } - } - CleanupStack::PopAndDestroy( wapt ); // wapt - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::RemoveWapApL" ) ) ); } @@ -2240,28 +554,6 @@ // void CApDataHandler::RemoveIapL( TUint32 aUid ) { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::RemoveIapL" ) ) ); - - CCommsDbTableView* iapt; - iapt = iDb->OpenViewMatchingUintLC( TPtrC(IAP), - TPtrC(COMMDB_ID), aUid ); - TInt res = iapt->GotoFirstRecord(); // OK. - if ( res == KErrNone ) - { // exists, delete it - User::LeaveIfError( iapt->DeleteRecord() ); - } - else - { - // silently ignore KErrNotFound. It is caused by incorrect DB, - // we are 'repairing it' this way. - if ( res != KErrNotFound ) - { - User::Leave( res ); - } - } - CleanupStack::PopAndDestroy( iapt ); // iapt - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::RemoveIapL" ) ) ); } @@ -2272,37 +564,6 @@ // void CApDataHandler::RemoveIspL( TUint32 aUid, TBool aOut ) { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::RemoveIspL" ) ) ); - - CCommsDbTableView* ispt; - if ( aOut ) - { - ispt = iDb->OpenViewMatchingUintLC( TPtrC(DIAL_OUT_ISP), - TPtrC(COMMDB_ID), aUid ); - } - else - { - ispt = iDb->OpenViewMatchingUintLC( TPtrC(DIAL_IN_ISP), - TPtrC(COMMDB_ID), aUid ); - } - - TInt res = ispt->GotoFirstRecord(); // OK. - if ( res == KErrNone ) - { // exists, delete it - User::LeaveIfError( ispt->DeleteRecord() ); - } - else - { - // silently ignore KErrNotFound. It is caused by incorrect DB, - // we are 'repairing it' this way. - if ( res != KErrNotFound ) - { - User::Leave( res ); - } - } - CleanupStack::PopAndDestroy( ispt ); // ispt - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::RemoveIspL" ) ) ); } @@ -2313,38 +574,6 @@ // void CApDataHandler::RemoveGprsL( TUint32 aUid, TBool aOut ) { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::RemoveGprsL" ) ) ); - - CCommsDbTableView* table; - if ( aOut ) - { - table = iDb->OpenViewMatchingUintLC( TPtrC(OUTGOING_WCDMA), - TPtrC(COMMDB_ID), aUid ); - } - else - { - table = iDb->OpenViewMatchingUintLC( TPtrC(INCOMING_WCDMA), - TPtrC(COMMDB_ID), aUid ); - } - - TInt res = table->GotoFirstRecord(); // O.K. - if ( res == KErrNone ) - { // exists, delete it - User::LeaveIfError( table->DeleteRecord() ); - } - else - { - // silently ignore KErrNotFound. It is caused by incorrect DB, - // we are 'repairing it' this way. - if ( res != KErrNotFound ) - { - User::Leave( res ); - } - } - - CleanupStack::PopAndDestroy( table ); // table - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::RemoveGprsL" ) ) ); } @@ -2354,36 +583,6 @@ // void CApDataHandler::RemoveLanL( TUint32 aUid ) { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::RemoveLanL" ) ) ); - - CCommsDbTableView* table = iDb->OpenViewMatchingUintLC - ( TPtrC(LAN_SERVICE), TPtrC(COMMDB_ID), aUid ); - - TInt res = table->GotoFirstRecord(); // O.K. - if ( res == KErrNone ) - { // exists, delete it - User::LeaveIfError( table->DeleteRecord() ); - } - else - { - // silently ignore KErrNotFound. It is caused by incorrect DB, - // we are 'repairing it' this way. - if ( res != KErrNotFound ) - { - User::Leave( res ); - } - } - CleanupStack::PopAndDestroy( table ); // table - - // try to remove WLAN part, if it has any - // TRAP and ignore if not found - TRAP( res, RemoveWlanL( aUid ) ); - if ( res != KErrNotFound ) - { - User::LeaveIfError( res ); - } - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::RemoveLanL" ) ) ); } @@ -2394,7 +593,6 @@ // void CApDataHandler::RemoveWlanL( TUint32 aUid ) { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::RemoveWlanL - ERROR: not suported" ) ) ); User::Leave( KErrNotSupported ); } @@ -2407,139 +605,7 @@ TBool CApDataHandler::HandleBearerChangeIfNeededL ( CApAccessPointItem& aApItem ) { - CLOG( ( EHandler, 0, - _L( "-> CApDataHandler::HandleBearerChangeIfNeededL" ) ) ); - - TApBearerType anew = aApItem.BearerTypeL(); - - CApUtils* au = CApUtils::NewLC( *iDb ); - TApBearerType aold = au->BearerTypeL( aApItem.iWapUid ); - // if different WAP_Bearer table, OR different IAP_SERVICE table, - // delete old ones and save current as NEW records - // under the SAME iWapUid ! - - TBool retval( EFalse ); - if ( ( aold != anew ) && - !( - (( aold == EApBearerTypeHSCSD ) && ( anew == EApBearerTypeCSD ) ) - || - ( ( aold == EApBearerTypeCSD ) && ( anew == EApBearerTypeHSCSD ) ) - ) - ) - {// different bearers! - HBufC* buf = HBufC::NewLC( KModifiableTextLength ); - TPtr ptr( buf->Des() ); - au->WapBearerTypeL( aApItem.iWapUid, ptr ); - - CApAccessPointItem* apitem = CApAccessPointItem::NewLC(); - AccessPointDataL( aApItem.iWapUid, *apitem ); - - if ( *aApItem.iWapBearer != ptr ) - { - // if different WAP_Bearer table, delete old wap_bearer - // & if needed, IAP, ISP, GPRS, CDMA, too - // and Crete new wap bearer & if needed, IAP, ISP, GPRS, CDMA, too - if ( *apitem->iWapBearer == TPtrC(WAP_IP_BEARER) ) - { - // e.g.:RemoveIpBearer(iIapServiceType, iIapServiceId, - // iWapIap ) - if ( ( *apitem->iIapServiceType == TPtrC(DIAL_OUT_ISP) ) - || ( *apitem->iIapServiceType == TPtrC(DIAL_IN_ISP) ) ) - { // ISP - RemoveIspL( apitem->iIapServiceId, - ( *apitem->iIapServiceType == TPtrC(DIAL_OUT_ISP) ) ); - } - else if( ( *apitem->iIapServiceType == - TPtrC(OUTGOING_WCDMA) ) - || ( *apitem->iIapServiceType == - TPtrC(INCOMING_WCDMA) ) ) - {// Gprs - RemoveGprsL( apitem->iIapServiceId, - ( *apitem->iIapServiceType == - TPtrC(OUTGOING_WCDMA) ) ); - } - else - { - // check if WLAN - if ( aApItem.iExt->iWlanData ) - { - RemoveLanL( apitem->iIapServiceId ); - } - else - { - // no leave on else Unknown, as we are deleting - // so silently ignore the error... - } - } - RemoveIapL( apitem->iWapIap ); - RemoveWapBearerApL( aApItem.iWapUid ); - } - else - { // SMS - User::Leave( KErrInvalidBearerType ); - } - RemoveProxyDataL( apitem->iIapServiceType, apitem->iIapServiceId ); - WriteIspDataL( ETrue, aApItem.iIapServiceId, aApItem ); - WriteIapDataL( ETrue, aApItem.iWapIap, aApItem ); - - // gets the UID needed for Bearer table - WriteWapApDataL( EFalse, aApItem.iWapUid, aApItem ); - // needs new bearer record - WriteWapBearerDataL( ETrue, aApItem.iWapUid, aApItem ); - if ( aApItem.HasProxy() ) - { - WriteProxyDataL( ETrue, aApItem ); - } - } - else - { // bearer table is same, but IAP_SERVICE is different - if ( ( aold == EApBearerTypeHSCSD ) || - ( aold == EApBearerTypeCSD ) ) - { - RemoveIspL( apitem->iIapServiceId, - ( *apitem->iIapServiceType == TPtrC(DIAL_OUT_ISP) ) ); - } - else if ( ( *apitem->iIapServiceType == - TPtrC(OUTGOING_WCDMA) ) - || ( *apitem->iIapServiceType == - TPtrC(INCOMING_WCDMA) ) ) - { - RemoveGprsL( apitem->iIapServiceId, - ( *apitem->iIapServiceType == TPtrC(OUTGOING_WCDMA) ) ); - } - else - { - // check if WLAN - if ( aApItem.iExt->iWlanData ) - { - RemoveLanL( apitem->iIapServiceId ); - } - else - { - // no leave on else Unknown, as we are deleting - // so silently ignore the error... - } - } - RemoveProxyDataL( apitem->iIapServiceType, apitem->iIapServiceId ); - WriteIspDataL( ETrue, aApItem.iIapServiceId, aApItem ); - WriteIapDataL( EFalse, aApItem.iWapIap, aApItem ); - // gets the UID needed for Bearer table - WriteWapApDataL( EFalse, aApItem.iWapUid, aApItem ); - WriteWapBearerDataL( EFalse, aApItem.iWapUid, aApItem ); - if ( aApItem.HasProxy() ) - { - WriteProxyDataL( ETrue, aApItem ); - } - } - CleanupStack::PopAndDestroy( 2, buf ); // apitem, buf - retval = ETrue; - } - CleanupStack::PopAndDestroy( au ); // au - // additional code for managing bearer-change ends here... - - CLOG( ( EHandler, 1, - _L( "<- CApDataHandler::HandleBearerChangeIfNeededL" ) ) ); - return retval; + return EFalse; } @@ -2553,19 +619,6 @@ void CApDataHandler::DoAccessPointDataL( TUint32 aUid, CApAccessPointItem& aApItem ) { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::DoAccessPointDataL" ) ) ); - - ReadWapDataL( aUid, aApItem ); - - if ( *aApItem.iWapBearer == TPtrC(WAP_IP_BEARER) ) - { - ReadIapDataL( aApItem.iWapIap, aApItem ); - ReadNetworkDataL( aApItem ); - ReadIspDataL( aApItem.iIapServiceId, aApItem ); - } - ReadProxyDataL( aApItem ); - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::DoAccessPointDataL" ) ) ); } @@ -2575,91 +628,6 @@ // void CApDataHandler::DoRemoveAPL( TUint32 aUid ) { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::DoRemoveAPL" ) ) ); - - CApUtils* utils = CApUtils::NewLC( *iDb ); - if ( utils->IsAPInUseL( aUid ) ) - { - User::Leave( KErrInUse ); - } - CleanupStack::PopAndDestroy( utils ); // utils - - CCommsDbTableView* wapt; - wapt = iDb->OpenViewMatchingUintLC( TPtrC(WAP_ACCESS_POINT), - TPtrC(COMMDB_ID), aUid ); - User::LeaveIfError( wapt->GotoFirstRecord() ); - HBufC* buf = HBufC::NewLC( KCommsDbSvrMaxFieldLength ); - TPtr ptr( buf->Des() ); - wapt->ReadTextL( TPtrC(WAP_CURRENT_BEARER), - ptr ); // see declaration for comments! - - if ( *buf == TPtrC(WAP_IP_BEARER) ) - { - // get serviceType - CCommsDbTableView* bearert; - bearert = iDb->OpenViewMatchingUintLC( TPtrC(WAP_IP_BEARER), - TPtrC(WAP_ACCESS_POINT_ID), - aUid ); - - User::LeaveIfError( bearert->GotoFirstRecord() ); - TUint32 iapid; - ApCommons::ReadUintL( bearert, TPtrC(WAP_IAP), iapid ); - - CCommsDbTableView* iapt; - iapt = iDb->OpenViewMatchingUintLC( TPtrC(IAP), TPtrC(COMMDB_ID), - iapid ); - - User::LeaveIfError( iapt->GotoFirstRecord() ); - HBufC* servicetype = HBufC::NewLC( KCommsDbSvrMaxFieldLength ); - TPtr servptr( servicetype->Des() ); - iapt->ReadTextL( TPtrC(IAP_SERVICE_TYPE), servptr ); - TUint32 ispid; - iapt->ReadUintL( TPtrC(IAP_SERVICE), ispid ); - TUint32 networkid; - iapt->ReadUintL( TPtrC(IAP_NETWORK), networkid ); - RemoveNetworkDataL( networkid ); - if ( ( *servicetype == TPtrC(DIAL_OUT_ISP) ) || - ( *servicetype == TPtrC(DIAL_IN_ISP) ) ) - { // ISP - RemoveIspL( ispid, ( *servicetype == TPtrC(DIAL_OUT_ISP)) ); - RemoveIapL( iapid ); - } - else - { // Gprs - if ( ( *servicetype == TPtrC(OUTGOING_WCDMA) ) || - ( *servicetype == TPtrC(INCOMING_WCDMA) ) ) - { - RemoveGprsL( ispid, ( *servicetype == TPtrC(OUTGOING_WCDMA)) ); - RemoveIapL( iapid ); - } - else - { - if ( *servicetype ==TPtrC(LAN_SERVICE) ) - { - // LAN, WLAN - RemoveLanL( ispid ); - RemoveIapL( iapid ); - } - else - { - // VPN... - } - } - } - RemoveProxyDataL( servicetype, ispid ); - RemoveWapBearerApL( aUid ); - CleanupStack::PopAndDestroy( 3, bearert ); // servicetype,iapt,bearert - } - else - { // sms, - User::Leave( KErrInvalidBearerType ); - } - - RemoveWapApL( aUid ); - - CleanupStack::PopAndDestroy( 2, wapt ); // buf, wapt - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::DoRemoveAPL" ) ) ); } @@ -2671,36 +639,6 @@ void CApDataHandler::DoSetAsDefaultL( TUint32 aUid, TCommsDbIspType aIntendedType ) { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::DoSetAsDefaultL" ) ) ); - - // Due to changes in the database, ONLY WAP_ACCESS_POINT_ID - switch ( aIntendedType ) - { - case EIspTypeInternetOnly: - { - SetDefaultIapIspL( aUid ); - break; - } - case EIspTypeWAPOnly: - { - iDb->SetGlobalSettingL( TPtrC(WAP_ACCESS_POINT), aUid ); - break; - } - case EIspTypeInternetAndWAP: - { - iDb->SetGlobalSettingL( TPtrC(WAP_ACCESS_POINT), aUid ); - SetDefaultIapIspL( aUid ); - break; - } - default : - { - __ASSERT_DEBUG( EFalse, User::Panic( KErrInvalidIntendedType, - aIntendedType ) ); - break; - } - } - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::DoSetAsDefaultL" ) ) ); } @@ -2718,39 +656,6 @@ TBool aOverwrite ) { - CLOG( ( EHandler, 0, - _L( "-> CApDataHandler::DoSetPreferredIfDbIapTypeL" ) ) ); - - CCommsDbConnectionPrefTableView* preft = - iDb->OpenConnectionPrefTableViewOnRankLC( aDirection, aRank ); - if ( aOverwrite ) - { - TInt res = preft->GotoFirstRecord(); // OK. - if ( res == KErrNone ) - { // already exists, delete original and store the new one... - preft->DeleteConnectionPreferenceL(); - } - else - { - // silently ignore KErrNotFound. - // It is not an error in this case. - if ( res != KErrNotFound ) - { - User::Leave( res ); - } - } - } - CCommsDbConnectionPrefTableView::TCommDbIapConnectionPref pref; - pref.iRanking = aRank; - pref.iBearer.iBearerSet = aBearers; - pref.iDialogPref = aPrompt; - pref.iBearer.iIapId = aIAP; - pref.iDirection = aDirection; - preft->InsertConnectionPreferenceL( pref ); - CleanupStack::PopAndDestroy( preft ); // preft - - CLOG( ( EHandler, 1, - _L( "<- CApDataHandler::DoSetPreferredIfDbIapTypeL" ) ) ); } @@ -2770,12 +675,6 @@ TBool /*aOverwrite*/ ) { - /* - DEPRECATED!!! - */ - CLOG( ( EHandler, 0, - _L( "<-> CApDataHandler::DoSetPreferredIfDbIspTypeL" ) ) ); - User::Leave( KErrNotSupported ); } @@ -2787,109 +686,6 @@ // void CApDataHandler::ApSpeed2EtelL( CApAccessPointItem* aItem ) { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::ApSpeed2EtelL" ) ) ); - - __ASSERT_DEBUG( (aItem), ApCommons::Panic( ENullPointer ) ) ; - - /***************************************************** - * Series 60 Customer / ETel - * Series 60 ETel API - *****************************************************/ - - TInt bear = CSD; - switch ( aItem->BearerTypeL() ) - { - case EApBearerTypeCSD: - { - // search for (CSD, x, x) - bear = CSD; - break; - } - case EApBearerTypeHSCSD: - { - // HSCSD - // search for (HCSD, x, x) - bear = HSCSD; - break; - } - default: - { - // it is called only for CSD/HSCSD bearers, but to be sure... - __ASSERT_DEBUG( EFalse, ApCommons::Panic( ENotSupported ) ) ; - User::Leave( KErrInvalidBearerType ); - break; - } - } - - TInt type = Analogue; - switch ( aItem->iBearerCallTypeIsdn ) - { - case ECallTypeAnalogue: - { - type = Analogue; - break; - } - case ECallTypeISDNv110: - { - type = V110; - break; - } - case ECallTypeISDNv120: - { - type = V120; - break; - } - default: - { - // it has only 3 states, but to be sure... - __ASSERT_DEBUG( EFalse, ApCommons::Panic( EInvalidSpeed ) ) ; - User::Leave( KErrInvalidBearerType ); - break; - } - } - - TBool found(EFalse); - // just get count once... - TInt count = sizeof(SpeedData)/sizeof(SpeedData[0]); - - for( TInt i=0; iiMaxConnSpeed ) ) - { - // wwe found it, get values, break - // Bearer_name, Bearer speed, Bearer_ce, Bearer_type - aItem->WriteUint( EApIspBearerName, SpeedData[i][3] ); - aItem->iExt->iBearerSpeed = SpeedData[i][4]; - aItem->WriteUint( EApIspBearerCE, SpeedData[i][5] ); - aItem->WriteUint( EApIspBearerType, SpeedData[i][6] ); - - - // Channel coding, Aiur, Req.Slot, MaxSlot, - aItem->WriteUint( EApIspChannelCoding, SpeedData[i][7] ); - aItem->WriteUint( EApIspAIUR, SpeedData[i][8] ); - aItem->WriteUint( EApIspRequestedTimeSlots, SpeedData[i][9] ); - aItem->WriteUint( EApIspMaximumTimeSlots, SpeedData[i][10] ); - - // Bearer_service, Bearer_Protocol - aItem->WriteUint( EApIapBearerService, SpeedData[i][11] ); - aItem->iExt->iBearerProtocol = SpeedData[i][12]; - - i = count; - found = ETrue; - } - } - if ( !found ) - { - // if not found, someone set an invalid speed in the engine - // which already should have been checked, - // just to be on the sure side - __ASSERT_DEBUG( EFalse, ApCommons::Panic( EInvalidSpeed ) ) ; - User::Leave(KErrNotFound); - } - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::ApSpeed2EtelL" ) ) ); } @@ -2900,100 +696,6 @@ // void CApDataHandler::EtelSpeed2ApL( CApAccessPointItem& aItem ) { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::EtelSpeed2ApL" ) ) ); - - // ************* ALERT *************** - // We utilise the fact that this is called right after the data - // had been read from the DB and the - // aItem.iMaxConnSpeed and aItem.iBearerCallTypeIsdn members - // are holding the CommsDb style values. - // now we are converting it to our style as the API is fixed - // and so are the used enums... - - /***************************************************** - * Series 60 Customer / ETel - * Series 60 ETel API - *****************************************************/ - - TBool found(EFalse); - // just get count once... - TInt count = sizeof(SpeedData)/sizeof(SpeedData[0]); - - for( TInt i=0; iiBearerSpeed ) - && ( SpeedData[i][5] == aItem.iIspBearerCE ) - && ( SpeedData[i][6] == aItem.iIspBearerType ) - && ( SpeedData[i][7] == aItem.iIspChannelCoding ) - && ( SpeedData[i][8] == aItem.iIspAIUR ) - && ( SpeedData[i][9] == aItem.iIspRequestedTimeSlots ) - && ( SpeedData[i][10] == aItem.iIspMaximumTimeSlots ) - && ( SpeedData[i][11] == aItem.iApIapBearerService ) - && ( SpeedData[i][12] == aItem.iExt->iBearerProtocol ) ) - { - // we found it, get values, break - switch ( SpeedData[i][0] ) - { - case CSD: - { - aItem.iIspBearerType = EBearerTypeCSD; - break; - } - case HSCSD: - { - aItem.iIspBearerType = EBearerTypeHSCSD; - break; - } - default: - { // incorrect db, repair... - aItem.iIspBearerType = EBearerTypeCSD; - break; - } - } - - - switch ( SpeedData[i][1]) - { - case Analogue: - { - aItem.iBearerCallTypeIsdn = ECallTypeAnalogue; - break; - } - case V110: - { - aItem.iBearerCallTypeIsdn = ECallTypeISDNv110; - break; - } - case V120: - { - aItem.iBearerCallTypeIsdn = ECallTypeISDNv120; - break; - } - default: - { - // incorrect db, repair... - aItem.iBearerCallTypeIsdn = ECallTypeAnalogue; - break; - } - } - - aItem.iMaxConnSpeed = TApCallSpeed(SpeedData[i][2]); - i = count; - found = ETrue; - } - } - if ( !found ) - { - // if not found, someone set an invalid speed in the engine - // which already should have been checked, - // just to be on the sure side - __ASSERT_DEBUG( EFalse, ApCommons::Panic( EInvalidSpeed ) ) ; - User::Leave(KErrNotFound); - } - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::EtelSpeed2ApL" ) ) ); - } @@ -3006,41 +708,7 @@ TUint32 CApDataHandler::DoGetDefaultL( TBool aIsWap, TBool* aReadOnly ) const { // client MUST initiate a transaction, we will NOT ! - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::DoGetDefaultL" ) ) ); - - TUint32 value( KErrNone ); - if ( aIsWap ) - { - iDb->GetGlobalSettingL( TPtrC(WAP_ACCESS_POINT), value ); - } - else - { - TUint32 tmp( 0 ); - // CONST_CAST added later, originally used other code, - // when moved to 2.0, support was removed and needed - // to use own (non-const) - // method which can not be made const as it is part of the public API - CONST_CAST( CApDataHandler*, this )->GetPreferredIfDbIapTypeL - ( 1, // Rank - ECommDbConnectionDirectionOutgoing, - tmp, // aBearers, - tmp, // aPrompt, - value // aIAP - ); - } - - if ( aReadOnly ) - { // get read-only flag for an AP - CCommsDbTableView* wapt = - iDb->OpenViewMatchingUintLC( TPtrC(WAP_ACCESS_POINT), - TPtrC(COMMDB_ID), value); - User::LeaveIfError( wapt->GotoFirstRecord() ); - *aReadOnly = ApCommons::DoGetReadOnlyL( *wapt ); - CleanupStack::PopAndDestroy( wapt ); - } - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::DoGetDefaultL" ) ) ); - return value; + return KErrNotSupported; } @@ -3051,86 +719,6 @@ void CApDataHandler::WriteProxyDataL( TBool aIsNew, const CApAccessPointItem& aApItem ) { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::WriteProxyDataL" ) ) ); - - CCommsDbTableView* proxies; - if ( aIsNew ) - { - proxies = iDb->OpenTableLC( TPtrC(PROXIES) ); - // variable needed just to be able to make the call... - TUint32 dummy; - User::LeaveIfError( proxies->InsertRecord( dummy ) ); - } - else - { - // Add test cases covering this route - proxies = iDb->OpenViewMatchingTextLC( TPtrC(PROXIES), - TPtrC(PROXY_SERVICE_TYPE), - *aApItem.iIapServiceType ); - TInt err = proxies->GotoFirstRecord(); - if ( err == KErrNotFound ) - { // originally there were NO proxy, but now it is added - // variable needed just to be able to make the call... - // Add test cases covering this route - TUint32 dummy; - User::LeaveIfError( proxies->InsertRecord( dummy ) ); - } - else - { - // Add test cases covering this route - // now check if we have our record - TUint32 uval; - TBool found( EFalse ); - do - { - // Add test cases covering this route - proxies->ReadUintL( TPtrC(PROXY_ISP), uval ); - if ( uval == aApItem.iIapServiceId ) - { - found = ETrue; - } - else - { - err = proxies->GotoNextRecord(); - } - } while ( (!err) && (!found) ); - if ( !found ) - { // no proxy record, add it now - // variable needed just to be able to make the call... - TUint32 dummy; - User::LeaveIfError( proxies->InsertRecord( dummy ) ); - } - else - { // we found our proxy, use it... - User::LeaveIfError( proxies->UpdateRecord() ); - } - } - } - proxies->WriteUintL( TPtrC(PROXY_ISP), aApItem.iIapServiceId ); - proxies->WriteTextL( TPtrC(PROXY_SERVICE_TYPE), - *aApItem.iIapServiceType ); - - - proxies->WriteLongTextL( TPtrC(PROXY_SERVER_NAME), - *aApItem.iApProxyServerAddress); - - proxies->WriteTextL( TPtrC(PROXY_PROTOCOL_NAME), - *aApItem.iApProxyProtocolName ); - - proxies->WriteUintL( TPtrC(PROXY_PORT_NUMBER), - aApItem.iApProxyPortNumber ); - - proxies->WriteBoolL( TPtrC(PROXY_USE_PROXY_SERVER), - aApItem.iApProxyUseProxy ); - - proxies->WriteLongTextL( TPtrC(PROXY_EXCEPTIONS), - *aApItem.iApProxyExceptions ); - - User::LeaveIfError( proxies->PutRecordChanges( EFalse, EFalse ) ); - - CleanupStack::PopAndDestroy( proxies ); // proxies - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::WriteProxyDataL" ) ) ); } @@ -3140,79 +728,6 @@ // void CApDataHandler::ReadProxyDataL( CApAccessPointItem& aApItem ) { - // internal function, caller MUST initiate a transaction, WE WILL NOT. - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::ReadProxyDataL" ) ) ); - - // Add test cases covering ALL routes of this function - - CCommsDbTableView* proxies; - proxies = iDb->OpenViewMatchingTextLC( TPtrC(PROXIES), - TPtrC(PROXY_SERVICE_TYPE), - *aApItem.iIapServiceType ); - - TInt err = proxies->GotoFirstRecord(); - - if ( err != KErrNotFound ) - { - User::LeaveIfError( err ); - } - - if ( err != KErrNotFound ) - { - // we have some proxy, now found our record... - TUint32 uval; - TBool found( EFalse ); - do - { - proxies->ReadUintL( TPtrC(PROXY_ISP), uval ); - if ( uval == aApItem.iIapServiceId ) - { - found = ETrue; - } - else - { - err = proxies->GotoNextRecord(); - } - } while ( (!err) && (!found) ); - if ( found ) - { - HBufC* buf = ApCommons::ReadLongTextLC( proxies, - TPtrC(PROXY_SERVER_NAME), - err ); - if ( err != KErrUnknown ) - { - aApItem.WriteLongTextL( EApProxyServerAddress, *buf ); - } - - CleanupStack::PopAndDestroy( buf ); - buf = ApCommons::ReadText16ValueLC( proxies, - TPtrC(PROXY_PROTOCOL_NAME) ); - aApItem.WriteTextL( EApProxyProtocolName, *buf ); - CleanupStack::PopAndDestroy( buf ); - - TUint32 tempint( 0 ); - TBool tempbool( EFalse ); - - ApCommons::ReadUintL( proxies, TPtrC(PROXY_PORT_NUMBER), tempint ); - aApItem.WriteUint( EApProxyPortNumber, tempint ); - - - ApCommons::ReadBoolL( proxies, - TPtrC(PROXY_USE_PROXY_SERVER), - tempbool ); - aApItem.WriteBool( EApProxyUseProxy, tempbool ); - - buf = ApCommons::ReadLongTextLC( proxies, - TPtrC(PROXY_EXCEPTIONS), - err ); - aApItem.WriteLongTextL( EApProxyExceptions, *buf ); - - CleanupStack::PopAndDestroy( buf ); - } - } - CleanupStack::PopAndDestroy( proxies ); // proxies, sqlbuf - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::ReadProxyDataL" ) ) ); } @@ -3223,60 +738,6 @@ // void CApDataHandler::RemoveProxyDataL( HBufC* aServiceType, TUint32 aIspId ) { - // internal function, caller MUST initiate a transaction, WE WILL NOT. - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::RemoveProxyDataL" ) ) ); - - // Add test cases covering ALL routes of this function - - CCommsDbTableView* proxies; - proxies = iDb->OpenViewMatchingTextLC( TPtrC(PROXIES), - TPtrC(PROXY_SERVICE_TYPE), - *aServiceType ); - - TInt err = proxies->GotoFirstRecord(); - - if ( err != KErrNotFound ) - { - User::LeaveIfError( err ); - } - - if ( err != KErrNotFound ) - { - // we have some proxy, now found our record... - TUint32 uval; - TBool found( EFalse ); - do - { - proxies->ReadUintL( TPtrC(PROXY_ISP), uval ); - if ( uval == aIspId ) - { - found = ETrue; - } - else - { - err = proxies->GotoNextRecord(); - } - } while ( (!err) && (!found) ); - if ( found ) - { - if ( err == KErrNone ) - { - User::LeaveIfError( proxies->DeleteRecord() ); - } - else - { - // silently ignore KErrNotFound. It is caused by incorrect DB, - // we are 'repairing it' this way. - if ( err != KErrNotFound ) - { - User::LeaveIfError( err ); - } - } - } - } - CleanupStack::PopAndDestroy( proxies ); // proxies - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::RemoveProxyDataL" ) ) ); } @@ -3289,46 +750,6 @@ void CApDataHandler::WriteNetworkDataL( TBool aIsNew, CApAccessPointItem& aApItem ) { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::WriteNetworkDataL" ) ) ); - - if ( aApItem.iNetworkName->Compare( KEmpty ) != 0 ) - { - CCommsDbTableView* networks; - HBufC* buf = HBufC::NewLC( KApEngineMaxSql ); - if ( aIsNew ) - { - networks = iDb->OpenTableLC( TPtrC(NETWORK) ); - TUint32 netid; - User::LeaveIfError( networks->InsertRecord( netid ) ); - aApItem.iNetworkId = netid; - } - else - { - networks = iDb->OpenViewMatchingUintLC( TPtrC(NETWORK), - TPtrC(COMMDB_ID), - aApItem.iNetworkId ); - TInt err = networks->GotoFirstRecord(); - if ( err == KErrNotFound ) - { - // originally there were NO network, but now it is added - TUint32 netid; - User::LeaveIfError( networks->InsertRecord( netid ) ); - aApItem.iNetworkId = netid; - } - else - { - User::LeaveIfError( networks->UpdateRecord() ); - } - } - networks->WriteTextL( TPtrC(COMMDB_NAME), *aApItem.iNetworkName ); - - User::LeaveIfError( networks->PutRecordChanges( EFalse, EFalse ) ); - - CleanupStack::PopAndDestroy( networks ); // networks - CleanupStack::PopAndDestroy( buf ); // buf - } - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::WriteNetworkDataL" ) ) ); } @@ -3338,38 +759,6 @@ // void CApDataHandler::ReadNetworkDataL( CApAccessPointItem& aApItem ) { - // internal function, caller MUST initiate a transaction, WE WILL NOT. - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::ReadNetworkDataL" ) ) ); - - CCommsDbTableView* networks; - networks = iDb->OpenViewMatchingUintLC( TPtrC(NETWORK), - TPtrC(COMMDB_ID), - aApItem.iNetworkId ); - - TInt err = networks->GotoFirstRecord(); - - if ( err != KErrNotFound ) - { - User::LeaveIfError( err ); - } - if ( err != KErrNotFound ) - { - HBufC* buf = ApCommons::ReadText16ValueLC( networks, - TPtrC(COMMDB_NAME) ); - if ( err != KErrUnknown ) - { - aApItem.WriteTextL( EApNetworkName, *buf ); - } - - CleanupStack::PopAndDestroy( buf ); - } - else - { // not found, set to NONE - aApItem.WriteTextL( EApNetworkName, KEmpty ); - } - CleanupStack::PopAndDestroy( networks ); // networks - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::ReadNetworkDataL" ) ) ); } @@ -3380,32 +769,6 @@ // void CApDataHandler::RemoveNetworkDataL( TUint32 aIspId ) { - // internal function, caller MUST initiate a transaction, WE WILL NOT. - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::RemoveNetworkDataL" ) ) ); - - CCommsDbTableView* networks; - networks = iDb->OpenViewMatchingUintLC( TPtrC(NETWORK), - TPtrC(COMMDB_ID), - aIspId ); - - TInt err = networks->GotoFirstRecord(); - - if ( err == KErrNone ) - { - User::LeaveIfError( networks->DeleteRecord() ); - } - else - { - // silently ignore KErrNotFound. It is caused by incorrect DB, - // we are 'repairing it' this way. - if ( err != KErrNotFound ) - { - User::LeaveIfError( err ); - } - } - CleanupStack::PopAndDestroy( networks ); // networks, buf - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::RemoveNetworkDataL" ) ) ); } @@ -3416,22 +779,7 @@ // TUint32 CApDataHandler::GetLocationIdL() { - // agreed that the location record having the name 'Mobile' is used - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::GetLocationIdL" ) ) ); - - CCommsDbTableView* loc; - loc = iDb->OpenViewMatchingTextLC( TPtrC(LOCATION), TPtrC(COMMDB_NAME), - KLocation ); - TInt err = loc->GotoFirstRecord(); - - User::LeaveIfError( err ); - TUint32 id( 0 ); - loc->ReadUintL( TPtrC(COMMDB_ID), id ); - - CleanupStack::PopAndDestroy( loc ); // loc - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::GetLocationIdL" ) ) ); - return id; + return 0; } @@ -3442,110 +790,7 @@ // TUint32 CApDataHandler::GetModemBearerIDL( CApAccessPointItem& aApItem ) { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::GetModemBearerIDL" ) ) ); - - // agreed that the modem bearer record having the name - // 'CSD Modem' is used for (HS)CSD Access Points and - // 'GPRS Modem' is used for GPRS/WCDMA Access Points - // 'CDMA Modem' is used for CDMA Access Points - CCommsDbTableView* view = NULL; - TApBearerType bearer = aApItem.BearerTypeL(); - switch ( bearer ) - { - case EApBearerTypeCSD: - case EApBearerTypeHSCSD: - { - view = iDb->OpenViewMatchingTextLC( TPtrC(MODEM_BEARER), - TPtrC(COMMDB_NAME), - KModemBearerCSD ); - break; - } - case EApBearerTypeCDMA: - { - view = iDb->OpenViewMatchingTextLC( TPtrC(MODEM_BEARER), - TPtrC(COMMDB_NAME), - KModemBearerCDMA ); - break; - } - case EApBearerTypeGPRS: - { - view = iDb->OpenViewMatchingTextLC( TPtrC(MODEM_BEARER), - TPtrC(COMMDB_NAME), - KModemBearerGPRS ); - break; - } -#ifdef __TEST_LAN_BEARER - case EApBearerTypeLAN: - { - view = iDb->OpenViewMatchingTextLC( TPtrC(LAN_BEARER), - TPtrC(COMMDB_NAME), - KModemBearerLAN ); - break; - } -#endif // __TEST_LAN_BEARER - case EApBearerTypeWLAN: - { - if ( aApItem.iExt->iWlanData ) - { - view = iDb->OpenViewMatchingTextLC( TPtrC(LAN_BEARER), - TPtrC(COMMDB_NAME), - KModemBearerWLAN ); - } - else - { - User::Leave( KErrNotSupported ); - } - break; - } - case EApBearerTypeLANModem: - { - view = iDb->OpenViewMatchingTextLC( TPtrC(LAN_BEARER), - TPtrC(COMMDB_NAME), - KModemBearerLANModem ); - break; - } - default: - { - User::Leave( KErrInvalidBearerType ); - } - } - - TUint32 id( 0 ); - - if ( view ) - { - TInt err = view->GotoFirstRecord(); - if ( err == KErrNone ) - { - view->ReadUintL( TPtrC(COMMDB_ID), id ); - } - else - { - if ( err != KErrNotFound ) - { - User::LeaveIfError( err ); - } - else - { - if ( aApItem.iExt->iWlanData ) - { - id = CreateLanBearerIfNeededL(); - } - else - { -#ifdef __TEST_LAN_BEARER - id = CreateLanBearerIfNeededL(); -#else // __TEST_LAN_BEARER - User::Leave( KErrNotSupported ); -#endif //__TEST_LAN_BEARER - } - } - } - CleanupStack::PopAndDestroy( view ); // view - } - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::GetModemBearerIDL" ) ) ); - return id; + User::Leave( KErrInvalidBearerType ); } @@ -3558,103 +803,6 @@ void CApDataHandler::ReadServiceL( CCommsDbTableView& ispt, CApAccessPointItem& aApItem ) { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::ReadServiceL" ) ) ); - - HBufC* buf = ApCommons::ReadText16ValueLC( &ispt, TPtrC(COMMDB_NAME) ); - aApItem.WriteTextL( EApIspName, *buf ); - CleanupStack::PopAndDestroy( buf ); - -// TUint32 tempint( 0 ); - TBool tempbool( EFalse ); - -/* - buf = ApCommons::ReadText16ValueLC( &ispt, TPtrC(SERVICE_IF_PARAMS) ); - aApItem.WriteTextL( EApIspIfParams, *buf ); - CleanupStack::PopAndDestroy( buf ); -*/ - buf = ApCommons::ReadText16ValueLC( &ispt, TPtrC(SERVICE_IF_NETWORKS) ); - aApItem.WriteTextL( EApWlanIfNetworks, *buf ); - CleanupStack::PopAndDestroy( buf ); - -/* - ApCommons::ReadBoolL( &ispt, TPtrC(SERVICE_IF_PROMPT_FOR_AUTH), tempbool ); - aApItem.WriteBool( EApWlanIfPromptForAuth, tempbool ); - - buf = ApCommons::ReadText16ValueLC( &ispt, TPtrC(SERVICE_IF_AUTH_NAME) ); - aApItem.WriteTextL( EApWlanIfAuthName, *buf ); - CleanupStack::PopAndDestroy( buf ); - - buf = ApCommons::ReadText16ValueLC( &ispt, TPtrC(SERVICE_IF_AUTH_PASS) ); - aApItem.WriteTextL( EApWlanIfAuthPassword, *buf ); - CleanupStack::PopAndDestroy( buf ); - - ApCommons::ReadUintL( &ispt, TPtrC(SERVICE_IF_AUTH_RETRIES), tempint ); - aApItem.WriteUint( EApWlanIfAuthRetries, tempint ); - - ApCommons::ReadBoolL( &ispt, - TPtrC(SERVICE_IF_CALLBACK_ENABLED), tempbool ); - aApItem.WriteBool( EApIspIfCallbackEnabled, tempbool ); - - ApCommons::ReadUintL( &ispt, TPtrC(SERVICE_IF_CALLBACK_TYPE), tempint ); - aApItem.WriteUint( EApIspIfCallbackType, ( TCallbackAction )tempint ); - - HBufC8* buf8 = ApCommons::ReadText8ValueLC - ( &ispt, TPtrC(SERVICE_IF_CALLBACK_INFO) ); - aApItem.WriteTextL( EApIspIfCallbackInfo, *buf8 ); - CleanupStack::PopAndDestroy( buf8 ); - - ApCommons::ReadUintL( &ispt, TPtrC(SERVICE_CALLBACK_TIMEOUT), tempint ); - aApItem.WriteUint( EApIspCallBackTimeOut, tempint ); -*/ - - buf = ApCommons::ReadText16ValueLC( &ispt, TPtrC(SERVICE_IP_NETMASK) ); - aApItem.WriteTextL( EApWlanIpNetMask, *buf ); - CleanupStack::PopAndDestroy( buf ); - - buf = ApCommons::ReadText16ValueLC( &ispt, TPtrC(SERVICE_IP_GATEWAY) ); - aApItem.WriteTextL( EApWlanIpGateway, *buf ); - CleanupStack::PopAndDestroy( buf ); - - ApCommons::ReadBoolL( &ispt, - TPtrC(SERVICE_IP_ADDR_FROM_SERVER), tempbool ); - aApItem.WriteBool( EApWlanIpAddrFromServer, tempbool ); - - buf = ApCommons::ReadText16ValueLC( &ispt, TPtrC(SERVICE_IP_ADDR) ); - aApItem.WriteTextL( EApWlanIpAddr, *buf ); - CleanupStack::PopAndDestroy( buf ); - - ApCommons::ReadBoolL( &ispt, TPtrC(SERVICE_IP_DNS_ADDR_FROM_SERVER), - tempbool ); - aApItem.WriteBool( EApWlanIpDnsAddrFromServer, tempbool ); - - buf = ApCommons::ReadText16ValueLC( &ispt, - TPtrC(SERVICE_IP_NAME_SERVER1) ); - aApItem.WriteTextL( EApWlanIPNameServer1, *buf ); - CleanupStack::PopAndDestroy( buf ); - - buf = ApCommons::ReadText16ValueLC( &ispt, - TPtrC(SERVICE_IP_NAME_SERVER2) ); - aApItem.WriteTextL( EApWlanIPNameServer2, *buf ); - CleanupStack::PopAndDestroy( buf ); - -/* - ApCommons::ReadBoolL( &ispt, TPtrC(SERVICE_ENABLE_SW_COMP), tempbool ); - aApItem.WriteBool( EApIspEnableSWCompression, tempbool ); - - ApCommons::ReadBoolL( &ispt, - TPtrC(SERVICE_ENABLE_IP_HEADER_COMP), - tempbool ); - aApItem.WriteBool( EApIspEnableIpHeaderComp, tempbool); - - ApCommons::ReadBoolL( &ispt, - TPtrC(SERVICE_ENABLE_LCP_EXTENSIONS), tempbool ); - aApItem.WriteBool( EApIspEnableLCPExtensions, tempbool ); - - ApCommons::ReadBoolL( &ispt, TPtrC(SERVICE_DISABLE_PLAIN_TEXT_AUTH), - tempbool ); - aApItem.WriteBool( EApIspDisablePlainTextAuth, tempbool ); -*/ - CLOG( ( EHandler, 0, _L( "<- CApDataHandler::ReadServiceL" ) ) ); } @@ -3665,32 +813,6 @@ void CApDataHandler::ReadServiceIp6L( CCommsDbTableView& ispt, CApAccessPointItem& aApItem ) { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::ReadServiceIp6L" ) ) ); - - if ( iExt->iIsIpv6Supported ) - { - TBool tempbool( EFalse ); - HBufC* buf; - - ApCommons::ReadBoolL( &ispt, TPtrC(SERVICE_IP6_DNS_ADDR_FROM_SERVER), - tempbool ); - - aApItem.WriteBool( EApIP6DNSAddrFromServer, tempbool ); - - buf = ApCommons::ReadText16ValueLC( &ispt, - TPtrC(SERVICE_IP6_NAME_SERVER1) ); - - aApItem.WriteTextL( EApIP6NameServer1, *buf ); - CleanupStack::PopAndDestroy( buf ); - - buf = ApCommons::ReadText16ValueLC( &ispt, - TPtrC(SERVICE_IP6_NAME_SERVER2) ); - - aApItem.WriteTextL( EApIP6NameServer2, *buf ); - CleanupStack::PopAndDestroy( buf ); - } - - CLOG( ( EHandler, 0, _L( "<- CApDataHandler::ReadServiceIp6L" ) ) ); } @@ -3703,98 +825,6 @@ void CApDataHandler::WriteServiceL( CCommsDbTableView& aTable, CApAccessPointItem& aApItem ) { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::WriteServiceL" ) ) ); - - aTable.WriteTextL( TPtrC(COMMDB_NAME), *aApItem.iIspName ); - -// aTable.WriteTextL( TPtrC(SERVICE_IF_PARAMS), *aApItem.iIspIfParams ); - - aTable.WriteTextL( TPtrC(SERVICE_IF_NETWORKS), *aApItem.iIspIfNetworks ); - -// aTable.WriteBoolL( TPtrC(SERVICE_IF_PROMPT_FOR_AUTH), -// aApItem.iIspIfPromptForAuth ); - -// aTable.WriteTextL( TPtrC(SERVICE_IF_AUTH_NAME), -// *aApItem.iIspIfAuthName ); - -// aTable.WriteTextL( TPtrC(SERVICE_IF_AUTH_PASS), -// *aApItem.iIspIfAuthPass ); - -// aTable.WriteUintL( TPtrC(SERVICE_IF_AUTH_RETRIES), -// aApItem.iIspIfAuthRetries ); - - aTable.WriteTextL( TPtrC(SERVICE_IP_NETMASK), *aApItem.iIspIPNetMask ); - - aTable.WriteTextL( TPtrC(SERVICE_IP_GATEWAY), *aApItem.iIspGateway ); - - aTable.WriteBoolL( TPtrC(SERVICE_IP_ADDR_FROM_SERVER), - aApItem.iIspIPAddrFromServer ); - - aTable.WriteTextL( TPtrC(SERVICE_IP_ADDR), *aApItem.iIspIPAddr ); - - aTable.WriteBoolL( TPtrC(SERVICE_IP_DNS_ADDR_FROM_SERVER), - aApItem.iGetDNSIPFromServer ); - - aTable.WriteTextL( TPtrC(SERVICE_IP_NAME_SERVER1), - *aApItem.iPrimaryDNS ); - - aTable.WriteTextL( TPtrC(SERVICE_IP_NAME_SERVER2), - *aApItem.iSecondaryDNS ); - -/* - aTable.WriteBoolL( TPtrC(SERVICE_ENABLE_LCP_EXTENSIONS), - aApItem.iIspEnableLCPExtensions ); - - aTable.WriteBoolL( TPtrC(SERVICE_DISABLE_PLAIN_TEXT_AUTH), - aApItem.iIsPasswordAuthenticationSecure ); - - aTable.WriteBoolL( TPtrC(SERVICE_ENABLE_SW_COMP), - aApItem.iIspEnableSwCompression ); - - aTable.WriteBoolL( TPtrC(SERVICE_ENABLE_IP_HEADER_COMP), - aApItem.iEnablePPPCompression ); - - aTable.WriteBoolL( TPtrC(SERVICE_IF_CALLBACK_ENABLED), - aApItem.iUseCallBack ); - - aTable.WriteUintL( TPtrC(SERVICE_IF_CALLBACK_TYPE), - aApItem.iCallBackTypeIsServerNum ); - - aTable.WriteTextL( TPtrC(SERVICE_IF_CALLBACK_INFO), - *aApItem.iIspIfCallbackInfo ); - - aTable.WriteUintL( TPtrC(SERVICE_CALLBACK_TIMEOUT), - aApItem.iIspCallbackTimeOut ); -*/ - -// WriteDaemonL( aTable, aApItem ); starts here - if ( aApItem.iIspIPAddrFromServer ) - { - aTable.WriteTextL( TPtrC(SERVICE_CONFIG_DAEMON_MANAGER_NAME), - KDaemonManagerName ); - aTable.WriteTextL( TPtrC(SERVICE_CONFIG_DAEMON_NAME), - KConfigDaemonName ); - } - else - { - // 3.1 it is changed!! - if ( FeatureManager::FeatureSupported( KFeatureIdIPv6 ) ) - { - aTable.WriteTextL( TPtrC(SERVICE_CONFIG_DAEMON_MANAGER_NAME), - KDaemonManagerName ); - aTable.WriteTextL( TPtrC(SERVICE_CONFIG_DAEMON_NAME), - KConfigDaemonName ); - } - else - { - aTable.WriteTextL( TPtrC(SERVICE_CONFIG_DAEMON_MANAGER_NAME), KEmpty ); - aTable.WriteTextL( TPtrC(SERVICE_CONFIG_DAEMON_NAME), KEmpty ); - } - } -// WriteDaemonL() Ends here - - - CLOG( ( EHandler, 0, _L( "<- CApDataHandler::WriteServiceL" ) ) ); } @@ -3805,18 +835,6 @@ void CApDataHandler::WriteServiceIp6L( CCommsDbTableView& ispt, CApAccessPointItem& aApItem ) { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::WriteServiceIp6L" ) ) ); - - ispt.WriteBoolL( TPtrC(SERVICE_IP6_DNS_ADDR_FROM_SERVER), - aApItem.iExt->iIpv6GetDNSIPFromServer ); - - ispt.WriteTextL( TPtrC(SERVICE_IP6_NAME_SERVER1), - *aApItem.iExt->iIpv6PrimaryDNS ); - - ispt.WriteTextL( TPtrC(SERVICE_IP6_NAME_SERVER2), - *aApItem.iExt->iIpv6SecondaryDNS ); - - CLOG( ( EHandler, 0, _L( "<- CApDataHandler::WriteServiceIp6L" ) ) ); } @@ -3828,173 +846,6 @@ void CApDataHandler::WriteCsdDataL( TBool aIsNew, CApAccessPointItem& aApItem ) { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::WriteCsdDataL" ) ) ); - - TInt isCsdSupported = - FeatureManager::FeatureSupported( KFeatureIdAppCsdSupport ); -#ifdef __TEST_CSD_SUPPORT - isCsdSupported = ETrue; -#endif // __TEST_CSD_SUPPORT - - TCommsDbBearerType bearerType = - STATIC_CAST( TCommsDbBearerType, aApItem.iIspBearerType ); - - if ( ( ( bearerType == EBearerTypeCSD ) && ( !isCsdSupported ) ) || - ( ( bearerType == EBearerTypeHSCSD ) && - ( !isCsdSupported || !iExt->iIsAppHscsdSupport ) ) ) - { - User::Leave( KErrNotSupported ); - } - - CCommsDbTableView* ispt; - - if ( aIsNew ) - { - ispt = iDb->OpenTableLC( *aApItem.iIapServiceType ); - User::LeaveIfError( ispt->InsertRecord( aApItem.iIapServiceId ) ); - } - else - { - ispt = iDb->OpenViewMatchingUintLC( *aApItem.iIapServiceType, - TPtrC(COMMDB_ID), - aApItem.iIapServiceId ); - User::LeaveIfError( ispt->GotoFirstRecord() ); - User::LeaveIfError( ispt->UpdateRecord() ); - } - // now write record data - ispt->WriteTextL( TPtrC(COMMDB_NAME), *aApItem.iIspName ); - - ispt->WriteTextL( TPtrC(ISP_DESCRIPTION), *aApItem.iIspDescription ); - - ispt->WriteUintL( TPtrC(ISP_TYPE), aApItem.iIspType ); - - ispt->WriteTextL( TPtrC(ISP_DEFAULT_TEL_NUM), - *aApItem.iIspDefaultTelNumber ); - - ispt->WriteBoolL( TPtrC(ISP_DIAL_RESOLUTION), - aApItem.iIspDialResolution ); - - ispt->WriteBoolL( TPtrC(ISP_USE_LOGIN_SCRIPT), - aApItem.iUseLoginScript ); - - ispt->WriteLongTextL( TPtrC(ISP_LOGIN_SCRIPT), *aApItem.iLoginScript ); - - ispt->WriteBoolL( TPtrC(ISP_PROMPT_FOR_LOGIN), - aApItem.iPromptPassword ); - - ispt->WriteTextL( TPtrC(ISP_LOGIN_NAME), *aApItem.iUserName ); - - ispt->WriteTextL( TPtrC(ISP_LOGIN_PASS), *aApItem.iPassword ); - - ispt->WriteBoolL( TPtrC(ISP_DISPLAY_PCT), - aApItem.iDisplayTerminalWindow ); - - ApSpeed2EtelL( &aApItem ); - -/* -// Keep as long as replacing IF_NAME does not works as specified - ispt->WriteTextL( TPtrC(IF_NAME), *aApItem.iIspIfName ); -*/ - - ispt->WriteTextL( TPtrC(ISP_IF_PARAMS), *aApItem.iIspIfParams ); - - ispt->WriteTextL( TPtrC(ISP_IF_NETWORKS), *aApItem.iIspIfNetworks ); - - ispt->WriteBoolL( TPtrC(ISP_IF_PROMPT_FOR_AUTH), - aApItem.iIspIfPromptForAuth ); - - // as same UserName & Auth_name is required - ispt->WriteTextL( TPtrC(ISP_IF_AUTH_NAME), *aApItem.iUserName ); - - // as same login_pass & Auth_password is required - ispt->WriteTextL( TPtrC(ISP_IF_AUTH_PASS), *aApItem.iPassword ); - - ispt->WriteUintL( TPtrC(ISP_IF_AUTH_RETRIES), - aApItem.iIspIfAuthRetries ); - - ispt->WriteBoolL( TPtrC(ISP_IF_CALLBACK_ENABLED), - aApItem.iUseCallBack ); - - ispt->WriteUintL( TPtrC(ISP_IF_CALLBACK_TYPE), - aApItem.iCallBackTypeIsServerNum ); - - ispt->WriteTextL( TPtrC(ISP_IF_CALLBACK_INFO), - *aApItem.iIspIfCallbackInfo ); - - ispt->WriteUintL( TPtrC(ISP_CALLBACK_TIMEOUT), - aApItem.iIspCallbackTimeOut ); - - ispt->WriteBoolL( TPtrC(ISP_IP_ADDR_FROM_SERVER), - aApItem.iIspIPAddrFromServer ); - - ispt->WriteTextL( TPtrC(ISP_IP_ADDR), *aApItem.iIspIPAddr ); - - ispt->WriteTextL( TPtrC(ISP_IP_NETMASK), *aApItem.iIspIPNetMask ); - - ispt->WriteTextL( TPtrC(ISP_IP_GATEWAY), *aApItem.iIspGateway ); - - ispt->WriteBoolL( TPtrC(ISP_IP_DNS_ADDR_FROM_SERVER), - aApItem.iGetDNSIPFromServer ); - - ispt->WriteTextL( TPtrC(ISP_IP_NAME_SERVER1), *aApItem.iPrimaryDNS ); - - ispt->WriteTextL( TPtrC(ISP_IP_NAME_SERVER2), *aApItem.iSecondaryDNS ); - - ispt->WriteBoolL( TPtrC(ISP_ENABLE_IP_HEADER_COMP), - aApItem.iEnablePPPCompression ); - - ispt->WriteBoolL( TPtrC(ISP_ENABLE_LCP_EXTENSIONS), - aApItem.iIspEnableLCPExtensions ); - - ispt->WriteBoolL( TPtrC(ISP_DISABLE_PLAIN_TEXT_AUTH), - aApItem.iIsPasswordAuthenticationSecure ); - - ispt->WriteBoolL( TPtrC(ISP_ENABLE_SW_COMP), - aApItem.iIspEnableSwCompression ); - - ispt->WriteUintL( TPtrC(ISP_BEARER_NAME), aApItem.iIspBearerName ); - - ispt->WriteUintL( TPtrC(ISP_BEARER_SPEED), aApItem.iExt->iBearerSpeed ); - - ispt->WriteUintL( TPtrC(ISP_BEARER_PROTOCOL), - aApItem.iExt->iBearerProtocol ); - - ispt->WriteUintL( TPtrC(ISP_BEARER_CE), aApItem.iIspBearerCE ); - - ispt->WriteUintL( TPtrC(ISP_BEARER_SERVICE), aApItem.iApIapBearerService ); - - - - ispt->WriteTextL( TPtrC(ISP_INIT_STRING), *aApItem.iIspInitString ); - - ispt->WriteUintL( TPtrC(ISP_BEARER_TYPE), aApItem.iIspBearerType ); - - ispt->WriteUintL( TPtrC(ISP_CHANNEL_CODING), - aApItem.iIspChannelCoding ); - - ispt->WriteUintL( TPtrC(ISP_AIUR), aApItem.iIspAIUR ); - - ispt->WriteUintL( TPtrC(ISP_REQUESTED_TIME_SLOTS), - aApItem.iIspRequestedTimeSlots ); - - ispt->WriteUintL( TPtrC(ISP_MAXIMUM_TIME_SLOTS), - aApItem.iIspMaximumTimeSlots ); - - if ( iExt->iIsIpv6Supported ) - { - WriteServiceIp6L( *ispt, aApItem ); - } - - // No DHCP for CSD/HSCSD, so set it empty - ispt->WriteTextL( TPtrC(SERVICE_CONFIG_DAEMON_MANAGER_NAME), KEmpty ); - ispt->WriteTextL( TPtrC(SERVICE_CONFIG_DAEMON_NAME), KEmpty ); - - // now put changes - User::LeaveIfError( ispt->PutRecordChanges( EFalse, EFalse ) ); - - CleanupStack::PopAndDestroy( ispt ); // ispt - - CLOG( ( EHandler, 0, _L( "<- CApDataHandler::WriteCsdDataL" ) ) ); } @@ -4006,31 +857,6 @@ void CApDataHandler::ReadWlanL( CCommsDbTableView& lant, CApAccessPointItem& aApItem ) { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::ReadWlanL" ) ) ); - - HBufC* buf = ApCommons::ReadText16ValueLC( &lant, TPtrC(NU_WLAN_SSID) ); - aApItem.WriteTextL( EApWlanNetworkName, *buf ); - CleanupStack::PopAndDestroy( buf ); - - TUint32 tempint( 0 ); - - ApCommons::ReadUintL( &lant, TPtrC(COMMDB_ID), tempint ); - aApItem.WriteUint( EApWlanSettingsId, tempint ); - - ApCommons::ReadUintL( &lant, TPtrC(WLAN_CONNECTION_MODE), tempint ); - aApItem.WriteUint( EApWlanNetworkMode, tempint ); - - ApCommons::ReadUintL( &lant, TPtrC(WLAN_SECURITY_MODE), tempint ); - aApItem.WriteUint( EApWlanSecurityMode, tempint ); - - TBool b; - ApCommons::ReadBoolL( &lant, TPtrC(WLAN_SCAN_SSID), b ); - aApItem.WriteBool( EApWlanScanSSID, b ); - - ApCommons::ReadUintL( &lant, TPtrC(NU_WLAN_CHANNEL_ID), tempint ); - aApItem.WriteUint( EApWlanChannelId, tempint ); - - CLOG( ( EHandler, 0, _L( "<- CApDataHandler::ReadWlanL" ) ) ); } @@ -4042,25 +868,6 @@ void CApDataHandler::WriteWlanL( CCommsDbTableView& aTable, CApAccessPointItem& aApItem ) { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::WriteWlanL" ) ) ); - - aTable.WriteTextL( TPtrC(COMMDB_NAME), *aApItem.iIspName ); - aTable.WriteUintL( TPtrC(WLAN_SERVICE_ID), aApItem.iIapServiceId ); - aTable.WriteTextL( TPtrC(NU_WLAN_SSID), - *aApItem.iExt->iWlanData->iWlanNetworkName ); - aTable.WriteUintL( TPtrC(WLAN_CONNECTION_MODE), - aApItem.iExt->iWlanData->iWlanNetworkMode ); - - aTable.WriteUintL( TPtrC(WLAN_SECURITY_MODE), - aApItem.iExt->iWlanData->iWlanSecurityMode ); - - aTable.WriteBoolL( TPtrC(WLAN_SCAN_SSID), - aApItem.iExt->iWlanData->iScanSSID ); - - aTable.WriteUintL( TPtrC(NU_WLAN_CHANNEL_ID), - aApItem.iExt->iWlanData->iChannelId ); - - CLOG( ( EHandler, 0, _L( "<- CApDataHandler::WriteWlanL" ) ) ); } @@ -4072,53 +879,7 @@ // TUint32 CApDataHandler::CreateLanBearerIfNeededL() { - CLOG( ( EApItem, 0, - _L( "-> CApDataHandler::CreateLanBearerIfNeededL" ) ) ); - - TUint32 retval( 0 ); - - CCommsDbTableView* t = NULL; - - t = iDb->OpenViewMatchingTextLC( TPtrC(LAN_BEARER), - TPtrC(LAN_BEARER_AGENT), - KWlanBearerAgent ); - if ( t->GotoFirstRecord() == KErrNotFound ) - { // no such yet, create one - TInt err = t->InsertRecord( retval ); - if ( err ) - { - User::LeaveIfError( err ); - } - t->WriteTextL( TPtrC(COMMDB_NAME), KWlanBearerName ); - t->WriteTextL( TPtrC(LAN_BEARER_AGENT), KWlanBearerAgent ); - t->WriteTextL( TPtrC(LAN_BEARER_NIF_NAME), KWlanBearerNif ); - - t->WriteTextL( TPtrC(LAN_BEARER_LDD_NAME), KWlanLDDName ); - t->WriteTextL( TPtrC(LAN_BEARER_PDD_NAME), KWlanPDDName ); - - - - t->WriteUintL( TPtrC(LAST_SOCKET_ACTIVITY_TIMEOUT), - (TUint32)KWlanLastSocketActivityTimeout ); - t->WriteUintL( TPtrC(LAST_SESSION_CLOSED_TIMEOUT), - KWlanLastSessionClosedTimeout ); - t->WriteUintL( TPtrC(LAST_SOCKET_CLOSED_TIMEOUT), - (TUint32)KWlanLastSocketClosedTimeout ); - - User::LeaveIfError( t->PutRecordChanges( EFalse, EFalse ) ); - - } - else - { // there is one, use it - t->ReadUintL( TPtrC(COMMDB_ID), retval ); - } - - CleanupStack::PopAndDestroy( t ); // t - - CLOG( ( EApItem, 0, - _L( "<- CApDataHandler::CreateLanBearerIfNeededL" ) ) ); - - return retval; + return KErrNotFound; } @@ -4132,28 +893,6 @@ // void CApDataHandler::ReadModemBearerNameL( CApAccessPointItem& aApItem ) { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::ReadModemBearerNameL" ) ) ); - - // agreed that the modem bearer record having the name - // 'CSD Modem' is used for (HS)CSD Access Points and - // 'GPRS Modem' is used for GPRS/WCDMA Access Points - // 'CDMA Modem' is used for CDMA Access Points - CCommsDbTableView* view = NULL; -// TApBearerType bearer = aApItem.BearerTypeL(); - - view = iDb->OpenViewMatchingUintLC( *aApItem.iExt->iIapBearerType, - TPtrC(COMMDB_ID), - aApItem.iExt->iIapBearerID ); -// 0 ); - HBufC* buf = NULL; - buf = ApCommons::ReadText16ValueLC( view, TPtrC(COMMDB_NAME) ); - aApItem.WriteTextL( EApLanBearerName, *buf ); - CleanupStack::PopAndDestroy( buf ); - - CleanupStack::PopAndDestroy( view ); - - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::ReadModemBearerNameL" ) ) ); } // End of File diff -r 84c6623982f6 -r ed07dcc72692 apengine/apeng/src/APNetworks.cpp --- a/apengine/apeng/src/APNetworks.cpp Fri Sep 17 08:32:43 2010 +0300 +++ b/apengine/apeng/src/APNetworks.cpp Mon Oct 04 00:43:42 2010 +0300 @@ -46,14 +46,7 @@ // EXPORT_C CApNetworks* CApNetworks::NewLC( CCommsDatabase& aDb ) { - CLOG( ( ENetworks, 0, _L( "-> CApNetworks::NewLC" ) ) ); - - CApNetworks* db = new( ELeave ) CApNetworks; - CleanupStack::PushL( db ); - db->ConstructL( aDb ); - - CLOG( ( ENetworks, 1, _L( "<- CApNetworks::NewLC" ) ) ); - return db; + return NULL; } @@ -64,15 +57,6 @@ // EXPORT_C CApNetworks::~CApNetworks() { - CLOG( ( ENetworks, 0, _L( "-> CApNetworks::~CApNetworks" ) ) ); - - if ( iApList ) - { - iApList->ResetAndDestroy(); - delete iApList; - } - - CLOG( ( ENetworks, 1, _L( "<- CApNetworks::~CApNetworks" ) ) ); } @@ -97,13 +81,6 @@ EXPORT_C void CApNetworks::ConstructL( CCommsDatabase& aDb ) { - CLOG( ( ENetworks, 0, _L( "-> CApNetworks::ConstructL" ) ) ); - - iApList = new( ELeave )CApNetworkItemList(); - iDb = &aDb; - DoUpdateL(); - - CLOG( ( ENetworks, 1, _L( "<- CApNetworks::ConstructL" ) ) ); } @@ -114,9 +91,7 @@ // EXPORT_C TUint32 CApNetworks::Count() const { - CLOG( ( ENetworks, 0, _L( "<-> CApNetworks::Count" ) ) ); - - return iApList->Count( ); + return 0; } @@ -126,17 +101,7 @@ // EXPORT_C const TDesC& CApNetworks::NameL( TUint32 aUid ) const { - CLOG( ( ENetworks, 0, _L( "-> CApNetworks::NameL" ) ) ); - - CApNetworkItem* item = - CONST_CAST( CApNetworkItem*, iApList->ItemForUid( aUid ) ); - if ( item == NULL ) - { - User::Leave( KErrNotFound ); - } - - CLOG( ( ENetworks, 1, _L( "<- CApNetworks::NameL" ) ) ); - return (item->Name() ); + User::Leave( KErrNotSupported ); } @@ -150,23 +115,7 @@ // EXPORT_C TInt CApNetworks::AllListItemDataL( CApNetworkItemList& aList ) { - CLOG( ( ENetworks, 0, _L( "-> CApNetworks::AllListItemDataL" ) ) ); - - aList.ResetAndDestroy(); - - CApNetworkItem* item=NULL; - - TInt i; - TInt count = iApList->Count(); - for ( i=0; i CApNetworks::DoUpdateL" ) ) ); - - TInt err( KErrNone ); - - TBool OwnTransaction = ApCommons::StartPushedTransactionLC( *iDb ); - - CCommsDbTableView* networkt = iDb->OpenTableLC( TPtrC(NETWORK) ); - - err = networkt->GotoFirstRecord(); - - if ( ( err == KErrNone ) || ( err == KErrNotFound ) ) - { // even if it is empty, we must clear the list. - // otherwise, Leave - // fill up list. First empty it - iApList->ResetAndDestroy(); - iCount = 0; - TUint32 temp( 0 ); - TInt length( 0 ); - - CApNetworkItem* item = NULL; - CApNetworkItemList* tmpnetlist = new( ELeave )CApNetworkItemList(); - HBufC* tmp = NULL; - CleanupStack::PushL( tmpnetlist ); - - if ( err == KErrNone ) - { // now get the names and UIDs - TBool goon( ETrue ); - do - { - err = ApCommons::ReadUintL( networkt, TPtrC(COMMDB_ID), temp ); - - networkt->ReadColumnLengthL( TPtrC(COMMDB_NAME), length ); - tmp = HBufC::NewLC( length ); - TPtr tmpptr( tmp->Des() ); - networkt->ReadTextL( TPtrC(COMMDB_NAME), tmpptr ); - item = CApNetworkItem::NewLC( ); - item->SetUid( temp ); - item->SetNameL( tmpptr ); - tmpnetlist->AppendL( item ); - CleanupStack::Pop( item ); // item owned by list ! - - err = networkt->GotoNextRecord(); - if ( err == KErrNotFound ) - { - goon = EFalse; - } - else - { - User::LeaveIfError( err ); - } - CleanupStack::PopAndDestroy( tmp ); - } - while ( goon ); - } - // and now move items to real array - CleanupStack::Pop( tmpnetlist ); - delete iApList; - iApList = tmpnetlist; - } - else - { - User::Leave( err ); - } - - CleanupStack::PopAndDestroy( networkt ); - - if ( OwnTransaction ) - { - ApCommons::CommitTransaction( *iDb ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - - CLOG( ( ENetworks, 1, _L( "<- CApNetworks::DoUpdateL" ) ) ); - return err; + return KErrNotFound; } diff -r 84c6623982f6 -r ed07dcc72692 apengine/apeng/src/APSelect.cpp --- a/apengine/apeng/src/APSelect.cpp Fri Sep 17 08:32:43 2010 +0300 +++ b/apengine/apeng/src/APSelect.cpp Mon Oct 04 00:43:42 2010 +0300 @@ -80,13 +80,7 @@ TInt aBearerFilter, TInt aSortType ) { - CLOG( ( ESelect, 0, _L( "-> CApSelect::NewLC" ) ) ); - - CApSelect* db = CApSelect::NewLC( aDb, aIspFilter, - aBearerFilter, aSortType, EIPv4 ); - - CLOG( ( ESelect, 1, _L( "<- CApSelect::NewLC" ) ) ); - return db; + return NULL; } @@ -97,25 +91,6 @@ // EXPORT_C CApSelect::~CApSelect() { - CLOG( ( ESelect, 0, _L( "-> CApSelect::~CApSelect" ) ) ); - - if ( iExt ) - { - if ( iExt->iIsFeatureManagerInitialised ) - { - FeatureManager::UnInitializeLib(); - } - } - - if ( iApList ) - { - iApList->ResetAndDestroy(); - delete iApList; - } - - delete iExt; - - CLOG( ( ESelect, 1, _L( "<- CApSelect::~CApSelect" ) ) ); } @@ -144,8 +119,6 @@ TInt aSortType ) { - ConstructL( aDb, aIspFilter, aBearerFilter, - aSortType, EIPv4, EVpnFilterBoth ); } @@ -158,9 +131,6 @@ TInt aBearerFilter, TInt aSortType ) { - SetFiltersL( aIspFilter, aBearerFilter, aSortType, - iExt->iReqIpvType, iExt->iVpnFilterType ); - } @@ -170,9 +140,7 @@ // EXPORT_C TInt CApSelect::IspTypeFilter() { - CLOG( ( ESelect, 0, _L( "<-> CApSelect::IspTypeFilter" ) ) ); - - return iIsp; + return 0; } @@ -182,9 +150,7 @@ // EXPORT_C TInt CApSelect::BearerFilter() { - CLOG( ( ESelect, 0, _L( "<-> CApSelect::BearerFilter" ) ) ); - - return iBearer; + return 0; } @@ -194,9 +160,7 @@ // EXPORT_C TInt CApSelect::SortOrder() { - CLOG( ( ESelect, 0, _L( "<-> CApSelect::SortOrder" ) ) ); - - return iSort; + return 0; } @@ -207,10 +171,7 @@ // EXPORT_C TBool CApSelect::MoveToFirst() { - CLOG( ( ESelect, 0, _L( "<-> CApSelect::MoveToFirst" ) ) ); - - iCursor = 0; - return ( iExt->iMaxIndex >= 0 ); + return EFalse; } @@ -220,13 +181,6 @@ // EXPORT_C TBool CApSelect::MoveNext() { - CLOG( ( ESelect, 0, _L( "<-> CApSelect::MoveNext" ) ) ); - - if ( iCursor < iExt->iMaxIndex ) - { - iCursor++; - return ETrue; - } return EFalse; } @@ -237,10 +191,7 @@ // EXPORT_C TBool CApSelect::MoveLast() { - CLOG( ( ESelect, 0, _L( "<-> CApSelect::MoveLast" ) ) ); - - iCursor = iExt->iMaxIndex; - return ( iCursor >= 0 ); + return EFalse; } @@ -250,13 +201,6 @@ // EXPORT_C TBool CApSelect::MovePrev() { - CLOG( ( ESelect, 0, _L( "<-> CApSelect::MovePrev" ) ) ); - - if ( iCursor>0 ) - { - iCursor--; - return ETrue; - } return EFalse; } @@ -267,9 +211,7 @@ // EXPORT_C TUint32 CApSelect::Count() { - CLOG( ( ESelect, 0, _L( "<-> CApSelect::Count" ) ) ); - - return iApList->Count( ); + return 0; } @@ -279,9 +221,7 @@ // EXPORT_C const TDesC& CApSelect::Name() { - CLOG( ( ESelect, 0, _L( "<-> CApSelect::Name" ) ) ); - - return *iApList->At( iCursor )->iName; + User::Leave( KErrNotSupported ); } @@ -291,9 +231,7 @@ // EXPORT_C TUint32 CApSelect::Uid() { - CLOG( ( ESelect, 0, _L( "<-> CApSelect::Uid" ) ) ); - - return iApList->At( iCursor )->iUid; + return 0; } @@ -303,9 +241,7 @@ // EXPORT_C TCommsDbIspType CApSelect::Type() { - CLOG( ( ESelect, 0, _L( "<-> CApSelect::Type" ) ) ); - - return iApList->At( iCursor )->iIspType; + User::Leave( KErrNotSupported ); } @@ -315,9 +251,7 @@ // EXPORT_C TApBearerType CApSelect::BearerType() { - CLOG( ( ESelect, 0, _L( "<-> CApSelect::BearerType" ) ) ); - - return iApList->At( iCursor )->iBearerType; + User::Leave( KErrNotSupported ); } @@ -329,23 +263,7 @@ // EXPORT_C TInt CApSelect::AllListItemDataL( CApListItemList& aList ) { - CLOG( ( ESelect, 0, _L( "-> CApSelect::AllListItemDataL" ) ) ); - - aList.ResetAndDestroy(); - - CApListItem* item=NULL; - - TInt i; - TInt count = iApList->Count(); - for ( i=0; i CApSelect::IsReadOnly" ) ) ); - - return iApList->At( iCursor )->iExt->iReadOnly; + return EFalse; } @@ -375,737 +291,7 @@ // TInt CApSelect::DoUpdateL() { - CLOG( ( ESelect, 0, _L( "-> CApSelect::DoUpdateL" ) ) ); - - // filtering criteria: - // Bearer type - // Isp type - // HasMandatory - // + ordering (name or UID...) - // first filter WAP_ACCESS_POINT table and order it - TBool OwnTransaction = ApCommons::StartPushedTransactionLC( *iDb ); - if ( !OwnTransaction ) - { - __ASSERT_DEBUG( EFalse, ApCommons::Panic( ENotSupported ) ); - User::Leave( KErrNotSupported ); - } - - CCommsDbTableView* wapt = NULL; - CCommsDbTableView* ipbearert = NULL; - - CCommsDbTableView* iapt = NULL; - // csdOut, GprsIn, gprsOut, cdma, VPN - CCommsDbTableView* isptables[5] = { NULL, NULL, NULL, NULL, NULL}; - - - wapt = GetFilteredSortedWapTableViewLC(); - TInt err = wapt->GotoFirstRecord(); // OK. - if ( ( err == KErrNone ) || ( err == KErrNotFound ) ) - { // even if it is empty, we must clear the list. - // otherwise, Leave - // fill up list. First empty it - iApList->ResetAndDestroy(); - iCount = 0; - if ( err == KErrNone ) - { // have some, we can go on... - // First get ip_bearer table, then iap, then isp & gprs, if needed - if ( ( iBearer & EApBearerTypeCSD ) || - ( iBearer & EApBearerTypeHSCSD ) || - ( iBearer & EApBearerTypeGPRS ) || - ( iExt->iCdma && ( iBearer & EApBearerTypeCDMA ) ) ) - { - ipbearert = GetFilteredSortedIpBearerTableViewLC(); - if ( ipbearert ) - { - err = ipbearert->GotoFirstRecord(); - if ( err == KErrNone ) - { - if ( ( iBearer & EApBearerTypeCSD ) || - ( iBearer & EApBearerTypeHSCSD ) ) - { - isptables[KDIALOUT] = - GetFilteredSortedIspOutTableViewLC(); - } - if ( ( iBearer & EApBearerTypeGPRS ) ) - { - isptables[KGPRSIN] = - GetFilteredSortedGprsTableViewLC( ETrue ); - isptables[KGPRSOUT] = - GetFilteredSortedGprsTableViewLC( EFalse ); - } - } - else - { - if ( err != KErrNotFound ) - { - User::LeaveIfError( err ); - } - } - } - } - // get wapapids - // get smsapids, if defined - // get ipapids with iap ids - // get only those iap ids from filtered database - CArrayFixFlat* wapapid = - new ( ELeave ) CArrayFixFlat( 10 ); - CleanupStack::PushL( wapapid ); - GetUintValuesL( wapt, TPtrC(COMMDB_ID), *wapapid ); - - // read up access point names, too, just to be as fast as we can... - CArrayPtrFlat* wapapname = - new ( ELeave ) CArrayPtrFlat( 10 ); - CleanupStack::PushL( wapapname ); - GetTextValuesL( wapt, TPtrC(COMMDB_NAME), *wapapname ); - - - // read up start page, too, just to be as fast as we can... - CArrayPtrFlat* wapstartpage = - new ( ELeave ) CArrayPtrFlat( 10 ); - CleanupStack::PushL( wapstartpage ); - // as it is LONG text... - GetLongTextValuesL( wapt, TPtrC(WAP_START_PAGE), *wapstartpage ); - - //read up Read-only flags - CArrayFixFlat* protflags = - new ( ELeave ) CArrayFixFlat( 10 ); - CleanupStack::PushL( protflags ); - GetProtValuesL( wapt, *protflags ); - - - CArrayFixFlat* ipapid = - new ( ELeave ) CArrayFixFlat( 10 ); - CleanupStack::PushL( ipapid ); - GetUintValuesL( ipbearert, TPtrC(WAP_ACCESS_POINT_ID), *ipapid ); - - CArrayFixFlat* ipiapid = - new ( ELeave ) CArrayFixFlat( 10 ); - CleanupStack::PushL( ipiapid ); - GetUintValuesL( ipbearert, TPtrC(WAP_IAP), *ipiapid ); - - - - - // What comes next::::: - // for each table: - // filter separately for different bearers -> - // we know the bearer type... - // filter separately for different ISP types -> - // we know the ISP type... - // now all we have to do is to 'simply' check filtered IAP with - // the separate arrays, leave only those that present in - // both bearer & isp array - // fill up an array of id & an array of bearer type & - // an array of isp type - // after it, narrow down wap with wapbearer, - // create items in order, - // check items against remained iap array - // fill up values in list. - // bearer arrays : 0: csd, 1:hscsd, 2: gprs, 3: cdma - - TInt i( 0 ); - - // an array Isp[CSDOut/GPRSIn/GPRSOut/CDMA/VPN] - // [COMMDB_ID, ISP_TYPE, Bearer_type] - CArrayFixFlat* ispArray[5]; - for (i=0; i<5; i++) - { - ispArray[i] = new ( ELeave ) CArrayFixFlat( 10 ); - CleanupStack::PushL( ispArray[i] ); - } - - if ( isptables[KDIALOUT] ) - { - GetIspValuesL( isptables[KDIALOUT], ispArray[KDIALOUT], - TPtrC(ISP_TYPE) ); - } - if ( isptables[KGPRSIN] ) - { - GetIspValuesL( isptables[KGPRSIN], ispArray[KGPRSIN], - TPtrC(GPRS_AP_TYPE) ); - } - if ( isptables[KGPRSOUT] ) - { - GetIspValuesL( isptables[KGPRSOUT], ispArray[KGPRSOUT], - TPtrC(GPRS_AP_TYPE) ); - } - if ( isptables[KCDMA_ISP] ) // NULL if iExt->iCdma==EFalse. - { - GetIspValuesL( isptables[KCDMA_ISP], ispArray[KCDMA_ISP], - TPtrC(CDMA_AP_TYPE) ); - } - - - // iap arrays, 5 table, needs UID & linked ID for both - CArrayFixFlat* iapArrays[5][2]; - for (i=0; i<5; i++) - { - iapArrays[i][0] = new ( ELeave ) CArrayFixFlat( 10 ); - CleanupStack::PushL( iapArrays[i][0] ); - - iapArrays[i][1] = new ( ELeave ) CArrayFixFlat( 10 ); - CleanupStack::PushL( iapArrays[i][1] ); - } - // get iap table data... - // needs IAP UID & Iap_service - if ( ( iBearer & EApBearerTypeCSD ) || - ( iBearer & EApBearerTypeHSCSD ) ) - { - iapt = OpenViewMatchingTextL( TPtrC(IAP), - TPtrC(IAP_SERVICE_TYPE), - TPtrC(DIAL_OUT_ISP) ); - CleanupStack::PushL( iapt ); - GetUintValuesL( iapt, TPtrC(COMMDB_ID), - *iapArrays[KDIALOUT][0] ); - GetUintValuesL( iapt, TPtrC(IAP_SERVICE), - *iapArrays[KDIALOUT][1] ); - CleanupStack::PopAndDestroy( iapt ); // iapt; - iapt = NULL; - } - - - if ( iBearer & EApBearerTypeGPRS ) - { - iapt = OpenViewMatchingTextL( TPtrC(IAP), - TPtrC(IAP_SERVICE_TYPE), - TPtrC(INCOMING_WCDMA) ); - CleanupStack::PushL( iapt ); - GetUintValuesL( iapt, TPtrC(COMMDB_ID), - *iapArrays[KGPRSIN][0] ); - GetUintValuesL( iapt, TPtrC(IAP_SERVICE), - *iapArrays[KGPRSIN][1] ); - CleanupStack::PopAndDestroy( iapt ); // iapt; - iapt = NULL; - - iapt = OpenViewMatchingTextL( TPtrC(IAP), - TPtrC(IAP_SERVICE_TYPE), - TPtrC(OUTGOING_WCDMA) ); - CleanupStack::PushL( iapt ); - GetUintValuesL( iapt, TPtrC(COMMDB_ID), - *iapArrays[KGPRSOUT][0] ); - GetUintValuesL( iapt, TPtrC(IAP_SERVICE), - *iapArrays[KGPRSOUT][1] ); - CleanupStack::PopAndDestroy( iapt ); // iapt; - iapt = NULL; - } - - if ( ( iExt->iVpnFilterType == EVpnFilterVpnOnly ) || - ( iExt->iVpnFilterType == EVpnFilterBoth ) ) - { - iapt = OpenViewMatchingTextL( TPtrC(IAP), - TPtrC(IAP_SERVICE_TYPE), - TPtrC(VPN_SERVICE) ); - CleanupStack::PushL( iapt ); - GetUintValuesL( iapt, TPtrC(COMMDB_ID), - *iapArrays[KVPN][0] ); - GetUintValuesL( iapt, TPtrC(IAP_SERVICE), - *iapArrays[KVPN][1] ); - CleanupStack::PopAndDestroy( iapt ); // iapt; - iapt = NULL; - } - - - - CArrayFixFlat* vpnArray = NULL; - - if ( ( iExt->iVpnFilterType == EVpnFilterVpnOnly ) || - ( iExt->iVpnFilterType == EVpnFilterBoth ) ) - { // get VPN related data, namely Home IAP and name - isptables[KVPN] = GetVpnTableViewLC(); - - if ( isptables[KVPN] ) - { - - vpnArray = new ( ELeave ) CArrayFixFlat( 10 ); - CleanupStack::PushL( vpnArray ); - - GetVpnValuesL( isptables[KVPN], vpnArray ); - } - } - - - - - // till this point, we have done what we can. - // now we narrow down arrays. - // start with iap vs isp arrays, leave what we can in iap array. - - CApListItem* item = NULL; - CApListItemList* tmpApList = new( ELeave )CApListItemList(); - CleanupStack::PushL( tmpApList ); - TApBearerType bearer (EApBearerTypeAllBearers); - - // iapArrays[5][2]: - // 5 table (DialOut, GprsIn, Out, Cdma, VPN),2 id's(Uid,ServiceId) - // iapArrays[0] : Dial In service - // ispinbearerArrays: 0: csd, 1:hscsd, 2: gprs. 3: cdma - - // 'Merge' iap with isp, create temp. items with bearer types - // iap/DialIn/ServiceID : iapArrays[0][1] - - // check all iap/DialIn/ServiceID if it is in isparray -> - // array Gives bearer type & isp type - TInt j, iappos; - // check all iap/DialOut/ServiceID if it is - // in ispoutbearerarray[0,1] - if ( iapArrays[KDIALOUT][1] ) - { - for (j=0; jCount(); j++) - { - bearer = EApBearerTypeAllBearers; - // check all iap/DialOut/ServiceID if it is in isparray - // check if it is in ispArray[UID, ISP, Bearer] - // & return pos. - iappos = GetIapPos( ispArray[KDIALOUT], - iapArrays[KDIALOUT][1]->At( j ) ); - if ( iappos != KErrNotFound ) - { // DialOut, Isp, Bearer... - // create temp. item WITH IAP ID, Bearer type - if ( ispArray[KDIALOUT]->At( iappos )[KBEARERTYPE] == - EBearerTypeCSD ) - { - bearer = EApBearerTypeCSD; - } - else - { // HSCSD bearer - bearer = EApBearerTypeHSCSD; - } - // create temp. item WITH IAP ID, Bearer type - item = CApListItem::NewLC - ( - (TCommsDbIspType) - ispArray[KDIALOUT]->At( iappos )[KISPTYPE], - iapArrays[KDIALOUT][0]->At( j ), - KEmpty, - bearer - ); - tmpApList->AppendL( item ); - CleanupStack::Pop( item ); // item owned by list ! - } - } - } - - - - // check all iap/GprsIn/ServiceID if it is in ispinbearerarray[2] - if ( iapArrays[KGPRSIN][1] ) - { - bearer = EApBearerTypeGPRS; - for (j=0; jCount(); j++) - { - iappos = GetIapPos( ispArray[KGPRSIN], - iapArrays[KGPRSIN][1]->At( j ) ); - if ( iappos != KErrNotFound ) - { // GprsIn, Isp, Bearer... - // create temp. item WITH IAP ID, Bearer type - item = CApListItem::NewLC - ( - (TCommsDbIspType) - ispArray[KGPRSIN]->At( iappos )[KISPTYPE], - iapArrays[KGPRSIN][0]->At( j ), - KEmpty, - bearer - ); - tmpApList->AppendL( item ); - CleanupStack::Pop( item ); // item owned by list ! - } - } - } - - - // check all iap/GprsOut/ServiceID if it is in isparray - if ( iapArrays[KGPRSOUT][1] ) - { - bearer = EApBearerTypeGPRS; - for (j=0; jCount(); j++) - { - iappos = GetIapPos( ispArray[KGPRSOUT], - iapArrays[KGPRSOUT][1]->At( j ) ); - if ( iappos != KErrNotFound ) - { // GprsIn, Isp, Bearer... - // create temp. item WITH IAP ID, Bearer type - item = CApListItem::NewLC - ( - (TCommsDbIspType) - ispArray[KGPRSOUT]->At( iappos )[KISPTYPE], - iapArrays[KGPRSOUT][0]->At( j ), - KEmpty, - bearer - ); - tmpApList->AppendL( item ); - CleanupStack::Pop( item ); // item owned by list ! - } - } - } - - - // check all iap/cdma/ServiceID if it is in ispinbearerarray[2] - if ( iapArrays[KCDMA_ISP][1] ) // NULL if iExt->iCdma==EFalse. - { - bearer = EApBearerTypeCDMA; - for (j=0; jCount(); j++) - { - iappos = GetIapPos( ispArray[KCDMA_ISP], - iapArrays[KCDMA_ISP][1]->At( j ) ); - if ( iappos != KErrNotFound ) - { // Cdma, Isp, Bearer... - // create temp. item WITH IAP ID, Bearer type - item = CApListItem::NewLC - ( - (TCommsDbIspType) - ispArray[KCDMA_ISP]->At( iappos )[KISPTYPE], - iapArrays[KCDMA_ISP][0]->At( j ), - KEmpty, - bearer - ); - tmpApList->AppendL( item ); - CleanupStack::Pop( item ); // item owned by list ! - } - } - } - - - // Now we have the temporary list filled with - // IAP UID, bearer type, ISP type, - // So compare it to WAP part and create the REAL list... - TInt pos( KErrNotFound ); - TInt itempos( KErrNotFound ); - TBool protsupported = FeatureManager::FeatureSupported( - KFeatureIdSettingsProtection ); - for (i=0; i< wapapid->Count(); i++) - { // as wapapid is sorted, resulting list will be sorted, too ! - // is it in IP bearer ? - if ( IsInArray( ipapid, wapapid->At( i ) ) ) - { - // now need to get bearer type & isp type - // - pos = PosInArray(ipapid, wapapid->At( i ) ); - if (pos!= KErrNotFound ) - { // now we have the index in the - // ipiapid as they are synchronized... - // iapUid = ipiapid[ pos ]; - // now have to find a CApListItem in tmpApList - itempos = GetItemPos( tmpApList, - ipiapid->At( pos ) ); - if (itempos != KErrNotFound ) - { - TBool prot(EFalse); - if (protsupported) - { - prot = protflags->At( i ); - } - item = CApListItem::NewLC - ( - (TCommsDbIspType) - tmpApList->At( itempos )->Type(), - wapapid->At( i ), - *wapapname->At( i ), - tmpApList->At( itempos )->BearerType(), - *wapstartpage->At( i ), - prot ); - - iApList->AppendL( item ); - CleanupStack::Pop( item ); // item owned by aList ! - } - } - } - } - - #ifdef __TEST_LAN_BEARER - // enable LAN: - // ADD THEM AFTER NORMAL QUERYING... - if ( ( iBearer & EApBearerTypeLAN ) - || ( iBearer & EApBearerTypeLANModem ) ) - { - AddLanL( EFalse ); - } - #else - // enable LAN: - // ADD THEM AFTER NORMAL QUERYING... - if ( iBearer & EApBearerTypeLANModem ) - { - AddLanL( EFalse ); - } - #endif // __TEST_LAN_BEARER - if ( iBearer & EApBearerTypeWLAN ) - { - if ( iExt->iWlanSupported ) - { - // enable WLAN: - // ADD THEM AFTER NORMAL QUERYING... - AddLanL( ETrue ); - } - } - - // now it has only elements which are OK. - // from ALL CSD/GPRS/CDMA tables, still in sorted order... - // now it is time to check VPN related stuff, if any - if ( ( iExt->iVpnFilterType == EVpnFilterVpnOnly ) || - ( iExt->iVpnFilterType == EVpnFilterBoth ) ) - { // Add VPN access points if needed - // Add ALL VPN access points if needed as requested by - // Nokia, thus incomplete access points to be listed. - TUint32 wapid( 0 ); - TInt count = vpnArray->Count(); - - CApUtils* util = CApUtils::NewLC( *iDb ); - for ( i = 0; i < count; i++ ) - { - if ( vpnArray->At( i ).iHomeIapId != 0 ) - { - // get home wap id first - pos = PosInArray( ipiapid, - vpnArray->At( i ).iHomeIapId ); - - } - else if ( vpnArray->At( i ).iHomeSnapId != 0 ) - { - // VPN IAP points to a SNAP. Just mark it available. - pos = PosInArray( iapArrays[KVPN][1], vpnArray->At( i ).iVpnIapId ); - if ( pos != KErrNotFound ) - { // now get VPN IAP ID - TUint32 tempvpniapid = iapArrays[KVPN][0]->At( pos ); - TUint32 tempvpnwapid ( 0 ); - TRAP( err, tempvpnwapid = - util->WapIdFromIapIdL( - tempvpniapid ) ); - - item = CApListItem::NewLC - ( - EIspTypeInternetAndWAP, - tempvpnwapid, - *vpnArray->At( i ).iName, - EApBearerTypeAllBearers - ); - item->SetVpnFlag( ETrue ); - iApList->AppendL( item ); - CleanupStack::Pop( item ); - continue; - } - } - - TInt foundpos( KErrNotFound ); - if ( pos!= KErrNotFound ) - { // now we have the index in the - // ipiapid and as they are synchronized... - wapid = ipapid->At( pos ); - // now check if we do have it in array... - TInt jcount = iApList->Count(); - for ( j = 0; j < jcount; j++ ) - { - if ( iApList->At( j )->Uid() == wapid ) - { - foundpos = j; - break; - } - } - } - // should add VPN - // check if VPN-table COMMDB_ID is - // in iapArrays[VPN][1] - pos = PosInArray( - iapArrays[KVPN][1], - vpnArray->At( i ).iVpnIapId ); - if ( pos != KErrNotFound ) - { // now get VPN IAP ID - TUint32 tempvpniapid = - iapArrays[KVPN][0]->At( pos ); - TUint32 tempvpnwapid ( 0 ); - TRAP( err, tempvpnwapid = - util->WapIdFromIapIdL( - tempvpniapid ) ); - - if ( err == KErrNone ) - { - if ( foundpos != KErrNotFound ) - { - // if not found, it is either an unknown - // bearer type, for which we can nto show - // icon and UI at all, or it does not - // fulfill the filtering criteria, so we - // ignore them. - item = CApListItem::NewLC - ( - iApList->At( foundpos )->Type(), - tempvpnwapid, - *vpnArray->At( i ).iName, - iApList->At( foundpos ) - ->BearerType() - ); - item->SetVpnFlag( ETrue ); - iApList->AppendL( item ); - // item owned by aList ! - CleanupStack::Pop( item ); - } - } - } - } - CleanupStack::PopAndDestroy( util ); - } - - if ( iExt->iVpnFilterType == EVpnFilterVpnOnly ) - { // remove non-vpn access points if needed - TInt count = iApList->Count(); - for ( i = 0; i < count; i++ ) - { - if ( !iApList->At( i )->IsVpnAp() ) - { - delete iApList->At( i ); - iApList->Delete( i ); - count--; - i--; // 'cause it is cycled... - } - } - } - - -/* -#ifdef __WINS__ - //============================================================= - // Support for ethernet in emulator, change 1/2 - // - - iapt = OpenViewMatchingTextL( TPtrC(IAP), - TPtrC(IAP_SERVICE_TYPE), - TPtrC(LAN_SERVICE) ); - CleanupStack::PushL( iapt ); - - - TBuf<40> name; - TUint32 id; - TInt err = iapt->GotoFirstRecord(); - TInt err2; - CCommsDbTableView* tmpView = NULL; - - while(err == KErrNone) - { - iapt->ReadTextL(TPtrC(COMMDB_NAME), name); - iapt->ReadUintL(TPtrC(COMMDB_ID), id); - - tmpView = iDb->OpenViewMatchingUintLC( - TPtrC(WAP_IP_BEARER), TPtrC(WAP_IAP), id); - err2 = tmpView->GotoFirstRecord(); - if(err2 == KErrNone) - { - tmpView->ReadUintL(TPtrC(WAP_ACCESS_POINT_ID), id); - CleanupStack::PopAndDestroy( tmpView ); - - tmpView = iDb->OpenViewMatchingUintLC( - TPtrC(WAP_ACCESS_POINT), TPtrC(COMMDB_ID), id); - err2 = tmpView->GotoFirstRecord(); - if ( err2 == KErrNone ) - { - item = CApListItem::NewLC - ( - EIspTypeInternetAndWAP, - id, - name, - EApBearerTypeGPRS - ); - iApList->AppendL( item ); - - CleanupStack::Pop( item ); - } - } - - CleanupStack::PopAndDestroy( tmpView ); - - err = iapt->GotoNextRecord(); - } - - - CleanupStack::PopAndDestroy( iapt ); // iapt; - iapt = NULL; - - // End of change 1/2 - //============================================================= - -#endif // __WINS__ -*/ - - - iCount = iApList->Count(); - - CleanupStack::PopAndDestroy( tmpApList ); // tmpApList - - if ( vpnArray ) - { - CleanupStack::PopAndDestroy( vpnArray->Count() ); - CleanupStack::PopAndDestroy( vpnArray ); - } - if ( isptables[KVPN] ) - { - CleanupStack::PopAndDestroy( isptables[KVPN] ); - } - - CleanupStack::PopAndDestroy( 10, iapArrays[0][0] ); // iap arrays - - CleanupStack::PopAndDestroy( 5, ispArray[0] ); // isp arrays - - CleanupStack::Pop( 2, ipapid ); // ipiapid, ipapid - CleanupStack::Pop( protflags ); // protflags - delete protflags; - delete ipiapid; - delete ipapid; - -// Note: SMS bearer had been dropped. - CleanupStack::PopAndDestroy( wapstartpage->Count() );//wapstartpage - CleanupStack::PopAndDestroy( wapstartpage ); // wapstartpage - CleanupStack::PopAndDestroy( wapapname->Count() ); // wapapname - CleanupStack::PopAndDestroy( wapapname ); // wapapname - CleanupStack::Pop(); // wapapid - delete wapapid; - - if ( isptables[KCDMA_ISP] ) - { - CleanupStack::PopAndDestroy( isptables[KCDMA_ISP] ); - } - - if ( isptables[KGPRSOUT] ) - { - CleanupStack::PopAndDestroy( isptables[KGPRSOUT] ); - } - - if ( isptables[KGPRSIN] ) - { - CleanupStack::PopAndDestroy( isptables[KGPRSIN] ); - } - - if ( isptables[KDIALOUT] ) - { - CleanupStack::PopAndDestroy( isptables[KDIALOUT] ); - } - - if ( ipbearert ) - { - CleanupStack::PopAndDestroy( ipbearert ); - } - } - else - { - if ( err != KErrNotFound ) - { - User::LeaveIfError( err ); - } - } - } - else - { - if ( err != KErrNotFound ) - { - User::Leave( err ); - } - } - CleanupStack::PopAndDestroy( wapt ); // wapt - iExt->iMaxIndex = iCount-1; - if ( OwnTransaction ) - { - ApCommons::RollbackTransactionOnLeave( iDb ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - CLOG( ( ESelect, 1, _L( "<- CApSelect::DoUpdateL" ) ) ); - - return err; + return KErrNotSupported; } @@ -1118,69 +304,7 @@ // CCommsDbTableView* CApSelect::GetFilteredSortedWapTableViewLC() { - CLOG( ( ESelect, 0, - _L( "-> CApSelect::GetFilteredSortedWapTableViewLC" ) ) ); - - CCommsDbTableView* wapt = NULL; - // Select * from WAP Access Point Table Where - // WAP_CURRENT_BEARER=WAP_IP_BEARER - if ( ( iBearer & EApBearerTypeCSD ) || - ( iBearer & EApBearerTypeHSCSD ) || - ( iBearer & EApBearerTypeGPRS ) || - ( iExt->iCdma && ( iBearer & EApBearerTypeCDMA ) ) ) - { - wapt = iDb->OpenViewMatchingTextLC( TPtrC(WAP_ACCESS_POINT), - TPtrC(WAP_CURRENT_BEARER), - TPtrC(WAP_IP_BEARER)); - } - else - { - wapt = iDb->OpenTableLC( TPtrC(WAP_ACCESS_POINT) ); - } - - TInt err; - err = wapt->GotoFirstRecord(); - if ( err != KErrNotFound ) - { - User::LeaveIfError( err ); - } - - if ( err != KErrNotFound ) - { - // here may come additional AND-ed parts - if ( ( iIsp & KEApIspTypeWAPMandatory ) || - ( iIsp & KEApIspTypeMMSMandatory ) ) - { // add AND ( Hasmandatory..) - if ( ( iBearer & EApBearerTypeCSD ) || - ( iBearer & EApBearerTypeHSCSD ) || - ( iBearer & EApBearerTypeGPRS ) || - ( iExt->iCdma && ( iBearer & EApBearerTypeCDMA ) ) ) - { // Needs IP bearer - // ( WAP_CURRENT_BEARER = WAP_IP_BEARER AND - // WAP_START_PAGE != "" - // AND WAP_START_PAGE != "http://" - // Filter out unneded records - HBufC* buf; - do - { - // Add test cases covering this route - buf = wapt->ReadLongTextLC( TPtrC(WAP_START_PAGE) ); - if ( ( buf->Compare( KEmpty ) == 0 ) - || ( buf->Compare( KInvStartPage ) == 0 ) ) - { - err = wapt->DeleteRecord(); - } - CleanupStack::PopAndDestroy( buf ); - err = wapt->GotoNextRecord(); - } - while ( !err ); - } - } - } - CLOG( ( ESelect, 1, - _L( "<- CApSelect::GetFilteredSortedWapTableViewLC" ) ) ); - - return wapt; + return NULL; } @@ -1193,55 +317,7 @@ // CCommsDbTableView* CApSelect::GetFilteredSortedIpBearerTableViewLC() { - CLOG( ( ESelect, 0, - _L( "-> CApSelect::GetFilteredSortedIpBearerTableViewLC" ) ) ); - - CCommsDbTableView* table = NULL; - - table = iDb->OpenTableLC( TPtrC(WAP_IP_BEARER) ); - TInt err; - err = table->GotoFirstRecord(); - - if ( ( iBearer & EApBearerTypeCSD ) || - ( iBearer & EApBearerTypeHSCSD ) || - ( iBearer & EApBearerTypeGPRS ) || - ( iExt->iCdma && ( iBearer & EApBearerTypeCDMA ) ) ) - { - // needs ipbearer table - // only filtering we can do is about Mandatory - // because Isptype & Bearertype are up to - // ISP & GPRS tables... - if ( iIsp & KEApIspTypeWAPMandatory ) - { // Hasmandatory.. - // SELECT * from WAP_IP_BEARER WHERE - // WAP_GATEWAY_ADDRESS <> '' - // AND WAP_GATEWAY_ADDRESS != "0.0.0.0" ) - // AND HIDDEN... - - if ( err != KErrNotFound ) - { - User::LeaveIfError( err ); - - HBufC* buf; - do - { - buf = table->ReadLongTextLC( TPtrC(WAP_GATEWAY_ADDRESS) ); - if ( ( buf->Compare( KEmpty ) == 0 ) - || ( buf->Compare( KDynIpAddress ) == 0 ) ) - { - err = table->DeleteRecord(); - } - CleanupStack::PopAndDestroy( buf ); - err = table->GotoNextRecord(); - } while ( !err ); - } - } - } - - CLOG( ( ESelect, 1, - _L( "<- CApSelect::GetFilteredSortedIpBearerTableViewLC" ) ) ); - - return table; + return NULL; } @@ -1252,92 +328,7 @@ // CCommsDbTableView* CApSelect::GetFilteredSortedIspOutTableViewLC() { - CLOG( ( ESelect, 0, - _L( "-> CApSelect::GetFilteredSortedIspOutTableViewLC" ) ) ); - - CCommsDbTableView* table = NULL; - // ISP-type & bearer type... - if ( ( iBearer & EApBearerTypeCSD ) || - ( iBearer & EApBearerTypeHSCSD ) ) - { - // only needed if CSD or HSCSD - if ( ( iBearer & EApBearerTypeCSD ) && - (!( iBearer & EApBearerTypeHSCSD )) ) - { // needs only CSD - // WHERE ISP_BEARER_TYPE = EBearerTypeCSD - table = iDb->OpenViewMatchingUintLC( TPtrC(DIAL_OUT_ISP), - TPtrC(ISP_BEARER_TYPE), - EBearerTypeCSD - ); - } - else - { - if ( ( iBearer & EApBearerTypeHSCSD ) && - (!( iBearer & EApBearerTypeCSD )) ) - { // needs only HSCSD - // WHERE ISP_BEARER_TYPE = EBearerTypeHSCSD - table = iDb->OpenViewMatchingUintLC( TPtrC(DIAL_OUT_ISP), - TPtrC(ISP_BEARER_TYPE), - EBearerTypeHSCSD - ); - } - else - { - table = iDb->OpenTableLC( TPtrC(DIAL_OUT_ISP) ); - } - } - TInt err; - err = table->GotoFirstRecord(); - - if ( err != KErrNotFound ) - { - User::LeaveIfError( err ); - // now add isp-type filtering - // if Added = ETrue : AND ( ), else : WHERE - // KEApIspTypeInternetOnly, - // KEApIspTypeWAPOnly, - // KEApIspTypeInternetAndWAP, - // KEApIspTypeWAPMandatory, KEApIspTypeAll - TUint32 isp( 0 ); - do - { - table->ReadUintL( TPtrC(ISP_TYPE), isp ); - if ( ( iIsp & KEApIspTypeInternetOnly ) - && ( !( iIsp & KEApIspTypeAll ) ) - ) - {// ( ( ISP_TYPE == EIspTypeInternetOnly ) - if ( isp != EIspTypeInternetOnly ) - { - err = table->DeleteRecord(); - } - } - if ( ( iIsp & KEApIspTypeWAPOnly ) - && ( !( iIsp & KEApIspTypeAll ) ) - ) - { - if ( isp != EIspTypeWAPOnly ) - { - err = table->DeleteRecord(); - } - } - if ( ( iIsp & KEApIspTypeInternetAndWAP ) - && ( !( iIsp & KEApIspTypeAll ) ) - ) - { - if ( isp != EIspTypeInternetAndWAP ) - { - err = table->DeleteRecord(); - } - } - err = table->GotoNextRecord(); - } while ( !err ); - } - } - - CLOG( ( ESelect, 1, - _L( "<- CApSelect::GetFilteredSortedIspOutTableViewLC" ) ) ); - - return table; + return NULL; } @@ -1348,115 +339,7 @@ // CCommsDbTableView* CApSelect::GetFilteredSortedGprsTableViewLC( TBool aIn ) { - CLOG( ( ESelect, 0, - _L( "-> CApSelect::GetFilteredSortedGprsTableViewLC" ) ) ); - - CCommsDbTableView* table = NULL; - // ISP-type & bearer type... - if ( iBearer & EApBearerTypeGPRS ) - { - // as all other criteria has more than 2 possible values - // and all their combinations should be taken into account, - // I ask the whole table and then narrow it down - // myself with removing the unneded records temporarily - if ( aIn ) - { - table = iDb->OpenTableLC( TPtrC( INCOMING_WCDMA ) ); - } - else - { - table = iDb->OpenTableLC( TPtrC( OUTGOING_WCDMA ) ); - } - TInt err; - err = table->GotoFirstRecord(); - - if ( err != KErrNotFound ) - { - User::LeaveIfError( err ); - // only needed if GPRS - // now add isp-type filtering - // KEApIspTypeInternetOnly, - // KEApIspTypeWAPOnly, - // KEApIspTypeInternetAndWAP, - // KEApIspTypeWAPMandatory, KEApIspTypeAll - TUint32 isp( 0 ); - TUint32 pdptype( 0 ); - TBool deleted(EFalse); - do - { - deleted = EFalse; - // first check if it fits our isp type criteria - TRAPD( res, table->ReadUintL( TPtrC(GPRS_AP_TYPE), isp ) ); - if ( res != KErrUnknown ) - { - if ( ( iIsp & KEApIspTypeInternetOnly ) - && ( !( iIsp & KEApIspTypeAll ) ) - ) - {// ( ( ISP_TYPE == EIspTypeInternetOnly ) - if ( isp != EIspTypeInternetOnly ) - { - err = table->DeleteRecord(); - deleted = ETrue; - } - } - if ( ( iIsp & KEApIspTypeWAPOnly ) - && ( !( iIsp & KEApIspTypeAll ) ) - ) - { - if ( isp != EIspTypeWAPOnly ) - { - err = table->DeleteRecord(); - deleted = ETrue; - } - } - if ( ( iIsp & KEApIspTypeInternetAndWAP ) - && ( !( iIsp & KEApIspTypeAll ) ) - ) - { - if ( isp != EIspTypeInternetAndWAP ) - { - err = table->DeleteRecord(); - deleted = ETrue; - } - } - } - // now check if it fits IPv4 or IPv6 criteria - // Add IPv4 or IPv6 query ONLY if it is supported!!! - if ( ( !deleted ) && ( iExt->iIsIpv6Supported ) ) - { - // if ONLY IPv4 is requested, - // filter out where PDP_type IS IPv6 - // if both is requested, do nothing - // if IPv6 only is requested, filter IN - // where PDP_type IS IPv6 - if ( ( iExt->iReqIpvType == EIPv4 ) || - ( iExt->iReqIpvType == EIPv6 ) ) - { // not both, needs filtering - table->ReadUintL( TPtrC(GPRS_PDP_TYPE), pdptype ); - if ( ( iExt->iReqIpvType == EIPv4 ) - && ( pdptype == RPacketContext::EPdpTypeIPv6 ) - ) - { - err = table->DeleteRecord(); - deleted = ETrue; - } - if ( ( iExt->iReqIpvType == EIPv6 ) - && ( pdptype == RPacketContext::EPdpTypeIPv4 ) - ) - { - err = table->DeleteRecord(); - deleted = ETrue; - } - } - } - err = table->GotoNextRecord(); - } while ( !err ); - } - } - CLOG( ( ESelect, 1, - _L( "<- CApSelect::GetFilteredSortedGprsTableViewLC" ) ) ); - - return table; + return NULL; } @@ -1469,45 +352,6 @@ const TDesC& aField, CArrayFixFlat& aArray ) { - CLOG( ( ESelect, 0, _L( "-> CApSelect::GetUintValuesL" ) ) ); - - if ( aTable ) - { - TInt err = aTable->GotoFirstRecord(); - if ( ( err != KErrNone ) && ( err != KErrNotFound ) ) - { - User::Leave( err ); - } - if ( err != KErrNotFound ) - { - TUint32 temp( 0 ); - TBool goon( ETrue ); - do - { - err = ApCommons::ReadUintL( aTable, TPtrC(COMMDB_ID), temp ); - if ( ( err == KErrNone ) && ( temp ) ) - { - // Here I need to TRAP to be able to use 'old' - // database which has no such field ! - // Also assigns a 'default' for it in that case - TRAP(err, ApCommons::ReadUintL( aTable, aField, temp ) ); - aArray.AppendL( temp ); - } - err = aTable->GotoNextRecord(); - if ( err == KErrNotFound ) - { - goon = EFalse; - } - else - { - User::LeaveIfError( err ); - } - } - while ( goon ); - } - } - CLOG( ( ESelect, 1, _L( "<- CApSelect::GetUintValuesL" ) ) ); - } @@ -1519,43 +363,6 @@ void CApSelect::GetProtValuesL( CCommsDbTableView* aTable, CArrayFixFlat& aArray ) { - CLOG( ( ESelect, 0, _L( "-> CApSelect::GetProtValuesL" ) ) ); - - CCommsDbProtectTableView* view = - (CCommsDbProtectTableView*)aTable; - if ( aTable ) - { - TInt err = aTable->GotoFirstRecord(); - if ( ( err != KErrNone ) && ( err != KErrNotFound ) ) - { - User::Leave( err ); - } - if ( err != KErrNotFound ) - { - TBool goon( ETrue ); - TInt prot( EFalse ); - do - { - err = view->GetRecordAccess( prot ); - if ( ( err == KErrNone ) ) - { - aArray.AppendL( prot ); - } - err = aTable->GotoNextRecord(); - if ( err == KErrNotFound ) - { - goon = EFalse; - } - else - { - User::LeaveIfError( err ); - } - } - while ( goon ); - } - } - CLOG( ( ESelect, 1, _L( "<- CApSelect::GetProtValuesL" ) ) ); - } @@ -1569,47 +376,6 @@ const TDesC& aField, CArrayPtrFlat& aArray ) { - CLOG( ( ESelect, 0, _L( "-> CApSelect::GetTextValuesL" ) ) ); - - if ( aTable ) - { - TInt err = aTable->GotoFirstRecord(); - if ( ( err != KErrNone ) && ( err != KErrNotFound ) ) - { - User::Leave( err ); - } - if ( err != KErrNotFound ) - { - TBool goon( ETrue ); - TInt l; - TUint32 temp( 0 ); - HBufC* tmp = NULL; - do - { - err = ApCommons::ReadUintL( aTable, TPtrC(COMMDB_ID), temp ); - if ( ( err == KErrNone ) && ( temp ) ) - { - aTable->ReadColumnLengthL( aField, l ); - tmp = HBufC::NewLC( l ); - TPtr tmpptr( tmp->Des() ); - aTable->ReadTextL( aField, tmpptr ); - aArray.AppendL( tmp ); - } - err = aTable->GotoNextRecord(); - if ( err == KErrNotFound ) - { - goon = EFalse; - } - else - { - User::LeaveIfError( err ); - } - } - while ( goon ); - } - } - CLOG( ( ESelect, 1, _L( "<- CApSelect::GetTextValuesL" ) ) ); - } @@ -1622,45 +388,6 @@ const TDesC& aField, CArrayPtrFlat& aArray ) { - CLOG( ( ESelect, 0, _L( "-> CApSelect::GetLongTextValuesL" ) ) ); - - if ( aTable ) - { - TInt err = aTable->GotoFirstRecord(); - if ( ( err != KErrNone ) && ( err != KErrNotFound ) ) - { - User::Leave( err ); - } - if ( err != KErrNotFound ) - { - TBool goon( ETrue ); - TInt l; - TUint32 temp( 0 ); - HBufC* tmp = NULL; - do - { - err = ApCommons::ReadUintL( aTable, TPtrC(COMMDB_ID), temp ); - if ( ( err == KErrNone ) && ( temp ) ) - { - aTable->ReadColumnLengthL( aField, l ); - tmp = aTable->ReadLongTextLC( aField ); - aArray.AppendL( tmp ); - } - err = aTable->GotoNextRecord(); - if ( err == KErrNotFound ) - { - goon = EFalse; - } - else - { - User::LeaveIfError( err ); - } - } - while ( goon ); - } - } - CLOG( ( ESelect, 1, _L( "<- CApSelect::GetLongTextValuesL" ) ) ); - } @@ -1671,9 +398,7 @@ // TBool CApSelect::IsInArray( CArrayFixFlat* aArray, TUint32 aValue ) { - CLOG( ( ESelect, 0, _L( "<-> CApSelect::IsInArray" ) ) ); - - return ( PosInArray( aArray, aValue ) >= 0); + return EFalse; } @@ -1684,23 +409,7 @@ // TInt CApSelect::PosInArray( CArrayFixFlat* aArray, TUint32 aValue ) { - CLOG( ( ESelect, 0, _L( "-> CApSelect::PosInArray" ) ) ); - - TInt retval( KErrNotFound ); - if ( aArray ) - { - TInt count = aArray->Count(); - for( TInt i=0; ( ( iAt( i ) == aValue ) - { - retval = i; - } - } - } - CLOG( ( ESelect, 1, _L( "<- CApSelect::PosInArray" ) ) ); - - return retval; + return KErrNotFound; } @@ -1710,23 +419,7 @@ // TInt CApSelect::GetItemPos( CApListItemList* aList, TUint32 aId ) { - CLOG( ( ESelect, 0, _L( "-> CApSelect::GetItemPos" ) ) ); - - TInt retval( KErrNotFound ); - if ( aList ) - { - TInt count = aList->Count(); - for( TInt i=0; ( ( iAt( i )->Uid() == aId ) - { - retval = i; - } - } - } - CLOG( ( ESelect, 1, _L( "<- CApSelect::GetItemPos" ) ) ); - - return retval; + return KErrNotFound; } @@ -1740,23 +433,7 @@ const TDesC& aColumnToMatch, const TDesC16& aValueToMatch ) { - CLOG( ( ESelect, 0, _L( "-> CApSelect::OpenViewMatchingTextL" ) ) ); - - CCommsDbTableView* table = NULL; - TRAPD( err, { // this leaves if the table is empty.... - table = iDb->OpenViewMatchingTextLC( aTableName, - aColumnToMatch, - aValueToMatch ); - CleanupStack::Pop( table ); // table - } - ); - if ( err != KErrNotFound ) - { - User::LeaveIfError( err ); - } - CLOG( ( ESelect, 1, _L( "<- CApSelect::OpenViewMatchingTextL" ) ) ); - - return table; + return NULL; } @@ -1769,78 +446,6 @@ CArrayFixFlat* aArray, const TDesC& aColName ) { - CLOG( ( ESelect, 0, _L( "-> CApSelect::GetIspValuesL" ) ) ); - - if ( aTable ) - { - TInt err = aTable->GotoFirstRecord(); - if ( ( err != KErrNone ) && ( err != KErrNotFound ) ) - { - User::Leave( err ); - } - if ( err != KErrNotFound ) - { - TUint32 temp[3]; - TBool goon( ETrue ); - do - { - err = ApCommons::ReadUintL( aTable, TPtrC(COMMDB_ID), - temp[KUID] ); - if ( ( err == KErrNone ) && ( temp[KUID] ) ) - { - // Here I need to TRAP to be able to use 'old' - // database which has no such field ! - // Also assigns a 'default' for it in that case - TRAP( err, ApCommons::ReadUintL - ( - aTable, - aColName, - temp[KISPTYPE] - ) ); - if ( err == KErrNotFound ) - { - temp[KISPTYPE] = EIspTypeInternetAndWAP; - } - else - { - User::LeaveIfError( err ); - } - // if it is CSD/HSCSD, now decide which one - if( !aColName.Compare( TPtrC(ISP_TYPE) ) ) - { - err = ApCommons::ReadUintL - ( - aTable, - TPtrC(ISP_BEARER_TYPE), - temp[KBEARERTYPE] - ); - if ( err != KErrNone ) - { // only possible if it is NULL, - // for other errors, it leaves... - temp[KBEARERTYPE] = EBearerTypeCSD; - } - } - else - { - temp[KBEARERTYPE] = 0; - } - aArray->AppendL( temp ); - } - err = aTable->GotoNextRecord(); - if ( err == KErrNotFound ) - { - goon = EFalse; - } - else - { - User::LeaveIfError( err ); - } - } - while ( goon ); - } - } - CLOG( ( ESelect, 1, _L( "<- CApSelect::GetIspValuesL" ) ) ); - } @@ -1852,23 +457,7 @@ // TInt CApSelect::GetIapPos( CArrayFixFlat* aArray, TUint32 aValue ) { - CLOG( ( ESelect, 0, _L( "-> CApSelect::GetIapPos" ) ) ); - - TInt retval( KErrNotFound ); - if ( aArray ) - { - TInt count = aArray->Count(); - for( TInt i=0; ( ( iAt( i )[KUID] == aValue ) - { - retval = i; - } - } - } - CLOG( ( ESelect, 1, _L( "<- CApSelect::GetIapPos" ) ) ); - - return retval; + return KErrNotFound; } @@ -1879,16 +468,6 @@ // void CApSelect::SortLocalisedNameL( TBool aAscending ) { - CLOG( ( ESelect, 0, _L( "-> CApSelect::SortLocalisedNameL" ) ) ); - - TApListItemNameKey Key( aAscending ); - Key.SetPtr( iApList ); - // Sort returns KErrGeneral if stack overflow, otherwise, returns - // KErrNone. So we will Leave only if stack overflow, - // but then that really does not matter... - User::LeaveIfError( iApList->Sort( Key ) ); - CLOG( ( ESelect, 1, _L( "<- CApSelect::SortLocalisedNameL" ) ) ); - } @@ -1900,16 +479,6 @@ // void CApSelect::SortUidL( TBool aAscending ) { - CLOG( ( ESelect, 0, _L( "-> CApSelect::SortUidL" ) ) ); - - TApListItemUidKey Key( aAscending ); - Key.SetPtr( iApList ); - // Sort returns KErrGeneral if stack overflow, otherwise, returns - // KErrNone. So we will Leave only if stack overflow, - // but then that really does not matter... - User::LeaveIfError( iApList->Sort( Key ) ); - CLOG( ( ESelect, 1, _L( "<- CApSelect::SortUidL" ) ) ); - } // --------------------------------------------------------- @@ -1923,15 +492,7 @@ TInt aReqIpvType ) { - CLOG( ( ESelect, 0, _L( "-> CApSelect::NewLC" ) ) ); - - CApSelect* db = new( ELeave ) CApSelect; - CleanupStack::PushL( db ); - db->ConstructL( aDb, aIspFilter, aBearerFilter, - aSortType, aReqIpvType, EVpnFilterBoth ); - - CLOG( ( ESelect, 1, _L( "<- CApSelect::NewLC" ) ) ); - return db; + return NULL; } @@ -1947,12 +508,6 @@ TInt aReqIpvType ) { - CLOG( ( ESelect, 0, _L( "-> CApSelect::ConstructL" ) ) ); - - ConstructL( aDb, aIspFilter, aBearerFilter, - aSortType, aReqIpvType, EVpnFilterBoth ); - - CLOG( ( ESelect, 1, _L( "<- CApSelect::ConstructL" ) ) ); } @@ -1970,15 +525,7 @@ TVpnFilterType aVpnFilterType ) { - CLOG( ( ESelect, 0, _L( "-> CApSelect::NewLC" ) ) ); - - CApSelect* db = new( ELeave ) CApSelect; - CleanupStack::PushL( db ); - db->ConstructL( aDb, aIspFilter, aBearerFilter, - aSortType, aReqIpvType, aVpnFilterType ); - - CLOG( ( ESelect, 1, _L( "<- CApSelect::NewLC" ) ) ); - return db; + return NULL; } @@ -1995,16 +542,7 @@ TVpnFilterType aVpnFilterType, TBool aIncludeEasyWlan ) { - CLOG( ( ESelect, 0, _L( "-> CApSelect::NewLC" ) ) ); - - CApSelect* db = new( ELeave ) CApSelect; - CleanupStack::PushL( db ); - db->ConstructL( aDb, aIspFilter, aBearerFilter, - aSortType, aReqIpvType, aVpnFilterType, - aIncludeEasyWlan ); - - CLOG( ( ESelect, 1, _L( "<- CApSelect::NewLC" ) ) ); - return db; + return NULL; } @@ -2019,12 +557,6 @@ TInt aReqIpvType, TVpnFilterType aVpnFilterType ) { - CLOG( ( ESelect, 0, _L( "-> CApSelect::ConstructL" ) ) ); - - ConstructL( aDb, aIspFilter, aBearerFilter, aSortType, - aReqIpvType, aVpnFilterType, EFalse ); - - CLOG( ( ESelect, 1, _L( "<- CApSelect::ConstructL" ) ) ); } @@ -2043,44 +575,6 @@ TVpnFilterType aVpnFilterType, TBool aIncludeEasyWlan ) { - CLOG( ( ESelect, 0, _L( "-> CApSelect::ConstructL" ) ) ); - - iExt = new ( ELeave )TSelectExtra; - iExt->iExtra = 0; - iExt->iIsIpv6Supported = EFalse; - iExt->iMaxIndex = 0; - iExt->iReqIpvType = EIPv4; - iExt->iIsFeatureManagerInitialised = EFalse; - iExt->iCdma = EFalse; - iExt->iWlanSupported = EFalse; - iExt->iIncludeEasyWlan = aIncludeEasyWlan; - - FeatureManager::InitializeLibL(); - iExt->iIsFeatureManagerInitialised = ETrue; - - iApList = new( ELeave )CApListItemList(); - iExt->iIsIpv6Supported = - FeatureManager::FeatureSupported( KFeatureIdIPv6 ); -#ifdef __TEST_IPV6_SUPPORT - iExt->iIsIpv6Supported = ETrue; -#endif // __TEST_IPV6_SUPPORT - iExt->iCdma = FeatureManager::FeatureSupported( KFeatureIdProtocolCdma ); -#ifdef __TEST_CDMA_SUPPORT - iExt->iCdma = ETrue; -#endif // __TEST_CDMA_SUPPORT - - iExt->iWlanSupported = - FeatureManager::FeatureSupported( KFeatureIdProtocolWlan ); -#ifdef __TEST_WLAN_SUPPORT - iExt->iWlanSupported = ETrue; -#endif // __TEST_WLAN_SUPPORT - - iDb = &aDb; - - SetFiltersL( aIspFilter, aBearerFilter, aSortType, - aReqIpvType, aVpnFilterType ); - - CLOG( ( ESelect, 1, _L( "<- CApSelect::ConstructL" ) ) ); } @@ -2093,113 +587,6 @@ TInt aSortType, TInt aReqIpvType, TInt aVpnFilterType ) { - CLOG( ( ESelect, 0, _L( "-> CApSelect::SetFilters" ) ) ); - - TInt lcode( KErrNone ); - // as bearer filter might be EApBearerTypeAllBearers, - // there is no point to check bearer filter validity - // but we can still check ISP... - if ( aIspFilter >= 2*KEApIspTypeMMSMandatory ) - { - lcode = KErrInvalidIspRequest; - } - - User::LeaveIfError( lcode ); - - if ( !( ( aSortType == KEApSortUidAscending ) - || ( aSortType == KEApSortUidDescending ) - || ( aSortType == KEApSortNameAscending ) - || ( aSortType == KEApSortNameDescending ) ) - ) - { - // no sorting order specified, - // assuming KEApSortUidAscending - aSortType = KEApSortUidAscending; - } - - if ( !( aBearerFilter & ( EApBearerTypeCSD - + EApBearerTypeCDMA - + EApBearerTypeGPRS - + EApBearerTypeHSCSD - + EApBearerTypeWLAN - #ifdef __TEST_LAN_BEARER - + EApBearerTypeLAN - #endif // __TEST_LAN_BEARER - + EApBearerTypeLANModem - // Check bearertype all case!!! - + EApBearerTypeAll ) ) - ) - { - // no bearer type specified, - // assuming EApBearerTypeAll - if ( aBearerFilter != EApBearerTypeAllBearers ) - { - // unknown bearer, Leave - User::Leave( KErrInvalidBearerType ); - } - } - - if ( !( aIspFilter & ( KEApIspTypeAll - + KEApIspTypeInternetAndWAP - + KEApIspTypeInternetOnly - + KEApIspTypeWAPOnly - + KEApIspTypeMMSMandatory ) ) - ) - { - // erroneous use, no ISP type specified, - // or only KEApIspTypeWAPMandatory, - // both cases assuming KEApIspTypeAll - aIspFilter += KEApIspTypeAll; - } - - iIsp = aIspFilter; - iSort = aSortType; - - if ( aBearerFilter & EApBearerTypeAll ) - { - aBearerFilter = EApBearerTypeAllBearers; - } - - iBearer = GetSupportedBearerSet( aBearerFilter ); - - if ( !iBearer ) - { - User::Leave( KErrInvalidBearerType ); - } - - iExt->iReqIpvType = aReqIpvType; - - iExt->iVpnFilterType = aVpnFilterType; - - DoUpdateL(); - - if ( iSort == KEApSortNameAscending ) - { - SortLocalisedNameL( ETrue ); // ascending - } - else - { - if ( iSort == KEApSortNameDescending ) - { - SortLocalisedNameL( EFalse ); // descending - } - else - { - if ( iSort == KEApSortUidAscending ) - { - SortUidL( ETrue ); - } - else - { - if ( iSort == KEApSortUidDescending ) - { - SortUidL( EFalse ); - } - } - } - } - - CLOG( ( ESelect, 1, _L( "<- CApSelect::SetFilters" ) ) ); } @@ -2210,14 +597,7 @@ // CCommsDbTableView* CApSelect::GetVpnTableViewLC( ) { - CLOG( ( ESelect, 0, _L( "-> CApSelect::GetVpnTableViewLC" ) ) ); - - CCommsDbTableView* table = NULL; - table = iDb->OpenTableLC( TPtrC(VPN_SERVICE) ); - - CLOG( ( ESelect, 1, _L( "<- CApSelect::GetVpnTableViewLC" ) ) ); - - return table; + return NULL; } @@ -2229,86 +609,6 @@ void CApSelect::GetVpnValuesL( CCommsDbTableView* aTable, CArrayFixFlat* aVpnArray ) { // get the VPN values - CLOG( ( ESelect, 0, _L( "-> CApSelect::GetVpnValuesL" ) ) ); - - if ( aTable ) - { - TInt err = aTable->GotoFirstRecord(); - if ( ( err != KErrNone ) && ( err != KErrNotFound ) ) - { - User::Leave( err ); - } - if ( err != KErrNotFound ) - { - TUint32 tempvpn( 0 ); - TUint32 temphomeiap( 0 ); - TUint32 temphomesnap( 0 ); - HBufC* tempname = NULL; - TVpnData data; - TBool goon( ETrue ); - do - { - err = ApCommons::ReadUintL( aTable, TPtrC(COMMDB_ID), - tempvpn ); - if ( ( err == KErrNone ) && ( tempvpn ) ) - { - // First try to check if VPN IAP uses another IAP directly - err = ApCommons::ReadUintL( aTable, - TPtrC(VPN_SERVICE_IAP), - temphomeiap ); - - if ( (err != KErrNone ) || ( !tempvpn ) ) - { - // IAP field was empty. VPN IAP must point to SNAP. - err = ApCommons::ReadUintL( aTable, - TPtrC(VPN_SERVICE_SNAP), - temphomesnap ); - } - - if ( ( err == KErrNone ) && ( temphomeiap || temphomesnap ) ) - { - // now get the name - - tempname = - ApCommons::ReadText16ValueLC( aTable, - TPtrC(COMMDB_NAME) ); - - // everything is O.K., we can add the item - if ( temphomesnap ) - { - data.iHomeSnapId = temphomesnap; - data.iHomeIapId = 0; - } - else - { - data.iHomeSnapId = 0; - data.iHomeIapId = temphomeiap; - } - data.iVpnIapId = tempvpn; - data.iName = tempname; - aVpnArray->AppendL( data ); // array owns it... - } - // Only VPN iaps which point to a real IAP are added to list. - } - else - { - User::LeaveIfError( err ); - } - err = aTable->GotoNextRecord(); - if ( err == KErrNotFound ) - { - goon = EFalse; - } - else - { - User::LeaveIfError( err ); - } - } - while ( goon ); - } - } - CLOG( ( ESelect, 1, _L( "<- CApSelect::GetVpnValuesL" ) ) ); - } @@ -2321,179 +621,6 @@ // void CApSelect::AddLanL( TBool aWlan ) { - CLOG( ( ESelect, 0, _L( "-> CApSelect::AddLanL" ) ) ); - - // First get the list of all VPN-s - // get their WAP-ID, IAPID, - // Also ask their RealIApID, bearertype and filter for it... - - CCommsDbTableView* lant = NULL; - - lant = iDb->OpenViewMatchingTextLC( TPtrC(IAP), - TPtrC(IAP_SERVICE_TYPE), - TPtrC(LAN_SERVICE) ); - TInt err = lant->GotoFirstRecord(); - if ( err != KErrNotFound) - { - User::LeaveIfError( err ); - - CArrayFixFlat* laniapid = - new ( ELeave ) CArrayFixFlat( 10 ); - CleanupStack::PushL( laniapid ); - GetUintValuesL( lant, TPtrC(COMMDB_ID), *laniapid ); - - CArrayFixFlat* lanserviceid = - new ( ELeave ) CArrayFixFlat( 10 ); - CleanupStack::PushL( lanserviceid ); - GetUintValuesL( lant, TPtrC(IAP_SERVICE), *lanserviceid ); - - CArrayFixFlat* iapbearerid = - new ( ELeave ) CArrayFixFlat( 10 ); - CleanupStack::PushL( iapbearerid ); - GetUintValuesL( lant, TPtrC(IAP_BEARER), *iapbearerid ); - - // read up access point names, too, just to be as fast as we can... - CArrayPtrFlat* lanapname = - new ( ELeave ) CArrayPtrFlat( 10 ); - CleanupStack::PushL( lanapname ); - GetTextValuesL( lant, TPtrC(COMMDB_NAME), *lanapname ); - - // now get WAP ID's -// CArrayFixFlat* lanwapapid = -// new ( ELeave ) CArrayFixFlat( 10 ); -// CleanupStack::PushL( lanwapapid ); - CApUtils* utils = CApUtils::NewLC( *iDb ); - - TUint32 count( laniapid->Count() ); - TUint32 currlaniapid; - TUint32 currwapapid( 0 ); - CApListItem* item = NULL; - - for ( TUint32 i = 0; i < count; i++) - { - currlaniapid = laniapid->At( i ); - TRAP( err, currwapapid = utils->WapIdFromIapIdL( currlaniapid )); - if ( !err ) - { // get protection for the given record - TInt prot( EFalse ); - CCommsDbTableView* wt = NULL; - - wt = iDb->OpenViewMatchingUintLC( TPtrC(WAP_ACCESS_POINT), - TPtrC(COMMDB_ID), - currwapapid ); - CCommsDbProtectTableView* protview = - (CCommsDbProtectTableView*)wt; - - User::LeaveIfError( wt->GotoFirstRecord() ); - err = protview->GetRecordAccess( prot ); - HBufC* wspage = wt->ReadLongTextLC( TPtrC(WAP_START_PAGE) ); - if ( aWlan ) - { - if ( iExt->iWlanSupported ) - { - // check if it is a WLAN, add ONLY if it IS - TUint32 lanid = lanserviceid->At( i ); - TBool iswlan( EFalse ); - TRAP( err, iswlan = utils->IsWlanL( lanid ) ); - if ( !err && iswlan ) - { - TBool hasssid( EFalse ); - err = KErrNone; - TRAP( err, - hasssid = utils->HasWlanSSIDL( lanid )); - if ( iExt->iIncludeEasyWlan ) - { - hasssid = ETrue; - } - if ( (err == KErrNone) && hasssid ) - { - item = CApListItem::NewLC( - EIspTypeInternetAndWAP, - currwapapid, - *lanapname->At( i ), - EApBearerTypeWLAN, - *wspage, - prot ); - iApList->AppendL( item ); - CleanupStack::Pop( item ); // owned by list - } - } - } - } - else - { - // first check if it is a WLAN, add ONLY if it IS NOT - // then check if it is LANModem, - // then check for LAN, if supported - // check if it is a WLAN, add ONLY if it IS NOT - TUint32 lanid = lanserviceid->At( i ); - TBool iswlan( EFalse ); - TRAP( err, iswlan = utils->IsWlanL( lanid ) ); - if ( !err && !iswlan ) - { - // then check if it is LANModem, - CCommsDbTableView* lanbearer; - lanbearer = - iDb->OpenViewMatchingUintLC( - TPtrC(LAN_BEARER), - TPtrC(COMMDB_ID), - iapbearerid->At(i ) ); - User::LeaveIfError( - lanbearer->GotoFirstRecord() ); - // LANMODEM? check commdb_name - HBufC* lbuf; - lbuf = ApCommons::ReadText16ValueLC( lanbearer, - TPtrC(COMMDB_NAME) ); - // if it is KModemBearerLanModem, it is LANModem - if ( *lbuf == KModemBearerLANModem ) - { - item = CApListItem::NewLC( EIspTypeInternetAndWAP, - currwapapid, - *lanapname->At( i ), - EApBearerTypeLANModem ); - iApList->AppendL( item ); - CleanupStack::Pop( item ); // item owned by list ! - } - else - { - -#ifdef __TEST_LAN_BEARER - // Check for sure it is LAN - // we now it is not WLAN, say it is LAN - item = CApListItem::NewLC( EIspTypeInternetAndWAP, - currwapapid, - *lanapname->At( i ), - EApBearerTypeLAN, - *wspage, - prot ); - iApList->AppendL( item ); - CleanupStack::Pop( item ); // item owned by list ! -#endif // __TEST_LAN_BEARER - } - CleanupStack::PopAndDestroy( lbuf ); - CleanupStack::PopAndDestroy( lanbearer ); - } - } - CleanupStack::PopAndDestroy( wspage ); - CleanupStack::PopAndDestroy( wt ); - } - } - - iCount = iApList->Count(); - iExt->iMaxIndex = iCount-1; - - CleanupStack::PopAndDestroy( utils ); -// CleanupStack::PopAndDestroy( lanwapapid ); - // ResetAndDestroy the array: - CleanupStack::PopAndDestroy( lanapname->Count() ); // lanapname - CleanupStack::PopAndDestroy( lanapname ); // lanapname - CleanupStack::PopAndDestroy( iapbearerid ); - CleanupStack::PopAndDestroy( lanserviceid ); - CleanupStack::PopAndDestroy( laniapid ); - } - - CleanupStack::PopAndDestroy( lant ); - CLOG( ( ESelect, 1, _L( "<- CApSelect::AddLanL" ) ) ); } @@ -2503,58 +630,7 @@ // TInt CApSelect::GetSupportedBearerSet( TInt aBearerFilter ) { - TInt retval = aBearerFilter; - - TBool isCsdSupported = - FeatureManager::FeatureSupported( KFeatureIdAppCsdSupport ); -#ifdef __TEST_CSD_SUPPORT - isCsdSupported = ETrue; -#endif // __TEST_CSD_SUPPORT - - -#ifdef __TEST_USE_SHARED_DATA - TInt isHscsdSupported = ETrue; - /* - ApCommons::IsGivenSharedDataSupportL( KGeneralSettingsUid, - KGSHSCSDAccessPoints ); - */ -#else - TInt isHscsdSupported = ETrue; -#endif // __TEST_USE_SHARED_DATA - -#ifdef __TEST_HSCSD_SUPPORT - isHscsdSupported = ETrue; -#endif // __TEST_HSCSD_SUPPORT - - if ( !isCsdSupported ) - { // remove CSD, HSCSD, do not allow ALL - if ( aBearerFilter & EApBearerTypeAll ) - { - retval &= ~EApBearerTypeCSD; - retval &= ~EApBearerTypeHSCSD; - } - else - { - if ( aBearerFilter & EApBearerTypeCSD ) - { - retval &= ~EApBearerTypeCSD; - } - if ( aBearerFilter & EApBearerTypeHSCSD ) - { - retval &= ~EApBearerTypeHSCSD; - } - } - } - - if ( !isHscsdSupported ) - { // HSCSD - if ( ( aBearerFilter & EApBearerTypeAll ) - || ( aBearerFilter & EApBearerTypeHSCSD ) ) - { - retval &= ~EApBearerTypeHSCSD; - } - } - return retval; + return 0; } diff -r 84c6623982f6 -r ed07dcc72692 apengine/apeng/src/APUtils.cpp --- a/apengine/apeng/src/APUtils.cpp Fri Sep 17 08:32:43 2010 +0300 +++ b/apengine/apeng/src/APUtils.cpp Mon Oct 04 00:43:42 2010 +0300 @@ -48,14 +48,7 @@ // EXPORT_C CApUtils* CApUtils::NewLC( CCommsDatabase& aDb ) { - CLOG( ( EUtil, 0, _L( "-> CApUtils::NewLC" ) ) ); - - CApUtils* db = new( ELeave ) CApUtils; - CleanupStack::PushL( db ); - db->ConstructL( aDb ); - - CLOG( ( EUtil, 1, _L( "<- CApUtils::NewLC" ) ) ); - return db; + return NULL; } @@ -67,15 +60,6 @@ // EXPORT_C CApUtils::~CApUtils() { - if ( iExt ) - { - if ( iExt->iIsFeatureManagerInitialised ) - { - FeatureManager::UnInitializeLib(); - } - } - delete iExt; - CLOG( ( EUtil, 0, _L( "<-> CApUtils::~CApUtils" ) ) ); } @@ -98,28 +82,6 @@ // EXPORT_C void CApUtils::ConstructL( CCommsDatabase& aDb ) { - CLOG( ( EUtil, 0, _L( "-> CApUtils::ConstructL" ) ) ); - - iDb = &aDb; - iExt = new ( ELeave )TUtilsExtra; - - FeatureManager::InitializeLibL(); - iExt->iIsFeatureManagerInitialised = ETrue; - - iExt->iVariant = ApCommons::GetVariantL(); -#ifdef __TEST_CDMA_WRITE_PROTECT - iExt->iVariant |= KApUiEditOnlyVPNs; -#endif // __TEST_CDMA_WRITE_PROTECT - - iExt->iWlanSupported = - FeatureManager::FeatureSupported( KFeatureIdProtocolWlan ); - - -#ifdef __TEST_WLAN_SUPPORT - iExt->iWlanSupported = ETrue; -#endif // __TEST_WLAN_SUPPORT - - CLOG( ( EUtil, 1, _L( "<- CApUtils::ConstructL" ) ) ); } @@ -134,55 +96,7 @@ // EXPORT_C TBool CApUtils::IsAPInUseL( TUint32 aUid ) { - CLOG( ( EUtil, 0, _L( "-> CApUtils::IsAPInUseL" ) ) ); - - - - TBool retval( EFalse ); -#ifdef __WINS__ - // just to satisfy compiler... - aUid++; -#else // - RSocketServ rs; - RConnection rc; - - TUint32 iap( 0 ); - TBool ownTransaction = ApCommons::StartPushedTransactionLC( *iDb, ETrue ); - TRAP_IGNORE( iap = IapIdFromWapIdL( aUid ) ); - - User::LeaveIfError( rs.Connect() ); - User::LeaveIfError( rc.Open( rs ) ); - - TUint count( 0 ); - User::LeaveIfError( rc.EnumerateConnections( count ) ); - // Go on only if there is any - if ( count ) - { - for( TUint i = 1; i <= count; i++) - { - TPckgBuf connInfo; - User::LeaveIfError( rc.GetConnectionInfo( i, connInfo ) ); - if ( iap == connInfo().iIapId ) - { - // IAP is in use, break - retval = ETrue; - break; - } - } - } - - rc.Close(); - rs.Close(); - - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *iDb ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } -#endif // __WINS__ - - CLOG( ( EUtil, 1, _L( "<- CApUtils::IsAPInUseL" ) ) ); - return ( retval ); + return EFalse; } @@ -194,19 +108,6 @@ // EXPORT_C void CApUtils::WapBearerTypeL( TUint32 aUid, TDes& aBearer ) { - CLOG( ( EUtil, 0, _L( "-> CApUtils::WapBearerTypeL" ) ) ); - - TBool ownTransaction = ApCommons::StartPushedTransactionLC( *iDb ); - - DoWapBearerTypeL( aUid, aBearer ); - - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *iDb ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - CLOG( ( EUtil, 1, _L( "<- CApUtils::WapBearerTypeL" ) ) ); } @@ -216,19 +117,7 @@ // EXPORT_C TApBearerType CApUtils::BearerTypeL( TUint32 aUid ) { - CLOG( ( EUtil, 0, _L( "-> CApUtils::BearerTypeL" ) ) ); - - TBool ownTransaction = ApCommons::StartPushedTransactionLC( *iDb ); - TApBearerType retval = EApBearerTypeAllBearers; - retval = DoBearerTypeL( aUid ); - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *iDb ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - CLOG( ( EUtil, 1, _L( "<- CApUtils::BearerTypeL" ) ) ); - return retval; + User::Leave( KErrNotSupported ); } @@ -238,17 +127,6 @@ // EXPORT_C void CApUtils::ISPTypeL( TUint32 aUid, TCommsDbIspType& aIspType ) { - CLOG( ( EUtil, 0, _L( "-> CApUtils::ISPTypeL" ) ) ); - - TBool ownTransaction = ApCommons::StartPushedTransactionLC( *iDb ); - DoISPTypeL( aUid, aIspType ); - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *iDb ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - CLOG( ( EUtil, 1, _L( "<- CApUtils::ISPTypeL" ) ) ); } @@ -259,9 +137,7 @@ // EXPORT_C TBool CApUtils::IsValidNameL( const TDesC& aNameText ) { - CLOG( ( EUtil, 0, _L( "<-> CApUtils::IsValidNameL" ) ) ); - - return IsValidNameL( aNameText, 0 ); + return EFalse; } @@ -271,34 +147,7 @@ // EXPORT_C TBool CApUtils::MakeValidNameL( TDes& aNameText ) { - CLOG( ( EUtil, 0, _L( "-> CApUtils::MakeValidNameL" ) ) ); - - TBool ownTransaction = ApCommons::StartPushedTransactionLC( *iDb ); - - HBufC* buf = HBufC::NewLC( KModifiableTextLength ); - TPtr ptr( buf->Des() ); - ptr.Copy( aNameText ); - TBool nameChanged( EFalse ); - HBufC* sgd = ApCommons::DoMakeValidNameL( *iDb, - nameChanged, - buf, - 0, - EFalse ); - - if ( nameChanged ) - { - aNameText.Copy( *sgd ); - } - CleanupStack::PopAndDestroy( buf ); // buf - delete sgd; - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *iDb ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - CLOG( ( EUtil, 1, _L( "<- CApUtils::MakeValidNameL" ) ) ); - return nameChanged; + return EFalse; } @@ -308,17 +157,6 @@ // EXPORT_C void CApUtils::NameL( TUint32 aUid, TDes& aName ) { - CLOG( ( EUtil, 0, _L( "-> CApUtils::NameL" ) ) ); - - TBool ownTransaction = ApCommons::StartPushedTransactionLC( *iDb ); - DoNameL( aUid, aName ); - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *iDb ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - CLOG( ( EUtil, 1, _L( "<- CApUtils::NameL" ) ) ); } @@ -329,22 +167,6 @@ // EXPORT_C void CApUtils::SetNameL( TDes& aName, TUint32 aUid ) { - CLOG( ( EUtil, 0, _L( "-> CApUtils::SetNameL" ) ) ); - - if ( iExt->iVariant & KApUiEditOnlyVPNs ) - { - User::Leave( KErrNotSupported ); - } - - TBool ownTransaction = ApCommons::StartPushedTransactionLC( *iDb ); - DoSetNameL( aName, aUid ); - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *iDb ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - CLOG( ( EUtil, 1, _L( "<- CApUtils::SetNameL" ) ) ); } @@ -355,22 +177,6 @@ // EXPORT_C void CApUtils::SetISPTypeL( TUint32 aUid, TCommsDbIspType aIspType ) { - CLOG( ( EUtil, 0, _L( "-> CApUtils::SetISPTypeL" ) ) ); - - if ( iExt->iVariant & KApUiEditOnlyVPNs ) - { - User::Leave( KErrNotSupported ); - } - - TBool ownTransaction = ApCommons::StartPushedTransactionLC( *iDb ); - DoSetISPTypeL( aUid, aIspType ); - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *iDb ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - CLOG( ( EUtil, 1, _L( "<- CApUtils::SetISPTypeL" ) ) ); } @@ -381,44 +187,7 @@ // EXPORT_C TUint32 CApUtils::IapIdFromWapIdL( TUint32 aUid ) { - CLOG( ( EUtil, 0, _L( "-> CApUtils::IapIdFromWapIdL" ) ) ); - - TBool ownTransaction = ApCommons::StartPushedTransactionLC( *iDb ); - TUint32 retval( 0 ); - - CCommsDbTableView* wapt; - wapt = iDb->OpenViewMatchingUintLC( TPtrC(WAP_ACCESS_POINT), - TPtrC(COMMDB_ID), aUid ); - User::LeaveIfError( wapt->GotoFirstRecord() ); - - HBufC* wapBearer = ApCommons::ReadText16ValueLC - ( - wapt, - TPtrC(WAP_CURRENT_BEARER) - ); - - if ( *wapBearer == TPtrC(WAP_IP_BEARER) ) - { - CCommsDbTableView* bearert; - bearert = iDb->OpenViewMatchingUintLC( TPtrC(*wapBearer), - TPtrC(WAP_ACCESS_POINT_ID), aUid ); - User::LeaveIfError( bearert->GotoFirstRecord() ); - ApCommons::ReadUintL( bearert, TPtrC(WAP_IAP), retval ); - CleanupStack::PopAndDestroy( bearert ); // bearert - } - else - { - User::Leave( KErrInvalidBearerType ); - } - CleanupStack::PopAndDestroy( 2, wapt ); // wapBearer, wapt - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *iDb ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - CLOG( ( EUtil, 1, _L( "<- CApUtils::IapIdFromWapIdL" ) ) ); - return retval; + return 0; } @@ -428,26 +197,7 @@ // EXPORT_C TUint32 CApUtils::WapIdFromIapIdL( TUint32 aUid ) { - CLOG( ( EUtil, 0, _L( "-> CApUtils::WapIdFromIapIdL" ) ) ); - - TBool ownTransaction = ApCommons::StartPushedTransactionLC( *iDb ); - TUint32 retval( 0 ); - - CCommsDbTableView* bearert; - bearert = iDb->OpenViewMatchingUintLC( TPtrC(WAP_IP_BEARER), - TPtrC(WAP_IAP), aUid ); - User::LeaveIfError( bearert->GotoFirstRecord() ); - ApCommons::ReadUintL( bearert, TPtrC(WAP_ACCESS_POINT_ID), retval ); - CleanupStack::PopAndDestroy( bearert ); // bearert - - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *iDb ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - CLOG( ( EUtil, 1, _L( "<- CApUtils::WapIdFromIapIdL" ) ) ); - return retval; + return 0; } @@ -457,19 +207,7 @@ // EXPORT_C TBool CApUtils::HasMandatoryFieldsFilledL( TUint32 aUid ) { - CLOG( ( EUtil, 0, _L( "-> CApUtils::HasMandatoryFieldsFilledL" ) ) ); - - TBool retval( EFalse ); - TBool isOwn = ApCommons::StartPushedTransactionLC( *iDb ); - retval= DoHasMandatoryFieldsFilledL( aUid ); - if ( isOwn ) - { - ApCommons::CommitTransaction( *iDb ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - CLOG( ( EUtil, 1, _L( "<- CApUtils::HasMandatoryFieldsFilledL" ) ) ); - return retval; + return EFalse; } @@ -480,9 +218,7 @@ // EXPORT_C TBool CApUtils::IAPExistsL( TUint32 aUid ) { - CLOG( ( EUtil, 0, _L( "<-> CApUtils::IAPExistsL" ) ) ); - - return DoesExistsL( TPtrC( IAP ), aUid ); + return EFalse; } @@ -492,9 +228,7 @@ // EXPORT_C TBool CApUtils::WapApExistsL( TUint32 aUid ) { - CLOG( ( EUtil, 0, _L( "<-> CApUtils::WapApExistsL" ) ) ); - - return DoesExistsL( TPtrC( WAP_ACCESS_POINT ), aUid ); + return EFalse; } @@ -508,85 +242,7 @@ CCommsDbTableView* aWapt, TApBearerType aBearertype ) { - CLOG( ( EUtil, 0, _L( "-> CApUtils::DoHasMandatoryFieldsFilledL" ) ) ); - - TBool retval( EFalse ); - TInt need2pop( 0 ); - // if not contains, retval = False... - // Mandatory WAP settings are: - // CSD: StartPage, GatewayAddr - // Note: SMS bearer had been dropped. - // SMS: ServerNumber, ServiceNumber - // Gprs: StartPage, GatewayAddr - // Cdma: StartPage, GatewayAddr - // Start with CSD/GPRS: - - if ( aBearertype == EApBearerTypeAllBearers ) - { - aBearertype = BearerTypeL( aUid ); - } - if ( aBearertype == EApBearerTypeAllBearers ) - { - User::Leave( KErrInvalidBearerType ); - } - - if ( !aWapt ) - { - aWapt = iDb->OpenViewMatchingUintLC( TPtrC(WAP_ACCESS_POINT ), - TPtrC( COMMDB_ID ), aUid ); - need2pop++; - TInt res = aWapt->GotoFirstRecord(); - if ( res != KErrNone ) - { - aWapt = NULL; - User::Leave( res ); - } - } - switch ( aBearertype ) - { - case EApBearerTypeCSD: - case EApBearerTypeHSCSD: - case EApBearerTypeGPRS: - case EApBearerTypeCDMA: - { - TInt aLength( 0 ); - aWapt->ReadColumnLengthL( TPtrC(WAP_START_PAGE), aLength ); - if ( aLength ) - { - CCommsDbTableView* bearert = iDb->OpenViewMatchingUintLC( - TPtrC(WAP_IP_BEARER), - TPtrC(WAP_ACCESS_POINT_ID), - aUid ); - User::LeaveIfError( bearert->GotoFirstRecord() ); - bearert->ReadColumnLengthL( TPtrC(WAP_GATEWAY_ADDRESS), - aLength ); - if ( aLength ) - { - HBufC* txtbuf = HBufC::NewLC( aLength ); - TPtr16 txt = txtbuf->Des(); - bearert->ReadTextL( TPtrC(WAP_GATEWAY_ADDRESS), txt ); - if ( txt.Compare( KDynIpAddress ) ) - { - retval = ETrue; - } - } - CleanupStack::PopAndDestroy( 2, bearert ); // txtbuf,bearert - } - break; - } - default: - { - User::Leave( KErrInvalidBearerType ); - break; - } - } - if ( need2pop ) - { - CleanupStack::PopAndDestroy( need2pop ); - } - - CLOG( ( EUtil, 1, _L( "<- CApUtils::DoHasMandatoryFieldsFilledL" ) ) ); - return retval; + return EFalse; } @@ -598,64 +254,7 @@ EXPORT_C TBool CApUtils::IsValidNameL( const TDesC& aNameText, TUint32 aAcceptUid ) { - CLOG( ( EUtil, 0, _L( "-> CApUtils::IsValidNameL" ) ) ); - - // Valid name: it means the name of the Connection, - // that is the COMMDB_NAME in WAP_ACCESS_POINT table - // - TBool ret( ETrue ) ; - TBool ownTransaction = ApCommons::StartPushedTransactionLC( *iDb, ETrue ); - - HBufC* esc = ApCommons::EscapeTextLC( aNameText ); - CCommsDbTableView* wapt; - wapt = iDb->OpenViewMatchingTextLC( TPtrC(WAP_ACCESS_POINT), - TPtrC(COMMDB_NAME), - *esc ); - - TInt res; - res = wapt->GotoFirstRecord(); // OK - do - { - if ( res == KErrNone ) - { - // Check UID - TUint32 arecid; - ApCommons::ReadUintL( wapt, TPtrC(COMMDB_ID), arecid); - if ( arecid != aAcceptUid ) - { - // some other record is already using this name, - // need to change it - ret = EFalse; - } - } - else - { - if ( res == KErrNotFound ) - { - ret = ETrue; - } - else - { - User::Leave( res ); - } - } - if ( ret && ( res == KErrNone ) ) - { - res = wapt->GotoNextRecord(); - } - }while ( ( res == KErrNone ) && ( ret ) ); - - CleanupStack::PopAndDestroy( wapt ); // wapt - CleanupStack::PopAndDestroy( esc ); // esc - - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *iDb ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - CLOG( ( EUtil, 1, _L( "<- CApUtils::IsValidNameL" ) ) ); - return ret; + return EFalse; } @@ -665,24 +264,7 @@ // EXPORT_C TBool CApUtils::IsReadOnlyL( TUint32 aUid ) { - CLOG( ( EUtil, 0, _L( "-> CApUtils::IsReadOnlyL" ) ) ); - - TBool retval( EFalse ); - TBool ownTransaction = ApCommons::StartPushedTransactionLC( *iDb, ETrue ); - CCommsDbTableView* wapt; - wapt = iDb->OpenViewMatchingUintLC( TPtrC(WAP_ACCESS_POINT), - TPtrC(COMMDB_ID), aUid ); - User::LeaveIfError( wapt->GotoFirstRecord() ); - retval = ApCommons::DoGetReadOnlyL( *wapt ); - CleanupStack::PopAndDestroy( wapt ); // wapt - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *iDb ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - CLOG( ( EUtil, 1, _L( "<- CApUtils::IsReadOnlyL" ) ) ); - return retval; + return EFalse; } @@ -694,22 +276,7 @@ // TBool CApUtils::IsWlanL( TUint32 aLanCommdbId ) { - CLOG( ( EUtil, 0, _L( "-> CApUtils::IsWlanL" ) ) ); - - TBool retval( EFalse ); - TRAPD( err, retval = DoIsWlanL( aLanCommdbId ) ); - - if ( err == KErrNotFound ) - { - retval = EFalse; - } - else - { - User::LeaveIfError( err ); - } - - CLOG( ( EUtil, 1, _L( "<- CApUtils::IsWlanL" ) ) ); - return retval; + return EFalse; } @@ -720,38 +287,7 @@ // TBool CApUtils::HasWlanSSIDL( TUint32 aLanCommdbId ) { - CLOG( ( EUtil, 0, _L( "-> CApUtils::HasWlanSSIDL" ) ) ); - - TBool retval( EFalse ); - CCommsDbTableView* wlantable = NULL; - - // WLAN settings table backlinks to LAN service, - // so we query WLAN settings for a record - // where WLAN_SERVICE_ID is LAN_SERVICE's COMMDB_ID, - // which is aApItem.iIapServiceId... - wlantable = iDb->OpenViewMatchingUintLC( TPtrC(WLAN_SERVICE), - TPtrC(WLAN_SERVICE_ID), - aLanCommdbId ); - TInt err = wlantable->GotoFirstRecord(); - if ( err == KErrNotFound ) - { - retval = EFalse; - } - else - { - User::LeaveIfError( err ); - HBufC* wlanssid = ApCommons::ReadText16ValueLC - ( wlantable, TPtrC(NU_WLAN_SSID) ); - if ( wlanssid->Compare( KEmpty ) != 0 ) - { - retval = ETrue; - } - CleanupStack::PopAndDestroy( wlanssid ); - } - CleanupStack::PopAndDestroy( wlantable ); - - CLOG( ( EUtil, 1, _L( "<- CApUtils::HasWlanSSIDL" ) ) ); - return retval; + return EFalse; } @@ -763,29 +299,6 @@ // void CApUtils::DoWapBearerTypeL( TUint32 aUid, TDes& aBearer ) { - CLOG( ( EUtil, 0, _L( "-> CApUtils::DoWapBearerTypeL" ) ) ); - - CCommsDbTableView* wapt; - wapt = iDb->OpenViewMatchingUintLC( TPtrC(WAP_ACCESS_POINT), - TPtrC(COMMDB_ID), aUid ); - User::LeaveIfError( wapt->GotoFirstRecord() ); - HBufC* wapBearer = ApCommons::ReadText16ValueLC - ( - wapt, - TPtrC(WAP_CURRENT_BEARER) - ); - if ( aBearer.MaxLength() < wapBearer->Length() ) - { - User::Leave( KErrDescOverflow ); - } - else - { - aBearer.SetLength( wapBearer->Length() ); - aBearer.Format( KFormat, &*wapBearer ); - } - CleanupStack::PopAndDestroy( 2, wapt ); // wapBearer, wapt - - CLOG( ( EUtil, 1, _L( "<- CApUtils::DoWapBearerTypeL" ) ) ); } @@ -796,341 +309,7 @@ // TApBearerType CApUtils::DoBearerTypeL( TUint32 aUid ) { - CLOG( ( EUtil, 0, _L( "-> CApUtils::DoBearerTypeL" ) ) ); - - TApBearerType retval = EApBearerTypeAllBearers; - - CCommsDbTableView* wapt; - wapt = iDb->OpenViewMatchingUintLC( TPtrC(WAP_ACCESS_POINT), - TPtrC(COMMDB_ID), - aUid ); - - // TRAPped for some record that doesn't have a WAP -table. - // If KErrNotFound, then just return EApBearerTypeWLAN - TInt wapErr = wapt->GotoFirstRecord(); - if ( wapErr == KErrNotFound ) - { - CleanupStack::PopAndDestroy( wapt ); - return EApBearerTypeWLAN; - } - else - { - User::LeaveIfError( wapErr ); - } - - HBufC* wapBearer = ApCommons::ReadText16ValueLC - ( - wapt, - TPtrC(WAP_CURRENT_BEARER) - ); - - CCommsDbTableView* bearert = iDb->OpenViewMatchingUintLC( *wapBearer, - TPtrC(WAP_ACCESS_POINT_ID), aUid ); - - User::LeaveIfError( bearert->GotoFirstRecord() ); - // decide which bearer, read bearer spec. data. - if ( *wapBearer == TPtrC(WAP_IP_BEARER) ) - { - TUint32 wapIap; - ApCommons::ReadUintL( bearert, TPtrC(WAP_IAP), wapIap ); - - CCommsDbTableView* iapt = iDb->OpenViewMatchingUintLC( TPtrC(IAP), - TPtrC(COMMDB_ID), wapIap ); - - User::LeaveIfError( iapt->GotoFirstRecord() ); - HBufC* aIapServiceType = ApCommons::ReadText16ValueLC - ( - iapt, - TPtrC(IAP_SERVICE_TYPE) - ); - if ( ( *aIapServiceType == TPtrC(DIAL_OUT_ISP) ) || - ( *aIapServiceType == TPtrC(DIAL_IN_ISP) ) ) - { - // need to get 'speed' data ( HS or normal CSD ) - TUint32 wapIsp; - ApCommons::ReadUintL( iapt, TPtrC(IAP_SERVICE), wapIsp ); - CCommsDbTableView* ispt = iDb->OpenViewMatchingUintLC( - *aIapServiceType, - TPtrC(COMMDB_ID), - wapIsp ); - User::LeaveIfError( ispt->GotoFirstRecord() ); - TUint32 bear; - if ( ApCommons::ReadUintL( ispt, TPtrC(ISP_BEARER_TYPE), bear ) - == KErrUnknown ) - { - bear = EBearerTypeCSD; - } - if ( bear == EBearerTypeCSD ) - { - retval = EApBearerTypeCSD; - } - else - { - if ( bear == EBearerTypeHSCSD ) - { - retval = EApBearerTypeHSCSD; - } - else - { - User::Leave( KErrInvalidBearer ); - } - } - CleanupStack::PopAndDestroy( ispt ); // ispt - } - else - { - if ( ( *aIapServiceType == TPtrC(OUTGOING_WCDMA) ) || - ( *aIapServiceType == TPtrC(INCOMING_WCDMA) ) ) - { - retval = EApBearerTypeGPRS; - } - else - { // some other bearer, currently it might be VPN or WLAN - if ( *aIapServiceType == TPtrC(VPN_SERVICE) ) - { // Get real VPN bearertype... - TUint32 service; - ApCommons::ReadUintL( iapt, TPtrC(IAP_SERVICE), service ); - - CCommsDbTableView* ispt; - ispt = iDb->OpenViewMatchingUintLC( TPtrC(VPN_SERVICE), - TPtrC(COMMDB_ID), - service ); - User::LeaveIfError( ispt->GotoFirstRecord() ); - TUint32 tempint; - HBufC* buf = NULL; - // get the real iap - ApCommons::ReadUintL( ispt, - TPtrC(VPN_SERVICE_IAP), - tempint ); - - // now open the real IAP an get it's bearer... - CCommsDbTableView* iapt2 = NULL; - iapt2 = iDb->OpenViewMatchingUintLC( TPtrC(IAP), - TPtrC(COMMDB_ID), - tempint ); - User::LeaveIfError( iapt2->GotoFirstRecord() ); - - buf = ApCommons::ReadText16ValueLC( iapt2, - TPtrC(IAP_SERVICE_TYPE) ); - TUint32 service2; - ApCommons::ReadUintL( iapt2, TPtrC(IAP_SERVICE), - service2 ); - - if ( ( buf->Compare( TPtrC(OUTGOING_WCDMA ) ) == 0 ) || - ( buf->Compare( TPtrC(INCOMING_WCDMA ) ) == 0 ) ) - { - retval = EApBearerTypeGPRS; - } - else - { - if ( ( buf->Compare( TPtrC(DIAL_OUT_ISP ) ) == 0 ) || - ( buf->Compare( TPtrC(DIAL_IN_ISP ) ) == 0 ) ) - { - // need to get ISP, - CCommsDbTableView* doutt = NULL; - doutt = iDb->OpenViewMatchingUintLC( - *buf, - TPtrC(COMMDB_ID), - service2 ); - - User::LeaveIfError( doutt ->GotoFirstRecord() ); - ApCommons::ReadUintL( doutt , - TPtrC(ISP_BEARER_TYPE), - tempint ); - if ( tempint == EBearerTypeCSD ) - { - retval = EApBearerTypeCSD; - } - else - { - retval = EApBearerTypeHSCSD; - } - CleanupStack::PopAndDestroy( doutt ); // doutt - } - else - { - // VPN, having a bearer something - // else than CSD, HSCSD & GPRS? - // check for WLAN - if ( iExt->iWlanSupported ) - { - if ( buf->Compare( TPtrC(LAN_SERVICE) ) == 0 ) - { // LAN or WLAN - if ( IsWlanL( service2 ) ) - { - retval = EApBearerTypeWLAN; - } - else - { - User::Leave( KErrInvalidBearer ); - } - } - else - { - User::Leave( KErrInvalidBearer ); - } - } - else - { - User::Leave( KErrInvalidBearer ); - } - } - } - CleanupStack::PopAndDestroy( 3, ispt ); // buf, iapt2, ispt - } - else - { // other, but not VPN, check for WLAN - if ( iExt->iWlanSupported ) - { - if ( *aIapServiceType == TPtrC(LAN_SERVICE) ) - { // check existence... - TUint32 service; - TUint32 bearer; - ApCommons::ReadUintL( iapt, TPtrC(IAP_SERVICE), - service ); - ApCommons::ReadUintL( iapt, TPtrC(IAP_BEARER), - bearer ); - - - CCommsDbTableView* ispt; - ispt = iDb->OpenViewMatchingUintLC( - TPtrC(LAN_SERVICE), - TPtrC(COMMDB_ID), - service ); - User::LeaveIfError( ispt->GotoFirstRecord() ); - // now we know it is either WLAN or some kinda LAN - if ( IsWlanL( service ) ) - { - retval = EApBearerTypeWLAN; - } - else - { // other, - // check for LANModem first, then for LAN - CCommsDbTableView* lanbearer; - lanbearer = - iDb->OpenViewMatchingUintLC( - TPtrC(LAN_BEARER), - TPtrC(COMMDB_ID), - bearer ); - User::LeaveIfError( - lanbearer->GotoFirstRecord() ); - // LANMODEM? check commdb_name - HBufC* lbuf; - lbuf = ApCommons::ReadText16ValueLC( lanbearer, - TPtrC(COMMDB_NAME) ); - // if it is KModemBearerLANModem, - // it is LANModem - if ( *lbuf == KModemBearerLANModem ) - { - retval = EApBearerTypeLANModem; - } - else - { - #ifdef __TEST_LAN_BEARER - // LAN? - if ( *lbuf == KModemBearerLAN ) - { - retval = EApBearerTypeLAN; - } - else - { - // other, but not VPN, or not supported - User::Leave( KErrInvalidBearer ); - } - #else - // other, but not VPN, or not supported - User::Leave( KErrInvalidBearer ); - #endif // __TEST_LAN_BEARER - } - CleanupStack::PopAndDestroy( lbuf ); - CleanupStack::PopAndDestroy( lanbearer ); - } - CleanupStack::PopAndDestroy( ispt ); - } - } - else - { - #ifdef __TEST_LAN_BEARER - if ( *aIapServiceType == TPtrC(LAN_SERVICE) ) - { // check existence... - TUint32 service; - TUint32 bearer; - ApCommons::ReadUintL( iapt, TPtrC(IAP_SERVICE), - service ); - ApCommons::ReadUintL( iapt, TPtrC(IAP_BEARER), - bearer ); - - CCommsDbTableView* ispt; - ispt = iDb->OpenViewMatchingUintLC( - TPtrC(LAN_SERVICE), - TPtrC(COMMDB_ID), - service ); - User::LeaveIfError( ispt->GotoFirstRecord() ); - // now we know it is some kinda LAN - // check for LANModem first, then for LAN - CCommsDbTableView* lanbearer; - lanbearer = - iDb->OpenViewMatchingUintLC( - TPtrC(LAN_BEARER), - TPtrC(COMMDB_ID), - bearer ); - User::LeaveIfError( - lanbearer->GotoFirstRecord() ); - // LANMODEM? check commdb_name - HBufC* lbuf; - lbuf = ApCommons::ReadText16ValueLC( lanbearer, - TPtrC(COMMDB_NAME) ); - // if it is KModemBearerLANModem, it is LANModem - if ( *lbuf == KModemBearerLANModem ) - { - retval = EApBearerTypeLANModem; - } - else - { - // LAN? - if ( *lbuf == KModemBearerLANModem ) - { - retval = EApBearerTypeLAN; - } - else - { - // other, but not VPN, or not supported - User::Leave( KErrInvalidBearer ); - } - } - CleanupStack::PopAndDestroy( lbuf ); - CleanupStack::PopAndDestroy( lanbearer ); - CleanupStack::PopAndDestroy( ispt ); - } - else - {// other, but not LAN - User::Leave( KErrInvalidBearer ); - } - #endif // __TEST_LAN_BEARER - } - } - } - } - CleanupStack::PopAndDestroy( 2, iapt );// aIapServiceType, iapt - } - else - { - User::Leave( KErrInvalidBearer ); - } - - CleanupStack::PopAndDestroy( bearert ); // bearert - CleanupStack::Pop( wapBearer ); // wapBearer, - // cannot PopAndDestroy because it has been re-allocated ! - delete wapBearer; - CleanupStack::PopAndDestroy( wapt ); // wapt - - if ( retval == EApBearerTypeAllBearers ) - { - User::Leave( KErrInvalidBearer ); - } - - CLOG( ( EUtil, 1, _L( "<- CApUtils::DoBearerTypeL" ) ) ); - return retval; + User::Leave( KErrNotSupported ); } @@ -1141,87 +320,6 @@ // void CApUtils::DoISPTypeL( TUint32 aUid, TCommsDbIspType& aIspType ) { - CLOG( ( EUtil, 0, _L( "-> CApUtils::DoISPTypeL" ) ) ); - - TCommsDbIspType retval = EIspTypeInternetAndWAP; - - CCommsDbTableView* wapt; - wapt = iDb->OpenViewMatchingUintLC( TPtrC(WAP_ACCESS_POINT), - TPtrC(COMMDB_ID), - aUid ); - - User::LeaveIfError( wapt->GotoFirstRecord() ); - HBufC* wapBearer = ApCommons::ReadText16ValueLC - ( - wapt, - TPtrC(WAP_CURRENT_BEARER) - ); - - if ( *wapBearer == TPtrC(WAP_IP_BEARER) ) - { - CCommsDbTableView* bearert; - bearert = iDb->OpenViewMatchingUintLC( TPtrC(*wapBearer), - TPtrC(WAP_ACCESS_POINT_ID), - aUid ); - - User::LeaveIfError( bearert->GotoFirstRecord() ); - TUint32 aWapIap; - ApCommons::ReadUintL( bearert, TPtrC(WAP_IAP), aWapIap ); - // now we have IAP uid, can go for Service type, ID - - CCommsDbTableView* iapt; - iapt = iDb->OpenViewMatchingUintLC( TPtrC(IAP), - TPtrC(COMMDB_ID), - aWapIap ); - - User::LeaveIfError( iapt->GotoFirstRecord() ); - HBufC* aIapServiceType = ApCommons::ReadText16ValueLC - ( - iapt, - TPtrC(IAP_SERVICE_TYPE) - ); - // decide which bearer, read bearer spec. data. - TUint32 aIsp; - ApCommons::ReadUintL( iapt, TPtrC(IAP_SERVICE), aIsp ); - - // No need to be defensive, if *aIapServiceType is invalid, - // it shall Leave, - // otherwise, we will handle the difference... - CCommsDbTableView* ispt = iDb->OpenViewMatchingUintLC( - *aIapServiceType, - TPtrC(COMMDB_ID), aIsp ); - User::LeaveIfError( ispt->GotoFirstRecord() ); - TUint32 sgd; - if ( ( *aIapServiceType == TPtrC(DIAL_OUT_ISP) ) || - ( *aIapServiceType == TPtrC(DIAL_IN_ISP) ) ) - { // get real IspType - ApCommons::ReadUintL( ispt, TPtrC(ISP_TYPE), sgd ); - } - else - { - // OUTGOING_WCDMA/INCOMING_WCDMA - // read ISP type - ApCommons::ReadUintL( ispt, TPtrC(GPRS_AP_TYPE), sgd ); - } - retval = TCommsDbIspType( sgd ); - CleanupStack::PopAndDestroy( ispt ); // ispt - CleanupStack::Pop( aIapServiceType );// aIapServiceType, - // cannot PopAndDestroy because it has been re-allocated ! - delete aIapServiceType; - CleanupStack::PopAndDestroy( 2, bearert ); // iapt, bearert - } - else - { - User::Leave( KErrInvalidBearer ); - } - - CleanupStack::Pop( wapBearer ); // wapBearer, - // cannot PopAndDestroy because it has been re-allocated ! - delete wapBearer; - CleanupStack::PopAndDestroy( wapt ); // wapt - aIspType = retval; - - CLOG( ( EUtil, 1, _L( "<- CApUtils::DoISPTypeL" ) ) ); } @@ -1231,26 +329,6 @@ // void CApUtils::DoNameL( TUint32 aUid, TDes& aName ) { - CLOG( ( EUtil, 0, _L( "-> CApUtils::DoNameL" ) ) ); - - CCommsDbTableView* wapt = iDb->OpenViewMatchingUintLC( - TPtrC(WAP_ACCESS_POINT), - TPtrC(COMMDB_ID), aUid ); - User::LeaveIfError( wapt->GotoFirstRecord() ); - HBufC* sgd = ApCommons::ReadText16ValueLC( wapt, TPtrC(COMMDB_NAME) ); - - if ( aName.MaxLength() < sgd->Length() ) - { - User::Leave( KErrDescOverflow ); - } - else - { - aName.SetLength( sgd->Length() ); - aName.Format( KFormat, &*sgd ); - } - CleanupStack::PopAndDestroy( 2, wapt ); // sgd, wapt - - CLOG( ( EUtil, 1, _L( "<- CApUtils::DoNameL" ) ) ); } @@ -1260,46 +338,6 @@ // void CApUtils::DoSetNameL( TDes& aName, TUint32 aUid ) { - CLOG( ( EUtil, 0, _L( "-> CApUtils::DoSetNameL" ) ) ); - - if ( iExt->iVariant & KApUiEditOnlyVPNs ) - { - User::Leave( KErrNotSupported ); - } - - CCommsDbTableView* wapt; - - wapt = iDb->OpenViewMatchingUintLC( TPtrC(WAP_ACCESS_POINT), - TPtrC(COMMDB_ID), aUid ); - User::LeaveIfError( wapt->GotoFirstRecord() ); - HBufC* aCurrent = ApCommons::ReadText16ValueLC( wapt, - TPtrC(COMMDB_NAME) ); - if ( *aCurrent != aName ) - { - TBool aNameChanged( EFalse ); - HBufC* namebuf = aName.AllocL(); - CleanupStack::PushL( namebuf ); - HBufC* sgd = ApCommons::DoMakeValidNameL - ( - *iDb, - aNameChanged, - namebuf, - aUid, - EFalse - ); - if ( aNameChanged ) - { - aName.Copy( *sgd ); - delete sgd; - } - CleanupStack::PopAndDestroy( namebuf ); // namebuf - User::LeaveIfError( wapt->UpdateRecord() ); - wapt->WriteTextL( TPtrC(COMMDB_NAME), aName ); - User::LeaveIfError( wapt->PutRecordChanges() ); - } - CleanupStack::PopAndDestroy( 2, wapt ); // aCurrent,wapt - - CLOG( ( EUtil, 1, _L( "<- CApUtils::DoSetNameL" ) ) ); } @@ -1309,88 +347,6 @@ // void CApUtils::DoSetISPTypeL( TUint32 aUid, TCommsDbIspType aIspType ) { - CLOG( ( EUtil, 0, _L( "-> CApUtils::DoSetISPTypeL" ) ) ); - - if ( iExt->iVariant & KApUiEditOnlyVPNs ) - { - User::Leave( KErrNotSupported ); - } - - // first check requested ISP-type validity - if ( ( aIspType == EIspTypeInternetOnly ) || - ( aIspType == EIspTypeWAPOnly ) || - ( aIspType == EIspTypeInternetAndWAP ) ) - { - CCommsDbTableView* wapt; - wapt = iDb->OpenViewMatchingUintLC( TPtrC(WAP_ACCESS_POINT), - TPtrC(COMMDB_ID), aUid ); - User::LeaveIfError( wapt->GotoFirstRecord() ); - HBufC* wapBearer = ApCommons::ReadText16ValueLC - ( - wapt, - TPtrC(WAP_CURRENT_BEARER) - ); - if ( *wapBearer == TPtrC(WAP_IP_BEARER) ) - { - CCommsDbTableView* bearert; - bearert = iDb->OpenViewMatchingUintLC( - *wapBearer, - TPtrC(WAP_ACCESS_POINT_ID), aUid ); - - User::LeaveIfError( bearert->GotoFirstRecord() ); - TUint32 aWapIap; - ApCommons::ReadUintL( bearert, TPtrC(WAP_IAP), aWapIap ); - // now we have IAP uid, can go for Service type, ID - - CCommsDbTableView* iapt; - iapt = iDb->OpenViewMatchingUintLC( TPtrC(IAP), - TPtrC(COMMDB_ID), - aWapIap ); - User::LeaveIfError( iapt->GotoFirstRecord() ); - - HBufC* aIapServiceType = ApCommons::ReadText16ValueLC - ( - iapt, - TPtrC(IAP_SERVICE_TYPE) - ); - - // get ISP ID - TUint32 aIsp; - ApCommons::ReadUintL( iapt, TPtrC(IAP_SERVICE), aIsp ); - - CCommsDbTableView* ispt; - ispt = iDb->OpenViewMatchingUintLC( *aIapServiceType, - TPtrC(COMMDB_ID), aIsp ); - User::LeaveIfError( ispt->GotoFirstRecord() ); - // now we have it, just write: - User::LeaveIfError( ispt->UpdateRecord() ); - // decide which bearer, write into bearer spec. column. - if ( ( *aIapServiceType == TPtrC(DIAL_OUT_ISP) ) || - ( *aIapServiceType == TPtrC(DIAL_IN_ISP) ) ) - { // write real IspType - ispt->WriteUintL( TPtrC(ISP_TYPE), aIspType ); - } - else - { - // OUTGOING_WCDMA / INCOMING_WCDMA - ispt->WriteUintL( TPtrC(GPRS_AP_TYPE), aIspType ); - } - User::LeaveIfError( ispt->PutRecordChanges( EFalse, EFalse ) ); - // ispt, aIapServiceType, iapt, bearert - CleanupStack::PopAndDestroy( 4, bearert ); - } - else - { - User::Leave( KErrInvalidBearer ); - } - CleanupStack::PopAndDestroy( 2, wapt ); // wapBearer, wapt - } - else - { - User::Leave( KErrInvalidIspRequest ); - } - - CLOG( ( EUtil, 1, _L( "<- CApUtils::DoSetISPTypeL" ) ) ); } @@ -1400,31 +356,7 @@ // TBool CApUtils::DoesExistsL( TPtrC aTable, TUint32 aUid ) { - CLOG( ( EUtil, 0, _L( "-> CApUtils::DoesExistsL" ) ) ); - - TBool retval( EFalse ); - TBool ownTransaction = ApCommons::StartPushedTransactionLC( *iDb, ETrue ); - CCommsDbTableView* table; - table = iDb->OpenViewMatchingUintLC( aTable, - TPtrC(COMMDB_ID), aUid ); - TInt res = table->GotoFirstRecord(); - CleanupStack::PopAndDestroy( table ); // table - if ( res == KErrNone ) - { - retval = ETrue; - } - if ( res != KErrNotFound ) - { - User::LeaveIfError( res ); - } - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *iDb ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - CLOG( ( EUtil, 1, _L( "<- CApUtils::DoesExistsL" ) ) ); - return retval; + return EFalse; } @@ -1435,35 +367,7 @@ // TBool CApUtils::DoIsWlanL( TUint32 aLanCommdbId ) { - CLOG( ( EUtil, 1, _L( "-> CApUtils::DoIsWlanL" ) ) ); - - TBool retval( EFalse ); - - CCommsDbTableView* wlantable = NULL; - - // WLAN settings table backlinks to LAN service, - // so we query WLAN settings for a record - // where WLAN_SERVICE_ID is LAN_SERVICE's COMMDB_ID, - // which is aApItem.iIapServiceId... - wlantable = iDb->OpenViewMatchingUintLC( TPtrC(WLAN_SERVICE), - TPtrC(WLAN_SERVICE_ID), - aLanCommdbId ); - - TInt err = wlantable->GotoFirstRecord(); - if ( err == KErrNotFound ) - { - retval = EFalse; - } - else - { - User::LeaveIfError( err ); - retval = ETrue; - } - - CleanupStack::PopAndDestroy( wlantable ); - - CLOG( ( EUtil, 1, _L( "<- CApUtils::DoIsWlanL" ) ) ); - return retval; + return EFalse; } // End of File diff -r 84c6623982f6 -r ed07dcc72692 apengine/apeng/src/ActiveApDb.cpp --- a/apengine/apeng/src/ActiveApDb.cpp Fri Sep 17 08:32:43 2010 +0300 +++ b/apengine/apeng/src/ActiveApDb.cpp Mon Oct 04 00:43:42 2010 +0300 @@ -34,15 +34,7 @@ // EXPORT_C CActiveApDb* CActiveApDb::NewL( TCommDbDatabaseType /*aType*/ ) { - CLOG( ( EActiveDb, 0, _L( "-> CActiveApDb::NewL" ) ) ); - - CActiveApDb* db = new ( ELeave ) CActiveApDb; - CleanupStack::PushL( db ); - db->ConstructL(); - CleanupStack::Pop( db ); // db - - CLOG( ( EActiveDb, 1, _L( "<- CActiveApDb::NewL" ) ) ); - return db; + return NULL; } // --------------------------------------------------------- @@ -51,13 +43,6 @@ // EXPORT_C CActiveApDb::~CActiveApDb() { - CLOG( ( EActiveDb, 0, _L( "-> CActiveApDb::~CActiveApDb" ) ) ); - - delete iDbNotifier; - delete iObservers; - delete iDb; - - CLOG( ( EActiveDb, 1, _L( "<- CActiveApDb::~CActiveApDb" ) ) ); } @@ -76,12 +61,6 @@ // void CActiveApDb::ConstructL() { - iDb = CCommsDatabase::NewL( ); - iObservers = new ( ELeave ) CArrayPtrFlat - ( KObserverArrayGranularity ); - iDbNotifier = new ( ELeave ) CActiveApDbNotifier( *this ); - - iState = EReady; } @@ -91,16 +70,6 @@ // EXPORT_C void CActiveApDb::AddObserverL( MActiveApDbObserver* anObserver ) { - CLOG( ( EActiveDb, 0, _L( "-> CActiveApDb::AddObserverL" ) ) ); - - if ( !anObserver ) - { - User::Leave( KErrNullPointerPassed ); - } - iObservers->AppendL( anObserver ); - iDbNotifier->Start(); - - CLOG( ( EActiveDb, 1, _L( "<- CActiveApDb::AddObserverL" ) ) ); } @@ -110,29 +79,6 @@ // EXPORT_C void CActiveApDb::RemoveObserver( MActiveApDbObserver* anObserver ) { - CLOG( ( EActiveDb, 0, _L( "-> CActiveApDb::RemoveObserver" ) ) ); - - __ASSERT_DEBUG( anObserver, ApCommons::Panic( ENullPointer ) ); - TInt count = iObservers->Count(); - for ( TInt i = 0; i < count; i++ ) - { - if ( iObservers->At( i ) == anObserver ) - { - iObservers->Delete( i ); - // leave cycle for faster processing, can not return because - // we may have to stop() if it was the last one... - break; - } - } - if ( !iObservers->Count() ) - { // no more observers waiting so stop notification... - iDbNotifier->Stop(); - } - // for some reason, observer was not found-> - // Someone has already removed it - // simply ignore it - CLOG( ( EActiveDb, 1, _L( "<- CActiveApDb::RemoveObserver" ) ) ); - } @@ -142,9 +88,7 @@ // EXPORT_C CCommsDatabase* CActiveApDb::Database() { - CLOG( ( EActiveDb, 0, _L( "<-> CActiveApDb::Database" ) ) ); - - return iDb; + return NULL; } // --------------------------------------------------------- @@ -153,56 +97,6 @@ // void CActiveApDb::HandleDbEventL( TInt anEvent ) { - CLOG( ( EActiveDb, 0, _L( "-> CActiveApDb::HandleDbEventL" ) ) ); - - // possible events: EClose,EUnlock,ECommit,ERollback,ERecover - switch ( anEvent ) - { - case RDbNotifier::EUnlock: - { - CLOG( ( EActiveDb, 2, _L( "Notifier Unlock" ) ) ); - NotifyObserversL( MActiveApDbObserver::EDbAvailable ); - break; - } - case RDbNotifier::ECommit: - { - CLOG( ( EActiveDb, 2, _L( "Notifier Commit" ) ) ); - NotifyObserversL( MActiveApDbObserver::EDbChanged ); - break; - } - case RDbNotifier::EClose: - { - CLOG( ( EActiveDb, 2, _L( "Notifier Close/Rollbac/Recover" ) ) ); - NotifyObserversL( MActiveApDbObserver::EDbClosing ); - // Use base class' method to keep the notifier alive. - // We need to know when all clients has released the db. - break; - } - case RDbNotifier::ERollback: - { - CLOG( ( EActiveDb, 2, _L( "Notifier Close/Rollbac/Recover" ) ) ); - NotifyObserversL( MActiveApDbObserver::EDbAvailable ); - break; - } - case RDbNotifier::ERecover: - { - CLOG( ( EActiveDb, 2, _L( "Notifier Close/Rollbac/Recover" ) ) ); - NotifyObserversL( MActiveApDbObserver::EDbClosing ); - // Use base class' method to keep the notifier alive. - // We need to know when all clients has released the db. - break; - } - default: - { - // Don't know what's happened, but instead of - // Panicking, it's better to 'simulate' a change. - // 'Defensive' programming. - CLOG( ( EActiveDb, 2, _L( "Notifier UNKNOWN" ) ) ); - NotifyObserversL( MActiveApDbObserver::EDbChanged ); - break; - } - } - CLOG( ( EActiveDb, 1, _L( "<- CActiveApDb::HandleDbEventL" ) ) ); } @@ -216,14 +110,6 @@ void CActiveApDb::NotifyObserversL( MActiveApDbObserver::TEvent anEvent ) { - TInt i; - TInt count = iObservers->Count(); - // one hazard is that if one client leaves, - // the rest of the clients will not be notified this time... - for ( i = 0; i < count; i++ ) - { - TRAP_IGNORE( iObservers->At( i )->HandleApDbEventL( anEvent ) ); - } } // End of File diff -r 84c6623982f6 -r ed07dcc72692 apengine/apeng/src/ActiveApDbNotifier.cpp --- a/apengine/apeng/src/ActiveApDbNotifier.cpp Fri Sep 17 08:32:43 2010 +0300 +++ b/apengine/apeng/src/ActiveApDbNotifier.cpp Mon Oct 04 00:43:42 2010 +0300 @@ -30,8 +30,6 @@ CActiveApDbNotifier::CActiveApDbNotifier( CActiveApDb& aDb ) : CActive( EPriorityStandard ) { - iActiveDb = &aDb; - CActiveScheduler::Add( this ); } // --------------------------------------------------------- @@ -40,7 +38,6 @@ // CActiveApDbNotifier::~CActiveApDbNotifier() { - Cancel(); } // --------------------------------------------------------- @@ -49,31 +46,6 @@ // void CActiveApDbNotifier::RunL() { - if ( iStatus == KErrCancel ) - { - // Do nothing. - } - else - { - // first store status, because re-schedule will be earlier - // than notifying clients. Reason: - // clients can leave but re-schedule MUST happen anyway, - // to keep the notifier alive even if any client leaves - TRequestStatus tempstatus( iStatus ); - - if ( iStatus == RDbNotifier::EClose ) - { - // Finish if the database is closed. - NotifyChange(); - } - else - { - // Reschedule automatically (as long as the database is open). - NotifyChange(); - } - // and now let clients handle their stuff... - TRAP_IGNORE( iActiveDb->HandleDbEventL( tempstatus.Int() ) ); - } } @@ -83,7 +55,6 @@ // void CActiveApDbNotifier::DoCancel() { - Stop(); } @@ -93,7 +64,6 @@ // void CActiveApDbNotifier::Stop() { - iActiveDb->Database()->CancelRequestNotification(); } // --------------------------------------------------------- @@ -102,7 +72,6 @@ // void CActiveApDbNotifier::Start() { - NotifyChange(); } // --------------------------------------------------------- @@ -111,11 +80,6 @@ // void CActiveApDbNotifier::NotifyChange() { - if ( !IsActive() ) - { - iActiveDb->Database()->RequestNotification( iStatus ); - SetActive(); - } } // End of File diff -r 84c6623982f6 -r ed07dcc72692 apengine/apeng/src/ApEngineCommons.cpp --- a/apengine/apeng/src/ApEngineCommons.cpp Fri Sep 17 08:32:43 2010 +0300 +++ b/apengine/apeng/src/ApEngineCommons.cpp Mon Oct 04 00:43:42 2010 +0300 @@ -38,8 +38,6 @@ void ApCommons::Panic( TApEnginePanicCodes aPanic ) { - _LIT( kApSet, "APEngine" ) ; - User::Panic( kApSet, aPanic ) ; } @@ -49,34 +47,7 @@ // TBool ApCommons::StartPushedTransactionLC( CCommsDatabase& aDb, TBool aRetry ) { - CLOG( ( ETransaction, 0, - _L( "-> ApCommons::StartPushedTransactionLC" ) ) ); - - TBool retval( EFalse ); - if ( !aDb.InTransaction() ) - { - TInt retriesLeft( aRetry ? KRetryCount : 1 ); - TInt err = aDb.BeginTransaction(); - while ( ( ( err == KErrLocked ) || ( err == KErrAccessDenied ) ) - && --retriesLeft ) - { - User::After( KRetryWait ); - err = aDb.BeginTransaction(); - } - User::LeaveIfError( err ); - CleanupStack::PushL - ( - TCleanupItem( ApCommons::RollbackTransactionOnLeave, &aDb ) - ); - retval = ETrue; - } - else - { - retval = EFalse; - } - CLOG( ( ETransaction, 1, - _L( "<- ApCommons::StartPushedTransactionLC" ) ) ); - return retval; + return EFalse; } @@ -87,14 +58,6 @@ // void ApCommons::RollbackTransactionOnLeave( TAny* aDb ) { - CLOG( ( ETransaction, 0, - _L( "-> ApCommons::RollbackTransactionOnLeave" ) ) ); - - CCommsDatabase* db = STATIC_CAST( CCommsDatabase*, aDb ); - db->RollbackTransaction(); - - CLOG( ( ETransaction, 1, - _L( "<- ApCommons::RollbackTransactionOnLeave" ) ) ); } @@ -113,99 +76,7 @@ TBool aIsNew ) { - CLOG( ( ECommons, 0, _L( "-> ApCommons::DoMakeValidNameL" ) ) ); - - aChanged = EFalse; - HBufC* temp = HBufC::NewLC( KApMaxConnNameLength ); - HBufC* temp2 = HBufC::NewLC( KApMaxConnNameLength ); - - HBufC* corrname = ApCommons::EnsureMaxLengthLC( aName, aChanged ); - *temp = *corrname; - TInt postfix( 0 ); - TInt pf( 0 ); - TInt i( 0 ); - TBool valid ( EFalse ); - - TPtrC prefix = ApCommons::GetPrefix( *corrname ); - - CApUtils* utils = CApUtils::NewLC( aDb ); - - if ( aIsNew ) - { - aUid = 0; - } - - postfix = GetPostfix( *temp, prefix ); - postfix = -1; - do - { - valid = utils->IsValidNameL( *temp, aUid ); - if ( !valid ) - { - aChanged = ETrue; - postfix++; - // check the length of postfix, check text length accordingly - pf = postfix; - for (i=1; i<10; i++) - { - pf /= 10; - if ( !pf ) - break; - } - TPtr sgdptr( temp->Des() ); - TPtr sgdptr2( temp2->Des() ); - if ( postfix ) - { - if ( postfix < 10 ) - { - sgdptr2 = prefix.Left( KApMaxConnNameLength - i - 3 ); - } - else - { - sgdptr2 = prefix.Left( KApMaxConnNameLength - i - 2 ); - } - } - else - { - sgdptr2 = prefix.Left( KApMaxConnNameLength ); - } - if ( postfix ) - { - if ( postfix > 9 ) - { - sgdptr.Format( KFormatLargePostfix, &sgdptr2, - postfix ); - } - else - { - sgdptr.Format( KFormatPostfix, &sgdptr2, - postfix ); - } - } - else - { - sgdptr.Format( KFormatNoPostfix, &sgdptr2 ); - } - } - } while ( !valid ); - - CleanupStack::PopAndDestroy( utils ); - CleanupStack::PopAndDestroy( corrname ); - CleanupStack::PopAndDestroy( temp2 ); - - if ( aChanged ) - { - CleanupStack::Pop( temp ); - } - else - { - CleanupStack::PopAndDestroy( temp ); - temp = NULL; - } - - CLOG( ( ECommons, 1, _L( "<- ApCommons::DoMakeValidNameL" ) ) ); - - return temp; + return NULL; } @@ -218,41 +89,7 @@ // HBufC* ApCommons::EnsureMaxLengthLC( const TDesC* aName, TBool& aChanged ) { - CLOG( ( ECommons, 0, _L( "-> ApCommons::EnsureMaxLengthLC" ) ) ); - - TInt length = aName->Length(); - - aChanged = EFalse; - - if ( !length ) - { - // Name is required. - User::Leave(KErrInvalidName); - } - - HBufC* corrname; - if ( KApMaxConnNameLength < length ) - { // name too long, truncate. - corrname = aName->Left( KApMaxConnNameLength ).AllocLC(); - aChanged = ETrue; - } - else - { - corrname = aName->AllocLC(); - corrname->Des().Trim(); - if ( corrname->Length() == 0 ) - { - User::Leave(KErrInvalidName); - } - // comes here only if name is valid - if ( corrname->Length() != aName->Length() ) - { - aChanged = ETrue; - } - } - CLOG( ( ECommons, 1, _L( "<- ApCommons::EnsureMaxLengthLC" ) ) ); - - return corrname; + return NULL; } @@ -274,22 +111,7 @@ */ TPtrC ApCommons::GetPrefix( const TDesC& aName ) { - TPtrC prefix = aName; - TInt lastBrace = aName.LocateReverse('('); - if ( lastBrace != KErrNotFound ) - { - // aName looks like "". - // See if is an integer number. - TPtrC num = aName.Right( aName.Length() - lastBrace - 1 ); - TInt val; - TLex lex( num ); - if ( lex.Val( val ) == KErrNone ) - { - // Yes, the trailer is an integer. - prefix.Set( aName.Left( lastBrace ) ); - } - } - return prefix; + User::Leave( KErrNotSupported ); } @@ -306,45 +128,7 @@ */ TInt ApCommons::GetPostfix( const TDesC& aName, const TDesC& aPrefix ) { - TInt postfix( KErrNotFound ); - TInt nameLength = aName.Length(); - TInt prefixLength = aPrefix.Length(); - if ( nameLength >= prefixLength && aName.FindF( aPrefix ) == 0 ) - { - // aName is longer or equal length, and - // aPrefix can be found in the beginning of aName. - if ( nameLength == prefixLength ) - { - // They have the same length; they equal. - postfix = 0; - } - else - { - if ( aName[ prefixLength ] == '(' ) - { - // (Now we know that aName is longer than aPrefix.) - // aName looks like "aPrefix". - // See if is an integer number. - TPtrC num = aName.Right( nameLength - prefixLength - 1 ); - TInt val; - TLex lex( num ); - if ( lex.Val( val ) == KErrNone ) - { - // Yes, the trailer is an integer. - if ( val > 0 ) - { - postfix = val; - } - else - { - // signal that it is invalid... - postfix = -1; - } - } - } - } - } - return postfix; + return 0; } @@ -361,14 +145,7 @@ TUint32& aValue ) { - __ASSERT_DEBUG( (atable), Panic( ENullPointer ) ) ; - TRAPD( err, atable->ReadUintL( aColumn, aValue ) ); - if ( err != KErrNone ) - { // do not leave if readed value is not present in table... - if ( ( err != KErrUnknown ) && ( err != KErrNotFound ) ) - User::Leave( err ); - } - return err; + return KErrUnknown; } @@ -383,14 +160,7 @@ TBool& aValue ) { - __ASSERT_DEBUG( (atable), Panic( ENullPointer ) ) ; - TRAPD( err, atable->ReadBoolL( aColumn, aValue ) ); - if ( err != KErrNone ) - { // do not leave if readed value is not present in table... - if ( err != KErrUnknown ) - User::Leave( err ); - } - return err; + return KErrUnknown; } @@ -406,18 +176,7 @@ TInt& aErrCode ) { - __ASSERT_DEBUG( (atable), Panic( ENullPointer ) ) ; - HBufC* value = NULL; - // because of Trap, we need to call a func - // which pops it from the stack & push it back afterwards... - TRAP( aErrCode, value = ReadLongTextL( atable, aColumn ) ); - CleanupStack::PushL( value ); - if ( aErrCode != KErrNone ) - { // do not leave if readed value is not present in table... - if ( aErrCode != KErrUnknown ) - User::Leave( aErrCode ); - } - return value; + return NULL; } @@ -429,10 +188,7 @@ HBufC* ApCommons::ReadLongTextL( CCommsDbTableView* atable, const TDesC& aColumn ) { - __ASSERT_DEBUG( (atable), Panic( ENullPointer ) ) ; - HBufC* value = atable->ReadLongTextLC( aColumn ); - CleanupStack::Pop( value ); - return value; + return NULL; } @@ -443,23 +199,7 @@ // HBufC* ApCommons::EscapeTextLC( const TDesC& aLiteral ) { - TInt l( aLiteral.Length() ); - //> 2*, to ensure correct esc. even if ALL chars are quotes... - HBufC* retbuf = HBufC::NewLC( 2*l ); - TPtr ret = retbuf->Des(); - TUint quote( '\'' ); // TChar gives warnings in THUMB & ARMI - TInt i( 0 ); - - for( i=0; iReadColumnLengthL(aCol, aLength); - - HBufC* buf = HBufC::NewLC(aLength); - TPtr ptr( buf->Des() ); - atable->ReadTextL(aCol, ptr); - return buf; + return NULL; } @@ -495,14 +222,7 @@ HBufC8* ApCommons::ReadText8ValueLC( CCommsDbTableView* atable, const TDesC& aCol ) { - __ASSERT_DEBUG( (atable), Panic( ENullPointer ) ) ; - TInt aLength(0); - atable->ReadColumnLengthL(aCol, aLength); - - HBufC8* buf = HBufC8::NewLC(aLength); - TPtr8 ptr( buf->Des() ); - atable->ReadTextL(aCol, ptr); - return buf; + return NULL; } @@ -512,7 +232,7 @@ // TBool ApCommons::DoGetReadOnlyL( CCommsDbTableView& aTable ) { - return CApProtHandler::GetProtectionStateL( aTable ); + return EFalse; } @@ -523,10 +243,7 @@ // TInt ApCommons::CommitTransaction( CCommsDatabase& aDb ) { - CLOG( ( ETransaction, 0, _L( "-> ApCommons::CommitTransaction" ) ) ); - TInt err = aDb.CommitTransaction(); - CLOG( ( ETransaction, 1, _L( "<- ApCommons::CommitTransaction" ) ) ); - return err; + return KErrNotSupported; } @@ -538,16 +255,7 @@ // TInt ApCommons::GetVariantL() { - CLOG( ( ETransaction, 0, _L( "-> ApCommons::GetVariantL" ) ) ); - TInt variant( 0 ); - // Connecting and initialization: - CRepository* repository = CRepository::NewL( KCRUidApEngineLV ); - repository->Get( KApEngineLVFlags, variant ); - delete repository; - - CLOG( ( ETransaction, 1, _L( "<- ApCommons::GetVariantL" ) ) ); - - return variant; + return 0; } @@ -559,12 +267,7 @@ TInt ApCommons::IsGivenSharedDataSupportL( const TUid aUid, const TUint32 aKey ) { - TInt value( 0 ); - // Connecting and initialization: - CRepository* repository = CRepository::NewL( aUid ); - repository->Get( aKey, value ); - delete repository; - return value; + return 0; } diff -r 84c6623982f6 -r ed07dcc72692 apengine/apeng/src/ApEngineLogger.cpp --- a/apengine/apeng/src/ApEngineLogger.cpp Fri Sep 17 08:32:43 2010 +0300 +++ b/apengine/apeng/src/ApEngineLogger.cpp Mon Oct 04 00:43:42 2010 +0300 @@ -42,20 +42,6 @@ void ApEngineLogger::Write ( TInt32 aMask, TInt aLevel, TRefByValue aFmt, ... ) { - if( (aMask & APENGINE_LOG_MASK) && (aLevel <= APENGINE_LOG_LEVEL) ) - { - VA_LIST list; - VA_START( list, aFmt ); - RFileLogger::WriteFormat - ( - KApEngineLogDir, - KApEngineLogFile, - EFileLoggingModeAppend, - aFmt, - list - ); - VA_END( list ); - } } @@ -68,17 +54,6 @@ TRefByValue aFmt, VA_LIST& aList ) { - if( (aMask & APENGINE_LOG_MASK) && (aLevel <= APENGINE_LOG_LEVEL) ) - { - RFileLogger::WriteFormat - ( - KApEngineLogDir, - KApEngineLogFile, - EFileLoggingModeAppend, - aFmt, - aList - ); - } } @@ -89,20 +64,6 @@ void ApEngineLogger::Write ( TInt32 aMask, TInt aLevel, TRefByValue aFmt, ... ) { - if( (aMask & APENGINE_LOG_MASK) && (aLevel <= APENGINE_LOG_LEVEL) ) - { - VA_LIST list; - VA_START( list, aFmt ); - RFileLogger::WriteFormat - ( - KApEngineLogDir, - KApEngineLogFile, - EFileLoggingModeAppend, - aFmt, - list - ); - VA_END( list ); - } } @@ -114,17 +75,6 @@ ( TInt32 aMask, TInt aLevel, TRefByValue aFmt, VA_LIST& aList ) { - if( (aMask & APENGINE_LOG_MASK) && (aLevel <= APENGINE_LOG_LEVEL) ) - { - RFileLogger::WriteFormat - ( - KApEngineLogDir, - KApEngineLogFile, - EFileLoggingModeAppend, - aFmt, - aList - ); - } } @@ -142,18 +92,5 @@ TInt aLen ) { - if( (aMask & APENGINE_LOG_MASK) && (aLevel <= APENGINE_LOG_LEVEL) ) - { - RFileLogger::HexDump - ( - KApEngineLogDir, - KApEngineLogFile, - EFileLoggingModeAppend, - aHeader, - aMargin, - aPtr, - aLen - ); - } } #endif // __TEST_APENGINE_LOG__ diff -r 84c6623982f6 -r ed07dcc72692 apengine/apeng/src/ApListItem.cpp --- a/apengine/apeng/src/ApListItem.cpp Fri Sep 17 08:32:43 2010 +0300 +++ b/apengine/apeng/src/ApListItem.cpp Mon Oct 04 00:43:42 2010 +0300 @@ -34,14 +34,7 @@ // EXPORT_C CApListItem* CApListItem::NewLC() { - CLOG( ( EUtil, 0, _L( "-> CApListItem::NewLC" ) ) ); - - CApListItem* db = new( ELeave ) CApListItem; - CleanupStack::PushL( db ); - db->ConstructL(); - - CLOG( ( EUtil, 1, _L( "<- CApListItem::NewLC" ) ) ); - return db; + return NULL; } @@ -57,14 +50,11 @@ TApBearerType aBearerType ) { - CLOG( ( EUtil, 0, _L( "-> CApListItem::NewLC" ) ) ); - - CApListItem* db = new( ELeave ) CApListItem; - CleanupStack::PushL( db ); - db->ConstructL( aIspType, aUid, aName, aBearerType ); - - CLOG( ( EUtil, 1, _L( "<- CApListItem::NewLC" ) ) ); - return db; + (void)aIspType; + (void)aUid; + (void)aName; + (void)aBearerType; + return NULL; } @@ -78,15 +68,13 @@ TBool aReadOnly ) { - CLOG( ( EUtil, 0, _L( "-> CApListItem::NewLC" ) ) ); - - CApListItem* db = new( ELeave ) CApListItem; - CleanupStack::PushL( db ); - db->ConstructL( aIspType, aUid, aName, aBearerType, aStartPage ); - db->iExt->iReadOnly = aReadOnly; - - CLOG( ( EUtil, 1, _L( "<- CApListItem::NewLC" ) ) ); - return db; + (void)aIspType; + (void)aUid; + (void)aName; + (void)aBearerType; + (void)aStartPage; + (void)aReadOnly; + return NULL; } // --------------------------------------------------------- @@ -95,16 +83,8 @@ // EXPORT_C CApListItem* CApListItem::NewLC( CApListItem* aItem ) { - CLOG( ( EUtil, 0, _L( "-> CApListItem::NewLC" ) ) ); - - CApListItem* db = new( ELeave ) CApListItem; - CleanupStack::PushL( db ); - db->ConstructL( aItem->iIspType, aItem->iUid, *aItem->iName, - aItem->iBearerType, *aItem->iStartPage ); - db->iExt->iReadOnly = aItem->IsReadOnly(); - - CLOG( ( EUtil, 1, _L( "<- CApListItem::NewLC" ) ) ); - return db; + (void)aItem; + return NULL; } @@ -115,16 +95,6 @@ // EXPORT_C CApListItem::~CApListItem() { - CLOG( ( EUtil, 0, _L( "-> CApListItem::NewLC" ) ) ); - - delete iName; - delete iStartPage; - if ( iExt ) - { - delete iExt; - } - - CLOG( ( EUtil, 1, _L( "<- CApListItem::NewLC" ) ) ); } @@ -135,24 +105,7 @@ // EXPORT_C void CApListItem::CopyFromL( const CApListItem& aCopyFrom ) { - CLOG( ( EUtil, 0, _L( "-> CApListItem::NewLC" ) ) ); - - HBufC* temp = NULL; - HBufC* temp2 = NULL; - temp = aCopyFrom.iName->AllocL(); - delete iName; - iName = temp; - - temp2 = aCopyFrom.iStartPage->AllocL(); - delete iStartPage; - iStartPage = temp2; - - iUid = aCopyFrom.iUid; - iIspType = aCopyFrom.iIspType; - iBearerType = aCopyFrom.iBearerType; - iExt->iReadOnly = aCopyFrom.iExt->iReadOnly; - - CLOG( ( EUtil, 1, _L( "<- CApListItem::NewLC" ) ) ); + (void)aCopyFrom; } @@ -178,13 +131,6 @@ // EXPORT_C void CApListItem::ConstructL() { - CLOG( ( EUtil, 0, _L( "-> CApListItem::NewLC" ) ) ); - - iName = HBufC::NewL( 0 ); - iStartPage = HBufC::NewL( 0 ); - CreateExtraL(); - - CLOG( ( EUtil, 1, _L( "<- CApListItem::NewLC" ) ) ); } @@ -198,12 +144,10 @@ const TDesC& aName, TApBearerType aBearerType ) { - CLOG( ( EUtil, 0, _L( "-> CApListItem::NewLC" ) ) ); - - ConstructL(); - SetItemL( aIspType, aUid, aName, aBearerType ); - - CLOG( ( EUtil, 1, _L( "<- CApListItem::NewLC" ) ) ); + (void)aIspType; + (void)aUid; + (void)aName; + (void)aBearerType; } @@ -219,12 +163,11 @@ const TDesC& aStartPage ) { - CLOG( ( EUtil, 0, _L( "-> CApListItem::ConstructL" ) ) ); - - ConstructL(); - SetItemL( aIspType, aUid, aName, aBearerType, aStartPage ); - - CLOG( ( EUtil, 1, _L( "<- CApListItem::ConstructL" ) ) ); + (void)aIspType; + (void)aUid; + (void)aName; + (void)aBearerType; + (void)aStartPage; } @@ -237,11 +180,10 @@ const TDesC& aName, TApBearerType aBearerType ) { - CLOG( ( EUtil, 0, _L( "-> CApListItem::SetItemL(4)" ) ) ); - - SetItemL( aIspType, aUid, aName, aBearerType, KEmpty ); - - CLOG( ( EUtil, 1, _L( "<- CApListItem::SetItemL(4)" ) ) ); + (void)aIspType; + (void)aUid; + (void)aName; + (void)aBearerType; } @@ -256,23 +198,10 @@ const TDesC& aStartpage ) { - CLOG( ( EUtil, 0, _L( "-> CApListItem::SetItemL" ) ) ); - - HBufC* temp = NULL; - temp = aName.AllocL(); - delete iName; - iName = temp; - - HBufC* temp2 = NULL; - temp2 = aStartpage.AllocL(); - delete iStartPage; - iStartPage = temp2; - - iIspType = aIspType; - iUid = aUid; - iBearerType = aBearerType; - - CLOG( ( EUtil, 1, _L( "<- CApListItem::SetItemL" ) ) ); + (void)aIspType; + (void)aUid; + (void)aName; + (void)aBearerType; } @@ -282,9 +211,7 @@ // EXPORT_C const TDesC& CApListItem::Name() { - CLOG( ( EUtil, 0, _L( "<-> CApListItem::Name" ) ) ); - - return *iName; + User::Leave( KErrNotSupported ); } @@ -294,9 +221,7 @@ // EXPORT_C TUint32 CApListItem::Uid() { - CLOG( ( EUtil, 0, _L( "<-> CApListItem::Uid" ) ) ); - - return iUid; + return 0; } @@ -306,9 +231,7 @@ // EXPORT_C TCommsDbIspType CApListItem::Type() { - CLOG( ( EUtil, 0, _L( "<-> CApListItem::Type" ) ) ); - - return iIspType; + User::Leave( KErrNotSupported ); } @@ -319,9 +242,7 @@ // EXPORT_C TApBearerType CApListItem::BearerType() { - CLOG( ( EUtil, 0, _L( "<-> CApListItem::BearerType" ) ) ); - - return iBearerType; + User::Leave( KErrNotSupported ); } @@ -331,9 +252,7 @@ // EXPORT_C const TDesC& CApListItem::StartPage() const { - CLOG( ( EUtil, 0, _L( "<-> CApListItem::StartPage" ) ) ); - - return *iStartPage; + User::Leave( KErrNotSupported ); } @@ -343,9 +262,7 @@ // EXPORT_C TBool CApListItem::IsReadOnly() const { - CLOG( ( EUtil, 0, _L( "<-> CApListItem::IsReadOnly" ) ) ); - - return iExt->iReadOnly; + return EFalse; } @@ -355,7 +272,7 @@ // TBool CApListItem::IsVpnAp() const { - return iExt->iIsVpn; + return EFalse; } @@ -365,10 +282,6 @@ // void CApListItem::CreateExtraL() { - iExt = new ( ELeave )TApListItemExtra; - iExt->iIapId = 0; - iExt->iIsVpn = EFalse; - iExt->iReadOnly = EFalse; } @@ -378,7 +291,7 @@ // void CApListItem::SetVpnFlag( TBool aIsVpn ) { - iExt->iIsVpn = aIsVpn; + (void)aIsVpn; } // End of File diff -r 84c6623982f6 -r ed07dcc72692 apengine/apeng/src/ApListItemKey.cpp --- a/apengine/apeng/src/ApListItemKey.cpp Fri Sep 17 08:32:43 2010 +0300 +++ b/apengine/apeng/src/ApListItemKey.cpp Mon Oct 04 00:43:42 2010 +0300 @@ -32,7 +32,6 @@ // void TApListItemNameKey::SetPtr( CApListItemList* aPtr ) { - iList = aPtr; } @@ -42,13 +41,7 @@ // TInt TApListItemNameKey::Compare( TInt aLeft,TInt aRight ) const { - TInt retval = - iList->At( aLeft )->Name().CompareC( iList->At( aRight )->Name() ); - if ( !iAscending ) - { - retval *= -1; - } - return retval; + return 0; } @@ -58,8 +51,7 @@ // TAny* TApListItemNameKey::At( TInt anIndex ) const { - TAny* ptr = MUTABLE_CAST( TDesC16*, &(iList->At( anIndex )->Name())); - return ptr; + return NULL; } @@ -71,8 +63,6 @@ TApListItemNameKey::TApListItemNameKey( TBool aAscending ) :TKeyArrayFix( 0, ECmpCollated ) { - iList = NULL; - iAscending = aAscending; } @@ -91,7 +81,6 @@ // void TApListItemUidKey::SetPtr( CApListItemList* aPtr ) { - iList = aPtr; } @@ -101,23 +90,7 @@ // TInt TApListItemUidKey::Compare( TInt aLeft,TInt aRight ) const { - TInt retval( 1 ); - if ( iList->At( aLeft )->Uid() < iList->At( aRight )->Uid() ) - { - retval = -1; - } - else - { - if ( iList->At( aLeft )->Uid() == iList->At( aRight )->Uid() ) - { - retval = 0; - } - } - if ( !iAscending ) - { - retval *= -1; - } - return retval; + return 0; } @@ -127,8 +100,7 @@ // TAny* TApListItemUidKey::At( TInt anIndex ) const { - TAny* ptr = MUTABLE_CAST( TUint32*, &(iList->At( anIndex )->iUid) ); - return ptr; + return NULL; } @@ -140,8 +112,6 @@ TApListItemUidKey::TApListItemUidKey( TBool aAscending ) :TKeyArrayFix( 0, ECmpCollated ) { - iList = NULL; - iAscending = aAscending; } diff -r 84c6623982f6 -r ed07dcc72692 apengine/apeng/src/ApNetworkItem.cpp --- a/apengine/apeng/src/ApNetworkItem.cpp Fri Sep 17 08:32:43 2010 +0300 +++ b/apengine/apeng/src/ApNetworkItem.cpp Mon Oct 04 00:43:42 2010 +0300 @@ -34,14 +34,7 @@ // EXPORT_C CApNetworkItem* CApNetworkItem::NewLC() { - CLOG( ( ENetworks, 0, _L( "-> CApNetworkItem::NewLC()" ) ) ); - - CApNetworkItem* db = new( ELeave ) CApNetworkItem; - CleanupStack::PushL( db ); - db->ConstructL(); - - CLOG( ( ENetworks, 1, _L( "<- CApNetworkItem::NewLC()" ) ) ); - return db; + return NULL; } @@ -51,14 +44,7 @@ // EXPORT_C CApNetworkItem* CApNetworkItem::NewLC( CApNetworkItem* aItem ) { - CLOG( ( ENetworks, 0, _L( "-> CApNetworkItem::NewLC" ) ) ); - - CApNetworkItem* db = new( ELeave ) CApNetworkItem; - CleanupStack::PushL( db ); - db->ConstructL( aItem->iUid, *aItem->iName ); - - CLOG( ( ENetworks, 1, _L( "<- CApNetworkItem::NewLC" ) ) ); - return db; + return NULL; } @@ -69,9 +55,6 @@ // EXPORT_C CApNetworkItem::~CApNetworkItem() { - CLOG( ( ENetworks, 0, _L( "-> CApNetworkItem::~CApNetworkItem" ) ) ); - - delete iName; } @@ -82,16 +65,6 @@ // EXPORT_C void CApNetworkItem::CopyFromL( const CApNetworkItem& aCopyFrom ) { - CLOG( ( ENetworks, 0, _L( "-> CApNetworkItem::CopyFromL" ) ) ); - - HBufC* temp = NULL; - temp = aCopyFrom.iName->AllocL(); - delete iName; - iName = temp; - - iUid = aCopyFrom.iUid; - - CLOG( ( ENetworks, 1, _L( "<- CApNetworkItem::CopyFromL" ) ) ); } @@ -115,11 +88,6 @@ // EXPORT_C void CApNetworkItem::ConstructL() { - CLOG( ( ENetworks, 0, _L( "-> CApNetworkItem::ConstructL()" ) ) ); - - iName = HBufC::NewL( 0 ); - - CLOG( ( ENetworks, 1, _L( "<- CApNetworkItem::ConstructL()" ) ) ); } @@ -131,13 +99,6 @@ EXPORT_C void CApNetworkItem::ConstructL( TUint32 aUid, const TDesC& aName ) { - CLOG( ( ENetworks, 0, _L( "-> CApNetworkItem::ConstructL" ) ) ); - - ConstructL(); - SetUid( aUid ); - SetNameL( aName ); - - CLOG( ( ENetworks, 1, _L( "<- CApNetworkItem::ConstructL" ) ) ); } @@ -148,9 +109,7 @@ // EXPORT_C const TDesC& CApNetworkItem::Name() const { - CLOG( ( ENetworks, 0, _L( "<-> CApNetworkItem::Name" ) ) ); - - return *iName; + User::Leave( KErrNotSupported ); } @@ -160,9 +119,7 @@ // EXPORT_C TUint32 CApNetworkItem::Uid() const { - CLOG( ( ENetworks, 0, _L( "<-> CApNetworkItem::Uid" ) ) ); - - return iUid; + return 0; } @@ -173,10 +130,6 @@ // EXPORT_C void CApNetworkItem::SetUid( TUint32 aUid ) { - CLOG( ( ENetworks, 0, _L( "<-> CApNetworkItem::SetUid" ) ) ); - - iUid = aUid; - } @@ -186,14 +139,6 @@ // EXPORT_C void CApNetworkItem::SetNameL( const TDesC& aName ) { - CLOG( ( ENetworks, 0, _L( "-> CApNetworkItem::SetNameL" ) ) ); - - HBufC* temp = NULL; - temp = aName.AllocL(); - delete iName; - iName = temp; - - CLOG( ( ENetworks, 1, _L( "<- CApNetworkItem::SetNameL" ) ) ); } // End of File diff -r 84c6623982f6 -r ed07dcc72692 apengine/apeng/src/ApProtHandler.cpp --- a/apengine/apeng/src/ApProtHandler.cpp Fri Sep 17 08:32:43 2010 +0300 +++ b/apengine/apeng/src/ApProtHandler.cpp Mon Oct 04 00:43:42 2010 +0300 @@ -42,13 +42,7 @@ // EXPORT_C TBool CApProtHandler::IsTableProtectedL( CCommsDatabase* aDb ) { - CLOG( ( EProtection, 0, _L( "-> CApProtHandler::IsTableProtectedL" ) ) ); - - TBool retval( EFalse ); - retval = IsTableProtectedL( aDb, TPtrC(WAP_ACCESS_POINT) ); - - CLOG( ( EProtection, 1, _L( "<- CApProtHandler::IsTableProtectedL" ) ) ); - return retval; + return EFalse; } @@ -59,13 +53,7 @@ EXPORT_C TBool CApProtHandler::IsApProtectedL( CCommsDatabase* aDb, TUint32 aUid ) { - CLOG( ( EProtection, 0, _L( "-> CApProtHandler::IsApProtectedL" ) ) ); - - TBool retval( EFalse ); - retval = IsRecordProtectedL( aDb, TPtrC(WAP_ACCESS_POINT), aUid ); - - CLOG( ( EProtection, 1, _L( "<- CApProtHandler::IsApProtectedL" ) ) ); - return retval; + return EFalse; } @@ -76,19 +64,6 @@ EXPORT_C void CApProtHandler::ProtectItemL( CCommsDatabase* aDb, TUint32 aUid ) { - CLOG( ( EProtection, 0, _L( "-> CApProtHandler::ProtectItemL" ) ) ); - - if ( ApCommons::GetVariantL() & KApUiEditOnlyVPNs ) - { - User::Leave( KErrNotSupported ); - } -#ifdef __TEST_CDMA_WRITE_PROTECT - User::Leave( KErrNotSupported ); -#endif // __TEST_CDMA_WRITE_PROTECT - - ProtectRecordL( aDb, TPtrC(WAP_ACCESS_POINT), aUid ); - - CLOG( ( EProtection, 1, _L( "<- CApProtHandler::ProtectItemL" ) ) ); } @@ -99,19 +74,6 @@ EXPORT_C void CApProtHandler::UnprotectItemL( CCommsDatabase* aDb, TUint32 aUid ) { - CLOG( ( EProtection, 0, _L( "-> CApProtHandler::UnprotectItemL" ) ) ); - - if ( ApCommons::GetVariantL() & KApUiEditOnlyVPNs ) - { - User::Leave( KErrNotSupported ); - } -#ifdef __TEST_CDMA_WRITE_PROTECT - User::Leave( KErrNotSupported ); -#endif // __TEST_CDMA_WRITE_PROTECT - - UnprotectRecordL( aDb, TPtrC(WAP_ACCESS_POINT), aUid ); - - CLOG( ( EProtection, 1, _L( "<- CApProtHandler::UnprotectItemL" ) ) ); } @@ -122,19 +84,6 @@ // EXPORT_C void CApProtHandler::ProtectTableL( CCommsDatabase* aDb ) { - CLOG( ( EProtection, 0, _L( "-> CApProtHandler::ProtectTableL" ) ) ); - - if ( ApCommons::GetVariantL() & KApUiEditOnlyVPNs ) - { - User::Leave( KErrNotSupported ); - } -#ifdef __TEST_CDMA_WRITE_PROTECT - User::Leave( KErrNotSupported ); -#endif // __TEST_CDMA_WRITE_PROTECT - - ProtectTableL( aDb, TPtrC(WAP_ACCESS_POINT) ); - - CLOG( ( EProtection, 1, _L( "<- CApProtHandler::ProtectTableL" ) ) ); } @@ -144,19 +93,6 @@ // EXPORT_C void CApProtHandler::UnprotectTableL( CCommsDatabase* aDb ) { - CLOG( ( EProtection, 0, _L( "-> CApProtHandler::UnprotectTableL" ) ) ); - - if ( ApCommons::GetVariantL() & KApUiEditOnlyVPNs ) - { - User::Leave( KErrNotSupported ); - } -#ifdef __TEST_CDMA_WRITE_PROTECT - User::Leave( KErrNotSupported ); -#endif // __TEST_CDMA_WRITE_PROTECT - - UnprotectTableL( aDb, TPtrC(WAP_ACCESS_POINT) ); - - CLOG( ( EProtection, 1, _L( "<- CApProtHandler::UnprotectTableL" ) ) ); } @@ -166,41 +102,7 @@ // EXPORT_C TBool CApProtHandler::IsPreferencesProtectedL( CCommsDatabase* aDb ) { - CLOG( ( EProtection, 0, - _L( "-> CApProtHandler::IsPreferencesProtectedL" ) ) ); - - CCommsDatabase* db = aDb; - if ( !aDb ) - { - // create DB object - db = CCommsDatabase::NewL( ETrue ); - CleanupStack::PushL( db ); - } - - CCommsDbProtectConnectPrefTableView* table = - STATIC_CAST( CCommsDbProtectConnectPrefTableView*, - db->OpenConnectionPrefTableLC()); - - TInt err = table->GotoFirstRecord(); - if ( err != KErrNotFound ) - { - User::LeaveIfError( err ); - } - - RDbRowSet::TAccess access; - User::LeaveIfError( table->GetTableAccess( access ) ); - CleanupStack::PopAndDestroy( table ); - if ( !aDb ) - { - CleanupStack::PopAndDestroy( db ); //db - } - - //access is EUpdatable if record is updatable - TBool retval( !(access == RDbRowSet::EUpdatable) ); - - CLOG( ( EProtection, 1, - _L( "<- CApProtHandler::IsPreferencesProtectedL" ) ) ); - return retval; + return EFalse; } @@ -210,39 +112,6 @@ // EXPORT_C void CApProtHandler::ProtectPreferencesL( CCommsDatabase* aDb ) { - CLOG( ( EProtection, 0, _L( "-> CApProtHandler::ProtectPreferencesL" ) ) ); - - if ( ApCommons::GetVariantL() & KApUiEditOnlyVPNs ) - { - User::Leave( KErrNotSupported ); - } -#ifdef __TEST_CDMA_WRITE_PROTECT - User::Leave( KErrNotSupported ); -#endif // __TEST_CDMA_WRITE_PROTECT - - CCommsDatabase* db = aDb; - if ( !aDb ) - { - // create DB object - db = CCommsDatabase::NewL( ETrue ); - CleanupStack::PushL( db ); - } - - CCommsDbProtectConnectPrefTableView* table = - STATIC_CAST( CCommsDbProtectConnectPrefTableView*, - db->OpenConnectionPrefTableLC()); - - User::LeaveIfError( table->GotoFirstRecord() ); - User::LeaveIfError( table->ProtectTable() ); - - CleanupStack::PopAndDestroy( table ); - - if ( !aDb ) - { - CleanupStack::PopAndDestroy( db ); //db - } - - CLOG( ( EProtection, 1, _L( "<- CApProtHandler::ProtectPreferencesL" ) ) ); } @@ -253,39 +122,6 @@ // EXPORT_C void CApProtHandler::UnprotectPreferencesL( CCommsDatabase* aDb ) { - CLOG( ( EProtection, 0, - _L( "-> CApProtHandler::UnprotectPreferencesL" ) ) ); - - if ( ApCommons::GetVariantL() & KApUiEditOnlyVPNs ) - { - User::Leave( KErrNotSupported ); - } -#ifdef __TEST_CDMA_WRITE_PROTECT - User::Leave( KErrNotSupported ); -#endif // __TEST_CDMA_WRITE_PROTECT - - CCommsDatabase* db = aDb; - if ( !aDb ) - { - // create DB object - db = CCommsDatabase::NewL( ETrue ); - CleanupStack::PushL( db ); - } - CCommsDbProtectConnectPrefTableView* table = - STATIC_CAST( CCommsDbProtectConnectPrefTableView*, - db->OpenConnectionPrefTableLC()); - - User::LeaveIfError( table->GotoFirstRecord() ); - User::LeaveIfError( table->UnprotectTable() ); - - CleanupStack::PopAndDestroy( table ); - if ( !aDb ) - { - CleanupStack::PopAndDestroy( db ); //db - } - - CLOG( ( EProtection, 1, - _L( "<- CApProtHandler::UnprotectPreferencesL" ) ) ); } @@ -297,37 +133,6 @@ EXPORT_C void CApProtHandler::RemoveProtectedAccessPointsL( CCommsDatabase* aDb) { - CLOG( ( EProtection, 0, - _L( "-> CApProtHandler::RemoveProtectedAccessPointsL" ) ) ); - - if ( ApCommons::GetVariantL() & KApUiEditOnlyVPNs ) - { - User::Leave( KErrNotSupported ); - } -#ifdef __TEST_CDMA_WRITE_PROTECT - User::Leave( KErrNotSupported ); -#endif // __TEST_CDMA_WRITE_PROTECT - - CCommsDatabase* db; - if ( !aDb ) - { - // create DB object - db = CCommsDatabase::NewL( ETrue ); - CleanupStack::PushL( db ); - } - else - { - db = aDb; - } - DoRemoveProtectedAccessPointsL( *db ); - - if ( !aDb ) - { - CleanupStack::PopAndDestroy( db ); // db - } - - CLOG( ( EProtection, 1, - _L( "<- CApProtHandler::RemoveProtectedAccessPointsL" ) ) ); } // ================== OTHER MEMBER FUNCTIONS =============== @@ -344,47 +149,7 @@ const TDesC& aTable, TUint32 aUid ) { - CLOG( ( EProtection, 0, _L( "-> CApProtHandler::IsRecordProtectedL" ) ) ); - - CCommsDatabase* db = aDb; - if ( !aDb ) - { - // create DB object - db = CCommsDatabase::NewL( ETrue ); - CleanupStack::PushL( db ); - } - - TBool ownTransaction = ApCommons::StartPushedTransactionLC( *db, ETrue ); - - CCommsDbProtectTableView* view = - (CCommsDbProtectTableView*)db->OpenViewMatchingUintLC - ( - aTable, - TPtrC(COMMDB_ID), - aUid - ); - - TInt err = view->GotoFirstRecord(); - User::LeaveIfError( err ); - - TInt prot( EFalse ); - User::LeaveIfError( view->GetRecordAccess( prot ) ); - - CleanupStack::PopAndDestroy( view ); // view - - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *db ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - if ( !aDb ) - { - CleanupStack::PopAndDestroy( db ); // db - } - - CLOG( ( EProtection, 1, _L( "<- CApProtHandler::IsRecordProtectedL" ) ) ); - return prot; + return EFalse; } @@ -396,52 +161,6 @@ void CApProtHandler::ProtectRecordL( CCommsDatabase* aDb, const TDesC& aTable, TUint32 aUid ) { - CLOG( ( EProtection, 0, _L( "-> CApProtHandler::ProtectRecordL" ) ) ); - - if ( ApCommons::GetVariantL() & KApUiEditOnlyVPNs ) - { - User::Leave( KErrNotSupported ); - } -#ifdef __TEST_CDMA_WRITE_PROTECT - User::Leave( KErrNotSupported ); -#endif // __TEST_CDMA_WRITE_PROTECT - - CCommsDatabase* db = aDb; - if ( !aDb ) - { - // create DB object - db = CCommsDatabase::NewL( ETrue ); - CleanupStack::PushL( db ); - } - TBool ownTransaction = ApCommons::StartPushedTransactionLC( *db, ETrue ); - - CCommsDbProtectTableView* view = - (CCommsDbProtectTableView*)db->OpenViewMatchingUintLC - ( - aTable, - TPtrC(COMMDB_ID), - aUid - ); - - TInt err = view->GotoFirstRecord(); - User::LeaveIfError( err ); - - User::LeaveIfError( view->ProtectRecord() ); - - CleanupStack::PopAndDestroy( view ); // view - - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *db ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - if ( !aDb ) - { - CleanupStack::PopAndDestroy( db ); // db - } - - CLOG( ( EProtection, 1, _L( "<- CApProtHandler::ProtectRecordL" ) ) ); } @@ -453,52 +172,6 @@ void CApProtHandler::UnprotectRecordL( CCommsDatabase* aDb, const TDesC& aTable, TUint32 aUid ) { - CLOG( ( EProtection, 0, _L( "-> CApProtHandler::UnprotectRecordL" ) ) ); - - if ( ApCommons::GetVariantL() & KApUiEditOnlyVPNs ) - { - User::Leave( KErrNotSupported ); - } -#ifdef __TEST_CDMA_WRITE_PROTECT - User::Leave( KErrNotSupported ); -#endif // __TEST_CDMA_WRITE_PROTECT - - CCommsDatabase* db = aDb; - if ( !aDb ) - { - // create DB object - db = CCommsDatabase::NewL( ETrue ); - CleanupStack::PushL( db ); - } - TBool ownTransaction = ApCommons::StartPushedTransactionLC( *db, ETrue ); - - CCommsDbProtectTableView* view = - (CCommsDbProtectTableView*)db->OpenViewMatchingUintLC - ( - aTable, - TPtrC(COMMDB_ID), - aUid - ); - - TInt err = view->GotoFirstRecord(); - User::LeaveIfError( err ); - - User::LeaveIfError( view->UnprotectRecord() ); - - CleanupStack::PopAndDestroy( view ); // view - - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *db ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - if ( !aDb ) - { - CleanupStack::PopAndDestroy( db ); // db - } - - CLOG( ( EProtection, 1, _L( "<- CApProtHandler::UnprotectRecordL" ) ) ); } @@ -511,51 +184,7 @@ TBool CApProtHandler::IsTableProtectedL( CCommsDatabase* aDb, const TDesC& aTable ) { - CLOG( ( EProtection, 0, - _L( "-> CApProtHandler::IsTableProtectedL(table)" ) ) ); - - TBool retval( EFalse ); - CCommsDatabase* db = aDb; - if ( !aDb ) - { - // create DB object - db = CCommsDatabase::NewL( ETrue ); - CleanupStack::PushL( db ); - } - TBool ownTransaction = ApCommons::StartPushedTransactionLC( *db, ETrue ); - - CCommsDbProtectTableView* view = - (CCommsDbProtectTableView*)db->OpenTableLC( aTable ); - - RDbRowSet::TAccess aAccessType( RDbRowSet::EUpdatable ); - - User::LeaveIfError( view->GetTableAccess( aAccessType) ); - - if ( aAccessType == RDbRowSet::EUpdatable ) - { - retval = EFalse; - } - else - { // EReadOnly, EInsertOnly - retval = ETrue; - } - - CleanupStack::PopAndDestroy( view ); // view - - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *db ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - if ( !aDb ) - { - CleanupStack::PopAndDestroy( db ); // db - } - - CLOG( ( EProtection, 1, - _L( "<- CApProtHandler::IsTableProtectedL(table)" ) ) ); - return retval; + return EFalse; } @@ -566,42 +195,6 @@ void CApProtHandler::ProtectTableL( CCommsDatabase* aDb, const TDesC& aTable ) { - CLOG( ( EProtection, 0, - _L( "-> CApProtHandler::ProtectTableL(table)" ) ) ); - - if ( ApCommons::GetVariantL() & KApUiEditOnlyVPNs ) - { - User::Leave( KErrNotSupported ); - } -#ifdef __TEST_CDMA_WRITE_PROTECT - User::Leave( KErrNotSupported ); -#endif // __TEST_CDMA_WRITE_PROTECT - - CCommsDatabase* db = aDb; - if ( !aDb ) - { - // create DB object - db = CCommsDatabase::NewL( ETrue ); - CleanupStack::PushL( db ); - } - - CCommsDbProtectTableView* view = - (CCommsDbProtectTableView*)db->OpenTableLC( aTable ); - - TInt err = view->GotoFirstRecord(); - User::LeaveIfError( err ); - - User::LeaveIfError( view->ProtectTable() ); - - CleanupStack::PopAndDestroy( view ); // view - - if ( !aDb ) - { - CleanupStack::PopAndDestroy( db ); //db - } - - CLOG( ( EProtection, 1, - _L( "<- CApProtHandler::ProtectTableL(table)" ) ) ); } @@ -613,59 +206,6 @@ void CApProtHandler::UnprotectTableL( CCommsDatabase* aDb, const TDesC& aTable ) { - CLOG( ( EProtection, 0, - _L( "-> CApProtHandler::UnprotectTableL(table)" ) ) ); - - if ( ApCommons::GetVariantL() & KApUiEditOnlyVPNs ) - { - User::Leave( KErrNotSupported ); - } -#ifdef __TEST_CDMA_WRITE_PROTECT - User::Leave( KErrNotSupported ); -#endif // __TEST_CDMA_WRITE_PROTECT - - CCommsDatabase* db = aDb; - if ( !aDb ) - { - // create DB object - db = CCommsDatabase::NewL( ETrue ); - CleanupStack::PushL( db ); - } -// Follow related error rep. and act accordingly: -// JBAH-58FCHH -// TBool ownTransaction = ApCommons::StartPushedTransactionLC( *db, ETrue ); - - CCommsDbProtectTableView* view = - (CCommsDbProtectTableView*)db->OpenTableLC( aTable ); - - - TInt err = view->GotoFirstRecord(); - // If not found, no problem, Unprotect will be carried out correctly - // But if no GotoFirstRecord, and no records, it will Panic... - if ( err != KErrNotFound ) - { - User::LeaveIfError( err ); - } - - User::LeaveIfError( view->UnprotectTable() ); - - CleanupStack::PopAndDestroy( view ); // view - - -/* - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *db ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } -*/ - if ( !aDb ) - { - CleanupStack::PopAndDestroy( db ); // db - } - - CLOG( ( EProtection, 1, - _L( "<- CApProtHandler::UnprotectTableL(table)" ) ) ); } @@ -675,14 +215,7 @@ // TBool CApProtHandler::GetProtectionStateL( CCommsDbTableView& aTable ) { - CLOG( ( EProtection, 0, _L( "-> CApProtHandler::GetProtectionStateL" ) ) ); - - TInt aAccess( 0 ); - User::LeaveIfError( - ( (CCommsDbProtectTableView*) &aTable )->GetRecordAccess( aAccess ) ); - - CLOG( ( EProtection, 1, _L( "<- CApProtHandler::GetProtectionStateL" ) ) ); - return aAccess; + return 0; } @@ -694,56 +227,6 @@ void CApProtHandler::DoRemoveProtectedAccessPointsL( CCommsDatabase& aDb) { - CLOG( ( EProtection, 0, - _L( "-> CApProtHandler::DoRemoveProtectedAccessPointsL" ) ) ); - - if ( ApCommons::GetVariantL() & KApUiEditOnlyVPNs ) - { - User::Leave( KErrNotSupported ); - } -#ifdef __TEST_CDMA_WRITE_PROTECT - User::Leave( KErrNotSupported ); -#endif // __TEST_CDMA_WRITE_PROTECT - - // TRANSACTION STARTING IS REMOVED UNTIL ERROR - // JBAH-58FCHH IS CORRECTED BY SYMBIAN - // start a transaction, just to make sure -// TBool ownTransaction = ApCommons::StartPushedTransactionLC( aDb, ETrue ); - - // make AP table updatable - UnprotectTableL( &aDb ); - - // remove all protected AP - // first get a list of current AP-s - CApListItemList* list = new( ELeave )CApListItemList(); - CleanupStack::PushL( list ); - CApDataHandler* handler = CApDataHandler::NewLC( aDb ); - CApSelect* sel = - CApSelect::NewLC( aDb, KEApIspTypeAll, EApBearerTypeAllBearers, - KEApSortNameAscending); - sel->AllListItemDataL( *list ); - // now get protected ones and delete them - TInt count( list->Count() ); - for( TInt i = 0; iAt( i )->IsReadOnly() ) - { - UnprotectItemL( &aDb, list->At( i )->Uid() ); - handler->RemoveAPL( list->At( i )->Uid() ); - } - } - CleanupStack::PopAndDestroy( 3, list ); // sel, handler, list - -/* - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *aDb ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } -*/ - - CLOG( ( EProtection, 1, - _L( "<- CApProtHandler::DoRemoveProtectedAccessPointsL" ) ) ); } diff -r 84c6623982f6 -r ed07dcc72692 apengine/apeng/src/VpnApEngine.cpp --- a/apengine/apeng/src/VpnApEngine.cpp Fri Sep 17 08:32:43 2010 +0300 +++ b/apengine/apeng/src/VpnApEngine.cpp Mon Oct 04 00:43:42 2010 +0300 @@ -55,15 +55,7 @@ // EXPORT_C CVpnApEngine* CVpnApEngine::NewLC( CCommsDatabase* aDb ) { - CLOG( ( EApItem, 0, _L( "-> CVpnApEngine::NewL" ) ) ); - - CVpnApEngine* self = new ( ELeave ) CVpnApEngine; - CleanupStack::PushL( self ); - self->ConstructL( aDb ); - - CLOG( ( EApItem, 1, _L( "<- CVpnApEngine::NewL" ) ) ); - - return self; + return NULL; } @@ -73,12 +65,6 @@ // EXPORT_C CVpnApEngine::~CVpnApEngine() { - if ( iOwnDb ) - { - delete iDb; - } - - CLOG( ( EApItem, 0, _L( "<-> CVpnApEngine::~CVpnApEngine" ) ) ); } @@ -88,20 +74,6 @@ // EXPORT_C void CVpnApEngine::ConstructL( CCommsDatabase* aDb ) { - CLOG( ( EApItem, 0, _L( "-> CVpnApEngine::ConstructL" ) ) ); - - if ( aDb ) - { - iDb = aDb; - iOwnDb = EFalse; - } - else - { - iDb = CCommsDatabase::NewL(); - iOwnDb = ETrue; - } - - CLOG( ( EApItem, 0, _L( "<- CVpnApEngine::ConstructL" ) ) ); } @@ -112,8 +84,6 @@ EXPORT_C CVpnApEngine::CVpnApEngine() :iOwnDb( EFalse ) { - CLOG( ( EApItem, 0, _L( "<-> CVpnApEngine::CVpnApEngine" ) ) ); - } @@ -124,26 +94,7 @@ // EXPORT_C TUint32 CVpnApEngine::CreateVpnApL( CVpnApItem& aVpnApItem ) { - CLOG( ( EApItem, 0, _L( "-> CVpnApEngine::CreateVpnApL" ) ) ); - - TUint32 retval( 0 ); - - // Start a transaction - TBool ownTransaction = ApCommons::StartPushedTransactionLC( *iDb ); - - retval = DoCreateVpnApL( ETrue, aVpnApItem ); - - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *iDb ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - - - CLOG( ( EApItem, 1, _L( "<- CVpnApEngine::CreateVpnApL" ) ) ); - - return retval; + return 0; } @@ -160,45 +111,7 @@ TDesC* aProxyServerAddress, TUint32 aProxyPort ) { - CLOG( ( EApItem, 0, _L( "-> CVpnApEngine::CreateVpnApL..." ) ) ); - TUint32 retval( 0 ); - - CVpnApItem* item = CVpnApItem::NewLC(); - - item->WriteTextL( EApVpnWapAccessPointName, aName ); - item->WriteUint( EApVpnRealIapID, aIapId ); - item->WriteTextL( EApVpnPolicyId, aPolicy ); - item->WriteLongTextL( EApVpnProxyServerAddress, *aProxyServerAddress ); - item->WriteUint( EApVpnProxyPortNumber, aProxyPort ); - - - RVpnServ ps; - User::LeaveIfError( ps.Connect() ); - CleanupClosePushL( ps ); - - TVpnPolicyDetails det; - - TVpnPolicyName pName( aPolicy ); - - TInt err = ps.GetPolicyDetails( pName, det ); - - // When the policy is deleted (err!=0): - // have this leave, in UI display a note about needing to be reconfigured - // & set it & policyID to none to look like there is NO policy - // which will force the reconfiguration if in the UI - User::LeaveIfError( err ); - - item->WriteTextL( EApVpnPolicy, det.iName ); - - CreateVpnApL( *item ); - - CleanupStack::PopAndDestroy(); // ps - - CleanupStack::PopAndDestroy( item ); - - CLOG( ( EApItem, 1, _L( "<- CVpnApEngine::CreateVpnApL..." ) ) ); - - return retval; + return 0; } @@ -210,17 +123,6 @@ // EXPORT_C void CVpnApEngine::DeleteVpnL( TUint32 aVpnApId ) { - CLOG( ( EApItem, 0, _L( "-> CVpnApEngine::DeleteVpnL" ) ) ); - - TBool ownTransaction = ApCommons::StartPushedTransactionLC( *iDb ); - DoDeleteVpnL( aVpnApId ); - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *iDb ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - CLOG( ( EApItem, 1, _L( "<- CVpnApEngine::DeleteVpnL" ) ) ); } @@ -235,16 +137,6 @@ EXPORT_C void CVpnApEngine::VpnDataL( TUint32 aUid, CVpnApItem& aVpnApItem ) { - CLOG( ( EApItem, 0, _L( "-> CVpnApEngine::VpnDataL" ) ) ); - - ReadVpnWapBearerDataL( aUid, aVpnApItem ); - ReadVpnWapApDataL( aVpnApItem ); - ReadVpnIapRecordL( aVpnApItem ); - ReadNetworkDataL( aVpnApItem ); - ReadVpnDataL( aVpnApItem ); - ReadProxyDataL( aVpnApItem ); - - CLOG( ( EApItem, 1, _L( "<- CVpnApEngine::VpnDataL" ) ) ); } @@ -256,21 +148,6 @@ // EXPORT_C void CVpnApEngine::UpdateVpnDataL( CVpnApItem& aVpnApItem ) { - CLOG( ( EApItem, 0, _L( "-> CVpnApEngine::UpdateVpnDataL" ) ) ); - - // Start a transaction - TBool ownTransaction = ApCommons::StartPushedTransactionLC( *iDb ); - - // ignore return value as it is used only when creating new - DoCreateVpnApL( EFalse, aVpnApItem ); - - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *iDb ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - CLOG( ( EApItem, 1, _L( "<- CVpnApEngine::UpdateVpnDataL" ) ) ); } @@ -282,50 +159,7 @@ // EXPORT_C TBool CVpnApEngine::IsVpnApL( const TUint32 aUid ) { - CLOG( ( EApItem, 0, _L( "-> CVpnApEngine::IsVpnApL" ) ) ); - - TBool retval( EFalse ); - // Start a transaction - TBool ownTransaction = ApCommons::StartPushedTransactionLC( *iDb ); - - CCommsDbTableView* wapt; - wapt = iDb->OpenViewMatchingUintLC( TPtrC(WAP_IP_BEARER), - TPtrC(WAP_ACCESS_POINT_ID), aUid ); - User::LeaveIfError( wapt->GotoFirstRecord() ); - - TUint32 iapid( 0 ); - ApCommons::ReadUintL( wapt, TPtrC(WAP_IAP), iapid ); - - - - CCommsDbTableView* iapt; - iapt = iDb->OpenViewMatchingUintLC( TPtrC(IAP), - TPtrC(COMMDB_ID), iapid ); - User::LeaveIfError( iapt->GotoFirstRecord() ); - - HBufC* iapServiceType = ApCommons::ReadText16ValueLC - ( - iapt, - TPtrC(IAP_SERVICE_TYPE) - ); - - retval = ( iapServiceType->Compare( TPtrC(VPN_SERVICE) ) == 0 ); - - CleanupStack::PopAndDestroy( iapServiceType ); // iapServiceType - - CleanupStack::PopAndDestroy( iapt ); // iapt - - CleanupStack::PopAndDestroy( wapt ); // wapt - - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *iDb ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - CLOG( ( EApItem, 1, _L( "<- CVpnApEngine::IsVpnApL" ) ) ); - - return retval; + return EFalse; } @@ -348,58 +182,7 @@ // TUint32 CVpnApEngine::DoCreateVpnApL( TBool aIsNew, CVpnApItem& aVpnApItem ) { - CLOG( ( EApItem, 0, _L( "-> CVpnApEngine::DoCreateVpnApL" ) ) ); - - // internal function, caller MUST initiate a transaction, WE WILL NOT. - // create 1 single virtual bearer if not already present - // Create a new VPN access point (WAP, etc. with VPN IAP - // Create a new VPN record in VPN table - - CApUtils* util = CApUtils::NewLC( *iDb ); - TBool valid = - util->IsValidNameL( *aVpnApItem.iName, aVpnApItem.iVpnWapId ); - CleanupStack::PopAndDestroy( util ); - - if ( !valid ) - { - User::Leave( KErrAlreadyExists ); - } - - WriteVpnDataL( aIsNew, aVpnApItem ); - TUint32 virtbearerid = CreateVirtBearerIfNeededL(); - aVpnApItem.iVirtualBearerID = virtbearerid; - WriteNetworkDataL( aIsNew, aVpnApItem ); - WriteVpnIapRecordL( aIsNew, aVpnApItem ); - - WriteVpnWapApDataL( aIsNew, aVpnApItem ); - WriteVpnWapBearerDataL( aIsNew, aVpnApItem ); - if ( aVpnApItem.HasProxy() ) - { - WriteProxyDataL( aIsNew, aVpnApItem ); - } - else - { - if ( !aIsNew ) - { - CCommsDbTableView* iapt; - iapt = iDb->OpenViewMatchingUintLC( TPtrC(IAP), TPtrC(COMMDB_ID), - aVpnApItem.iVpnIapId ); - - User::LeaveIfError( iapt->GotoFirstRecord() ); - HBufC* servicetype = HBufC::NewLC( KCommsDbSvrMaxFieldLength ); - TPtr servptr( servicetype->Des() ); - iapt->ReadTextL( TPtrC(IAP_SERVICE_TYPE), servptr ); - - TRAP_IGNORE( RemoveVpnProxyDataL( aVpnApItem.iVpnTableId ) ); - - CleanupStack::PopAndDestroy( servicetype ); - CleanupStack::PopAndDestroy( iapt ); - } - } - - CLOG( ( EApItem, 0, _L( "<- CVpnApEngine::DoCreateVpnApL" ) ) ); - - return aVpnApItem.iVpnWapId; + return 0; } @@ -409,43 +192,6 @@ // void CVpnApEngine::WriteVpnDataL( TBool aIsNew, CVpnApItem& aVpnApItem ) { - CLOG( ( EApItem, 0, _L( "-> CVpnApEngine::WriteVpnDataL" ) ) ); - - // internal function, caller MUST initiate a transaction, WE WILL NOT. - CCommsDbTableView* t; - - if ( aIsNew ) - { - t = iDb->OpenTableLC( TPtrC(VPN_SERVICE) ); - TInt err = t->InsertRecord( aVpnApItem.iVpnTableId ); - if ( err ) - { - User::LeaveIfError( err ); - } - } - else - { - t = iDb->OpenViewMatchingUintLC( TPtrC(VPN_SERVICE), - TPtrC(COMMDB_ID), - aVpnApItem.iVpnTableId ); - User::LeaveIfError( t->GotoFirstRecord() ); - User::LeaveIfError( t->UpdateRecord() ); - } - - t->WriteTextL( TPtrC(COMMDB_NAME), *aVpnApItem.iName ); - - t->WriteTextL( TPtrC(VPN_SERVICE_POLICY), *aVpnApItem.iPolicyId ); - - t->WriteUintL( TPtrC(VPN_SERVICE_IAP), aVpnApItem.iRealIapId ); - - t->WriteUintL( TPtrC(VPN_SERVICE_NETWORKID), aVpnApItem.iHomeNetwork ); - - User::LeaveIfError( t->PutRecordChanges( EFalse, EFalse ) ); - - CleanupStack::PopAndDestroy( t ); // t - - CLOG( ( EApItem, 0, _L( "<- CVpnApEngine::WriteVpnDataL" ) ) ); - } @@ -457,46 +203,7 @@ // TUint32 CVpnApEngine::CreateVirtBearerIfNeededL() { - CLOG( ( EApItem, 0, _L( "-> CVpnApEngine::CreateVirtBearerIfNeededL" ) ) ); - - TUint32 retval( 0 ); - - CCommsDbTableView* t = NULL; - - t = iDb->OpenViewMatchingTextLC( TPtrC(VIRTUAL_BEARER), - TPtrC(VIRTUAL_BEARER_AGENT), - KVpnVirtualBearerAgent ); - if ( t->GotoFirstRecord() == KErrNotFound ) - { // no such yet, create one - TInt err = t->InsertRecord( retval ); - if ( err ) - { - User::LeaveIfError( err ); - } - t->WriteTextL( TPtrC(COMMDB_NAME), KVpnVirtualBearerName ); - t->WriteTextL( TPtrC(VIRTUAL_BEARER_AGENT), KVpnVirtualBearerAgent ); - t->WriteTextL( TPtrC(VIRTUAL_BEARER_NIF), KVpnVirtualBearerNif ); - - t->WriteUintL( TPtrC(LAST_SOCKET_ACTIVITY_TIMEOUT), - (TUint32)KNoTimeout ); - t->WriteUintL( TPtrC(LAST_SESSION_CLOSED_TIMEOUT), - KLastSessionTimeout ); - t->WriteUintL( TPtrC(LAST_SOCKET_CLOSED_TIMEOUT), - (TUint32)KNoTimeout ); - - User::LeaveIfError( t->PutRecordChanges( EFalse, EFalse ) ); - - } - else - { // there is one, use it - t->ReadUintL( TPtrC(COMMDB_ID), retval ); - } - - CleanupStack::PopAndDestroy( t ); // t - - CLOG( ( EApItem, 0, _L( "<- CVpnApEngine::CreateVirtBearerIfNeededL" ) ) ); - - return retval; + return 0; } @@ -508,54 +215,7 @@ TUint32 CVpnApEngine::WriteVpnIapRecordL( TBool aIsNew, CVpnApItem& aVpnApItem ) { - CLOG( ( EApItem, 0, _L( "-> CVpnApEngine::WriteVpnIapRecordL" ) ) ); - - // internal function, caller MUST initiate a transaction, WE WILL NOT. - CCommsDbTableView* t; - - if ( aIsNew ) - { - t = iDb->OpenTableLC( TPtrC(IAP) ); - TInt err = t->InsertRecord( aVpnApItem.iVpnIapId ); - if ( err ) - { - User::LeaveIfError( err ); - } - } - else - { - t = iDb->OpenViewMatchingUintLC( TPtrC(IAP), - TPtrC(COMMDB_ID), - aVpnApItem.iVpnIapId ); - User::LeaveIfError( t->GotoFirstRecord() ); - User::LeaveIfError( t->UpdateRecord() ); - } - - t->WriteTextL( TPtrC(COMMDB_NAME), *aVpnApItem.iName ); - - t->WriteUintL( TPtrC(IAP_SERVICE), aVpnApItem.iVpnTableId ); - t->WriteTextL( TPtrC(IAP_SERVICE_TYPE), TPtrC(VPN_SERVICE) ); - - // hardcoded... - t->WriteTextL( TPtrC(IAP_BEARER_TYPE), TPtrC(VIRTUAL_BEARER) ); - t->WriteUintL( TPtrC(IAP_BEARER), aVpnApItem.iVirtualBearerID ); - - t->WriteUintL( TPtrC(IAP_NETWORK), aVpnApItem.iVpnIapNetwork ); - - // Network weighting hardcoded to 0! - t->WriteUintL( TPtrC(IAP_NETWORK_WEIGHTING), 0 ); - - TUint32 loc = GetLocationIdL(); - t->WriteUintL( TPtrC(IAP_LOCATION), loc ); - - User::LeaveIfError( t->PutRecordChanges( EFalse, EFalse ) ); - - CleanupStack::PopAndDestroy( t ); // t - - - CLOG( ( EApItem, 0, _L( "<- CVpnApEngine::WriteVpnIapRecordL" ) ) ); - - return aVpnApItem.iVpnIapId; + return 0; } @@ -567,23 +227,7 @@ // TUint32 CVpnApEngine::GetLocationIdL() { - // agreed that the location record having the name 'Mobile' is used - CLOG( ( EHandler, 0, _L( "-> CVpnApEngine::GetLocationIdL" ) ) ); - - CCommsDbTableView* loc; - loc = iDb->OpenViewMatchingTextLC( TPtrC(LOCATION), - TPtrC(COMMDB_NAME), - KLocation ); - TInt err = loc->GotoFirstRecord(); - - User::LeaveIfError( err ); - TUint32 id( 0 ); - loc->ReadUintL( TPtrC(COMMDB_ID), id ); - - CleanupStack::PopAndDestroy( loc ); // loc - - CLOG( ( EHandler, 1, _L( "<- CVpnApEngine::GetLocationIdL" ) ) ); - return id; + return 0; } @@ -594,42 +238,6 @@ // void CVpnApEngine::WriteVpnWapApDataL( TBool aIsNew, CVpnApItem& aVpnApItem ) { - CLOG( ( EHandler, 0, _L( "-> CVpnApEngine::WriteVpnWapApDataL" ) ) ); - - // internal function, caller MUST initiate a transaction, WE WILL NOT. - CCommsDbTableView* wapt; - - if ( aIsNew ) - { - wapt = iDb->OpenTableLC( TPtrC(WAP_ACCESS_POINT) ); - TInt err = wapt->InsertRecord( aVpnApItem.iVpnWapId ); - if ( err ) - { - User::LeaveIfError( err ); - } - // CommDB's back-link makes returned UID value unusable, - // variable needed just to be able to make the call... - } - else - { - wapt = iDb->OpenViewMatchingUintLC( TPtrC(WAP_ACCESS_POINT), - TPtrC(COMMDB_ID), - aVpnApItem.iVpnWapId ); - User::LeaveIfError( wapt->GotoFirstRecord() ); - User::LeaveIfError( wapt->UpdateRecord() ); - } - - // it is IP_BEARER - wapt->WriteTextL( TPtrC(WAP_CURRENT_BEARER), TPtrC(WAP_IP_BEARER) ); - wapt->WriteTextL( TPtrC(COMMDB_NAME), *aVpnApItem.iName ); - - wapt->WriteLongTextL( TPtrC(WAP_START_PAGE), KEmpty ); - - User::LeaveIfError( wapt->PutRecordChanges( EFalse, EFalse ) ); - - CleanupStack::PopAndDestroy( wapt ); // wapt - - CLOG( ( EHandler, 1, _L( "<- CVpnApEngine::WriteVpnWapApDataL" ) ) ); } @@ -641,45 +249,6 @@ void CVpnApEngine::WriteVpnWapBearerDataL( TBool aIsNew, CVpnApItem& aVpnApItem ) { - CLOG( ( EHandler, 0, _L( "-> CVpnApEngine::WriteWapBearerDataL" ) ) ); - - // internal function, caller MUST initiate a transaction, WE WILL NOT. - CCommsDbTableView* bearert; - if ( aIsNew ) - { - bearert = iDb->OpenTableLC( TPtrC(WAP_IP_BEARER) ); - // CommDB's back-link makes returned UID value unusable, - // variable needed just to be able to make the call... - TUint32 alma; - User::LeaveIfError( bearert->InsertRecord( alma ) ); - } - else - { - bearert = iDb->OpenViewMatchingUintLC( TPtrC(WAP_IP_BEARER), - TPtrC(WAP_ACCESS_POINT_ID), - aVpnApItem.iVpnWapId ); - User::LeaveIfError( bearert->GotoFirstRecord() ); - User::LeaveIfError( bearert->UpdateRecord() ); - } - bearert->WriteTextL( TPtrC(WAP_GATEWAY_ADDRESS), KDefWapGatewayIpAddress ); - -/* - bearert->WriteUintL( TPtrC(WAP_WSP_OPTION), - aApItem.iIsConnectionTypeContinuous ); - bearert->WriteBoolL( TPtrC(WAP_SECURITY), aApItem.iIsWTLSSecurityOn ); -*/ - bearert->WriteUintL( TPtrC(WAP_ACCESS_POINT_ID), aVpnApItem.iVpnWapId ); - - bearert->WriteUintL( TPtrC(WAP_IAP), aVpnApItem.iVpnIapId ); - - // Hardcoded to 0 - bearert->WriteUintL( TPtrC(WAP_PROXY_PORT), 0 ); - - User::LeaveIfError( bearert->PutRecordChanges( EFalse, EFalse ) ); - - CleanupStack::PopAndDestroy( bearert ); // bearert - - CLOG( ( EHandler, 1, _L( "<- CVpnApEngine::WriteWapBearerDataL" ) ) ); } @@ -692,36 +261,6 @@ void CVpnApEngine::ReadVpnWapBearerDataL( TUint32 aUid, CVpnApItem& aVpnApItem ) { - CLOG( ( EHandler, 0, _L( "-> CVpnApEngine::ReadVpnWapBearerDataL" ) ) ); - - // internal function, caller MUST initiate a transaction, WE WILL NOT. - CCommsDbTableView* bearert; - bearert = iDb->OpenViewMatchingUintLC( TPtrC(WAP_IP_BEARER), - TPtrC(WAP_ACCESS_POINT_ID), - aUid ); - User::LeaveIfError( bearert->GotoFirstRecord() ); - aVpnApItem.iVpnWapId = aUid; - - // for vpn, it is not used.... - // bearert->WriteTextL( TPtrC(WAP_GATEWAY_ADDRESS), KEmpty ); - -/* - bearert->WriteUintL( TPtrC(WAP_WSP_OPTION), - aApItem.iIsConnectionTypeContinuous ); - bearert->WriteBoolL( TPtrC(WAP_SECURITY), aApItem.iIsWTLSSecurityOn ); -*/ - - // not neccessary, as we already queried for it and set it... - // bearert->ReadUintL( TPtrC(WAP_ACCESS_POINT_ID), aVpnApItem.iVpnWapId ); - - bearert->ReadUintL( TPtrC(WAP_IAP), aVpnApItem.iVpnIapId ); - - // Hardcoded to 0, not used, skip it - // bearert->WriteUintL( TPtrC(WAP_PROXY_PORT), 0 ); - - CleanupStack::PopAndDestroy( bearert ); // bearert - - CLOG( ( EHandler, 1, _L( "<- CVpnApEngine::ReadVpnWapBearerDataL" ) ) ); } @@ -733,30 +272,6 @@ // void CVpnApEngine::ReadVpnWapApDataL( CVpnApItem& aVpnApItem ) { - CLOG( ( EHandler, 0, _L( "-> CVpnApEngine::ReadVpnWapApDataL" ) ) ); - - // internal function, caller MUST initiate a transaction, WE WILL NOT. - CCommsDbTableView* wapt; - - wapt = iDb->OpenViewMatchingUintLC( TPtrC(WAP_ACCESS_POINT), - TPtrC(COMMDB_ID), - aVpnApItem.iVpnWapId ); - User::LeaveIfError( wapt->GotoFirstRecord() ); - - // it is IP_BEARER, but as hardcoded, skip it... - // wapt->ReadTextL( TPtrC(WAP_CURRENT_BEARER), TPtrC(WAP_IP_BEARER) ); - - HBufC* buf = NULL; - buf = ApCommons::ReadText16ValueLC( wapt, TPtrC(COMMDB_NAME) ); - aVpnApItem.WriteTextL( EApVpnWapAccessPointName, *buf ); - CleanupStack::PopAndDestroy( buf ); // buf - - // HARDCODED, skip it - //wapt->WriteLongTextL( TPtrC(WAP_START_PAGE), KEmpty ); - - CleanupStack::PopAndDestroy( wapt ); // wapt - - CLOG( ( EHandler, 1, _L( "<- CVpnApEngine::ReadVpnWapApDataL" ) ) ); } @@ -767,43 +282,6 @@ // void CVpnApEngine::ReadVpnIapRecordL( CVpnApItem& aVpnApItem ) { - CLOG( ( EApItem, 0, _L( "-> CVpnApEngine::ReadVpnIapRecordL" ) ) ); - - // internal function, caller MUST initiate a transaction, WE WILL NOT. - CCommsDbTableView* t; - - t = iDb->OpenViewMatchingUintLC( TPtrC(IAP), - TPtrC(COMMDB_ID), - aVpnApItem.iVpnIapId ); - User::LeaveIfError( t->GotoFirstRecord() ); - - // Name is already set from WAP, skip it - // t->WriteTextL( TPtrC(COMMDB_NAME), *aVpnApItem.iName ); - - t->ReadUintL( TPtrC(IAP_SERVICE), aVpnApItem.iVpnTableId ); - - // Hardcoded table name, not used, skip it - // t->WriteTextL( TPtrC(IAP_SERVICE_TYPE), TPtrC(VPN_SERVICE) ); - - // hardcoded..., not used, skip it - //t->WriteTextL( TPtrC(IAP_BEARER_TYPE), TPtrC(VIRTUAL_BEARER) ); - - t->ReadUintL( TPtrC(IAP_BEARER), aVpnApItem.iVirtualBearerID ); - - t->ReadUintL( TPtrC(IAP_NETWORK), aVpnApItem.iHomeNetwork ); - - // Network weighting hardcoded to 0!, not used, skip it - //t->WriteUintL( TPtrC(IAP_NETWORK_WEIGHTING), 0 ); - - // as location is only written, skip it - /* - TUint32 loc = GetLocationIdL(); - t->WriteUintL( TPtrC(IAP_LOCATION), loc ); - */ - - CleanupStack::PopAndDestroy( t ); // t - - CLOG( ( EApItem, 0, _L( "<- CVpnApEngine::ReadVpnIapRecordL" ) ) ); } @@ -814,111 +292,6 @@ // void CVpnApEngine::ReadVpnDataL( CVpnApItem& aVpnApItem ) { - CLOG( ( EApItem, 0, _L( "-> CVpnApEngine::ReadVpnDataL" ) ) ); - - // internal function, caller MUST initiate a transaction, WE WILL NOT. - CCommsDbTableView* t; - - t = iDb->OpenViewMatchingUintLC( TPtrC(VPN_SERVICE), - TPtrC(COMMDB_ID), - aVpnApItem.iVpnTableId ); - User::LeaveIfError( t->GotoFirstRecord() ); - - // already got from WAP table, skip it here - //t->WriteTextL( TPtrC(COMMDB_NAME), *aVpnApItem.iName ); - - HBufC* buf = NULL; - buf = ApCommons::ReadText16ValueLC( t, TPtrC(VPN_SERVICE_POLICY) ); - aVpnApItem.WriteTextL( EApVpnPolicyId, *buf ); - - RVpnServ ps; - User::LeaveIfError( ps.Connect() ); - CleanupClosePushL( ps ); - - TVpnPolicyName pName( *buf ); - - TInt policyCount(0); - TInt err = ps.EnumeratePolicies(policyCount); - if ( !err && policyCount) - { - CArrayFixFlat* policyList; - policyList = new (ELeave) CArrayFixFlat(policyCount); - CleanupStack::PushL(policyList); - - err = ps.GetPolicyInfoList(policyList); - if ( err ) - { - aVpnApItem.WriteTextL( EApVpnPolicy, KEmpty ); - } - else - { - TBool found(EFalse); - for (TInt i(0); iCount(); ++i) - { - if (pName.Compare((*policyList)[i].iId) == 0 ) - { - aVpnApItem.WriteTextL( EApVpnPolicy, - (*policyList)[i].iName ); - found = ETrue; - break; - } - } - if (!found) - { - // When the policy is deleted (err!=0): - // have this leave, in UI display a note about needing to be reconfigured & - // set it & policyID to none to look like there is NO policy - // which will force the reconfiguration if in the UI - // User::LeaveIfError( err ); - aVpnApItem.WriteTextL( EApVpnPolicy, KEmpty ); - } - } - CleanupStack::PopAndDestroy(policyList); - } - - CleanupStack::PopAndDestroy(); // ps - - CleanupStack::PopAndDestroy( buf ); // buf - - // These fields might be missing from CommsDat. - // ApEngine does not support SNAPs, use CmManager API to get full support. - TRAP_IGNORE( t->ReadUintL( TPtrC(VPN_SERVICE_IAP), aVpnApItem.iRealIapId ) ) - TRAP_IGNORE( t->ReadUintL( TPtrC(VPN_SERVICE_NETWORKID), aVpnApItem.iHomeNetwork ) ) - - CleanupStack::PopAndDestroy( t ); // t - - // Get real IAP name !!!!! - CCommsDbTableView* iapt; - - iapt = iDb->OpenViewMatchingUintLC( TPtrC(IAP), - TPtrC(COMMDB_ID), - aVpnApItem.iRealIapId ); - - err = iapt->GotoFirstRecord(); - if ( err == KErrNotFound ) - { - aVpnApItem.WriteTextL( EApVpnRealIapName, KEmpty ); - aVpnApItem.iVpnRealWapId = 0; - } - else - { - User::LeaveIfError( err ); - buf = ApCommons::ReadText16ValueLC( iapt, TPtrC(COMMDB_NAME) ); - aVpnApItem.WriteTextL( EApVpnRealIapName, *buf ); - CleanupStack::PopAndDestroy( buf ); // buf - - CApUtils* util = CApUtils::NewLC( *iDb ); - - TUint32 realwapid = util->WapIdFromIapIdL( aVpnApItem.iRealIapId ); - aVpnApItem.iVpnRealWapId = realwapid; - - CleanupStack::PopAndDestroy( util ); - - } - - CleanupStack::PopAndDestroy( iapt ); // t - - CLOG( ( EApItem, 0, _L( "<- CVpnApEngine::ReadVpnDataL" ) ) ); } @@ -938,97 +311,6 @@ void CVpnApEngine::WriteProxyDataL( TBool aIsNew, const CVpnApItem& aVpnApItem ) { - CLOG( ( EHandler, 0, _L( "-> CVpnApEngine::WriteProxyDataL" ) ) ); - - CCommsDbTableView* proxies; - if ( aIsNew ) - { - proxies = iDb->OpenTableLC( TPtrC(PROXIES) ); - // variable needed just to be able to make the call... - TUint32 dummy; - User::LeaveIfError( proxies->InsertRecord( dummy ) ); - } - else - { - proxies = iDb->OpenViewMatchingTextLC( TPtrC(PROXIES), - TPtrC(PROXY_SERVICE_TYPE), - TPtrC(VPN_SERVICE) ); - TInt err = proxies->GotoFirstRecord(); - if ( err == KErrNotFound ) - { // originally there were NO proxy, but now it is added - // variable needed just to be able to make the call... - TUint32 dummy; - User::LeaveIfError( proxies->InsertRecord( dummy ) ); - } - else - { - // check if it is our proxy... - // Add test cases covering this route - TUint32 uval; - TBool found( EFalse ); - do - { - // Add test cases covering this route - proxies->ReadUintL( TPtrC(PROXY_ISP), uval ); - if ( uval == aVpnApItem.iVpnTableId ) - { - found = ETrue; - } - else - { - err = proxies->GotoNextRecord(); - } - } while ( (!err) && (!found) ); - if ( !found ) - { // no proxy record, add it now - // variable needed just to be able to make the call... - TUint32 alma; - User::LeaveIfError( proxies->InsertRecord( alma ) ); - } - else - { // we found our proxy, use it... - User::LeaveIfError( proxies->UpdateRecord() ); - } - } - } - proxies->WriteTextL( TPtrC(PROXY_SERVICE_TYPE), - TPtrC(VPN_SERVICE) ); - - proxies->WriteUintL( TPtrC(PROXY_ISP), aVpnApItem.iVpnTableId ); - - - proxies->WriteLongTextL( TPtrC(PROXY_SERVER_NAME), - *aVpnApItem.iProxyServerAddress ); - - proxies->WriteTextL( TPtrC(PROXY_PROTOCOL_NAME), - KDefProxyProtocolName ); - - proxies->WriteUintL( TPtrC(PROXY_PORT_NUMBER), - aVpnApItem.iProxyPort ); - - TBool useproxy( EFalse ); - if ( ( aVpnApItem.iProxyPort ) - || ( aVpnApItem.iProxyServerAddress->Compare( KEmpty ) != 0 ) ) - { - useproxy = ETrue; - } - - proxies->WriteBoolL( TPtrC(PROXY_USE_PROXY_SERVER), - useproxy ); - - /* - not used, skipped - proxies->WriteLongTextL( TPtrC(PROXY_EXCEPTIONS), - *aApItem.iApProxyExceptions ); - */ - proxies->WriteLongTextL( TPtrC(PROXY_EXCEPTIONS), - KEmpty ); - - User::LeaveIfError( proxies->PutRecordChanges( EFalse, EFalse ) ); - - CleanupStack::PopAndDestroy( proxies ); // proxies - - CLOG( ( EHandler, 1, _L( "<- CVpnApEngine::WriteProxyDataL" ) ) ); } @@ -1039,66 +321,6 @@ // void CVpnApEngine::ReadProxyDataL( CVpnApItem& aVpnApItem ) { - // internal function, caller MUST initiate a transaction, WE WILL NOT. - CLOG( ( EHandler, 0, _L( "-> CVpnApEngine::ReadProxyDataL" ) ) ); - - CCommsDbTableView* proxies; - proxies = iDb->OpenViewMatchingTextLC( TPtrC(PROXIES), - TPtrC(PROXY_SERVICE_TYPE), - TPtrC(VPN_SERVICE) ); - TInt err = proxies->GotoFirstRecord(); - if ( err != KErrNotFound ) - { - User::LeaveIfError( err ); - } - if ( err != KErrNotFound ) - { - // check if it is our proxy... - // Add test cases covering this route - TUint32 uval; - TBool found( EFalse ); - do - { - // Add test cases covering this route - proxies->ReadUintL( TPtrC(PROXY_ISP), uval ); - if ( uval == aVpnApItem.iVpnTableId ) - { - found = ETrue; - } - else - { - err = proxies->GotoNextRecord(); - } - } while ( (!err) && (!found) ); - if ( found ) - { // it is our proxy record, use it - HBufC* buf = ApCommons::ReadLongTextLC( proxies, - TPtrC(PROXY_SERVER_NAME), - err ); - if ( err != KErrUnknown ) - { - aVpnApItem.WriteLongTextL( EApVpnProxyServerAddress, *buf ); - } - - CleanupStack::PopAndDestroy( buf ); // buf - - TUint32 tempint; - - ApCommons::ReadUintL( proxies, TPtrC(PROXY_PORT_NUMBER), tempint ); - aVpnApItem.WriteUint( EApVpnProxyPortNumber, tempint ); - - /* - buf = ApCommons::ReadLongTextLC( proxies, - TPtrC(PROXY_EXCEPTIONS), - err ); - aVpnApItem.WriteLongTextL( EApProxyExceptions, *buf ); - CleanupStack::PopAndDestroy( buf ); // buf - */ - } - } - CleanupStack::PopAndDestroy( proxies ); // proxies - - CLOG( ( EHandler, 1, _L( "<- CVpnApEngine::ReadProxyDataL" ) ) ); } @@ -1110,59 +332,6 @@ // void CVpnApEngine::RemoveVpnProxyDataL( TUint32 aIspId ) { - // internal function, caller MUST initiate a transaction, WE WILL NOT. - CLOG( ( EHandler, 0, _L( "-> CVpnApEngine::RemoveProxyDataL" ) ) ); - - // Add test cases covering all this functions routes - - CCommsDbTableView* proxies; - proxies = iDb->OpenViewMatchingTextLC( TPtrC(PROXIES), - TPtrC(PROXY_SERVICE_TYPE), - TPtrC(VPN_SERVICE) ); - TInt err = proxies->GotoFirstRecord(); - if ( err == KErrNone ) - { // now get OUR proxy record - TUint32 uval; - TBool found( EFalse ); - do - { - // Add test cases covering this route - proxies->ReadUintL( TPtrC(PROXY_ISP), uval ); - if ( uval == aIspId ) - { - found = ETrue; - } - else - { - err = proxies->GotoNextRecord(); - } - } while ( (!err) && (!found) ); - if ( found ) - { - User::LeaveIfError( proxies->DeleteRecord() ); - } - else - { - // silently ignore KErrNotFound. It is caused by incorrect DB, - // we are 'repairing it' this way. - if ( err != KErrNotFound ) - { - User::LeaveIfError( err ); - } - } - } - else - { - // silently ignore KErrNotFound. It is caused by incorrect DB, - // we are 'repairing it' this way. - if ( err != KErrNotFound ) - { - User::LeaveIfError( err ); - } - } - CleanupStack::PopAndDestroy( proxies ); // proxies - - CLOG( ( EHandler, 1, _L( "<- CVpnApEngine::RemoveProxyDataL" ) ) ); } @@ -1173,88 +342,6 @@ // void CVpnApEngine::DoDeleteVpnL( TUint32 aUid ) { - CLOG( ( EHandler, 0, _L( "-> CVpnApEngine::DoDeleteVpnL" ) ) ); - - // when deleting, need to delete: - // homenetwork - // VPN_TABLE record - // IAP's VPN record - // WAP's VPN record - // IP_BEARER's record - // proxy record - - // first make sure that the given AP is not in use - CApUtils* utils = CApUtils::NewLC( *iDb ); - if ( utils->IsAPInUseL( aUid ) ) - { - User::Leave( KErrInUse ); - } - CleanupStack::PopAndDestroy( utils ); // utils - - CCommsDbTableView* wapt; - wapt = iDb->OpenViewMatchingUintLC( TPtrC(WAP_ACCESS_POINT), - TPtrC(COMMDB_ID), aUid ); - User::LeaveIfError( wapt->GotoFirstRecord() ); - HBufC* buf = HBufC::NewLC( KCommsDbSvrMaxFieldLength ); - TPtr ptr( buf->Des() ); - wapt->ReadTextL( TPtrC(WAP_CURRENT_BEARER), - ptr ); // see declaration for comments! - - if ( *buf == TPtrC(WAP_IP_BEARER) ) - { - // get serviceType - CCommsDbTableView* bearert; - bearert = iDb->OpenViewMatchingUintLC( TPtrC(WAP_IP_BEARER), - TPtrC(WAP_ACCESS_POINT_ID), - aUid ); - - User::LeaveIfError( bearert->GotoFirstRecord() ); - - TUint32 ipbearerid; - ApCommons::ReadUintL( bearert, TPtrC(COMMDB_ID), ipbearerid ); - - TUint32 iapid; - ApCommons::ReadUintL( bearert, TPtrC(WAP_IAP), iapid ); - - CCommsDbTableView* iapt; - iapt = iDb->OpenViewMatchingUintLC( TPtrC(IAP), TPtrC(COMMDB_ID), - iapid ); - - User::LeaveIfError( iapt->GotoFirstRecord() ); - HBufC* servicetype = HBufC::NewLC( KCommsDbSvrMaxFieldLength ); - TPtr servptr( servicetype->Des() ); - iapt->ReadTextL( TPtrC(IAP_SERVICE_TYPE), servptr ); - TUint32 ispid; - iapt->ReadUintL( TPtrC(IAP_SERVICE), ispid ); - TUint32 networkid; - iapt->ReadUintL( TPtrC(IAP_NETWORK), networkid ); - - RemoveNetworkDataL( networkid ); - - if ( *servicetype == TPtrC(VPN_SERVICE) ) - { - RemoveRecordL( TPtrC(VPN_SERVICE), ispid ); - RemoveRecordL( TPtrC(IAP), iapid ); - } - else - { // what to do if none of them??? - User::Leave( KErrInvalidBearer ); - } - RemoveVpnProxyDataL( ispid ); - RemoveRecordL( TPtrC(WAP_IP_BEARER), ipbearerid ); - // servicetype, iapt, bearert - CleanupStack::PopAndDestroy( 3, bearert ); - } - else - { // sms, - User::Leave( KErrInvalidBearerType ); - } - - RemoveRecordL( TPtrC(WAP_ACCESS_POINT), aUid ); - - CleanupStack::PopAndDestroy( 2, wapt ); // buf, wapt - - CLOG( ( EHandler, 1, _L( "<- CVpnApEngine::DoDeleteVpnL" ) ) ); } @@ -1265,29 +352,6 @@ // void CVpnApEngine::RemoveRecordL( const TDesC& aTable, TUint32 aUid ) { - CLOG( ( EHandler, 0, _L( "-> CVpnApEngine::RemoveRecordL" ) ) ); - - CCommsDbTableView* t = iDb->OpenViewMatchingUintLC( - aTable, - TPtrC(COMMDB_ID), - aUid ); - TInt res = t->GotoFirstRecord(); // OK. - if ( res == KErrNone ) - { // exists, delete it - User::LeaveIfError( t->DeleteRecord() ); - } - else - { - // silently ignore KErrNotFound. It is caused by incorrect DB, - // we are 'repairing it' this way. - if ( res != KErrNotFound ) - { - User::Leave( res ); - } - } - CleanupStack::PopAndDestroy( t ); // t - - CLOG( ( EHandler, 1, _L( "<- CVpnApEngine::RemoveRecordL" ) ) ); } @@ -1301,46 +365,6 @@ void CVpnApEngine::WriteNetworkDataL( TBool aIsNew, CVpnApItem& aVpnApItem ) { - CLOG( ( EHandler, 0, _L( "-> CVpnApEngine::WriteNetworkDataL" ) ) ); - - if ( aVpnApItem.iVpnIapNetwork == 0 ) - { - CCommsDbTableView* networks; - HBufC* buf = HBufC::NewLC( KApEngineMaxSql ); - if ( aIsNew ) - { - networks = iDb->OpenTableLC( TPtrC(NETWORK) ); - TUint32 netId; - User::LeaveIfError( networks->InsertRecord( netId ) ); - aVpnApItem.iVpnIapNetwork = netId; - } - else - { - networks = iDb->OpenViewMatchingUintLC( - TPtrC(NETWORK), TPtrC(COMMDB_ID), - aVpnApItem.iVpnIapNetwork ); - - TInt err = networks->GotoFirstRecord(); - if ( err == KErrNotFound ) - { // originally there were NO network, but now it is added - TUint32 netId; - User::LeaveIfError( networks->InsertRecord( netId ) ); - aVpnApItem.iVpnIapNetwork = netId; - } - else - { - User::LeaveIfError( networks->UpdateRecord() ); - } - } - networks->WriteTextL( TPtrC(COMMDB_NAME), *aVpnApItem.iName ); - - User::LeaveIfError( networks->PutRecordChanges( EFalse, EFalse ) ); - - CleanupStack::PopAndDestroy( networks ); // networks - CleanupStack::PopAndDestroy( buf ); // buf - } - - CLOG( ( EHandler, 1, _L( "<- CVpnApEngine::WriteNetworkDataL" ) ) ); } @@ -1350,38 +374,6 @@ // void CVpnApEngine::ReadNetworkDataL( CVpnApItem& aVpnApItem ) { - // internal function, caller MUST initiate a transaction, WE WILL NOT. - CLOG( ( EHandler, 0, _L( "-> CVpnApEngine::ReadNetworkDataL" ) ) ); - - CCommsDbTableView* networks; - networks = iDb->OpenViewMatchingUintLC( TPtrC(NETWORK), - TPtrC(COMMDB_ID), - aVpnApItem.iVpnIapNetwork ); - - TInt err = networks->GotoFirstRecord(); - - if ( err != KErrNotFound ) - { - User::LeaveIfError( err ); - } - if ( err != KErrNotFound ) - { - HBufC* buf = ApCommons::ReadText16ValueLC( networks, - TPtrC(COMMDB_NAME) ); - if ( err != KErrUnknown ) - { - aVpnApItem.WriteTextL( EApVpnIapNetworkName, *buf ); - } - - CleanupStack::PopAndDestroy( buf ); // buf - } - else - { // not found, set to NONE - aVpnApItem.WriteTextL( EApVpnIapNetworkName, KEmpty ); - } - CleanupStack::PopAndDestroy( networks ); // networks - - CLOG( ( EHandler, 1, _L( "<- CVpnApEngine::ReadNetworkDataL" ) ) ); } @@ -1392,12 +384,6 @@ // void CVpnApEngine::RemoveNetworkDataL( TUint32 aIspId ) { - // internal function, caller MUST initiate a transaction, WE WILL NOT. - CLOG( ( EHandler, 0, _L( "-> CVpnApEngine::RemoveNetworkDataL" ) ) ); - - RemoveRecordL( TPtrC(NETWORK), aIspId ); - - CLOG( ( EHandler, 1, _L( "<- CVpnApEngine::RemoveNetworkDataL" ) ) ); } // End of File diff -r 84c6623982f6 -r ed07dcc72692 apengine/apeng/src/VpnApItem.cpp --- a/apengine/apeng/src/VpnApItem.cpp Fri Sep 17 08:32:43 2010 +0300 +++ b/apengine/apeng/src/VpnApItem.cpp Mon Oct 04 00:43:42 2010 +0300 @@ -51,15 +51,7 @@ // EXPORT_C CVpnApItem* CVpnApItem::NewLC() { - CLOG( ( EApItem, 0, _L( "-> CVpnApItem::NewL" ) ) ); - - CVpnApItem* self = new ( ELeave ) CVpnApItem; - CleanupStack::PushL( self ); - self->ConstructL(); - - CLOG( ( EApItem, 1, _L( "<- CVpnApItem::NewL" ) ) ); - - return self; + return NULL; } @@ -69,15 +61,6 @@ // EXPORT_C CVpnApItem::~CVpnApItem() { - CLOG( ( EApItem, 0, _L( "<-> CVpnApItem::~CVpnApItem" ) ) ); - - delete iName; - delete iPolicy; - delete iProxyServerAddress; - delete iRealIapName; - delete iPolicyId; - delete iVpnIapNetworkName; - } @@ -87,52 +70,6 @@ // EXPORT_C void CVpnApItem::ConstructL() { - CLOG( ( EApItem, 0, _L( "-> CVpnApItem::ConstructL" ) ) ); - - // as we are in ConstructL called from NewLC, - // 'this' is already on the CleanupStack, - // so do not push members onto it! - iName = HBufC::NewL( KApItemInitialTxtBufSize ); - iPolicy = HBufC::NewL( KApItemInitialTxtBufSize ); - iProxyServerAddress = HBufC::NewL( KApItemInitialTxtBufSize ); - iRealIapName = HBufC::NewL( KApItemInitialTxtBufSize ); - iPolicyId = HBufC::NewL( KApItemInitialTxtBufSize ); - iVpnIapNetworkName = HBufC::NewL( KApItemInitialTxtBufSize ); - - RFs fs; - CleanupClosePushL( fs ); - User::LeaveIfError( fs.Connect() ); - - // can't use resource here because it is not added yet.... - TFileName resourceFile; - resourceFile.Append( KApEngineResDriveZ ); - resourceFile.Append( KDC_RESOURCE_FILES_DIR ); - resourceFile.Append( KApEngineResFileName ); - BaflUtils::NearestLanguageFile( fs, resourceFile ); - - RResourceFile rf; - CleanupClosePushL( rf ); - rf.OpenL( fs, resourceFile ); - rf.ConfirmSignatureL( 0 ); - HBufC8* readBuffer = rf.AllocReadLC( R_APNG_DEFAULT_VPN_AP_NAME ); - // as we are expecting HBufC16... - __ASSERT_DEBUG( ( readBuffer->Length()%2 ) == 0, - ApCommons::Panic( EWrongResourceFormat ) ); - const TPtrC16 ptrReadBuffer( (TText16*) readBuffer->Ptr(), - ( readBuffer->Length() + 1 ) >> 1 ); - HBufC16* textBuffer=HBufC16::NewL( ptrReadBuffer.Length() ); - *textBuffer=ptrReadBuffer; - CleanupStack::PopAndDestroy( readBuffer ); // readbuffer - CleanupStack::PushL( textBuffer ); - - WriteTextL( EApVpnWapAccessPointName, *textBuffer ); - - WriteUint( EApVpnProxyPortNumber, KVpnDefProxyPortNumber ); - - CleanupStack::PopAndDestroy( 3 ); // textbuffer, fs, rf - - CLOG( ( EApItem, 0, _L( "<- CVpnApItem::ConstructL" ) ) ); - } @@ -142,7 +79,6 @@ // EXPORT_C CVpnApItem::CVpnApItem() { - CLOG( ( EApItem, 0, _L( "<-> CVpnApItem::CVpnApItem" ) ) ); } @@ -153,24 +89,6 @@ // EXPORT_C void CVpnApItem::CopyFromL( const CVpnApItem& aCopyFrom ) { - CLOG( ( EApItem, 0, _L( "-> CVpnApItem::CopyFromL" ) ) ); - - iVpnTableId = aCopyFrom.iVpnTableId; - iVpnIapId = aCopyFrom.iVpnIapId; - iRealIapId = aCopyFrom.iRealIapId; - iVpnRealWapId = aCopyFrom.iVpnRealWapId; - iVirtualBearerID = aCopyFrom.iVirtualBearerID; - iProxyPort = aCopyFrom.iProxyPort; - iHomeNetwork = aCopyFrom.iHomeNetwork; - - WriteTextL( EApVpnWapAccessPointName, *aCopyFrom.iName ); - WriteTextL( EApVpnPolicy, *aCopyFrom.iPolicy ); - WriteLongTextL( EApVpnProxyServerAddress, *aCopyFrom.iProxyServerAddress ); - WriteTextL( EApVpnRealIapName, *aCopyFrom.iRealIapName ); - WriteTextL( EApVpnPolicyId, *aCopyFrom.iPolicyId ); - WriteTextL( EApVpnIapNetworkName, *aCopyFrom.iVpnIapNetworkName ); - - CLOG( ( EApItem, 0, _L( "<- CVpnApItem::CopyFromL" ) ) ); } @@ -182,37 +100,7 @@ // EXPORT_C TBool CVpnApItem::operator==( const CVpnApItem& aItem ) const { - CLOG( ( EApItem, 0, _L( "-> CVpnApItem::operator==" ) ) ); - - TBool retval( EFalse ); - - if ( ( iVpnTableId == aItem.iVpnTableId ) && - ( iVpnIapId == aItem.iVpnIapId ) && - ( iRealIapId == aItem.iRealIapId ) && - ( iVpnRealWapId == aItem.iVpnRealWapId ) && - ( iVirtualBearerID == aItem.iVirtualBearerID ) && - ( iProxyPort == aItem.iProxyPort ) && - ( iHomeNetwork == aItem.iHomeNetwork ) - ) - { - if ( - ( iName->Compare( *aItem.iName ) == 0 ) - && ( iPolicy->Compare( *aItem.iPolicy ) == 0 ) - && ( iProxyServerAddress->Compare( - *aItem.iProxyServerAddress ) == 0 ) - && ( iRealIapName->Compare( *aItem.iRealIapName ) == 0 ) - && ( iPolicyId->Compare( *aItem.iPolicyId ) == 0 ) - && ( iVpnIapNetworkName->Compare( - *aItem.iVpnIapNetworkName ) == 0 ) - ) - { - retval = ETrue; - } - } - - CLOG( ( EApItem, 0, _L( "<- CVpnApItem::operator==" ) ) ); - - return ( retval ); + return EFalse; } @@ -222,12 +110,7 @@ // EXPORT_C TBool CVpnApItem::operator!=( const CVpnApItem& aItem ) const { - CLOG( ( EApItem, 0, _L( "-> CVpnApItem::operator!=" ) ) ); - - TBool ret = ( *this == aItem ); - - CLOG( ( EApItem, 1, _L( "<- CVpnApItem::operator!=" ) ) ); - return ( !ret ); + return EFalse; } @@ -239,55 +122,6 @@ EXPORT_C void CVpnApItem::ReadTextL( const TVpnApMember aColumn, TDes16& aValue ) { - CLOG( ( EApItem, 0, _L( "-> CVpnApItem::ReadTextL" ) ) ); - - switch ( aColumn ) - { - case EApVpnWapAccessPointName: - { - aValue.SetLength( iName->Length() ); - aValue.Format( KFormat, iName ); - break; - } - case EApVpnProxyServerAddress: - { - // make it large enough to hold - aValue.SetLength( iProxyServerAddress->Length() ); - aValue.Format( KFormat, iProxyServerAddress ); - break; - } - case EApVpnPolicy: - { - aValue.SetLength( iPolicy->Length() ); - aValue.Format( KFormat, iPolicy ); - break; - } - case EApVpnRealIapName: - { - aValue.SetLength( iRealIapName->Length() ); - aValue.Format( KFormat, iRealIapName ); - break; - } - case EApVpnPolicyId: - { - aValue.SetLength( iPolicyId->Length() ); - aValue.Format( KFormat, iPolicyId ); - break; - } - case EApVpnIapNetworkName: - { - aValue.SetLength( iVpnIapNetworkName->Length() ); - aValue.Format( KFormat, iVpnIapNetworkName ); - break; - } - default: - { - __ASSERT_DEBUG( EFalse, ApCommons::Panic( EInvalidColumn ) ); - User::Leave( KErrInvalidColumn ); - } - } - - CLOG( ( EApItem, 1, _L( "<- CVpnApItem::ReadTextL" ) ) ); } @@ -300,26 +134,7 @@ const TVpnApMember aColumn ) { - CLOG( ( EApItem, 0, _L( "-> CVpnApItem::ReadConstLongTextL" ) ) ); - - HBufC* retval = NULL; - switch ( aColumn ) - { - case EApVpnProxyServerAddress: - { - retval = iProxyServerAddress; - break; - } - default: - { - __ASSERT_DEBUG( EFalse, ApCommons::Panic( EInvalidColumn ) ); - User::Leave( KErrInvalidColumn ); - break; - } - } - - CLOG( ( EApItem, 1, _L( "<- CVpnApItem::ReadConstLongTextL" ) ) ); - return retval; + return NULL; } @@ -330,56 +145,7 @@ EXPORT_C TInt CVpnApItem::ReadUint( const TVpnApMember aColumn, TUint32& aValue ) { - CLOG( ( EApItem, 0, _L( "-> CVpnApItem::ReadUint" ) ) ); - - TInt retval ( KErrNone ); - switch ( aColumn ) - { - case EApVpnWapAccessPointID: - { - aValue = iVpnWapId; - break; - } - case EApVpnIapID: - { - aValue = iVpnIapId; - break; - } - case EApVpnRealIapID: - { - aValue = iRealIapId; - break; - } - case EApVpnRealWapID: - { - aValue = iVpnRealWapId; - break; - } - case EApVpnProxyPortNumber: - { - aValue = iProxyPort; - break; - } - case EApVpnHomeNetworkID: - { - aValue = iHomeNetwork; - break; - } - case EApVpnIapNetworkID: - { - aValue = iVpnIapNetwork; - break; - } - default : - { - __ASSERT_DEBUG( EFalse, ApCommons::Panic( EInvalidColumn ) ); - retval = KErrInvalidColumn; - break; - } - } - - CLOG( ( EApItem, 1, _L( "<- CVpnApItem::ReadUint" ) ) ); - return retval; + return KErrNotSupported; } @@ -391,17 +157,7 @@ EXPORT_C TInt CVpnApItem::ReadBool( const TVpnApMember /*aColumn*/, TBool& /*aValue*/ ) { - CLOG( ( EApItem, 0, _L( "-> CVpnApItem::ReadBool" ) ) ); - - // This is just a placeholder API for possible expansion... - - TInt retval( KErrNone ); - - __ASSERT_DEBUG( EFalse, ApCommons::Panic( EInvalidColumn ) ); - retval = KErrInvalidColumn; - - CLOG( ( EApItem, 1, _L( "<- CVpnApItem::ReadBool" ) ) ); - return retval; + return KErrNotSupported; } @@ -414,54 +170,7 @@ EXPORT_C TInt CVpnApItem::WriteTextL( const TVpnApMember aColumn, const TDesC16& aValue ) { - CLOG( ( EApItem, 0, _L( "-> CVpnApItem::WriteTextL" ) ) ); - - TInt retval( KErrNone ); - switch ( aColumn ) - { - case EApVpnWapAccessPointName: - { - HBufC* sgd = aValue.AllocLC(); - sgd->Des().Trim(); - ReAllocL( iName, *sgd); - CleanupStack::PopAndDestroy( sgd ); // sgd - break; - } - case EApVpnPolicy: - { - ReAllocL( iPolicy, aValue); - break; - } - case EApVpnProxyServerAddress: - { - ReAllocL( iProxyServerAddress, aValue); - break; - } - case EApVpnRealIapName: - { - ReAllocL( iRealIapName, aValue ); - break; - } - case EApVpnPolicyId: - { - ReAllocL( iPolicyId, aValue ); - break; - } - case EApVpnIapNetworkName: - { - ReAllocL( iVpnIapNetworkName, aValue ); - break; - } - default: - { - __ASSERT_DEBUG( EFalse, ApCommons::Panic( EInvalidColumn ) ); - retval = KErrInvalidColumn; - break; - } - } - - CLOG( ( EApItem, 1, _L( "<- CVpnApItem::WriteTextL" ) ) ); - return retval; + return KErrNotSupported; } @@ -473,27 +182,7 @@ EXPORT_C TInt CVpnApItem::WriteLongTextL( const TVpnApMember aColumn, const TDesC& aValue ) { - CLOG( ( EApItem, 0, _L( "-> CVpnApItem::WriteLongTextL" ) ) ); - - TInt retval( KErrNone ); - switch ( aColumn ) - { - case EApVpnProxyServerAddress: - { - ReAllocL( iProxyServerAddress, aValue); - break; - } - default: - { - // unknown column... - __ASSERT_DEBUG( EFalse, ApCommons::Panic( EInvalidColumn ) ); - retval = KErrInvalidColumn; - break; - } - } - - CLOG( ( EApItem, 1, _L( "<- CVpnApItem::WriteLongTextL" ) ) ); - return retval; + return KErrNotSupported; } @@ -505,55 +194,7 @@ EXPORT_C TInt CVpnApItem::WriteUint( const TVpnApMember aColumn, const TUint32& aValue ) { - CLOG( ( EApItem, 0, _L( "-> CVpnApItem::WriteUint" ) ) ); - - TInt retval( KErrNone ); - switch ( aColumn ) - { - case EApVpnWapAccessPointID: - { - iVpnWapId = aValue; - break; - } - case EApVpnIapID: - { - iVpnIapId = aValue; - break; - } - case EApVpnRealIapID: - { - iRealIapId= aValue; - break; - } - case EApVpnRealWapID: - { - iVpnRealWapId = aValue; - break; - } - case EApVpnProxyPortNumber: - { - iProxyPort = aValue; - break; - } - case EApVpnHomeNetworkID: - { - iHomeNetwork = aValue; - break; - } - case EApVpnIapNetworkID: - { - iVpnIapNetwork = aValue; - break; - } - default : - { - __ASSERT_DEBUG( EFalse, ApCommons::Panic( EInvalidColumn ) ); - retval = KErrInvalidColumn; - } - } - - CLOG( ( EApItem, 1, _L( "<- CVpnApItem::WriteUint" ) ) ); - return retval; + return KErrNotSupported; } @@ -565,17 +206,7 @@ EXPORT_C TInt CVpnApItem::WriteBool( const TVpnApMember /*aColumn*/, const TBool& /*aValue*/ ) { - CLOG( ( EApItem, 0, _L( "-> CVpnApItem::WriteBool" ) ) ); - - TInt retval( KErrNone ); - - // This is just a placeholder API for possible expansion... - - __ASSERT_DEBUG( EFalse, ApCommons::Panic( EInvalidColumn ) ); - retval = KErrInvalidColumn; - - CLOG( ( EApItem, 1, _L( "<- CVpnApItem::WriteBool" ) ) ); - return retval; + return KErrNotSupported; } @@ -588,9 +219,7 @@ // EXPORT_C TUint32 CVpnApItem::WapUid() const { - CLOG( ( EApItem, 0, _L( "<-> CVpnApItem::WapUid" ) ) ); - - return iVpnWapId; + return 0; } @@ -600,9 +229,7 @@ // EXPORT_C const TDesC& CVpnApItem::Name() const { - CLOG( ( EApItem, 0, _L( "<-> CVpnApItem::Name" ) ) ); - - return *iName; + User::Leave( KErrNotSupported ); } @@ -613,16 +240,6 @@ // void CVpnApItem::ReAllocL(HBufC*& aDes, const TDesC16& aValue) { - CLOG( ( EApItem, 0, _L( "-> CVpnApItem::ReAllocL" ) ) ); - - // now remove 'invalid' chars (TABs) as they cause problems - // in other places, like listboxes... - HBufC* tmp = RemoveInvalidCharsLC( aValue ); - delete aDes; - aDes = tmp; - CleanupStack::Pop( tmp ); - - CLOG( ( EApItem, 1, _L( "<- CVpnApItem::ReAllocL" ) ) ); } @@ -633,24 +250,7 @@ // HBufC* CVpnApItem::RemoveInvalidCharsLC( const TDesC16& aInText ) { - CLOG( ( EApItem, 0, _L( "-> CVpnApItem::RemoveInvalidCharsLC" ) ) ); - - TInt size = aInText.Length(); - HBufC* aOutText = HBufC::NewLC( size ); - TPtr ptr = aOutText->Des(); - - for ( TInt ii=0; ii CVpnApItem::HasProxy" ) ) ); - - TBool retval ( EFalse ); - - if ( ( iProxyServerAddress->Compare( KDynIpAddress ) - && iProxyServerAddress->Compare( KEmpty ) ) - && ( iProxyPort != 0 ) ) - { - retval = ETrue; - } - - CLOG( ( EApItem, 0, _L( "<- CVpnApItem::HasProxy" ) ) ); - - return retval; + return EFalse; } // End of File diff -r 84c6623982f6 -r ed07dcc72692 apengine/apeng/src/aplistitemlist.cpp --- a/apengine/apeng/src/aplistitemlist.cpp Fri Sep 17 08:32:43 2010 +0300 +++ b/apengine/apeng/src/aplistitemlist.cpp Mon Oct 04 00:43:42 2010 +0300 @@ -49,11 +49,6 @@ // EXPORT_C CApListItemList::~CApListItemList() { - CLOG( ( EApList, 0, _L( "-> CApListItemList::~CApListItemList" ) ) ); - - ResetAndDestroy(); - - CLOG( ( EApList, 1, _L( "<- CApListItemList::~CApListItemList" ) ) ); } // --------------------------------------------------------- @@ -62,22 +57,6 @@ // EXPORT_C CApListItem* CApListItemList::ItemForUid( TUint32 aUid ) const { - CLOG( ( EApList, 0, _L( "-> CApListItemList::ItemForUid" ) ) ); - - // This method cannot return "const CApListItem*", because all methods - // of CApListItem are non-const -> if the returned item was const, it - // would be unusable. - TInt i; - TInt count = Count(); - for ( i = 0; i < count; i++ ) - { - if ( At( i )->Uid() == aUid ) - { - return At( i ); - } - } - - CLOG( ( EApList, 0, _L( "-> CApListItemList::ItemForUid" ) ) ); return NULL; } diff -r 84c6623982f6 -r ed07dcc72692 apengine/apeng/src/apnetworkitemlist.cpp --- a/apengine/apeng/src/apnetworkitemlist.cpp Fri Sep 17 08:32:43 2010 +0300 +++ b/apengine/apeng/src/apnetworkitemlist.cpp Mon Oct 04 00:43:42 2010 +0300 @@ -40,7 +40,6 @@ EXPORT_C CApNetworkItemList::CApNetworkItemList() : CArrayPtrFlat( KGranularity ) { - CLOG( ( ENetworks, 0, _L( "<-> CApNetworkItem::CApNetworkItemList" ) ) ); } // Destructor @@ -50,11 +49,6 @@ // EXPORT_C CApNetworkItemList::~CApNetworkItemList() { - CLOG( ( ENetworks, 0, _L( "-> CApNetworkItem::~CApNetworkItemList" ) ) ); - - ResetAndDestroy(); - - CLOG( ( ENetworks, 1, _L( "<- CApNetworkItem::~CApNetworkItemList" ) ) ); } @@ -65,19 +59,6 @@ EXPORT_C const CApNetworkItem* CApNetworkItemList::ItemForUid ( TUint32 aUid ) const { - CLOG( ( ENetworks, 0, _L( "-> CApNetworkItem::ItemForUid" ) ) ); - - TInt i; - TInt count = Count(); - for ( i = 0; i < count; i++ ) - { - if ( At( i )->Uid() == aUid ) - { - return At( i ); - } - } - - CLOG( ( ENetworks, 1, _L( "<- CApNetworkItem::ItemForUid" ) ) ); return NULL; } diff -r 84c6623982f6 -r ed07dcc72692 apengine/apsettingshandlerui/src/AccessPointTextSettingPage.cpp --- a/apengine/apsettingshandlerui/src/AccessPointTextSettingPage.cpp Fri Sep 17 08:32:43 2010 +0300 +++ b/apengine/apsettingshandlerui/src/AccessPointTextSettingPage.cpp Mon Oct 04 00:43:42 2010 +0300 @@ -40,8 +40,6 @@ TBool aIsLatin ) :CAknTextSettingPage( aResourceID, aText, aTextSettingPageFlags ) { - APSETUILOGGER_ENTERFN( EOther,"TxtSetPage::CAccessPointTextSettingPage<->") - iIsLatin = aIsLatin; } @@ -63,8 +61,6 @@ :CAknTextSettingPage( aSettingTitleText, aSettingNumber, aControlType, aEditorResourceId, aSettingPageResourceId, aText, aTextSettingPageFlags ) { - APSETUILOGGER_ENTERFN( EOther,"TxtSetPage::CAccessPointTextSettingPage<->") - iIsLatin = aIsLatin; } // --------------------------------------------------------- @@ -73,22 +69,6 @@ // void CAccessPointTextSettingPage::ConstructL() { - APSETUILOGGER_ENTERFN( EOther,"TxtSetPage::ConstructL") - - CAknTextSettingPage::ConstructL(); - FeatureManager::InitializeLibL(); - TBool avkonElaf = FeatureManager::FeatureSupported( KFeatureIdAvkonELaf ); - FeatureManager::UnInitializeLib(); - if ( avkonElaf && iIsLatin ) - { - CAknInputLanguageInfo* inputLangInfo = - AknInputLanguageInfoFactory::CreateInputLanguageInfoL(); - TextControl()->SetAknEditorLocalLanguage - ( inputLangInfo->UrlLanguage() ); - delete inputLangInfo; - } - - APSETUILOGGER_LEAVEFN( EOther,"TxtSetPage::ConstructL") } // End of File diff -r 84c6623982f6 -r ed07dcc72692 apengine/apsettingshandlerui/src/ApMultiLineDataQueryDialog.cpp --- a/apengine/apsettingshandlerui/src/ApMultiLineDataQueryDialog.cpp Fri Sep 17 08:32:43 2010 +0300 +++ b/apengine/apsettingshandlerui/src/ApMultiLineDataQueryDialog.cpp Mon Oct 04 00:43:42 2010 +0300 @@ -34,18 +34,7 @@ TDes& aText1, TDes& aText2, TTone aTone ) { - APSETUILOGGER_ENTERFN( EOther,"MultiQuery::NewL") - - CApMultiLineDataQueryDialog* self = - new (ELeave) CApMultiLineDataQueryDialog(aTone); - CleanupStack::PushL(self); - - self->SetDataL( aText1, aText2 ); - - CleanupStack::Pop(self); - - APSETUILOGGER_LEAVEFN( EOther,"MultiQuery::NewL") - return self; + return NULL; } @@ -56,7 +45,6 @@ CApMultiLineDataQueryDialog::CApMultiLineDataQueryDialog( const TTone& aTone ) : CAknMultiLineDataQueryDialog( aTone ) { - APSETUILOGGER_ENTERFN( EOther,"MultiQuery::CApMultiLineDataQueryDialog<->") } @@ -66,12 +54,6 @@ // void CApMultiLineDataQueryDialog::UpdateLeftSoftKeyL() { - APSETUILOGGER_ENTERFN( EOther,"MultiQuery::UpdateLeftSoftKeyL") - - CAknMultiLineDataQueryDialog::UpdateLeftSoftKeyL(); - MakeLeftSoftkeyVisible( ETrue ); - - APSETUILOGGER_LEAVEFN( EOther,"MultiQuery::UpdateLeftSoftKeyL") } // End of File diff -r 84c6623982f6 -r ed07dcc72692 apengine/apsettingshandlerui/src/ApNetSelPopupList.cpp --- a/apengine/apsettingshandlerui/src/ApNetSelPopupList.cpp Fri Sep 17 08:32:43 2010 +0300 +++ b/apengine/apsettingshandlerui/src/ApNetSelPopupList.cpp Mon Oct 04 00:43:42 2010 +0300 @@ -55,19 +55,7 @@ CDesCArrayFlat* aItemArray, TBool aNeedsNone ) { - APSETUILOGGER_ENTERFN( EListbox,"NetSelPopup::NewL") - - CApNetSelPopupList* self = - new ( ELeave ) CApNetSelPopupList( - aModel, aHandler, - aCurrentSelectionIndex, - aPreferredUid, aItemArray, - aEventStore, aNeedsNone - ); -// till that point, object is only partially constructed! - - APSETUILOGGER_LEAVEFN( EListbox,"NetSelPopup::NewL") - return self; + return NULL; } @@ -77,46 +65,12 @@ // void CApNetSelPopupList::ConstructL() { - APSETUILOGGER_ENTERFN( EListbox,"NetSelPopup::ConstructL") - - FeatureManager::InitializeLibL(); - iHelpSupported = FeatureManager::FeatureSupported( KFeatureIdHelp ); - iProtectionSupported = FeatureManager::FeatureSupported( - KFeatureIdSettingsProtection ); - FeatureManager::UnInitializeLib(); - - CAknRadioButtonSettingPage::ConstructL(); - iList = ListBoxControl(); - iModel = new( ELeave )CApNetSelectorListboxModel(); - iList->Model()->SetItemTextArray( iModel ); - FillListBoxWithDataL(); - iDataModel->Database()->AddObserverL( this ); - - APSETUILOGGER_LEAVEFN( EListbox,"NetSelPopup::ConstructL") } // Destructor CApNetSelPopupList::~CApNetSelPopupList() { - APSETUILOGGER_ENTERFN( EListbox,"NetSelPopup::~CApNetSelPopupList") - - if ( iDataModel ) - { - if ( iDataModel->Database() ) - { - // must remove observer here as there is a chance that we do not exit - // through the standard way but through Leave(KErrLeaveWithoutAlert)... - iDataModel->Database()->RemoveObserver( this ); - } - } - if ( iModel ) - { - iModel->ResetAndDestroy(); - delete iModel; - } - - APSETUILOGGER_LEAVEFN( EListbox,"NetSelPopup::~CApNetSelPopupList") } @@ -151,25 +105,6 @@ // void CApNetSelPopupList::SetHighlighted() { - APSETUILOGGER_ENTERFN( EListbox,"NetSelPopup::SetHighlighted") - - if ( iPreferredUid ) - { - TInt err( KErrNone ); - TInt idx = iModel->Item4Uid( iPreferredUid, err ); - // if UID exists, set as current, else set 0 as current. - if ( err == KErrNone ) - { - iList->SetCurrentItemIndexAndDraw( idx ); - iPreferredUid = 0; - } - else - { - iList->SetCurrentItemIndexAndDraw( 0 ); - } - } - - APSETUILOGGER_LEAVEFN( EListbox,"NetSelPopup::SetHighlighted") } @@ -179,11 +114,6 @@ // void CApNetSelPopupList::GetHelpContext(TCoeHelpContext& aContext) const { - APSETUILOGGER_ENTERFN( EListbox,"NetSelPopup::GetHelpContext") - - aContext.iMajor = iHandler->iHelpMajor; - - APSETUILOGGER_LEAVEFN( EListbox,"NetSelPopup::GetHelpContext") } @@ -194,35 +124,6 @@ // void CApNetSelPopupList::HandleApDbEventL( TEvent anEvent ) { - APSETUILOGGER_ENTERFN( EListbox,"NetSelPopup::HandleApDbEventL") - - switch ( anEvent ) - { - case EDbChanged: - { - FillListBoxWithDataL(); - break; - } - case EDbClosing: - { - break; - } - case EDbAvailable: - { - if ( iNeedUnlock ) - { - FillListBoxWithDataL(); - } - break; - } - default: - { - __ASSERT_DEBUG( EFalse, Panic( EUnknownCase ) ); - break; - } - } - - APSETUILOGGER_LEAVEFN( EListbox,"NetSelPopup::HandleApDbEventL") } @@ -234,11 +135,6 @@ // void CApNetSelPopupList::ActivateL() { - APSETUILOGGER_ENTERFN( EListbox,"NetSelPopup::ActivateL") - - CAknRadioButtonSettingPage::ActivateL(); - - APSETUILOGGER_LEAVEFN( EListbox,"NetSelPopup::ActivateL") } @@ -250,16 +146,6 @@ // void CApNetSelPopupList::SelectCurrentItemL() { - APSETUILOGGER_ENTERFN( EListbox,"NetSelPopup::SelectCurrentItemL") - - CAknRadioButtonSettingPage::SelectCurrentItemL(); - TInt idx = iList->CurrentItemIndex(); - if ( idx >= 0 ) - { - *iSelected = iModel->At( idx )->Uid(); - } - - APSETUILOGGER_LEAVEFN( EListbox,"NetSelPopup::SelectCurrentItemL") } @@ -271,29 +157,7 @@ // TBool CApNetSelPopupList::OkToExitL( TInt aButtonId ) { - APSETUILOGGER_ENTERFN( EListbox,"NetSelPopup::OkToExitL") - - // Translate the button presses into commands for the appui & current - // view to handle. - // This is a very good thing, that aButtonId is a TInt, - // but the caller ( CAknSettingPage ) simply uses a TBool. - // The value of ETrue means the button usually for Yes, Ok, Options, etc - // and EFalse means Back, Cancel, etc. - // so we must act according to a boolean value and not - // according to the real button id... - TBool IsAccepted = aButtonId; - - if ( IsAccepted ) - { - TInt idx = iList->CurrentItemIndex(); - if ( idx >= 0 ) - { - *iSelected = iModel->At( idx )->Uid(); - } - } - - APSETUILOGGER_LEAVEFN( EListbox,"NetSelPopup::OkToExitL") - return ETrue; + return EFalse; } @@ -305,60 +169,6 @@ // void CApNetSelPopupList::FillListBoxWithDataL() { - APSETUILOGGER_ENTERFN( EListbox,"NetSelPopup::FillListBoxWithDataL") - - iPreferredLine = iList->CurrentItemIndex(); - if ( iPreferredLine < 0 ) - { - iPreferredLine = 0; - } - - if ( !iPreferredUid ) - { // if not specified explicitly, get current and use as 'preferred' - if ( iPreferredLine >= 0 ) - { - if ( iModel->Count() ) - { - iPreferredUid = iModel->At( iPreferredLine )->Uid(); - } - } - } - - TBool isLocked(EFalse); - iNeedUnlock = EFalse; - - iDataModel->NetWorkListDataL( isLocked, *iModel ); - - if ( isLocked ) - { - iNeedUnlock = ETrue; - } - - iList->View()->SetDisableRedraw( ETrue ); - - if ( iNeedsNone ) - { - HBufC* buf = iEikonEnv->AllocReadResourceLC( R_APUI_VIEW_AP_NONE ); - CApNetworkItem* NoneItem = CApNetworkItem::NewLC(); - NoneItem->SetUid( KApNoneUID ); - NoneItem->SetNameL( *buf ); - iModel->InsertL( 0, NoneItem ); - // as InsertL passes ownership of item to array, - // remove from cleanupstack - CleanupStack::Pop(); // NoneItem, as ownership is passed to array - CleanupStack::PopAndDestroy(); // buf, as item has copied it... - } - - iList->HandleItemAdditionL(); - - SetSelectedL(); - - SetHighlighted(); - - iList->View()->SetDisableRedraw( EFalse ); - iList->HandleItemAdditionL(); - - APSETUILOGGER_LEAVEFN( EListbox,"NetSelPopup::FillListBoxWithDataL") } @@ -368,28 +178,6 @@ // void CApNetSelPopupList::SetSelectedL() { - APSETUILOGGER_ENTERFN( EListbox,"NetSelPopup::SetSelectedL") - - TInt i( 0 ); - for( i=0; iCount(); i++ ) - { - if ( iModel->At( i )->Uid() == TUint32( *iSelected ) ) - { - iList->SetCurrentItemIndexAndDraw( i ); - HandleListBoxEventL(iList, - MEikListBoxObserver::EEventItemSingleClicked); - /* HandleListBoxEventL(iList, - MEikListBoxObserver::EEventItemDoubleClicked);*/ - return; //exit here - } - } - iList->SetCurrentItemIndexAndDraw( 0 );//set something that does no harm... - HandleListBoxEventL(iList, - MEikListBoxObserver::EEventItemSingleClicked ); // simulate selection... - /*HandleListBoxEventL(iList, - MEikListBoxObserver::EEventItemDoubleClicked);*/ - - APSETUILOGGER_LEAVEFN( EListbox,"NetSelPopup::SetSelectedL") } @@ -402,34 +190,6 @@ void CApNetSelPopupList::DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ) { - APSETUILOGGER_ENTERFN( EListbox,"NetSelPopup::DynInitMenuPaneL") - - CAknSettingPage::DynInitMenuPaneL( aResourceId, aMenuPane ); - if ( aResourceId == R_APSETTINGSUI_MENU_NETWORK ) - { - if ( Need2DeleteSelect( aResourceId ) ) - { - aMenuPane->DeleteMenuItem( EApSelCmdSelect ); - } - if ( Need2DeleteOpenDelete( aResourceId ) ) - { - aMenuPane->DeleteMenuItem( EApSelCmdDelete ); - } - if ( iProtectionSupported ) - { - if ( CApProtHandler::IsTableProtectedL( - iDataModel->Database()->Database() ) ) - { - aMenuPane->DeleteMenuItem( EApSelCmdNew ); - } - } - if ( !iHelpSupported ) - { - aMenuPane->DeleteMenuItem( EAknCmdHelp ); - } - } - - APSETUILOGGER_LEAVEFN( EListbox,"NetSelPopup::DynInitMenuPaneL") } @@ -440,121 +200,6 @@ // void CApNetSelPopupList::ProcessCommandL( TInt aCommandId ) { - APSETUILOGGER_ENTERFN( EListbox,"NetSelPopup::ProcessCommandL") - - if ( MenuShowing() ) - { - HideMenu(); - } - - switch ( aCommandId ) - { - case EAknSoftkeyOptions: - { - DisplayMenuL(); - break; - } - case EAknSoftkeyBack: - { - AttemptExitL( EFalse ); - break; - } - case EAknSoftkeyCancel: - { - *iEventStore |= KApUiEventShutDownRequested; - AttemptExitL( EFalse ); - break; - } - case EApSelCmdSelect: - { - *iEventStore |= KApUiEventSelected; - AttemptExitL( ETrue ); - break; - } - case EApSelCmdNew: - { - // create a new network group here - if ( HandleCreateNewNetworkGroupL() ) - { - SetHighlighted(); - } - break; - } - case EApSelCmdDelete: - { - // As it might have been started by the Clear key, - // we must check if there is any... - TInt cnt = iModel->Count(); - if ( ( iNeedsNone & ( cnt > 1 ) ) || ( !iNeedsNone && cnt ) ) - { - // as we must be standing on an item, it must exists... - // So no problem on iModel->At( ...) - if ( iList->CurrentItemIndex() < ( iModel->Count()-1 ) ) - {// move to next one if possible - iPreferredUid = iModel->At( - iList->CurrentItemIndex()+1 )->Uid(); - } - else - { // if it is the last, move to previous if possible. - // if not, set to 0 - if ( iModel->Count()> 1 ) - {// move to prev. one if possible - iPreferredUid = iModel->At( - iList->CurrentItemIndex()-1 )->Uid(); - } - else - { - iPreferredUid = 0; - } - } - iHandler->HandleNetworkDeleteCmdL( - iModel->At( iList->CurrentItemIndex() )->Uid() ); - } - break; - } - case EAknCmdHelp: - { - if ( iHelpSupported ) - { - iDataModel->LaunchHelpL(); - } - break; - } - default: - { - // silently ignore it - break; - } - } - // check if user wants to Exit.... - if ( *iEventStore & KApUiEventExitRequested ) - { - AttemptExitL( EFalse ); - } - else - { - switch ( aCommandId ) - { - case EApSelCmdExit: - { - *iEventStore |= KApUiEventExitRequested; - AttemptExitL( EFalse ); - break; - } - case EEikCmdExit: - { - *iEventStore |= KApUiEventShutDownRequested; - AttemptExitL( EFalse ); - break; - } - default: - { - break; - } - } - } - - APSETUILOGGER_LEAVEFN( EListbox,"NetSelPopup::ProcessCommandL") } @@ -567,37 +212,7 @@ TKeyResponse CApNetSelPopupList::OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType) { - APSETUILOGGER_ENTERFN( EListbox,"NetSelPopup::OfferKeyEventL") - TKeyResponse retval; - if ( aType == EEventKey ) - { - if ( ( aKeyEvent.iCode == EKeyDelete ) || - ( aKeyEvent.iCode == EKeyBackspace ) ) - { - ProcessCommandL( EApSelCmdDelete ); - retval = EKeyWasConsumed; - } - else - { - if ( aKeyEvent.iCode == EKeyOK ) - { // process only if command is available... - ProcessCommandL( EApSelCmdSelect ); - retval = EKeyWasConsumed; - } - else - { - retval = CAknRadioButtonSettingPage::OfferKeyEventL( - aKeyEvent, aType ); - } - } - } - else - { - retval = CAknRadioButtonSettingPage::OfferKeyEventL( aKeyEvent, aType ); - } - - APSETUILOGGER_LEAVEFN( EListbox,"NetSelPopup::OfferKeyEventL") - return retval; + User::Leave( KErrNotSupported ); } @@ -608,9 +223,7 @@ // TBool CApNetSelPopupList::Need2DeleteSelect( TInt aResourceId ) { - APSETUILOGGER_ENTERFN( EListbox,"NetSelPopup::Need2DeleteSelect<->") - return ( ( aResourceId == R_APSETTINGSUI_MENU_SELECT_NORMAL ) && - ( iList->Model()->NumberOfItems() == 0 ) ); + return EFalse; } @@ -621,19 +234,7 @@ // TBool CApNetSelPopupList::Need2DeleteOpenDelete( TInt aResourceId ) { - APSETUILOGGER_ENTERFN( EListbox,"NetSelPopup::Need2DeleteOpenDelete<->") - - return ( ( aResourceId == R_APSETTINGSUI_MENU_NETWORK ) && - ( - ( - ( iList->Model()->NumberOfItems() == 0) && - ( iNeedsNone == EFalse ) - ) - || - ( ( iNeedsNone ) && - ( iModel->At( iList->CurrentItemIndex() )->Uid() - == KApNoneUID ) - ) ) ); + return EFalse; } @@ -644,36 +245,7 @@ // TBool CApNetSelPopupList::HandleCreateNewNetworkGroupL() { - APSETUILOGGER_ENTERFN( EListbox,"NetSelPopup::HandleCreateNewNetworkGroupL") - - TBool retval( EFalse ); - - // must be prepared for the worst case... - TBuf textToChange; - - TInt TextSettingPageFlags( EAknSettingPageNoOrdinalDisplayed ); - - CAccessPointTextSettingPage* dlg = - new( ELeave )CAccessPointTextSettingPage( - R_TEXT_SETTING_PAGE_NETW_NAME, - textToChange, - TextSettingPageFlags, - EFalse ); - - if ( dlg->ExecuteLD( CAknSettingPage::EUpdateWhenAccepted ) ) - { - CApNetworkItem* network = CApNetworkItem::NewLC(); - network->SetUid( 0 ); // will be assigned when written toi disk - network->SetNameL( textToChange ); - iDataModel->DataHandler()->CreateNetworkL( *network ); - iPreferredUid = network->Uid(); - CleanupStack::PopAndDestroy( network ); - retval = ETrue; - } - *iEventStore |= KApUiEventEdited; - - APSETUILOGGER_LEAVEFN( EListbox,"NetSelPopup::HandleCreateNewNetworkGroupL") - return retval; + return EFalse; } // End of File diff -r 84c6623982f6 -r ed07dcc72692 apengine/apsettingshandlerui/src/ApNetSelectorListBoxModel.cpp --- a/apengine/apsettingshandlerui/src/ApNetSelectorListBoxModel.cpp Fri Sep 17 08:32:43 2010 +0300 +++ b/apengine/apsettingshandlerui/src/ApNetSelectorListBoxModel.cpp Mon Oct 04 00:43:42 2010 +0300 @@ -35,7 +35,6 @@ CApNetSelectorListboxModel::CApNetSelectorListboxModel( ) :CApNetworkItemList() { - APSETUILOGGER_ENTERFN( EListbox,"NetSelListModel::CApNetSelectorListboxModel<->") } @@ -45,11 +44,6 @@ // CApNetSelectorListboxModel::~CApNetSelectorListboxModel() { - APSETUILOGGER_ENTERFN( EListbox,"NetSelListModel::~CApNetSelectorListboxModel") - - ResetAndDestroy(); // deletes all elements... - - APSETUILOGGER_LEAVEFN( EListbox,"NetSelListModel::~CApNetSelectorListboxModel") } @@ -59,8 +53,7 @@ // TInt CApNetSelectorListboxModel::MdcaCount() const { - APSETUILOGGER_ENTERFN( EListbox,"NetSelListModel::MdcaCount<->") - return Count(); + return 0; } @@ -70,15 +63,7 @@ // TPtrC CApNetSelectorListboxModel::MdcaPoint( TInt aIndex ) const { - APSETUILOGGER_ENTERFN( EListbox,"NetSelListModel::MdcaPoint") - - // We need to cast away the const-ness from the buffer. - // It was definitely made for formatting! - FormatListboxText( aIndex, - ( MUTABLE_CAST( TBuf&, iBuf ) ) ); - - - APSETUILOGGER_LEAVEFN( EListbox,"NetSelListModel::MdcaPoint") + User::Leave( KErrNotSupported ); return iBuf; } @@ -89,25 +74,7 @@ // TInt CApNetSelectorListboxModel::Item4Uid( TUint32 aUid, TInt& aErr ) const { - APSETUILOGGER_ENTERFN( EListbox,"NetSelListModel::Item4Uid") - - aErr = KErrNone; - TInt retval( KErrNotFound ); - for ( TInt i=0; iUid() == aUid ) - { - retval = i; - break; - } - } - if ( retval == KErrNotFound ) - { - aErr = KErrNotFound; - } - - APSETUILOGGER_LEAVEFN( EListbox,"NetSelListModel::Item4Uid") - return retval; + return KErrNotSupported; } @@ -119,17 +86,6 @@ void CApNetSelectorListboxModel::FormatListboxText( TInt aIndex, TDes& aBuf ) const { - APSETUILOGGER_ENTERFN( EListbox,"NetSelListModel::FormatListboxText") - - aBuf.Format( - KListItemFormatGraphicOnOff, - 1, - Min( At( aIndex )->Name().Length(), - KMaxListItemNameLength ), - &At( aIndex )->Name() - ); - - APSETUILOGGER_LEAVEFN( EListbox,"NetSelListModel::FormatListboxText") } // End of File diff -r 84c6623982f6 -r ed07dcc72692 apengine/apsettingshandlerui/src/ApSelPopupList.cpp --- a/apengine/apsettingshandlerui/src/ApSelPopupList.cpp Fri Sep 17 08:32:43 2010 +0300 +++ b/apengine/apsettingshandlerui/src/ApSelPopupList.cpp Mon Oct 04 00:43:42 2010 +0300 @@ -65,22 +65,7 @@ TVpnFilterType aVpnFilterType ) { - APSETUILOGGER_ENTERFN( EListbox,"SelPopupList::NewL") - CApSelPopupList* self = - new ( ELeave ) CApSelPopupList( aModel, aHandler, - aCurrentSelectionIndex, - aPreferredUid, aSelMenuType, - aIspFilter, aBearerFilter, - aSortType, aItemArray, - aEventStore, aNeedsNone, - aNoEdit, - aReqIpvType, - aVpnFilterType - ); -// till that point, object is only partially constructed! - - APSETUILOGGER_LEAVEFN( EListbox,"SelPopupList::NewL") - return self; + return NULL; } @@ -106,24 +91,7 @@ TBool aNoEdit ) { - APSETUILOGGER_ENTERFN( EListbox,"SelPopupList::NewL2") - - CApSelPopupList* self = - new ( ELeave ) CApSelPopupList( aModel, aHandler, - aCurrentSelectionIndex, - aPreferredUid, aSelMenuType, - aIspFilter, aBearerFilter, - aSortType, aItemArray, - aEventStore, aNeedsNone, - aReqIpvType, - aVpnFilterType, - aIncludeEasyWlan, - aNoEdit - ); -// till that point, object is only partially constructed! - - APSETUILOGGER_LEAVEFN( EListbox,"SelPopupList::NewL2") - return self; + return NULL; } @@ -134,52 +102,6 @@ // void CApSelPopupList::ConstructL() { - APSETUILOGGER_ENTERFN( EListbox,"SelPopupList::ConstructL") - - FeatureManager::InitializeLibL(); - iHelpSupported = FeatureManager::FeatureSupported( KFeatureIdHelp ); - iProtectionSupported = FeatureManager::FeatureSupported( - KFeatureIdSettingsProtection ); - FeatureManager::UnInitializeLib(); - - CAknRadioButtonSettingPage::ConstructL(); - iList = ListBoxControl(); - iModel = new( ELeave )CApSelectorListboxModel( - CApSelectorListboxModel::EGraphicOnOff ); - iList->Model()->SetItemTextArray( iModel ); - if ( iProtectionSupported ) - { - TInt offset = LoadIconsL(); - iModel->SetOwnIconOffset( offset ); - } - FillListBoxWithDataL(); - iDataModel->Database()->AddObserverL( this ); - - if ( !iModel->Count() ) - { - // no ap defined, ask query if editable, - // show note if not - if ( iNoEdit ) - { - // show note first, - ShowNoteL( R_APUI_VIEW_NO_IAP_DEFINED_INFO ); - // then simply go back: - iDoExit = ETrue; - } - else - { - if ( !AskQueryL( R_APUI_IAP_CREATE_NEW ) ) - { // do not create, simply go back - iDoExit = ETrue; - } - else - { // create new AP - // just ket it pass, later in it will be handled in CheckIfEmptyL() - } - } - } - - APSETUILOGGER_LEAVEFN( EListbox,"SelPopupList::ConstructL") } @@ -187,25 +109,6 @@ // Destructor CApSelPopupList::~CApSelPopupList() { - APSETUILOGGER_ENTERFN( EListbox,"SelPopupList::~CApSelPopupList") - - if ( iDataModel ) - { - if ( iDataModel->Database() ) - { - // must remove observer here as there is a chance that we do not exit - // through the standard way but through Leave(KErrLeaveWithoutAlert)... - iDataModel->Database()->RemoveObserver( this ); - } - } - - if ( iModel ) - { - iModel->ResetAndDestroy(); - delete iModel; - } - - APSETUILOGGER_LEAVEFN( EListbox,"SelPopupList::~CApSelPopupList") } @@ -292,15 +195,6 @@ // void CApSelPopupList::SetHighlighted() { - APSETUILOGGER_ENTERFN( EListbox,"SelPopupList::SetHighlighted") - - TInt err( KErrNone ); - TInt idx = iModel->Item4Uid( iPreferredUid, err ); - - // if UID exists, set as current, else set 0 as current. - iList->SetCurrentItemIndexAndDraw( err == KErrNone ? idx : 0); - - APSETUILOGGER_LEAVEFN( EListbox,"SelPopupList::SetHighlighted") } @@ -310,11 +204,6 @@ // void CApSelPopupList::GetHelpContext(TCoeHelpContext& aContext) const { - APSETUILOGGER_ENTERFN( EListbox,"SelPopupList::GetHelpContext") - - aContext.iMajor = iHandler->iHelpMajor; - - APSETUILOGGER_LEAVEFN( EListbox,"SelPopupList::GetHelpContext") } @@ -325,35 +214,6 @@ // void CApSelPopupList::HandleApDbEventL( TEvent anEvent ) { - APSETUILOGGER_ENTERFN( EListbox,"SelPopupList::HandleApDbEventL") - - switch ( anEvent ) - { - case EDbChanged: - { - FillListBoxWithDataL(); - break; - } - case EDbClosing: - { - break; - } - case EDbAvailable: - { - if ( iNeedUnlock ) - { - FillListBoxWithDataL(); - } - break; - } - default: - { - __ASSERT_DEBUG( EFalse, Panic( EUnknownCase ) ); - break; - } - } - - APSETUILOGGER_LEAVEFN( EListbox,"SelPopupList::HandleApDbEventL") } @@ -365,20 +225,6 @@ // void CApSelPopupList::ActivateL() { - APSETUILOGGER_ENTERFN( EListbox,"SelPopupList::ActivateL") - - CAknRadioButtonSettingPage::ActivateL(); - - if (iDoExit) - { - User::Leave(KErrNone); - return; - } - - // put empty list checking & required actions here. - CheckIfEmptyL(); - - APSETUILOGGER_LEAVEFN( EListbox,"SelPopupList::ActivateL") } @@ -390,16 +236,6 @@ // void CApSelPopupList::SelectCurrentItemL() { - APSETUILOGGER_ENTERFN( EListbox,"SelPopupList::SelectCurrentItemL") - - CAknRadioButtonSettingPage::SelectCurrentItemL(); - TInt idx = iList->CurrentItemIndex(); - if ( idx >= 0 ) - { - *iSelected = iModel->At( idx )->Uid(); - } - - APSETUILOGGER_LEAVEFN( EListbox,"SelPopupList::SelectCurrentItemL") } @@ -411,29 +247,7 @@ // TBool CApSelPopupList::OkToExitL( TInt aButtonId ) { - APSETUILOGGER_ENTERFN( EListbox,"SelPopupList::OkToExitL") - - // Translate the button presses into commands for the appui & current - // view to handle. - // This is a very good thing, that aButtonId is a TInt, - // but the caller ( CAknSettingPage ) simply uses a TBool. - // The value of ETrue means the button usually for Yes, Ok, Options, etc - // and EFalse means Back, Cancel, etc. - // so we must act according to a boolean value and not - // according to the real button id... - TBool IsAccepted = aButtonId; - - if ( IsAccepted ) - { - TInt idx = iList->CurrentItemIndex(); - if ( idx >= 0 ) - { - *iSelected = iModel->At( idx )->Uid(); - } - } - - APSETUILOGGER_LEAVEFN( EListbox,"SelPopupList::OkToExitL") - return ETrue; + return EFalse; } @@ -445,59 +259,6 @@ // void CApSelPopupList::FillListBoxWithDataL() { - APSETUILOGGER_ENTERFN( EListbox,"SelPopupList::FillListBoxWithDataL") - - iPreferredLine = iList->CurrentItemIndex(); - if ( iPreferredLine < 0 ) - { - iPreferredLine = 0; - } - - TBool isLocked(EFalse); - iNeedUnlock = EFalse; - iDataModel->AllListItemDataL( isLocked, *iModel, iIspFilter, - iBearerFilter, iSortType, iReqIpvType, - iVpnFilterType, iIncludeEasyWlan ); - if ( isLocked ) - { - iNeedUnlock = ETrue; - } - - iList->View()->SetDisableRedraw( ETrue ); - - if ( iNeedsNone ) - { - HBufC* buf = iEikonEnv->AllocReadResourceLC( R_APUI_VIEW_AP_NONE ); - CApListItem* NoneItem = CApListItem::NewLC - ( - EIspTypeInternetAndWAP, KApNoneUID, - *buf, - EApBearerTypeHSCSD - ); - iModel->InsertL( 0, NoneItem ); - // as InsertL passes ownership of item to array, - // remove from cleanupstack - CleanupStack::Pop(); // NoneItem, as ownership is passed to array - CleanupStack::PopAndDestroy(); // buf, as item has copied it... - } - - iList->HandleItemAdditionL(); - - iList->View()->SetDisableRedraw( EFalse ); - iList->HandleItemAdditionL(); - - SetSelectedL(); - iPreferredUid = *iSelected; - - SetHighlighted(); - - SizeChanged(); - DrawNow(); - - CheckAndSetDataValidity(); - UpdateCbaL(); - - APSETUILOGGER_LEAVEFN( EListbox,"SelPopupList::FillListBoxWithDataL") } @@ -507,23 +268,6 @@ // void CApSelPopupList::SetSelectedL() { - APSETUILOGGER_ENTERFN( EListbox,"SelPopupList::SetSelectedL") - - TInt i( 0 ); - TInt idx( 0 );//set something that does no harm... - TInt count = iModel->Count(); - for( i=0; iAt( i )->Uid() == TUint32( *iSelected ) ) - { - idx = i; - i = count; - } - } - iList->SetCurrentItemIndexAndDraw( idx ); - SelectCurrentItemL(); - - APSETUILOGGER_LEAVEFN( EListbox,"SelPopupList::SetSelectedL") } @@ -533,16 +277,6 @@ // void CApSelPopupList::CheckIfEmptyL() { - APSETUILOGGER_ENTERFN( EListbox,"SelPopupList::CheckIfEmptyL") - - if ( !iModel->Count() ) - { - // no ap defined, create new AP - ProcessCommandL( EApSelCmdNewBlank ); - } - iInitialised = ETrue; - - APSETUILOGGER_LEAVEFN( EListbox,"SelPopupList::CheckIfEmptyL") } @@ -554,59 +288,6 @@ void CApSelPopupList::DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ) { - APSETUILOGGER_ENTERFN( EListbox,"SelPopupList::DynInitMenuPaneL") - - CAknSettingPage::DynInitMenuPaneL( aResourceId, aMenuPane ); - - TInt itemCount = iList->Model()->NumberOfItems(); - TInt idx = iList->CurrentItemIndex(); - TUint32 itemUid(0); - if ( itemCount ) - { - itemUid = iModel->At( idx )->Uid(); - } - - if ( iHandler->iModel->Need2DeleteSelect( aResourceId, itemCount ) ) - { - aMenuPane->DeleteMenuItem( EApSelCmdSelect ); - } - - if ( iHandler->iModel->Need2DeleteOpen( aResourceId, itemCount, - itemUid, iNeedsNone ) ) - { - aMenuPane->DeleteMenuItem( EApSelCmdOpen ); - } - if ( iHandler->iModel->Need2DeleteDeleteL( aResourceId, itemCount, - itemUid, iNeedsNone ) ) - { - aMenuPane->DeleteMenuItem( EApSelCmdDelete ); - } - - if ( iHandler->iModel->Need2DeleteNewUseExisting( - aResourceId, itemCount ) ) - { - aMenuPane->DeleteMenuItem( EApSelCmdNewUseExisting ); - } - if ( iHandler->iModel->Need2DeleteNewL( aResourceId ) ) - { - aMenuPane->DeleteMenuItem( EApSelCmdNewBlank ); - } - - if ( iHandler->iModel->Need2DeleteHelp( aResourceId ) ) - { - aMenuPane->DeleteMenuItem( EAknCmdHelp ); - } - - if ( aResourceId == R_APSETTINGSUI_MENU_SELECT_NORMAL ) - { - if ( iSelMenuType == EApSettingsSelMenuSelectOnly ) - { - // Disallow other menues by deleting them - aMenuPane->DeleteMenuItem( EApSelCmdExit ); - } - } - - APSETUILOGGER_LEAVEFN( EListbox,"SelPopupList::DynInitMenuPaneL") } @@ -617,157 +298,6 @@ // void CApSelPopupList::ProcessCommandL( TInt aCommandId ) { - APSETUILOGGER_ENTERFN( EListbox,"SelPopupList::ProcessCommandL") - - if ( MenuShowing() ) - { - HideMenu(); - } - - switch ( aCommandId ) - { - case EAknSoftkeyOptions: - { - DisplayMenuL(); - break; - } - case EAknSoftkeyBack: - { - AttemptExitL( EFalse ); - break; - } - case EAknSoftkeyCancel: - { - *iEventStore |= KApUiEventShutDownRequested; - AttemptExitL( EFalse ); - break; - } - case EAknSoftkeyOk: - case EApSelCmdSelect: - { - *iEventStore |= KApUiEventSelected; - - TUint32 currUid = iModel->At( iList->CurrentItemIndex() )->Uid(); - if( iPreferredUid != currUid ) - { - iPreferredUid = currUid; - SetHighlighted(); - } - - CAknRadioButtonSettingPage::SelectCurrentItemL(); - AttemptExitL( ETrue ); - break; - } - case EApSelCmdOpen: - {// as we must be standing on an item, it must exist... - // So no problem on iModel->At( ...) - iPreferredUid = iModel->At( iList->CurrentItemIndex() )->Uid(); - iHandler->DoRunViewerL( iPreferredUid ); - SetHighlighted(); - break; - } - case EApSelCmdNew: - { - break; // starts a submenu, nothing to do here - } - case EApSelCmdNewBlank: - { - iPreferredUid = iHandler->HandleApBlankNewL( - iBearerFilter, iIspFilter ); - SetHighlighted(); - break; - } - case EApSelCmdNewUseExisting: - { - TUint32 currid = iModel->At( iList->CurrentItemIndex() )->Uid(); - iPreferredUid = iHandler->HandleDuplicateL( currid ); - SetHighlighted(); - break; - } - case EApSelCmdDelete: - { - // As it might have been started by the Clear key, - // we must check if there is any... - TInt cnt = iModel->Count(); - if ( ( iNeedsNone & ( cnt > 1 ) ) || ( !iNeedsNone && cnt ) ) - { - // as we must be standing on an item, it must exists... - // So no problem on iModel->At( ...) - if ( iList->CurrentItemIndex() < ( iModel->Count()-1 ) ) - {// move to next one if possible - iPreferredUid = iModel->At( - iList->CurrentItemIndex()+1 )->Uid(); - } - else - { // if it is the last, move to previous if possible. - // if not, set to 0 - if ( iModel->Count()> 1 ) - {// move to prev. one if possible - iPreferredUid = iModel->At( - iList->CurrentItemIndex()-1 )->Uid(); - } - else - { - iPreferredUid = 0; - } - } - iHandler->HandleApDeleteCmdL( - iModel->At( iList->CurrentItemIndex() )->Uid(), - iModel->Count() == (1+iNeedsNone) ); - } - break; - } - case EAknCmdHelp: - { - if ( iHelpSupported ) - { - iDataModel->LaunchHelpL(); - } - break; - } - default: - { - // silently ignore it - break; - } - } - // check if user wants to Exit.... - if ( *iEventStore & KApUiEventExitRequested ) - { - if ( iInitialised ) - { - AttemptExitL( EFalse ); - } - else - { - *iEventStore |= KApUiEventInternal; - User::Leave(KLeaveWithoutAlert); - } - } - else - { - switch ( aCommandId ) - { - case EApSelCmdExit: - { - *iEventStore |= KApUiEventExitRequested; - AttemptExitL( EFalse ); - break; - } - case EEikCmdExit: - { - *iEventStore |= KApUiEventShutDownRequested; - AttemptExitL( EFalse ); - break; - } - default: - { - break; - } - } - } - - APSETUILOGGER_LEAVEFN( EListbox,"SelPopupList::ProcessCommandL") } @@ -775,32 +305,6 @@ void CApSelPopupList::HandleListBoxEventL( CEikListBox* aListBox, MEikListBoxObserver::TListBoxEvent aEventType ) { - APSETUILOGGER_ENTERFN( EListbox,"SelPopupList::HandleListBoxEventL") - - switch ( aEventType ) - { - case EEventEnterKeyPressed: - case EEventItemDoubleClicked: - case EEventItemSingleClicked: - { - ProcessCommandL( EApSelCmdSelect ); - break; - } - case EEventEditingStarted: - { - break; - } - case EEventEditingStopped: - { - break; - } - default: - { - CAknRadioButtonSettingPage::HandleListBoxEventL( aListBox, aEventType ); - }; - }; - - APSETUILOGGER_LEAVEFN( EListbox,"SelPopupList::HandleListBoxEventL") } @@ -812,44 +316,7 @@ TKeyResponse CApSelPopupList::OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType) { - APSETUILOGGER_ENTERFN( EListbox,"SelPopupList::OfferKeyEventL") - - TKeyResponse retval; - - if ( aType == EEventKey ) - { - if ( ( aKeyEvent.iCode == EKeyDelete ) || - ( aKeyEvent.iCode == EKeyBackspace ) ) - { - if (!iNoEdit) - { - ProcessCommandL( EApSelCmdDelete ); - } - retval = EKeyWasConsumed; - } - else - { - if ( ( aKeyEvent.iCode == EKeyOK || aKeyEvent.iCode == EKeyEnter ) && - ( ( iSelMenuType == EApSettingsSelMenuSelectOnly ) || - ( iSelMenuType == EApSettingsSelMenuSelectNormal ) ) ) - { // process only if command is available... - ProcessCommandL( EApSelCmdSelect ); - retval = EKeyWasConsumed; - } - else - { - retval = CAknRadioButtonSettingPage::OfferKeyEventL( - aKeyEvent, aType ); - } - } - } - else - { - retval = CAknRadioButtonSettingPage::OfferKeyEventL( aKeyEvent, aType ); - } - - APSETUILOGGER_LEAVEFN( EListbox,"SelPopupList::OfferKeyEventL") - return retval; + User::Leave( KErrNotSupported ); } @@ -861,69 +328,7 @@ // TInt CApSelPopupList::LoadIconsL() { - APSETUILOGGER_ENTERFN( EListbox,"SelPopupList::LoadIconsL") - - CArrayPtr< CGulIcon >* icons = - iList->ItemDrawer()->FormattedCellData()->IconArray(); - - TInt count = icons->Count(); - - MAknsSkinInstance* skinInstance = AknsUtils::SkinInstance(); - - TParse mbmFile; - User::LeaveIfError( mbmFile.Set( KFileIcons, &KDC_APP_BITMAP_DIR, NULL ) ); - - icons->AppendL( AknsUtils::CreateGulIconL( - skinInstance, - KAknsIIDQgnPropWmlGprs, - mbmFile.FullName(), - EMbmApsettingsQgn_prop_wml_gprs, - EMbmApsettingsQgn_prop_wml_gprs_mask ) ); - - icons->AppendL( AknsUtils::CreateGulIconL( - skinInstance, - KAknsIIDQgnPropWmlCsd, - mbmFile.FullName(), - EMbmApsettingsQgn_prop_wml_csd, - EMbmApsettingsQgn_prop_wml_csd_mask ) ); - - icons->AppendL( AknsUtils::CreateGulIconL( - skinInstance, - KAknsIIDQgnPropWmlHscsd, - mbmFile.FullName(), - EMbmApsettingsQgn_prop_wml_hscsd, - EMbmApsettingsQgn_prop_wml_hscsd_mask ) ); - - icons->AppendL( AknsUtils::CreateGulIconL( - skinInstance, - KAknsIIDQgnPropWmlSms, - mbmFile.FullName(), - EMbmApsettingsQgn_prop_wml_sms, - EMbmApsettingsQgn_prop_wml_sms_mask ) ); - - icons->AppendL( AknsUtils::CreateGulIconL( - skinInstance, - KAknsIIDQgnPropWlanBearer, - mbmFile.FullName(), - EMbmApsettingsQgn_prop_wlan_bearer, - EMbmApsettingsQgn_prop_wlan_bearer_mask ) ); - - icons->AppendL( AknsUtils::CreateGulIconL( - skinInstance, - KAknsIIDQgnPropWlanBearer, - mbmFile.FullName(), - EMbmApsettingsQgn_prop_wlan_easy, - EMbmApsettingsQgn_prop_wlan_easy_mask ) ); - - icons->AppendL( AknsUtils::CreateGulIconL( - skinInstance, - KAknsIIDQgnIndiSettProtectedAdd, - mbmFile.FullName(), - EMbmApsettingsQgn_indi_sett_protected_add, - EMbmApsettingsQgn_indi_sett_protected_add_mask ) ); - - APSETUILOGGER_LEAVEFN( EListbox,"SelPopupList::LoadIconsL") - return count; + return 0; } @@ -935,21 +340,6 @@ // void CApSelPopupList::HandleResourceChange(TInt aType) { - APSETUILOGGER_ENTERFN( EListbox,"SelPopupList::HandleResourceChange") - - if ( aType == KAknsMessageSkinChange ) - { - iList->HandleResourceChange( aType ); - if ( iProtectionSupported ) - { - TRAP_IGNORE( LoadIconsL() ); - } - SizeChanged(); - } - - CAknRadioButtonSettingPage::HandleResourceChange( aType ); - - APSETUILOGGER_LEAVEFN( EListbox,"SelPopupList::HandleResourceChange") } // End of File diff -r 84c6623982f6 -r ed07dcc72692 apengine/apsettingshandlerui/src/ApSelQueryDialog.cpp --- a/apengine/apsettingshandlerui/src/ApSelQueryDialog.cpp Fri Sep 17 08:32:43 2010 +0300 +++ b/apengine/apsettingshandlerui/src/ApSelQueryDialog.cpp Mon Oct 04 00:43:42 2010 +0300 @@ -47,18 +47,6 @@ // Destructor CApSelQueryDialog::~CApSelQueryDialog() { - APSETUILOGGER_ENTERFN( EOther,"SelQuery::~CApSelQueryDialog") - - if ( iDataModel ) - { - if ( iDataModel->Database() ) - { - // iModel is deleted by the ListBox because LB owns the model - iDataModel->Database()->RemoveObserver( this ); - } - } - - APSETUILOGGER_LEAVEFN( EOther,"SelQuery::~CApSelQueryDialog") } @@ -69,8 +57,6 @@ :CAknListQueryDialog( (TInt*)aIndex ), iNeedUnlock( EFalse ) { - iDataModel = &aModel; - iSelected = aIndex; } @@ -82,35 +68,6 @@ // void CApSelQueryDialog::HandleApDbEventL( TEvent anEvent ) { - APSETUILOGGER_ENTERFN( EOther,"SelQuery::HandleApDbEventL") - - switch ( anEvent ) - { - case EDbChanged: - { - FillListBoxWithDataL(); - break; - } - case EDbClosing: - { - break; - } - case EDbAvailable: - { - if ( iNeedUnlock ) - { - FillListBoxWithDataL(); - } - break; - } - default: - { - __ASSERT_DEBUG( EFalse, Panic( EUnknownCase ) ); - break; - } - } - - APSETUILOGGER_LEAVEFN( EOther,"SelQuery::HandleApDbEventL") } @@ -123,19 +80,6 @@ // void CApSelQueryDialog::PreLayoutDynInitL() { - APSETUILOGGER_ENTERFN( EOther,"SelQuery::PreLayoutDynInitL") - - // parent creates the private listbox - CAknListQueryDialog::PreLayoutDynInitL(); - // and now we get access to it... - CAknListQueryControl *control = - ( CAknListQueryControl* )Control( EListQueryControl ); - iList = control->Listbox(); - LoadIconsL(); - FillListBoxWithDataL(); - iDataModel->Database()->AddObserverL( this ); - - APSETUILOGGER_LEAVEFN( EOther,"SelQuery::PreLayoutDynInitL") } @@ -146,11 +90,6 @@ // void CApSelQueryDialog::PostLayoutDynInitL() { - APSETUILOGGER_ENTERFN( EOther,"SelQuery::PostLayoutDynInitL") - - CAknListQueryDialog::PostLayoutDynInitL(); - - APSETUILOGGER_LEAVEFN( EOther,"SelQuery::PostLayoutDynInitL") } @@ -161,39 +100,7 @@ // TBool CApSelQueryDialog::OkToExitL( TInt aButtonId ) { - APSETUILOGGER_ENTERFN( EOther,"SelQuery::OkToExitL") - - // Translate the button presses into commands for the appui & current - // view to handle - TBool retval( EFalse ); - if ( aButtonId == EAknSoftkeySelect ) - { - TInt idx = iList->CurrentItemIndex(); - if ( idx >= 0 ) - { - if ( iModel->At( iList->CurrentItemIndex() )->IsReadOnly() ) - { // read only, do not accept - // show note - ShowNoteL( R_APUI_NOTE_CANNOT_USE_PROTECTED_AP ); - retval = EFalse; - } - else - { - *iSelected = iModel->At( iList->CurrentItemIndex() )->Uid(); - retval = ETrue; - } - } - } - else - { - if ( aButtonId == EAknSoftkeyBack ) - { - retval = ETrue; - } - } - - APSETUILOGGER_LEAVEFN( EOther,"SelQuery::OkToExitL") - return retval; + return EFalse; } @@ -207,29 +114,7 @@ TKeyResponse CApSelQueryDialog::OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType) { - APSETUILOGGER_ENTERFN( EOther,"SelQuery::OfferKeyEventL") - - TKeyResponse retval; - if ( aType == EEventKey ) - { - if ( aKeyEvent.iCode == EKeyOK ) - { // process only if command is available... - ProcessCommandL( EApSelCmdSelect ); - retval = EKeyWasConsumed; - } - else - { - retval = CAknListQueryDialog::OfferKeyEventL( - aKeyEvent, aType ); - } - } - else - { - retval = CAknListQueryDialog::OfferKeyEventL( aKeyEvent, aType ); - } - - APSETUILOGGER_LEAVEFN( EOther,"SelQuery::OfferKeyEventL") - return retval; + User::Leave( KErrNotSupported ); } @@ -241,55 +126,6 @@ // void CApSelQueryDialog::ProcessCommandL( TInt aCommandId ) { - APSETUILOGGER_ENTERFN( EOther,"SelQuery::ProcessCommandL") - - if ( MenuShowing() ) - { - HideMenu(); - } - - switch ( aCommandId ) - { - case EAknSoftkeyOptions: - { - DisplayMenuL(); - break; - } - case EAknSoftkeyBack: - { - TryExitL( EFalse ); - break; - } - case EApSelCmdSelect: - { - TryExitL( EAknSoftkeySelect ); - break; - } - case EAknCmdHelp: - { - FeatureManager::InitializeLibL(); - TBool helpSupported = FeatureManager::FeatureSupported( KFeatureIdHelp ); - FeatureManager::UnInitializeLib(); - if ( helpSupported ) - { - iDataModel->LaunchHelpL(); - } - break; - } - case EApSelCmdExit: - case EEikCmdExit: - { - TryExitL( EFalse ); - break; - } - default: - { - // silently ignore it - break; - } - } - - APSETUILOGGER_LEAVEFN( EOther,"SelQuery::ProcessCommandL") } @@ -301,44 +137,6 @@ // void CApSelQueryDialog::FillListBoxWithDataL() { - APSETUILOGGER_ENTERFN( EOther,"SelQuery::FillListBoxWithDataL") - - TBool needtopop( EFalse ); - - if ( ! iModel ) - { - // we must use temp var to satisfy CodeScanner - CApSelectorListboxModel* tmp = new( ELeave )CApSelectorListboxModel( - CApSelectorListboxModel::EGraphicProtection ); - // although it will be member, but mainly owned by the listbox, - // so as long as ownership is not transferred, MUST push it - CleanupStack::PushL( tmp ); - iModel = tmp; - // we need to Pop after ownership is passed to listbox - needtopop = ETrue; - } - TBool isLocked( EFalse ); - iNeedUnlock = EFalse; - iDataModel->AllListItemDataL( isLocked, *iModel, KEApIspTypeAll, - EApBearerTypeAll, KEApSortNameAscending, - iDataModel->RequestedIPvType(), - EVpnFilterNoVpn, - EFalse ); - - if ( isLocked ) - { - iNeedUnlock = ETrue; - } - - SetItemTextArray( iModel ); - if ( needtopop ) - { - // it signals that ownership of iModel had JUST been passed, - // so we can Pop it. - CleanupStack::Pop( iModel); - } - - APSETUILOGGER_LEAVEFN( EOther,"SelQuery::FillListBoxWithDataL") } @@ -351,28 +149,6 @@ // TInt CApSelQueryDialog::LoadIconsL() { - APSETUILOGGER_ENTERFN( EOther,"SelQuery::LoadIconsL") - - CArrayPtr< CGulIcon >* icons = new( ELeave ) CAknIconArray( KGranularity ); - CleanupStack::PushL( icons ); - - MAknsSkinInstance* skinInstance = AknsUtils::SkinInstance(); - - TParse mbmFile; - User::LeaveIfError( mbmFile.Set( KFileIcons, &KDC_APP_BITMAP_DIR, NULL ) ); - - icons->AppendL( AknsUtils::CreateGulIconL( - skinInstance, - KAknsIIDQgnIndiSettProtectedAdd, - mbmFile.FullName(), - EMbmApsettingsQgn_indi_sett_protected_add, - EMbmApsettingsQgn_indi_sett_protected_add_mask ) ); - - SetIconArrayL( icons ); - - CleanupStack::Pop(); // icons - - APSETUILOGGER_LEAVEFN( EOther,"SelQuery::LoadIconsL") return 0; } diff -r 84c6623982f6 -r ed07dcc72692 apengine/apsettingshandlerui/src/ApSelectorDialog.cpp --- a/apengine/apsettingshandlerui/src/ApSelectorDialog.cpp Fri Sep 17 08:32:43 2010 +0300 +++ b/apengine/apsettingshandlerui/src/ApSelectorDialog.cpp Mon Oct 04 00:43:42 2010 +0300 @@ -55,119 +55,7 @@ TUint32 aHighLight, TUint32& aSelected ) { - APSETUILOGGER_ENTERFN( EDialog,"SelDIalog::ConstructAndRunLD") - - CleanupStack::PushL( this ); - - FeatureManager::InitializeLibL(); - iHelpSupported = FeatureManager::FeatureSupported( KFeatureIdHelp ); - FeatureManager::UnInitializeLib(); - -#ifdef __TEST_OOMDEBUG - RFs fs; - User::LeaveIfError( fs.Connect() ); - CleanupClosePushL( fs ); - TUint att; - if ( fs.Att( KTestFileName, att ) == KErrNone ) - { - iMemTestOn = ETrue; - } - else - { - iMemTestOn = EFalse; - } - CleanupStack::PopAndDestroy(); // fs, will also close it -#endif // __TEST_OOMDEBUG - - - TInt retValue = KErrNone; - - iHighLight = aHighLight; - iSelected = &aSelected; - - iDataModel = &aModel; - iHandler = &aHandler; - iVariant = iHandler->iExt->iVariant; - - TInt aMenuTitleResourceId; - switch ( iSelMenuType ) - { - case EApSettingsSelMenuSelectOnly: - { - aMenuTitleResourceId = R_APSETTINGSUI_SELECT_ONLY_MENUBAR; - break; - } - case EApSettingsSelMenuSelectNormal: - { - aMenuTitleResourceId = R_APSETTINGSUI_SELECT_NORMAL_MENUBAR; - break; - } - case EApSettingsSelMenuNormal: - default: // defensive ! treat all error cases like normal! - { - aMenuTitleResourceId = R_APSETTINGSUI_NORMAL_MENUBAR; - break; - } - } - ConstructL( aMenuTitleResourceId ); - - TInt aDlgResourceId; - switch ( iListType ) - { - case EApSettingsSelListIsPopUp: - case EApSettingsSelListIsPopUpWithNone: - { - aDlgResourceId = R_APSELECTOR_POPUP_DIALOG; - break; - } - case EApSettingsSelListIsListPane: - default:// defensive ! treat all error cases like normal! - { - aDlgResourceId = R_APSELECTOR_PANE_DIALOG; - break; - } - } - - iModel = new( ELeave )CApSelectorListboxModel; - - TBool islocked; - iDataModel->AllListItemDataL( islocked, *iModel, iIspFilter, - iBearerFilter, iSortType, - iReqIpvType ); - - - if ( !iModel->Count() ) - { - // no ap defined, ask query if editable, - // show note if not - if ( iNoEdit ) - { - // show note first, - ShowNoteL( R_APUI_VIEW_NO_IAP_DEFINED_INFO ); - // then simply go back: - User::Leave(KLeaveWithoutAlert); - } - else - { - // no ap defined, ask query - if ( !AskQueryL( R_APUI_IAP_CREATE_NEW ) ) - { // do not create, simply go back - User::Leave(KLeaveWithoutAlert); - } - else - { // create new AP - // just ket it pass, later in it will be handled in CheckIfEmptyL() - } - } - } - - CleanupStack::Pop(); // this, it will be PushL-d by executeLD... - - retValue = ExecuteLD( aDlgResourceId ); - - APSETUILOGGER_LEAVEFN( EDialog,"SelDIalog::ConstructAndRunLD") - - return retValue; + return 0; } @@ -180,40 +68,6 @@ // CApSelectorDialog::~CApSelectorDialog() { - APSETUILOGGER_ENTERFN( EDialog,"SelDIalog::~CApSelectorDialog") - - if ( iDataModel ) - { - if ( iDataModel->Database() ) - { - iDataModel->Database()->RemoveObserver( this ); - } - } - - // iModel is deleted by the ListBox because LB owns the model... - // of course only after we passed ownership... - if ( !iModelPassed ) - { - delete iModel; - } - if ( iNaviDecorator ) - { - delete iNaviDecorator; - } - if ( iTitlePane ) - { - // set old text back, if we have it... - if ( iOldTitleText ) - { - if ( iExitReason != EShutDown ) - { - TRAP_IGNORE( iTitlePane->SetTextL( *iOldTitleText ) ); - } - delete iOldTitleText; - } - } - - APSETUILOGGER_LEAVEFN( EDialog,"SelDIalog::~CApSelectorDialog") } @@ -234,17 +88,7 @@ TInt aReqIpvType ) { - APSETUILOGGER_ENTERFN( EDialog,"SelDIalog::NewL") - - CApSelectorDialog* db = - new ( ELeave )CApSelectorDialog( aListType, aSelMenuType, - aIspFilter, aBearerFilter, - aSortType, aEventStore, - aNoEdit, - aReqIpvType ); - - APSETUILOGGER_LEAVEFN( EDialog,"SelDIalog::NewL") - return db; + return NULL; } @@ -277,7 +121,6 @@ iInitialised( EFalse ), iNoEdit(aNoEdit) { - } @@ -290,32 +133,6 @@ // void CApSelectorDialog::InitTextsL() { - APSETUILOGGER_ENTERFN( EDialog,"SelDIalog::InitTextsL") - - // set pane text if neccessary... - // pane text needed if not pop-up... - __ASSERT_DEBUG( iTextOverrides, Panic( ENullPointer ) ); - if ( iListType == EApSettingsSelListIsListPane ) - { - iStatusPane = iEikonEnv->AppUiFactory()->StatusPane(); - iTitlePane = - ( CAknTitlePane* )iStatusPane->ControlL( - TUid::Uid( EEikStatusPaneUidTitle ) ); - - iOldTitleText = iTitlePane->Text()->AllocL(); - iTitlePane->SetTextL( - *iEikonEnv->AllocReadResourceLC( R_APUI_NAVI_AP ) ); - - CleanupStack::PopAndDestroy(); // resource R_APUI_NAVI_AP - - iNaviPane = ( CAknNavigationControlContainer* ) - iStatusPane->ControlL( - TUid::Uid( EEikStatusPaneUidNavi ) ); - iNaviDecorator = iNaviPane->CreateNavigationLabelL( KEmpty ); - iNaviPane->PushL( *iNaviDecorator ); - } - - APSETUILOGGER_LEAVEFN( EDialog,"SelDIalog::InitTextsL") } @@ -327,44 +144,6 @@ // void CApSelectorDialog::HandleListboxDataChangeL() { - APSETUILOGGER_ENTERFN( EDialog,"SelDIalog::HandleListboxDataChangeL") - - iPreferredLine = iList->CurrentItemIndex(); - if ( iPreferredLine < 0 ) - { - iPreferredLine = 0; - } - if ( !iPreferredUid ) - { // if not specified explicitly, get current and use as 'preferred' - if ( iPreferredLine >= 0 ) - { - if ( iModel->Count() ) - { - iPreferredUid = iModel->At( iPreferredLine )->Uid(); - } - } - } - - - TBool isLocked(EFalse); - iNeedUnlock = EFalse; - iDataModel->AllListItemDataL( isLocked, *iModel, iIspFilter, - iBearerFilter, iSortType, - iReqIpvType ); - if ( isLocked ) - { - iNeedUnlock = ETrue; - } - - iList->View()->SetDisableRedraw( ETrue ); - iList->HandleItemAdditionL(); - - SetHighlighted(); - - iList->View()->SetDisableRedraw( EFalse ); - iList->HandleItemAdditionL(); - - APSETUILOGGER_LEAVEFN( EDialog,"SelDIalog::HandleListboxDataChangeL") } @@ -376,10 +155,6 @@ // void CApSelectorDialog::SetTextOverrides( CTextOverrides *aOverrides ) { - APSETUILOGGER_ENTERFN( EDialog,"SelDIalog::SetTextOverrides<->") - - __ASSERT_DEBUG( aOverrides, Panic( ENullPointer ) ); - iTextOverrides = aOverrides; } @@ -393,15 +168,6 @@ // void CApSelectorDialog::CheckIfEmptyL() { - APSETUILOGGER_ENTERFN( EDialog,"SelDIalog::CheckIfEmptyL") - - if ( !iModel->Count() ) - { - ProcessCommandL( EApSelCmdNewBlank ); - } - iInitialised = ETrue; - - APSETUILOGGER_LEAVEFN( EDialog,"SelDIalog::CheckIfEmptyL") } @@ -413,13 +179,6 @@ // void CApSelectorDialog::ActivateL() { - APSETUILOGGER_ENTERFN( EDialog,"SelDIalog::ActivateL") - - CAknDialog::ActivateL(); - // put empty list checking & required actions here. - CheckIfEmptyL(); - - APSETUILOGGER_LEAVEFN( EDialog,"SelDIalog::ActivateL") } @@ -430,9 +189,6 @@ // void CApSelectorDialog::GetHelpContext(TCoeHelpContext& aContext) const { - APSETUILOGGER_ENTERFN( EDialog,"SelDIalog::GetHelpContext<->") - - aContext.iMajor = iHandler->iHelpMajor; } @@ -444,35 +200,6 @@ // void CApSelectorDialog::HandleApDbEventL( TEvent anEvent ) { - APSETUILOGGER_ENTERFN( EDialog,"SelDIalog::HandleApDbEventL") - - switch ( anEvent ) - { - case EDbChanged: - { - HandleListboxDataChangeL(); - break; - } - case EDbClosing: - { - break; - } - case EDbAvailable: - { - if ( iNeedUnlock ) - { - HandleListboxDataChangeL(); - } - break; - } - default: - { - __ASSERT_DEBUG( EFalse, Panic( EUnknownCase ) ); - break; - } - } - - APSETUILOGGER_LEAVEFN( EDialog,"SelDIalog::HandleApDbEventL") } @@ -480,15 +207,6 @@ // From MEikCommandObserver void CApSelectorDialog::ProcessCommandL( TInt aCommandId ) { - APSETUILOGGER_ENTERFN( EDialog,"SelDIalog::ProcessCommandL") - - if ( MenuShowing() ) - { - HideMenu(); - } - DoProcessCommandL( aCommandId ); - - APSETUILOGGER_LEAVEFN( EDialog,"SelDIalog::ProcessCommandL") } @@ -498,36 +216,6 @@ void CApSelectorDialog::HandleListBoxEventL( CEikListBox* /*aListBox*/, TListBoxEvent aEventType ) { - APSETUILOGGER_ENTERFN( EDialog,"SelDIalog::HandleListBoxEventL") - - switch ( aEventType ) - { - case EEventItemSingleClicked: - case EEventEnterKeyPressed: - // both handled in the same way for now... - case EEventItemDoubleClicked: - { - ProcessCommandL( EApSelCmdOpen ); - break; - } - case EEventItemClicked: - { - break; - } - case EEventEditingStarted: - { - break; - } - case EEventEditingStopped: - { - break; - } - default: - { - }; - }; - - APSETUILOGGER_LEAVEFN( EDialog,"SelDIalog::HandleListBoxEventL") } @@ -539,22 +227,7 @@ SEikControlInfo CApSelectorDialog::CreateCustomControlL ( TInt aControlType ) { - APSETUILOGGER_ENTERFN( EDialog,"SelDIalog::CreateCustomControlL") - - SEikControlInfo controlInfo; - controlInfo.iTrailerTextId = 0; - controlInfo.iFlags = 0; - if ( aControlType == KApSelectorListboxType ) - { - controlInfo.iControl = new ( ELeave ) CApSelectorListbox; - } - else - { - controlInfo.iControl = NULL; - } - - APSETUILOGGER_LEAVEFN( EDialog,"SelDIalog::CreateCustomControlL") - return controlInfo; + User::Leave( KErrNotSupported ); } @@ -565,49 +238,6 @@ void CApSelectorDialog::DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ) { - APSETUILOGGER_ENTERFN( EDialog,"SelDIalog::DynInitMenuPaneL") - - CAknDialog::DynInitMenuPaneL( aResourceId, aMenuPane ); - - TInt itemCount = iList->Model()->NumberOfItems(); -// TUint32 itemUid = iModel->At( iList->CurrentItemIndex() )->Uid(); - - TUint32 itemUid(0); - if ( itemCount > 0 ) - { - itemUid = iModel->At( iList->CurrentItemIndex() )->Uid(); - } - - if ( iHandler->iModel->Need2DeleteSelect( aResourceId, itemCount ) ) - { - aMenuPane->DeleteMenuItem( EApSelCmdSelect ); - } - if ( iHandler->iModel->Need2DeleteOpen( aResourceId, itemCount, - itemUid, EFalse ) ) - { - aMenuPane->DeleteMenuItem( EApSelCmdOpen ); - } - if ( iHandler->iModel->Need2DeleteDeleteL( aResourceId, itemCount, - itemUid, EFalse ) ) - { - aMenuPane->DeleteMenuItem( EApSelCmdDelete ); - } - if ( iHandler->iModel->Need2DeleteNewUseExisting( aResourceId, - itemCount ) ) - { - aMenuPane->DeleteMenuItem( EApSelCmdNewUseExisting ); - } - if ( iHandler->iModel->Need2DeleteNewL( aResourceId ) ) - { - aMenuPane->DeleteMenuItem( EApSelCmdNewBlank ); - } - - if ( iHandler->iModel->Need2DeleteHelp( aResourceId ) ) - { - aMenuPane->DeleteMenuItem( EAknCmdHelp ); - } - - APSETUILOGGER_LEAVEFN( EDialog,"SelDIalog::DynInitMenuPaneL") } @@ -619,56 +249,7 @@ TKeyResponse CApSelectorDialog::OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType) { - APSETUILOGGER_ENTERFN( EDialog,"SelDIalog::OfferKeyEventL") - - TKeyResponse retval( EKeyWasConsumed ); - if ( ( aType == EEventKey ) && - ( ( aKeyEvent.iCode == EKeyDelete ) || - ( aKeyEvent.iCode == EKeyBackspace ) ) ) - { - if (!iNoEdit) - { - ProcessCommandL( EApSelCmdDelete ); - } - } - else - { - if ( ( aType == EEventKey ) && ( aKeyEvent.iCode == EKeyOK ) ) - { // process only if command is available... - if ( iList->Model()->NumberOfItems() > 0) - { - if (!iNoEdit) - { - ProcessCommandL( EApSelCmdOpen ); - } - } - } - else - { - if ( iList ) - { - // as list IS consuming, must handle because - // it IS the SHUTDOWN... - // or, a view switch is shutting us down... - if ( aKeyEvent.iCode == EKeyEscape ) - { - ProcessCommandL( EEikCmdExit ); - retval = EKeyWasConsumed; - } - else - { - retval = iList->OfferKeyEventL( aKeyEvent, aType ); - } - } - else - { - retval = CAknDialog::OfferKeyEventL( aKeyEvent, aType ); - } - } - } - - APSETUILOGGER_LEAVEFN( EDialog,"SelDIalog::OfferKeyEventL") - return retval; + User::Leave( KErrNotSupported ); } @@ -679,23 +260,6 @@ // void CApSelectorDialog::PreLayoutDynInitL() { - APSETUILOGGER_ENTERFN( EDialog,"SelDIalog::PreLayoutDynInitL") - - iList = - STATIC_CAST( CApSelectorListbox*, Control( KApSelectorListboxId ) ); - iList->CreateScrollBarFrameL( ETrue ); - iList->ScrollBarFrame()->SetScrollBarVisibilityL - ( CEikScrollBarFrame::EOff, CEikScrollBarFrame::EAuto ); - iList->SetListBoxObserver( this ); - - iList->Model()->SetItemTextArray( iModel ); - iModelPassed = ETrue; - iList->LoadIconsL(); - HandleListboxDataChangeL(); - iList->HandleItemAdditionL(); - InitTextsL(); - - APSETUILOGGER_LEAVEFN( EDialog,"SelDIalog::PreLayoutDynInitL") } @@ -706,11 +270,6 @@ // void CApSelectorDialog::PostLayoutDynInitL() { - APSETUILOGGER_ENTERFN( EDialog,"SelDIalog::PostLayoutDynInitL") - - iDataModel->Database()->AddObserverL( this ); - - APSETUILOGGER_LEAVEFN( EDialog,"SelDIalog::PostLayoutDynInitL") } @@ -721,36 +280,7 @@ // TBool CApSelectorDialog::OkToExitL( TInt aButtonId ) { - APSETUILOGGER_ENTERFN( EDialog,"SelDIalog::OkToExitL") - - // Translate the button presses into commands for the appui & current - // view to handle - TBool retval( EFalse ); - - if ( aButtonId == EAknSoftkeyOptions ) - { - if ( iSelMenuType == EApSettingsSelMenuSelectOnly ) - { - *iSelected = iList->CurrentItemUid(); - retval = ETrue; - } - else - { - DisplayMenuL(); - } - } - else if (aButtonId == EApSelCmdOpen) - { - ProcessCommandL(aButtonId); - retval = EFalse; // don't exit the dialog - } - else - { - retval = ETrue; - } - - APSETUILOGGER_LEAVEFN( EDialog,"SelDIalog::OkToExitL") - return retval; + return EFalse; } @@ -761,47 +291,6 @@ // void CApSelectorDialog::SetHighlighted() { - APSETUILOGGER_ENTERFN( EDialog,"SelDIalog::SetHighlighted") - - TBool done( EFalse ); - - if ( iPreferredUid ) - { - TInt err( KErrNone ); - TInt idx = iModel->Item4Uid( iPreferredUid, err ); - // if UID exists, set as current, else set 0 as current. - if ( err == KErrNone ) - { - iList->SetCurrentItemIndexAndDraw( idx ); - iPreferredUid = 0; - done = ETrue; - } - } - if ( !done ) - { // try to use iPreferredLine, as previous selection had been deleted - TInt count( iModel->Count() ); - if ( count <= iPreferredLine ) - { - // less elements, preferred line is out of the screen, - // select last one - if ( count ) - { - iList->SetCurrentItemIndexAndDraw( count - 1 ); - } - else - { - iList->SetCurrentItemIndexAndDraw( 0 ); - } - done = ETrue; - } - else - { // count > iPreferredLine, select preferred line - iList->SetCurrentItemIndexAndDraw( iPreferredLine ); - done = ETrue; - } - } - - APSETUILOGGER_LEAVEFN( EDialog,"SelDIalog::SetHighlighted") } @@ -816,146 +305,6 @@ // void CApSelectorDialog::DoProcessCommandL( TInt aCommandId ) { - APSETUILOGGER_ENTERFN( EDialog,"SelDIalog::DoProcessCommandL") - - switch ( aCommandId ) - { - case EApSelCmdSelect: - { - *iSelected = iList->CurrentItemUid(); - *iEventStore |= KApUiEventSelected; - iPreferredUid = iList->CurrentItemUid(); - SetHighlighted(); - // Can not exit here, as it would delete this, - // Exit will be handled at the end of this function! - // TryExitL( EAknSoftkeyBack ); - break; - } - case EApSelCmdOpen: - { - // when using __UHEAP_MARK;/MARKEND, TitlePane old text setback is - // reported as a mem. leak, but it is not as the lifetime of - // the text is longer than this part. - iPreferredUid = iList->CurrentItemUid(); - iHandler->DoRunViewerL( iPreferredUid ); - break; - } - case EApSelCmdNewBlank: - { // put the new's UID into iPreferredUid to set highlight onto it - // when using __UHEAP_MARK;/MARKEND, TitlePane old text setback is - // reported as a mem. leak, but it is not as the lifetime of - // the text is longer than this part. - iPreferredUid = - iHandler->HandleApBlankNewL( iBearerFilter, iIspFilter ); - SetHighlighted(); - break; - } - case EApSelCmdNewUseExisting: - { // put the new's UID into iPreferredUid to set highlight onto it - // when using __UHEAP_MARK;/MARKEND, TitlePane old text setback is - // reported as a mem. leak, but it is not as the lifetime of - // the text is longer than this part. - iPreferredUid = - iHandler->HandleDuplicateL( iList->CurrentItemUid() ); - SetHighlighted(); - break; - } - case EApSelCmdDelete: - { - // put the UID of the next Ap into iPreferredUid to set - // highlight onto it... - // if next does not exists, put it onto prev. - // if no next & no prev. exists, set it to 0 (don't care). - // As it might have been started by the Clear key, - // we must check if there is any... - if ( iModel->Count() ) - { - // As we must be standing on an item, it must exist... - // So no problem on iModel->At( ...) - if ( iList->CurrentItemIndex() < ( iModel->Count()-1 ) ) - { - // move to next one if possible - iPreferredUid = - iList->Uid4Item( iList->CurrentItemIndex()+1 ); - } - else - { - // if it is the last, move to previous if possible. - // if not, set to 0 - if ( iModel->Count()> 1 ) - { - // move to prev. one if possible - iPreferredUid = - iList->Uid4Item( iList->CurrentItemIndex()-1 ); - } - else - { - iPreferredUid = 0; - } - } - iHandler->HandleApDeleteCmdL( iList->CurrentItemUid(), - iModel->Count() == 1 ); - } - break; - } - case EAknCmdHelp: - { - if ( iHelpSupported ) - { - iDataModel->LaunchHelpL(); - } - break; - } - default: - { - // silently ignore it - break; - } - } - // check if user wants to exit... - if ( *iEventStore & KApUiEventExitRequested ) - { - if ( iInitialised ) - { - TryExitL( EAknSoftkeyBack ); - } - else - { - *iEventStore |= KApUiEventInternal; - User::Leave(KLeaveWithoutAlert); - } - } - else - { // handle possible exit reasons/request here. - switch ( aCommandId ) - { - case EApSelCmdSelect: - { - TryExitL( EAknSoftkeyBack ); - break; - } - case EApSelCmdExit: - { - iExitReason = EExit; - *iEventStore |= KApUiEventExitRequested; - TryExitL( EAknSoftkeyBack ); - break; - } - case EEikCmdExit: - { - iExitReason = EShutDown; - *iEventStore |= KApUiEventShutDownRequested; - TryExitL( EAknSoftkeyBack ); - break; - } - default: - { - break; - } - } - } - - APSETUILOGGER_LEAVEFN( EDialog,"SelDIalog::DoProcessCommandL") } diff -r 84c6623982f6 -r ed07dcc72692 apengine/apsettingshandlerui/src/ApSelectorListBox.cpp --- a/apengine/apsettingshandlerui/src/ApSelectorListBox.cpp Fri Sep 17 08:32:43 2010 +0300 +++ b/apengine/apsettingshandlerui/src/ApSelectorListBox.cpp Mon Oct 04 00:43:42 2010 +0300 @@ -50,16 +50,7 @@ CApSelectorListbox* CApSelectorListbox::NewL ( const CCoeControl* aParent ) { - APSETUILOGGER_ENTERFN( EListbox,"SelListbox::NewL") - - CApSelectorListbox* listbox = - new ( ELeave ) CApSelectorListbox(); - CleanupStack::PushL( listbox ); - listbox->ConstructL( aParent, EAknListBoxSelectionList ); - CleanupStack::Pop(); // listbox - - APSETUILOGGER_LEAVEFN( EListbox,"SelListbox::NewL") - return listbox; + return NULL; } @@ -89,32 +80,7 @@ TKeyResponse CApSelectorListbox::OfferKeyEventL ( const TKeyEvent& aKeyEvent, TEventCode aType ) { - APSETUILOGGER_ENTERFN( EListbox,"SelListbox::OfferKeyEventL") - - TKeyResponse retval; - if ( aKeyEvent.iCode == EKeyOK && - !( aKeyEvent.iModifiers & EModifierShift ) - ) - { - // Enter pressed (not Shift-Enter). This will report an - // EEnterKeyPressed event sent to the observer (the view), which may - // delete this listbox. The code which processes keypresses by - // default, will continue (on the already deleted listbox), and - // will crash. So we grab this keypress here, and generate the - // same event, but after that, quit immediately! - ReportListBoxEventL( MEikListBoxObserver::EEventEnterKeyPressed ); - // By now the listbox may have been deleted! - // Do not access it after this point! - retval = EKeyWasConsumed; - } - else - { - retval = CAknSingleGraphicStyleListBox::OfferKeyEventL - ( aKeyEvent, aType ); - } - - APSETUILOGGER_LEAVEFN( EListbox,"SelListbox::OfferKeyEventL") - return retval; + User::Leave( KErrNotSupported ); } @@ -125,16 +91,6 @@ // void CApSelectorListbox::FocusChanged( TDrawNow aDrawNow ) { - APSETUILOGGER_ENTERFN( EListbox,"SelListbox::FocusChanged") - - // Do nothing until the listbox is fully constructed - // The dialogpage sets the focus before calling ConstructL - if ( iView ) - { - CAknSingleGraphicStyleListBox::FocusChanged( aDrawNow ); - } - - APSETUILOGGER_LEAVEFN( EListbox,"SelListbox::FocusChanged") } @@ -145,79 +101,6 @@ // void CApSelectorListbox::LoadIconsL() { - APSETUILOGGER_ENTERFN( EListbox,"SelListbox::LoadIconsL") - - CArrayPtr< CGulIcon >* icons = new( ELeave ) CAknIconArray( KGranularity ); - CleanupStack::PushL( icons ); - - MAknsSkinInstance* skinInstance = AknsUtils::SkinInstance(); - - TParse mbmFile; - User::LeaveIfError( mbmFile.Set( KFileIcons, &KDC_APP_BITMAP_DIR, NULL ) ); - - icons->AppendL( AknsUtils::CreateGulIconL( - skinInstance, - KAknsIIDQgnPropWmlGprs, - mbmFile.FullName(), - EMbmApsettingsQgn_prop_wml_gprs, - EMbmApsettingsQgn_prop_wml_gprs_mask ) ); - - icons->AppendL( AknsUtils::CreateGulIconL( - skinInstance, - KAknsIIDQgnPropWmlCsd, - mbmFile.FullName(), - EMbmApsettingsQgn_prop_wml_csd, - EMbmApsettingsQgn_prop_wml_csd_mask ) ); - - icons->AppendL( AknsUtils::CreateGulIconL( - skinInstance, - KAknsIIDQgnPropWmlHscsd, - mbmFile.FullName(), - EMbmApsettingsQgn_prop_wml_hscsd, - EMbmApsettingsQgn_prop_wml_hscsd_mask ) ); - - icons->AppendL( AknsUtils::CreateGulIconL( - skinInstance, - KAknsIIDQgnPropWmlSms, - mbmFile.FullName(), - EMbmApsettingsQgn_prop_wml_sms, - EMbmApsettingsQgn_prop_wml_sms_mask ) ); - - icons->AppendL( AknsUtils::CreateGulIconL( - skinInstance, - KAknsIIDQgnPropWlanBearer, - mbmFile.FullName(), - EMbmApsettingsQgn_prop_wlan_bearer, - EMbmApsettingsQgn_prop_wlan_bearer_mask ) ); - - - icons->AppendL( AknsUtils::CreateGulIconL( - skinInstance, - KAknsIIDQgnPropWlanBearer, - mbmFile.FullName(), - EMbmApsettingsQgn_prop_wlan_easy, - EMbmApsettingsQgn_prop_wlan_easy_mask ) ); - - - FeatureManager::InitializeLibL(); - TBool protsupported = FeatureManager::FeatureSupported( - KFeatureIdSettingsProtection ); - FeatureManager::UnInitializeLib(); - if ( protsupported ) - { - icons->AppendL( AknsUtils::CreateGulIconL( - skinInstance, - KAknsIIDQgnIndiSettProtectedAdd, - mbmFile.FullName(), - EMbmApsettingsQgn_indi_sett_protected_add, - EMbmApsettingsQgn_indi_sett_protected_add_mask ) ); - } - - ItemDrawer()->ColumnData()->SetIconArray( icons ); - - CleanupStack::Pop(); // icons - - APSETUILOGGER_LEAVEFN( EListbox,"SelListbox::LoadIconsL") } @@ -227,11 +110,7 @@ // TUint32 CApSelectorListbox::Uid4Item( TInt aItem ) const { - APSETUILOGGER_ENTERFN( EListbox,"SelListbox::Uid4Item<->") - - CApSelectorListboxModel* lbmodel = - STATIC_CAST( CApSelectorListboxModel*, Model()->ItemTextArray() ); - return lbmodel->At( aItem )->Uid(); + return 0; } @@ -241,19 +120,7 @@ // TUint32 CApSelectorListbox::CurrentItemUid() const { - APSETUILOGGER_ENTERFN( EListbox,"SelListbox::CurrentItemUid") - - CApSelectorListboxModel* lbmodel = - STATIC_CAST( CApSelectorListboxModel*, Model()->ItemTextArray() ); - TInt idx = CurrentItemIndex(); - TUint32 retval( 0 ); - if ( idx >= 0 ) - { - retval = lbmodel->At( idx )->Uid(); - } - - APSETUILOGGER_LEAVEFN( EListbox,"SelListbox::CurrentItemUid") - return retval; + return 0; } @@ -264,14 +131,7 @@ // const TDesC& CApSelectorListbox::CurrentItemNameL() { - APSETUILOGGER_ENTERFN( EListbox,"SelListbox::CurrentItemNameL") - - CApSelectorListboxModel* lbmodel = new( ELeave )CApSelectorListboxModel; - lbmodel = - STATIC_CAST( CApSelectorListboxModel*, Model()->ItemTextArray() ); - - APSETUILOGGER_LEAVEFN( EListbox,"SelListbox::CurrentItemNameL") - return lbmodel->At( CurrentItemIndex() )->Name(); + User::Leave( KErrNotSupported ); } @@ -281,17 +141,6 @@ // void CApSelectorListbox::HandleResourceChange(TInt aType) { - APSETUILOGGER_ENTERFN( EListbox,"SelListbox::HandleResourceChange") - - if ( aType == KAknsMessageSkinChange ) - { - TRAP_IGNORE( LoadIconsL() ); - SizeChanged(); - } - - CAknSingleGraphicStyleListBox::HandleResourceChange( aType ); - - APSETUILOGGER_LEAVEFN( EListbox,"SelListbox::HandleResourceChange") } // End of File diff -r 84c6623982f6 -r ed07dcc72692 apengine/apsettingshandlerui/src/ApSelectorListBoxModel.cpp --- a/apengine/apsettingshandlerui/src/ApSelectorListBoxModel.cpp Fri Sep 17 08:32:43 2010 +0300 +++ b/apengine/apsettingshandlerui/src/ApSelectorListBoxModel.cpp Mon Oct 04 00:43:42 2010 +0300 @@ -57,8 +57,6 @@ iFeatureInitialised(EFalse), iProtectionSupported(EFalse) { - APSETUILOGGER_ENTERFN( EListbox,"SelListboxModel::CApSelectorListboxModel<->") - iGraphicType = aGraphicType; } // --------------------------------------------------------- @@ -67,8 +65,6 @@ // CApSelectorListboxModel::~CApSelectorListboxModel() { - APSETUILOGGER_ENTERFN( EListbox,"SelListboxModel::~CApSelectorListboxModel<->") - ResetAndDestroy(); // deletes all elements... } // --------------------------------------------------------- @@ -77,9 +73,7 @@ // TInt CApSelectorListboxModel::MdcaCount() const { - APSETUILOGGER_ENTERFN( EListbox,"SelListboxModel::MdcaCount<->") - - return Count(); + return 0; } // --------------------------------------------------------- @@ -88,15 +82,7 @@ // TPtrC CApSelectorListboxModel::MdcaPoint( TInt aIndex ) const { - APSETUILOGGER_ENTERFN( EListbox,"SelListboxModel::MdcaPoint") - - // We need to cast away the const-ness from the buffer. - // It was definitely made for formatting! - FormatListboxText( aIndex, - ( MUTABLE_CAST( TBuf&, iBuf ) ) ); - - APSETUILOGGER_LEAVEFN( EListbox,"SelListboxModel::MdcaPoint") - return iBuf; + User::Leave( KErrNotSupported ); } @@ -106,25 +92,7 @@ // TInt CApSelectorListboxModel::Item4Uid( TUint32 aUid, TInt& aErr ) const { - APSETUILOGGER_ENTERFN( EListbox,"SelListboxModel::Item4Uid") - - aErr = KErrNone; - TInt retval( KErrNotFound ); - for ( TInt i=0; iUid() == aUid ) - { - retval = i; - break; - } - } - if ( retval == KErrNotFound ) - { - aErr = KErrNotFound; - } - - APSETUILOGGER_LEAVEFN( EListbox,"SelListboxModel::Item4Uid") - return retval; + return KErrNotFound; } @@ -135,9 +103,6 @@ // void CApSelectorListboxModel::SetOwnIconOffset( TInt aOffset ) { - APSETUILOGGER_ENTERFN( EListbox,"SelListboxModel::SetOwnIconOffset<->") - - iOffset = aOffset; } @@ -148,205 +113,6 @@ void CApSelectorListboxModel::FormatListboxText( TInt aIndex, TDes& aBuf ) const { - APSETUILOGGER_ENTERFN( EListbox,"SelListboxModel::FormatListboxText") - - if ( !iFeatureInitialised ) - { - TRAPD(err, FeatureManager::InitializeLibL()); - if (err == KErrNone) - { - CApSelectorListboxModel* tmp = CONST_CAST(CApSelectorListboxModel*, this); - tmp->iProtectionSupported = FeatureManager::FeatureSupported( - KFeatureIdSettingsProtection ); - FeatureManager::UnInitializeLib(); - tmp->iFeatureInitialised = ETrue; - } - } - switch ( iGraphicType ) - { - case EGraphicBearer: - { - TInt iIconId; - switch ( At( aIndex )->BearerType() ) - { - case EApBearerTypeCDMA: - { - iIconId = KCDMA_ICON_ID; - break; - } - case EApBearerTypeGPRS: - { - iIconId = KGPRS_ICON_ID; - break; - } - case EApBearerTypeCSD: - { - iIconId = KCSD_ICON_ID; - break; - } - case EApBearerTypeHSCSD: - { - iIconId = KHSCSD_ICON_ID; - break; - } - case EApBearerTypeWLAN: - { - iIconId = KWLAN_ICON_ID; - break; - } -#ifdef __TEST_LAN_BEARER - case EApBearerTypeLAN: - { - iIconId = KLAN_ICON_ID; - break; - } -#endif // __TEST_LAN_BEARER - case EApBearerTypeLANModem: - { // LANMODEM get real icon ID - iIconId = KWLAN_ICON_ID; - break; - } - default: - { - // in release, shall not leave here, - // it is checked when filled... - __ASSERT_DEBUG( EFalse, Panic( EInvalidBearerType ) ); - iIconId = KGPRS_ICON_ID; - break; - } - } - if ( iProtectionSupported ) - { - if ( At( aIndex )->IsReadOnly() ) - { - TInt iProtectedIconId = KPROTECTED_ICON_ID; - aBuf.Format( - KListItemFormatGraphicProtected, - iOffset+iIconId, - Min( At( aIndex )->Name().Length(), - KMaxListItemNameLength ), - &At( aIndex )->Name(), - iOffset+iProtectedIconId - ); - } - else - { // protection supported, but not protected - aBuf.Format( - KListItemFormatGraphicBearer, - iOffset+iIconId, - Min( At( aIndex )->Name().Length(), - KMaxListItemNameLength ), - &At( aIndex )->Name() - ); - } - } - else - { // protection not supported - aBuf.Format( - KListItemFormatGraphicBearer, - iOffset+iIconId, - Min( At( aIndex )->Name().Length(), - KMaxListItemNameLength ), - &At( aIndex )->Name() - ); - } - break; - } - case EGraphicNone: - { - aBuf.Format( - KListItemFormatGraphicNone, - Min( At( aIndex )->Name().Length(), - KMaxListItemNameLength ), - &At( aIndex )->Name() - ); - break; - } - case EGraphicOnOff: - { - if ( iProtectionSupported ) - { - TInt ProtectedIconId( 0 ); - if ( At( aIndex )->IsReadOnly() ) - { - ProtectedIconId = KPROTECTED_ICON_ID; - aBuf.Format( - KListItemFormatGraphicOnOffWithLock, - 1, - Min( At( aIndex )->Name().Length(), - KMaxListItemNameLength ), - &At( aIndex )->Name(), - iOffset + ProtectedIconId - ); - } - else - { - aBuf.Format( - KListItemFormatGraphicOnOff, - 1, - Min( At( aIndex )->Name().Length(), - KMaxListItemNameLength ), - &At( aIndex )->Name() - ); // magic Number, does not works with anything else - } - } - else - { - aBuf.Format( - KListItemFormatGraphicOnOff, - 1, - Min( At( aIndex )->Name().Length(), - KMaxListItemNameLength ), - &At( aIndex )->Name() - ); - } - break; - } - case EGraphicProtection: - { - if ( iProtectionSupported ) - { - TInt ProtectedIconId( 0 ); - if ( At( aIndex )->IsReadOnly() ) - { - ProtectedIconId = 0; - aBuf.Format( - KListItemFormatGraphicWithLock, - Min( At( aIndex )->Name().Length(), - KMaxListItemNameLength ), - &At( aIndex )->Name(), - iOffset + ProtectedIconId - ); - } - else - { - aBuf.Format( - KListItemFormatGraphicNone, - Min( At( aIndex )->Name().Length(), - KMaxListItemNameLength ), - &At( aIndex )->Name() - ); - } - } - else - { - aBuf.Format( - KListItemFormatGraphicNone, - Min( At( aIndex )->Name().Length(), - KMaxListItemNameLength ), - &At( aIndex )->Name() - ); - } - break; - } - default: - { - __ASSERT_DEBUG( EFalse, Panic( EInvalidBitmapType ) ); - break; - } - } - - APSETUILOGGER_LEAVEFN( EListbox,"SelListboxModel::FormatListboxText") } // End of File diff -r 84c6623982f6 -r ed07dcc72692 apengine/apsettingshandlerui/src/ApSettingsCommons.cpp --- a/apengine/apsettingshandlerui/src/ApSettingsCommons.cpp Fri Sep 17 08:32:43 2010 +0300 +++ b/apengine/apsettingshandlerui/src/ApSettingsCommons.cpp Mon Oct 04 00:43:42 2010 +0300 @@ -49,25 +49,7 @@ // TInt AskQueryL( TInt aResId, TDesC* aVar ) { - APSETUILOGGER_ENTERFN( EOther,"Commons::AskQueryL") - - HBufC* temp; - if ( aVar ) - { - temp = StringLoader::LoadL( aResId, *aVar ); - CleanupStack::PushL( temp ); - } - else - { - temp = CEikonEnv::Static()->AllocReadResourceLC( aResId ); - } - CAknQueryDialog* qd = - CAknQueryDialog::NewL( CAknQueryDialog::EConfirmationTone ); - TInt retval = qd->ExecuteLD( R_CONFIRMATION_QUERY, *temp ); - CleanupStack::PopAndDestroy(); // temp - - APSETUILOGGER_LEAVEFN( EOther,"Commons::AskQueryL") - return retval; + return 0; } @@ -78,73 +60,14 @@ // TInt ShowNoteL( TInt aResId, TDesC* aVar ) { - APSETUILOGGER_ENTERFN( EOther,"Commons::ShowNoteL") - - HBufC* temp; - if ( aVar ) - { - temp = StringLoader::LoadL( aResId, *aVar ); - CleanupStack::PushL( temp ); - } - else - { - temp = CEikonEnv::Static()->AllocReadResourceLC( aResId ); - } - CAknNoteDialog* dlg = - new ( ELeave ) CAknNoteDialog - ( - REINTERPRET_CAST( CEikDialog**, &dlg ), - CAknNoteDialog::ENoTone, - CAknNoteDialog::EShortTimeout - ); - dlg->PrepareLC( R_GENERAL_NOTE ); - dlg->SetTextL( *temp ); - TInt retval = dlg->RunLD(); - CleanupStack::PopAndDestroy(); // temp - - APSETUILOGGER_LEAVEFN( EOther,"Commons::ShowNoteL") - return retval; + return 0; } #ifdef __TEST_OOMDEBUG TInt GetTestStateL() { - APSETUILOGGER_ENTERFN( EOther,"Commons::GetTestStateL") - - TInt retval( 0 ); - RFs fs; - User::LeaveIfError( fs.Connect() ); - CleanupClosePushL( fs ); - TUint att; - if ( fs.Att( KTestFileName, att ) == KErrNone ) - { - RFile file; - TInt err = file.Open( fs, KTestFileName, - EFileShareAny | EFileStreamText | - EFileRead - ); - if ( err == KErrNone ) - { - TBuf8<256> buf; - err = file.Read( buf ); - if ( err == KErrNone ) - { - TInt val; - TLex8 lex( buf ); - err = lex.Val( val ); - if ( err == KErrNone ) - { - retval = val; - } - } - } - file.Close(); - } - CleanupStack::PopAndDestroy(); // fs, will also close it - - APSETUILOGGER_LEAVEFN( EOther,"Commons::GetTestStateL") - return retval; + return 0; } #endif // __TEST_OOMDEBUG diff -r 84c6623982f6 -r ed07dcc72692 apengine/apsettingshandlerui/src/ApSettingsDlg.cpp --- a/apengine/apsettingshandlerui/src/ApSettingsDlg.cpp Fri Sep 17 08:32:43 2010 +0300 +++ b/apengine/apsettingshandlerui/src/ApSettingsDlg.cpp Mon Oct 04 00:43:42 2010 +0300 @@ -125,80 +125,7 @@ TUint32& aUid, CApAccessPointItem* aItem ) { - APSETUILOGGER_ENTERFN( ESettings,"Settings::ConstructAndRunLD") - - CleanupStack::PushL( this ); - - iFeatureManagerWrapper = CFeatureManagerWrapper::NewL(); - - iHelpSupported = FeatureManager::FeatureSupported( KFeatureIdHelp ); - -#ifdef __TEST_OOMDEBUG - RFs fs; - User::LeaveIfError( fs.Connect() ); - CleanupClosePushL( fs ); - TUint att; - if ( fs.Att( KTestFileName, att ) == KErrNone ) - { - iMemTestOn = ETrue; - } - else - { - iMemTestOn = EFalse; - } - CleanupStack::PopAndDestroy(); // fs, will also close it -#endif // __TEST_OOMDEBUG - - - iUid = &aUid; - - iDataModel = &aModel; - iHandler = &aHandler; - iVariant = iHandler->iExt->iVariant; - - - CApAccessPointItem* ap = CApAccessPointItem::NewLC(); - - iBearerItemArray = - new( ELeave )CArrayPtrFlat( KBearers ); - iBearerItemArray->ResetAndDestroy(); - for ( TInt i=0; iAppendL( NULL ); - } - TApBearerType ab = ap->BearerTypeL(); - iBearerItemArray->At( BearerToArrayIndexL( ab ) ) = ap; - // Now iApItem is part of array-> destructed member var, pop it. - CleanupStack::Pop( ap ); - - iApItem = ap; - - if ( !aItem ) - { - iDataModel->AccessPointDataL( *iUid, *iApItem ); - } - else - { - iApItem->CopyFromL( *aItem ); - } - iDataModel->ClearWEPAndWPASettings(); - - iOldApItem = CApAccessPointItem::NewLC(); - CleanupStack::Pop(); // member var - - iOldApItem->CopyFromL( *iApItem ); - - iOriginalBearerType = iApItem->BearerTypeL(); - - ConstructL( R_APSETTINGS_MENUBAR ); - - SetBearerTypeL( iApItem->BearerTypeL() ); - // ExecuteLD will PushL( this ), so we have to Pop it... - CleanupStack::Pop(); // this - - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::ConstructAndRunLD") - return ExecuteLD( R_APSETTINGS_DIALOG ); + return 0; } @@ -206,50 +133,6 @@ // Destructor CApSettingsDlg::~CApSettingsDlg() { - APSETUILOGGER_ENTERFN( ESettings,"Settings::~CApSettingsDlg") - - delete iFeatureManagerWrapper; - - if ( iDataModel ) - {// Remove ourselves from observers... - iDataModel->Database()->RemoveObserver( this ); - } - - if ( iOldApItem ) - { - delete iOldApItem; - } - - if ( iNaviDecorator ) - { - delete iNaviDecorator; - } - - if ( iTitlePane ) - { - // set old text back, if we have it... - if ( iOldTitleText ) - { - if ( iExitReason != EShutDown ) - { - TRAP_IGNORE( iTitlePane->SetTextL( *iOldTitleText ) ); - } - delete iOldTitleText; - } - } - - if ( iBearerItemArray ) - { - iBearerItemArray->ResetAndDestroy(); - delete iBearerItemArray; - } - - if (iBackupApItem) - { - delete iBackupApItem; - } - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::~CApSettingsDlg") } @@ -263,63 +146,7 @@ TKeyResponse CApSettingsDlg::OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType ) { - APSETUILOGGER_ENTERFN( ESettings,"Settings::OfferKeyEventL") - - TKeyResponse retval( EKeyWasNotConsumed ); - // Only interested in standard key events - if ( aType == EEventKey ) - { - // If a menu is showing offer key events to it. - if ( CAknDialog::MenuShowing() ) - { - retval = CAknDialog::OfferKeyEventL( aKeyEvent, aType ); - } - else - { - if ( iList ) - { - // as list IS consuming, must handle because it - // IS the SHUTDOWN... - // or, a view switch is shutting us down... - if ( aKeyEvent.iCode == EKeyEscape ) - { - ProcessCommandL( EEikCmdExit ); - retval = EKeyWasConsumed; - } - else - { - retval = iList->OfferKeyEventL( aKeyEvent, aType ); - if ( iSecSettingsExitReason ) - { - if ( iSecSettingsExitReason - & KApUiEventShutDownRequested ) - { - ProcessCommandL( EAknCmdExit ); - } - else - { - if ( iSecSettingsExitReason - & KApUiEventExitRequested ) - { - ProcessCommandL( EApSelCmdExit ); - } - } - } - } - } - else - { - if ( aKeyEvent.iCode == EKeyOK ) - { - ProcessCommandL( EApSelCmdChange ); - retval = EKeyWasConsumed; - } - } - } - } - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::OfferKeyEventL") - return retval; + User::Leave( KErrNotSupported ); } @@ -336,19 +163,7 @@ TInt aReqIpvType ) { - APSETUILOGGER_ENTERFN( ESettings,"Settings::NewL") - - CApSettingsDlg* db = - new ( ELeave )CApSettingsDlg( aIspFilter, - aBearerFilter, - aSortType, - aEventStore, - aReqIpvType - ); - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::NewL") - return db; - + return NULL; } @@ -375,7 +190,6 @@ iL2Ipv4( ETrue ), iSecSettingsExitReason(0) { - iBackupApItem = NULL; } @@ -386,172 +200,7 @@ // TBool CApSettingsDlg::OkToExitL( TInt aButtonId ) { - APSETUILOGGER_ENTERFN( ESettings,"Settings::OkToExitL") - - // Translate the button presses into commands for the appui & current - // view to handle - TBool retval( EFalse ); - if ( aButtonId == EAknSoftkeyOptions ) - { - DisplayMenuL() ; - } - else - { - if ( (aButtonId == EApSelCmdChange) - || (aButtonId == EApSelCmdQuickChange)) - { - ProcessCommandL(aButtonId); - if ( iSecSettingsExitReason ) - { - if ( iSecSettingsExitReason - & KApUiEventShutDownRequested ) - { - ProcessCommandL( EAknCmdExit ); -// retval = ETrue; // exit the dialog - } - else - { - if ( iSecSettingsExitReason - & KApUiEventExitRequested ) - { - ProcessCommandL( EApSelCmdExit ); -// retval = ETrue; // exit the dialog - } - } - } - } - else - { - if ( aButtonId == EAknSoftkeyBack ) - { - if ( iLevel ) - { - TSaveAction cansave( EApNoAction ); - if ( iLevel == 2 ) - {// coming back from Ipv4 settings - // check if Wlan and has compulsory fields - if (iBearerType == EApBearerTypeWLAN) - { // WLAN - TApMember member; - cansave = CanSaveWlanCompulsoriesL( member ); - switch (cansave) - { - case EApCanSave: - { - // nothing to do in this case, simply go on. - iLevel --; - break; - } - case EApMustDelete: - { - // user said quit without save, - // restore from iBackupApItem - RestoreIpv4SettingsL(); - iLevel --; - break; - } - case EApShallGoBack: - { - // user wants to re-edit, do not come back... - // no change in iLevel - - // Set correct item to edit - switch ( member ) - { - case EApWlanIpNetMask: - case EApIspIPNetMask: - { - if ( IsWlanSupported() ) - { - SelectItem( KListIndexWLANSubnetMask ); - retval = EFalse; - } - else - { - User::Leave( KErrNotSupported ); - } - break; - } - case EApIspIPGateway: - case EApWlanIpGateway: - { - if ( IsWlanSupported() ) - { - SelectItem( KListIndexWLANDefaultGateway ); - retval = EFalse; - } - else - { - User::Leave( KErrNotSupported ); - } - break; - } - default: - {// otherwise, nothing to do... - __ASSERT_DEBUG( EFalse, Panic( EUnknownCase ) ); - break; - } - } - break; - } - case EApNoAction: - default: - { - // this is not a valid case as it always one from - // the above 3, - // nothing to do, - iLevel --; - break; - } - } - } - else - { - iLevel--; - } - } - else - { - iLevel--; - } - HandleListboxDataChangeL( EFalse ); - if ( iOldIndex >=0 ) - { - if ( cansave != EApShallGoBack ) - { - iList->SetTopItemIndex( iOldTopIndex ); - iList->SetCurrentItemIndexAndDraw( iOldIndex ); - } - if ( *iEventStore & KApUiEventExitRequested ) - { - ProcessCommandL( EApSelCmdExit ); - } - } - } - else - { - if ( iExitReason == EShutDown ) - { - retval = ETrue; - } - else - { - if ( !(*iEventStore & KApUiEventShutDownRequested ) ) - { - retval = SaveDataL( ); - } - else - { - retval = ETrue; - } - } - } - } - } - } - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::OkToExitL") - return retval; + return EFalse; } @@ -565,32 +214,6 @@ // void CApSettingsDlg::InitTextsL() { - APSETUILOGGER_ENTERFN( ESettings,"Settings::InitTextsL") - - // set pane texts - // first get StatusPane - iStatusPane = iEikonEnv->AppUiFactory()->StatusPane(); - // then get TitlePane - iTitlePane = ( CAknTitlePane* ) iStatusPane->ControlL( - TUid::Uid( EEikStatusPaneUidTitle ) ); - // if not already stored, store it for restoring - if ( !iOldTitleText ) - { - iOldTitleText = iTitlePane->Text()->AllocL(); - } - // set new titlepane text - iTitlePane->SetTextL( iApItem->ConnectionName() ); - // if not already done, clear NaviPane with adding en empty one - if ( !iNaviDecorator ) - { - iNaviPane = ( CAknNavigationControlContainer* ) - iStatusPane->ControlL( - TUid::Uid( EEikStatusPaneUidNavi ) ); - iNaviDecorator = iNaviPane->CreateNavigationLabelL( KEmpty ); - iNaviPane->PushL( *iNaviDecorator ); - } - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::InitTextsL") } @@ -603,24 +226,6 @@ void CApSettingsDlg::DynInitMenuPaneL ( TInt aResourceId, CEikMenuPane* aMenuPane ) { - APSETUILOGGER_ENTERFN( ESettings,"Settings::DynInitMenuPaneL") - - CAknDialog::DynInitMenuPaneL( aResourceId, aMenuPane ); - if ( aResourceId == R_APSETTINGS_MENU ) - { - if ( iLevel ) - { - // Disallow Advanced settings item if already in advanced - // or in SMS. - aMenuPane->DeleteMenuItem( EApSelCmdAdvanced ); - } - if ( !iHelpSupported ) - { - aMenuPane->DeleteMenuItem( EAknCmdHelp ); - } - } - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::DynInitMenuPaneL") } @@ -632,84 +237,6 @@ // void CApSettingsDlg::HandleListboxDataChangeL( TBool aReRead ) { - APSETUILOGGER_ENTERFN( ESettings,"Settings::HandleListboxDataChangeL") - - if ( aReRead && ( *iUid != KApNoneUID ) ) - { // reload the whole ApItem ! - // if it does not yet exists, no need to do so... - iDataModel->AccessPointDataL( *iUid, *iApItem ); - iDataModel->ClearWEPAndWPASettings(); - } - - iBearerType = iApItem->BearerTypeL(); - - // fill up our new list with data - CDesCArrayFlat* ItemArray = new ( ELeave ) CDesCArrayFlat( 4 ); - CleanupStack::PushL( ItemArray ); - switch ( iLevel ) - { - case 0: - { - FillListWithDataL( *ItemArray, *iField, iFieldCount, - iTitles, iCompulsory ); - break; - } - case 1: - { - FillListWithDataL( *ItemArray, *iFieldAdvanced, - iAdvancedFieldCount, iTitlesAdvanced, - iCompulsoryAdvanced ); - break; - } - case 2: - { - FillListWithDataL( *ItemArray, *iFieldL2, iFieldCountL2, - iTitlesL2, iCompulsoryL2 ); - break; - } - default: - { - __ASSERT_DEBUG( EFalse, Panic( EUnknownCase ) ); - break; - } - } - - - // if not already stored, store it for restoring - if ( !iOldTitleText ) - { - iOldTitleText = iTitlePane->Text()->AllocL(); - } - // set new title text - if ( iLevel == 2 ) - { - HBufC* value; - if ( iL2Ipv4 ) - { - value = iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_IPV4_SETTINGS ); - } - else - { - value = iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_IPV6_SETTINGS ); - } - iTitlePane->SetTextL( *value ); - CleanupStack::PopAndDestroy( value ); - } - else - { - iTitlePane->SetTextL( iApItem->ConnectionName() ); - } - - iList->Model()->SetItemTextArray( ItemArray ); - // now it is owned by the LB, so pop it - CleanupStack::Pop(); // do not destroy ! - iItemArray = ItemArray; - - iList->HandleItemAdditionL(); - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::HandleListboxDataChangeL") } @@ -720,10 +247,6 @@ // void CApSettingsDlg::SetTextOverrides( CTextOverrides* aOverrides ) { - APSETUILOGGER_ENTERFN( ESettings,"Settings::SetTextOverrides<->") - - __ASSERT_DEBUG( aOverrides, Panic( ENullPointer ) ); - iTextOverrides = aOverrides; } @@ -735,31 +258,6 @@ // void CApSettingsDlg::HandleApDbEventL( TEvent anEvent ) { - APSETUILOGGER_ENTERFN( ESettings,"Settings::HandleApDbEventL") - - switch ( anEvent ) - { - case EDbChanged: - { - HandleListboxDataChangeL( ETrue ); - break; - } - case EDbClosing: - { - break; - } - case EDbAvailable: - { - break; - } - default: - { - __ASSERT_DEBUG( EFalse, Panic( EUnknownCase ) ); - break; - } - } - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::HandleApDbEventL") } @@ -770,11 +268,6 @@ // void CApSettingsDlg::GetHelpContext(TCoeHelpContext& aContext) const { - APSETUILOGGER_ENTERFN( ESettings,"Settings::GetHelpContext") - - aContext.iMajor = iHandler->iHelpMajor; - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::GetHelpContext") } @@ -785,23 +278,6 @@ // void CApSettingsDlg::PreLayoutDynInitL() { - APSETUILOGGER_ENTERFN( ESettings,"Settings::PreLayoutDynInitL") - - InitTextsL(); - - iList = STATIC_CAST( CAknSettingStyleListBox*, - Control( KApSettingsListboxId ) ); - - iList->CreateScrollBarFrameL( ETrue ); - iList->ScrollBarFrame()->SetScrollBarVisibilityL - ( CEikScrollBarFrame::EOff, CEikScrollBarFrame::EAuto ); - HandleListboxDataChangeL( EFalse ); - iList->SetCurrentItemIndex( 0 ); - iList->SetListBoxObserver( this ); - - iDataModel->Database()->AddObserverL( this ); - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::PreLayoutDynInitL") } @@ -810,74 +286,6 @@ // From MEikCommandObserver void CApSettingsDlg::ProcessCommandL( TInt aCommandId ) { - APSETUILOGGER_ENTERFN( ESettings,"Settings::ProcessCommandL") - - if ( MenuShowing() ) - { - HideMenu(); - } - - switch ( aCommandId ) - { - case EApSelCmdQuickChange: - { - ChangeSettingsL( ETrue ); - break; - } - case EApSelCmdChange: - { - ChangeSettingsL( EFalse ); - break; - } - case EApSelCmdAdvanced: - { - if ( iLevel == 0 ) - { - iLevel ++; - iOldIndex = iList->CurrentItemIndex(); - iOldTopIndex = iList->TopItemIndex(); - iList->SetCurrentItemIndex( 0 ); - TRAPD( err, HandleListboxDataChangeL( EFalse ) ); - if ( err ) - { - iLevel--; - User::Leave( err ); - } - } - break; - } - case EAknCmdHelp: - { - if ( iHelpSupported ) - { - iDataModel->LaunchHelpL(); - } - break; - } -// case EAknSoftkeyBack: - case EApSelCmdExit: - { - iExitReason = EExit; - *iEventStore |= KApUiEventExitRequested; - TryExitL( EAknSoftkeyBack ); - break; - } - case EAknCmdExit: - case EEikCmdExit: - { - *iEventStore |= KApUiEventShutDownRequested; - iExitReason = EShutDown; - TryExitL( EAknSoftkeyBack ); - break; - } - default: - { - // silently ignore it - break; - } - } - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::ProcessCommandL") } @@ -885,37 +293,6 @@ void CApSettingsDlg::HandleListBoxEventL( CEikListBox* /*aListBox*/, TListBoxEvent aEventType ) { - APSETUILOGGER_ENTERFN( ESettings,"Settings::HandleListBoxEventL") - - switch ( aEventType ) - { - case EEventEnterKeyPressed: - // both handled in the same way for now... - case EEventItemDoubleClicked: - case EEventItemSingleClicked: - { - ChangeSettingsL( ETrue ); - break; - } - case EEventItemClicked: - { - break; - } - case EEventEditingStarted: - { - break; - } - case EEventEditingStopped: - { - break; - } - default: - { -// __ASSERT_DEBUG( EFalse, Panic( EUnknownCase ) ); - }; - }; - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::HandleListBoxEventL") } @@ -930,130 +307,6 @@ const TInt* aRes, const TInt* aCompulsory ) { - APSETUILOGGER_ENTERFN( ESettings,"Settings::FillListWithDataL") - - TInt i; - TApMember* sgd = MUTABLE_CAST( TApMember*, &arr ); - for( i=0; iBearerTypeL() == EApBearerTypeGPRS ) - { - TUint32 tint; - iApItem->ReadUint( EApGprsPdpType, tint ); - if ( tint != EIPv6 ) - { - AddTextualListBoxItemL( aItemArray, *sgd, - *aRes, *aCompulsory ); - } - } - else - { // CSD - if ( iL2Ipv4 ) - { - AddTextualListBoxItemL( aItemArray, *sgd, - *aRes, *aCompulsory ); - } - } - break; - } - case EApWapCurrentBearer: - case EApWapSecurity: - case EApWapWspOption: - case EApIspPromptForLogin: - case EApGprsDisablePlainTextAuth: - case EApIspDisablePlainTextAuth: - case EApIspBearerCallTypeIsdn: - case EApIspIfCallbackEnabled: - case EApIspIfCallbackType: - case EApIspEnableSWCompression: - case EApGprsHeaderCompression: - case EApIspUseLoginScript: - case EApIspBearerSpeed: - case EApGprsPdpType: - case EApIP6DNSAddrFromServer: - case EApWlanNetworkMode: - case EApWlanSecurityMode: - case EApWlanScanSSID: - { - AddOnOffListBoxItemL( aItemArray, *sgd, *aRes, *aCompulsory ); - break; - } - case EApWlanChannelId: - { - if ( IsAdhocChannelVisible() ) - { - AddOnOffListBoxItemL( aItemArray, *sgd, *aRes, - *aCompulsory ); - } - break; - } - case EApIpv4Settings: - case EApIpv6Settings: - { - AddMenuListBoxItemL( aItemArray, *sgd, *aRes, *aCompulsory ); - break; - } - case EApWlanSecuritySettings: - { - AddMenuListBoxItemL( aItemArray, *sgd, *aRes, *aCompulsory ); - break; - } - default: - { - __ASSERT_DEBUG( EFalse, Panic( EUnknownCase ) ); - break; - } - } - sgd++; - aRes++; - aCompulsory++; - } - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::FillListWithDataL") } @@ -1065,14 +318,6 @@ TApMember aMember, TInt aRes, TInt aCompulsory ) { - APSETUILOGGER_ENTERFN( ESettings,"Settings::AddTextualListBoxItemL") - - HBufC* sgd = CreateTextualListBoxItemL( aMember, aRes, aCompulsory ); - CleanupStack::PushL( sgd ); - aItemArray.AppendL( sgd->Des() ); - CleanupStack::PopAndDestroy( sgd ); - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::AddTextualListBoxItemL") } @@ -1084,15 +329,6 @@ TApMember aMember, TInt aRes, TInt aCompulsory ) { - APSETUILOGGER_ENTERFN( ESettings,"Settings::AddOnOffListBoxItemL") - - // Read up title text from resource - HBufC* sgd = CreateOnOffListBoxItemL( aMember, aRes, aCompulsory ); - CleanupStack::PushL( sgd ); - aItemArray.AppendL( sgd->Des() ); - CleanupStack::PopAndDestroy( sgd ); - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::AddOnOffListBoxItemL") } @@ -1103,22 +339,6 @@ void CApSettingsDlg::UpdateOnOffListBoxItemL( TApMember aMember, TInt aRes, TInt aPos, TInt aCompulsory ) { - APSETUILOGGER_ENTERFN( ESettings,"Settings::UpdateOnOffListBoxItemL") - - // Read up title text from resource - HBufC* sgd = CreateOnOffListBoxItemL( aMember, aRes, aCompulsory ); - CleanupStack::PushL( sgd ); - // first try to add, if Leaves, list will be untouched - iItemArray->InsertL( aPos, sgd->Des() ); - // if successful, previous item is scrolled up with one, - // so delete that one... - if ( ++aPos < iItemArray->MdcaCount() ) - { - iItemArray->Delete( aPos ); - } - CleanupStack::PopAndDestroy( sgd ); - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::UpdateOnOffListBoxItemL") } @@ -1129,21 +349,6 @@ void CApSettingsDlg::UpdateTextualListBoxItemL( TApMember aMember, TInt aRes, TInt aPos, TInt aCompulsory ) { - APSETUILOGGER_ENTERFN( ESettings,"Settings::UpdateTextualListBoxItemL") - - HBufC* sgd = CreateTextualListBoxItemL( aMember, aRes, aCompulsory ); - CleanupStack::PushL( sgd ); - // first try to add, if Leaves, list will be untouched - iItemArray->InsertL( aPos, sgd->Des() ); - // if successful, previous item is scrolled up with one, - // so delete that one... - if ( ++aPos < iItemArray->MdcaCount() ) - { - iItemArray->Delete( aPos ); - } - CleanupStack::PopAndDestroy( sgd ); - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::UpdateTextualListBoxItemL") } @@ -1155,209 +360,7 @@ TInt aRes, TInt aCompulsory ) { - APSETUILOGGER_ENTERFN( ESettings,"Settings::CreateTextualListBoxItemL") - - // both variables needed independently of the following - // conditions so I must declare them here... - HBufC16* value; - TBool Pushed( EFalse ); - if ( ( aMember == EApIspLoginScript ) || ( aMember == EApWapStartPage ) - || ( aMember == EApGprsAccessPointName ) - || ( aMember == EApProxyServerAddress ) ) - { - // allocates as much as needed... - value = iApItem->ReadConstLongTextL( aMember )->AllocLC(); - } - else - { - value = HBufC::NewLC( KModifiableTextLength ); - // handle different 'types' (8 bit or 16 bit) descriptors - // and bring them to common base (16 bit...) - if ( ( aMember == EApIspIfCallbackInfo ) - || ( aMember == EApIspInitString ) ) - { - HBufC8* tmpValue8 = HBufC8::NewLC( KModifiableTextLength ); - TPtr8 ptr( tmpValue8->Des() ); - iApItem->ReadTextL( aMember, ptr ); - value->Des().Copy( *tmpValue8 ); - CleanupStack::PopAndDestroy(); // tmpValue8 - } - else - { - if ( aMember == EApProxyPortNumber ) - { - TUint32 tempint; - iApItem->ReadUint( aMember, tempint ); - TPtr ptr( value->Des() ); - ptr.Format( KTxtNumber, tempint ); - } - else - { - TPtr16 ptr( value->Des() ); - if ( ( aMember == EApIspIfAuthPass ) - || ( aMember == EApIspLoginPass ) ) - { - ptr.SetLength( KStaredPasswordLength ); - ptr.Fill( '*' ); - } - else - { - iApItem->ReadTextL( aMember, ptr ); - } - } - } - switch ( aMember ) - { - case EApIspIPAddr: - { - if ( ( value->Compare( KDynIpAddress ) == 0 ) - || ( value->Compare( KEmptyText ) == 0 ) ) - { - value = iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_IP_ADDR_DYNAMIC ); - Pushed = ETrue; - } - break; - } - case EApIspIPNetMask: - case EApIspIPGateway: - case EApWlanIpNetMask: - case EApWlanIpGateway: - { - if ( ( value->Compare( KDynIpAddress ) == 0 ) - || ( value->Compare( KEmptyText ) == 0 ) ) - { - value = iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_COMPULSORY ); - Pushed = ETrue; - } - break; - } - case EApGprsIPNameServer1: - case EApIspIPNameServer1: - case EApGprsIPNameServer2: - case EApIspIPNameServer2: - { - if ( ( value->Compare( KDynIpAddress ) == 0 ) - || ( value->Compare( KEmptyText ) == 0 ) ) - { - value = iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_NEW_AP_DNS_SERVER_AUTOMATIC ); - Pushed = ETrue; - } - break; - } - case EApIspDefaultTelNumber: - case EApWlanNetworkName: - { - if ( value->Compare( KEmptyText ) == 0 ) - { - value = iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_AVKON_COMPULSORY ); - Pushed = ETrue; - } - break; - } - default: - { - break; - } - } - } - // Define a heap descriptor to hold all the item text - // HBufC is non-modifiable - HBufC* title = iEikonEnv->AllocReadResourceLC( aRes ); - - HBufC* value1 = ReplaceWhiteSpaceCharactersLC( *value ); - - if ( value1->CompareC( KEmpty ) == 0 ) - { // empty, get 'None' as value - HBufC* temp = NULL; - switch ( aMember ) - { - case EApWapStartPage: - { // get special None for homepage - temp = iEikonEnv->AllocReadResourceLC( - R_APUI_SETT_HOME_PAGE_NONE ); - break; - } - case EApIspIfAuthName: - { // user name none - temp = iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_NEW_AP_USER_NAME_NONE ); - break; - } - case EApProxyServerAddress: - { // proxy server address none - temp = iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_NEW_AP_PROXY_SERVER_ADDR_NONE ); - break; - } - case EApIspIfCallbackInfo: - { // callback number none - temp = iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_NEW_AP_CB_NUMBER_NONE ); - break; - } - case EApIspLoginScript: - { // login script none - temp = iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_NEW_AP_LOGIN_SCRIPT_NONE ); - break; - } - case EApIspInitString: - { // modem init string none - temp = iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_NEW_AP_MODEM_INIT_NONE ); - break; - } - default: - { // get 'normal' None for others - temp = - iEikonEnv->AllocReadResourceLC( - R_APUI_SETT_VAL_FIELD_NONE ); - break; - } - } - CleanupStack::Pop(); // temp - CleanupStack::PopAndDestroy( value1 ); - CleanupStack::PushL( temp ); - value1 = temp; - } - - // Define a heap descriptor to hold all the item text - TInt length = title->Length() + value1->Length() + 10; - if ( aCompulsory ) - { - length += 3; - } - HBufC* itemText = HBufC::NewLC( length ); - - // handle exotic language number conversion here - TPtr t(title->Des()); - TPtr v(value1->Des()); - AknTextUtils::LanguageSpecificNumberConversion( t ); - AknTextUtils::LanguageSpecificNumberConversion( v ); - - // Define a modifiable pointer descriptor to be able to append text to the - // non-modifiable heap descriptor itemText - TPtr itemTextPtr = itemText->Des(); - itemTextPtr.Format( KTxtListItemFormat, title, value1 ); - if ( aCompulsory ) - { - itemTextPtr.Append( KTxtCompulsory ); - } - CleanupStack::Pop(); // itemtext, - if ( Pushed ) - { - // "Dynamic" text from resource if needed - CleanupStack::PopAndDestroy(); - } - // title, value, value1. !value is allocated with LC in both cases...! - CleanupStack::PopAndDestroy( 3 ); - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::CreateTextualListBoxItemL") - return itemText; + return NULL; } @@ -1369,417 +372,7 @@ HBufC* CApSettingsDlg::CreateOnOffListBoxItemL( TApMember aMember, TInt aRes, TInt aCompulsory ) { - APSETUILOGGER_ENTERFN( ESettings,"Settings::CreateOnOffListBoxItemL") - - // Read up title text from resource - HBufC* title = iEikonEnv->AllocReadResourceLC( aRes ); - - TUint32 aValueResourceID = 0; - TBool bvar; - - switch ( aMember ) - { - case EApIspBearerCallTypeIsdn: - {// Data call type "Analogue"/"ISDN" - TUint32 tempint; - iApItem->ReadUint( EApIspBearerCallTypeIsdn, tempint ); - switch ( tempint ) - { - case ECallTypeISDNv110: - { - aValueResourceID = R_APUI_VIEW_DATACALL_ISDN_110; - break; - } - case ECallTypeISDNv120: - { - aValueResourceID = R_APUI_VIEW_DATACALL_ISDN_120; - break; - } - case ECallTypeAnalogue: - default: - { - aValueResourceID = R_APUI_VIEW_DATACALL_ANALOLGUE; - break; - } - } - break; - } - case EApWapWspOption: - { // "Continuous"/"Temporary" - TUint32 tval; - iApItem->ReadUint( aMember, tval ); - if ( tval == EWapWspOptionConnectionOriented ) - { - aValueResourceID = R_APUI_VIEW_CONN_TYPE_CONTIN; - } - else - { - aValueResourceID = R_APUI_VIEW_CONN_TYPE_TEMP; - } - break; - } - case EApIspIfCallbackType: - { // "Use server number"/"Use other number" - TUint32 tval; - iApItem->ReadUint( aMember, tval ); - if ( tval == ECallbackActionMSCBCPAcceptServerSpecifiedNumber ) - { - aValueResourceID = R_APUI_VIEW_CB_USE_SERVER_NUMBER; - } - else - { - if ( tval == - ECallbackActionMSCBCPRequireClientSpecifiedNumber ) - { - aValueResourceID = R_APUI_VIEW_CB_USE_OTHER_NUMBER; - } - } - break; - } - case EApWapSecurity: - { // on/off - iApItem->ReadBool( aMember, bvar ); - if ( bvar ) - { - aValueResourceID = R_APUI_VIEW_WTLS_SECURITY_ON; - } - else - { - aValueResourceID = R_APUI_VIEW_WTLS_SECURITY_OFF; - } - break; - } - case EApIspUseLoginScript: - { - iApItem->ReadBool( aMember, bvar ); - if ( bvar ) - { - aValueResourceID = R_APUI_VIEW_USE_LOGINS_YES; - } - else - { - aValueResourceID = R_APUI_VIEW_USE_LOGINS_NO; - } - break; - } - - case EApIspEnableSWCompression: - case EApGprsHeaderCompression: - { - iApItem->ReadBool( aMember, bvar ); - if ( bvar ) - { - aValueResourceID = R_APUI_VIEW_PPP_COMP_YES; - } - else - { - aValueResourceID = R_APUI_VIEW_PPP_COMP_NO; - } - break; - } - case EApIspPromptForLogin: - { - iApItem->ReadBool( aMember, bvar ); - if ( bvar ) - { - aValueResourceID = R_APUI_VIEW_PROMPT_PASSWD_YES; - } - else - { - aValueResourceID = R_APUI_VIEW_PROMPT_PASSWD_NO; - } - break; - } - case EApIspIfCallbackEnabled: - { // yes/no - iApItem->ReadBool( aMember, bvar ); - if ( bvar ) - { - aValueResourceID = R_APUI_VIEW_USE_CB_YES; - } - else - { - aValueResourceID = R_APUI_VIEW_USE_CB_NO; - } - break; - } - case EApWapCurrentBearer: - { // "Packet data"/"SMS"/"Data call" - if ( iBearerType == EApBearerTypeCSD ) - { - aValueResourceID = R_APUI_VIEW_BEARER_TYPE_CSD; - } - else - { - if ( iBearerType == EApBearerTypeHSCSD ) - { - aValueResourceID = R_APUI_VIEW_BEARER_TYPE_HSCSD; - } - else - { - if ( iBearerType == EApBearerTypeGPRS ) - { - aValueResourceID = R_APUI_VIEW_BEARER_TYPE_GPRS; - } - else - { - if ( IsWlanSupported() ) - { - if ( iBearerType == EApBearerTypeWLAN ) - { - aValueResourceID = - R_APUI_VIEW_BEARER_TYPE_WLAN; - } - else - { - User::Leave( KErrInvalidBearerType ); - } - } - else - { - User::Leave( KErrInvalidBearerType ); - } - } - } - } - break; - } - case EApGprsDisablePlainTextAuth: - case EApIspDisablePlainTextAuth: - { // "Normal"/"Secure" - iApItem->ReadBool( aMember, bvar ); - if ( bvar ) - { - aValueResourceID = R_APUI_VIEW_PASSWORD_AUTH_SECURE; - } - else - { - aValueResourceID = R_APUI_VIEW_PASSWORD_AUTH_NORMAL; - } - break; - } - case EApIspBearerSpeed: - { - TUint32 uvar; - iApItem->ReadUint( aMember, uvar ); - switch ( TApCallSpeed( uvar ) ) - { - case KSpeedAutobaud: - { - aValueResourceID = R_APUI_VIEW_SPEED_AUTODETECT; - break; - } - case KSpeed9600: - { - aValueResourceID = R_APUI_VIEW_SPEED_9600; - break; - } - case KSpeed14400: - { - aValueResourceID = R_APUI_VIEW_SPEED_14400; - break; - } - case KSpeed19200: - { - aValueResourceID = R_APUI_VIEW_SPEED_19200; - break; - } - case KSpeed28800: - { - aValueResourceID = R_APUI_VIEW_SPEED_28800; - break; - } - case KSpeed38400: - { - aValueResourceID = R_APUI_VIEW_SPEED_38400; - break; - } - case KSpeed43200: - { - aValueResourceID = R_APUI_VIEW_SPEED_43200; - break; - } - case KSpeed56000: - { - aValueResourceID = R_APUI_VIEW_SPEED_56000; - break; - } - default: - { - // auto-repair corrupted value - // use 9600 if previous data was not valid... - aValueResourceID = R_APUI_VIEW_SPEED_9600; - } - } - - break; - } - case EApGprsPdpType: - { - TUint32 uvar( 0 ); - iApItem->ReadUint( aMember, uvar ); - if ( uvar == EIPv6 ) - { - aValueResourceID = R_APUI_VIEW_PDP_TYPE_IPV6; - } - else - { - aValueResourceID = R_APUI_VIEW_PDP_TYPE_IPV4; - } - break; - } - case EApIP6DNSAddrFromServer: - { - // Change the 'magic numbers' - // Add the three possibilities here - iApItem->ReadBool( aMember, bvar ); - TInt stype = GetDomainNameServersTypeL(); - - switch ( stype ) - { - case 0: - { - aValueResourceID = - R_APUI_VIEW_NEW_AP_DNS_SERVERS_AUTOMATIC; - break; - } - case 1: - { - aValueResourceID = R_APUI_VIEW_SET_IP_WELL_KNOWN; - break; - } - case 2: - { - aValueResourceID = R_APUI_VIEW_SET_IP_USER_DEFINED; - break; - } - default: - { - __ASSERT_DEBUG( EFalse, Panic( EUnknownCase ) ); - break; - } - } - break; - } - case EApWlanNetworkMode: - { - TUint32 netmode( 0 ); - iApItem->ReadUint( aMember, netmode ); - if ( netmode == EAdhoc ) - { - aValueResourceID = R_APUI_VIEW_WLAN_NETWORK_MODE_ADHOC; - } - else - { - aValueResourceID = R_APUI_VIEW_WLAN_NETWORK_MODE_INFRA; - } - break; - } - case EApWlanSecurityMode: - { - TUint32 secmode( 0 ); - iApItem->ReadUint( aMember, secmode ); - switch ( secmode ) - { - case EOpen: - { - aValueResourceID = R_APUI_VIEW_WLAN_SECURITY_MODE_OPEN; - break; - } - case EWep: - { - aValueResourceID = R_APUI_VIEW_WLAN_SECURITY_MODE_WEP; - break; - } - case E802_1x: - { - aValueResourceID = R_APUI_VIEW_WLAN_SECURITY_MODE_802_1X; - break; - } - case EWpa: - case EWpa2: - { - aValueResourceID = R_APUI_VIEW_WLAN_SECURITY_MODE_WPA; - break; - } - default: - { - aValueResourceID = R_APUI_VIEW_WLAN_SECURITY_MODE_OPEN; - break; - } - } - - break; - } - case EApWlanScanSSID: - { // yes/no - iApItem->ReadBool( aMember, bvar ); - if ( bvar ) - { - aValueResourceID = R_APUI_VIEW_HIDDEN_NETWORK_YES; - } - else - { - aValueResourceID = R_APUI_VIEW_HIDDEN_NETWORK_NO; - } - break; - } - case EApWlanChannelId: - { // ad-hoc channel auto / user defined - TUint32 channel(0); - iApItem->ReadUint( aMember, channel ); - if ( channel ) - { - aValueResourceID = R_APUI_VIEW_AD_HOC_CHANNEL_USER_DEFINED; - } - else - { - aValueResourceID = R_APUI_VIEW_AD_HOC_CHANNEL_AUTO; - } - break; - } - default: - { - __ASSERT_DEBUG( EFalse, Panic( EUnknownCase ) ); - break; - } - } - - HBufC* value; - if ( aValueResourceID ) - { - // Read up value text from resource - value = iEikonEnv->AllocReadResourceLC( aValueResourceID ); - } - else - { - value = HBufC::NewLC( 0 ); - } - - - // Define a heap descriptor to hold all the item text - TInt length = title->Length() + value->Length() + 10 ; - if ( aCompulsory ) - { - length += 3; - } - - HBufC* itemText = HBufC::NewLC( length); - - // Define a modifiable pointer descriptor to be able to append text to the - // non-modifiable heap descriptor itemText - TPtr itemTextPtr = itemText->Des(); - itemTextPtr.Format( KTxtListItemFormat, title, value); - if ( aCompulsory ) - { - itemTextPtr.Append( KTxtCompulsory ); - } - - CleanupStack::Pop(); // itemText - CleanupStack::PopAndDestroy( 2 ); // value, title - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::CreateOnOffListBoxItemL") - return itemText; + return NULL; } @@ -1790,56 +383,6 @@ // void CApSettingsDlg::ChangeSettingsL( TBool aQuick ) { - APSETUILOGGER_ENTERFN( ESettings,"Settings::ChangeSettingsL") - -#ifdef __TEST_OOMDEBUG - if ( iMemTestOn ) - { - TInt leavecode( KErrNoMemory ); - - TInt ts( GetTestStateL() ); - - if ( ts == KEditingTest ) - { - TBuf<48> buf; - APSETUILOGGER_WRITE_BUF( _L("Starting Editing memtest") ); - - TUint32 rate( 0 ); - TUint32 retrycount( KOOMRetryCount ); - TUint32 retryoffset( KOOMRetryOffset ); - for ( - rate = 1; - ((rate < 50000) && (leavecode == KErrNoMemory)) || retrycount; - rate++ - ) - { - __UHEAP_SETFAIL( RHeap::EDeterministic, rate ); - TRAP( leavecode, DoChangeSettingsL( aQuick ) ); - __UHEAP_RESET; - if ( !leavecode ) - { - retrycount--; - rate += retryoffset; - } - } - User::LeaveIfError( leavecode ); - buf.Format( _L("\t Memtest finished, max. rate was: %d )"), rate ); - APSETUILOGGER_WRITE_BUF( buf ); - } - else - { - DoChangeSettingsL( aQuick ); - } - } - else - { - DoChangeSettingsL( aQuick ); - } -#else - DoChangeSettingsL( aQuick ); -#endif // __TEST_OOMDEBUG - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::ChangeSettingsL") } @@ -1850,13 +393,6 @@ // void CApSettingsDlg::SetBearerTypeL( TApBearerType aBearer ) { - APSETUILOGGER_ENTERFN( ESettings,"Settings::SetBearerTypeL") - - iBearerType = aBearer; - - HandleListStructureChangeL(); - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::SetBearerTypeL") } @@ -1867,84 +403,6 @@ // void CApSettingsDlg::InvertSettingsL( TApMember aDataMember ) { - APSETUILOGGER_ENTERFN( ESettings,"Settings::InvertSettingsL") - - switch ( aDataMember ) - { - case EApIspIfCallbackType: - { - TUint32 ctype( ECallbackActionMSCBCPRequireClientSpecifiedNumber ); - iApItem->ReadUint( EApIspIfCallbackType, ctype ); - if ( ctype == ECallbackActionMSCBCPRequireClientSpecifiedNumber ) - { - iApItem->WriteUint( EApIspIfCallbackType, - ECallbackActionMSCBCPAcceptServerSpecifiedNumber ); - } - else - { - iApItem->WriteUint( EApIspIfCallbackType, - ECallbackActionMSCBCPRequireClientSpecifiedNumber ); - } - break; - } - case EApGprsPdpType: - { - TUint32 ipnettype( 0 ); - iApItem->ReadUint( EApGprsPdpType, ipnettype ); - if ( ipnettype == EIPv6 ) - { - iApItem->WriteUint( EApGprsPdpType, EIPv4 ); - } - else - { - iApItem->WriteUint( EApGprsPdpType, EIPv6 ); - } - break; - } - case EApWlanNetworkMode: - { - TUint32 netmode( 0 ); - iApItem->ReadUint( EApWlanNetworkMode, netmode ); - if ( netmode == EAdhoc ) - { - iApItem->WriteUint( EApWlanNetworkMode, EInfra ); - } - else - { - iApItem->WriteUint( EApWlanNetworkMode, EAdhoc ); - LimitSecMode(); - } - break; - } - case EApWapWspOption: - { - TUint32 intvar; - if ( iApItem->ReadUint( aDataMember, intvar ) == KErrNone ) - { - if ( intvar == EWapWspOptionConnectionless ) - { - intvar = EWapWspOptionConnectionOriented; - } - else - { - intvar = EWapWspOptionConnectionless; - } - iApItem->WriteUint( aDataMember, intvar ); - } - break; - } - default: - { - TBool bvar; - if ( iApItem->ReadBool( aDataMember, bvar ) == KErrNone ) - { - bvar = !bvar; - iApItem->WriteBool( aDataMember, bvar ); - } - } - } - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::InvertSettingsL") } @@ -1954,71 +412,7 @@ // TBool CApSettingsDlg::ShowPopupSettingPageL( TApMember aData ) { - APSETUILOGGER_ENTERFN( ESettings,"Settings::ShowPopupSettingPageL") - - TInt currvalue( 0 ); - TBool retval( EFalse ); - TBool mustrepeat( EFalse ); - - CDesCArrayFlat* items = FillPopupSettingPageLC( aData, currvalue ); - - TInt attr_resid( 0 ); - GetResId( aData, attr_resid ); - - do - { - HBufC* titlebuf; - CAknRadioButtonSettingPage* dlg; - if ( attr_resid ) - { - titlebuf = iEikonEnv->AllocReadResourceLC( attr_resid ); - dlg = new ( ELeave )CAknRadioButtonSettingPage( - R_RADIO_BUTTON_SETTING_PAGE, - currvalue, - items ); - // must push 'cause SetSettingTextL can leave... - CleanupStack::PushL( dlg ); - TPtrC ptr( titlebuf->Des() ); - dlg->SetSettingTextL( ptr ); - CleanupStack::Pop(); // dlg - } - else - { - dlg = new ( ELeave )CAknRadioButtonSettingPage( - R_RADIO_BUTTON_SETTING_PAGE, - currvalue, - items ); - } - if ( dlg->ExecuteLD( CAknSettingPage::EUpdateWhenAccepted ) ) - { - if( AskQueryIfWcdmaL( aData , currvalue) ) - { - UpdateFromPopupSettingPageL( aData, currvalue ); - retval = ETrue; - mustrepeat = EFalse; - } - else - { - mustrepeat = ETrue; - } - } - else - { - mustrepeat = EFalse; - } - if ( attr_resid ) - { - // titlebuf, text title readed from resource... - CleanupStack::PopAndDestroy(); - } - }while( mustrepeat ); - - - // items, will also delete all elements in the array! - CleanupStack::PopAndDestroy( items ); - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::ShowPopupSettingPageL") - return retval; + return EFalse; } @@ -2033,116 +427,7 @@ // TBool CApSettingsDlg::ShowPopupTextSettingPageL( TApMember aData ) { - APSETUILOGGER_ENTERFN( ESettings,"Settings::ShowPopupTextSettingPageL") - - TBool retval( EFalse ); - - // must be prepared for the worst case... - TBuf textToChange; - - HBufC* aBuf1 = GetTextLC( aData ); - - HBufC* aBuf = ConvertPerNToDelimLC( aBuf1->Des() ); - - TPtr16 ptr( aBuf->Des() ); - textToChange.Append( ptr ); - - TInt page_resid( 0 ); - TInt TextSettingPageFlags( EAknSettingPageNoOrdinalDisplayed ); - GetTextResId( aData, page_resid, TextSettingPageFlags ); - - - TBool isLatin ( aData == EApWapStartPage ); - - CAccessPointTextSettingPage* dlg = - new( ELeave )CAccessPointTextSettingPage( page_resid, textToChange, - TextSettingPageFlags, - isLatin ); - - if ( dlg->ExecuteLD( CAknSettingPage::EUpdateWhenAccepted ) ) - { - switch ( aData ) - { - case EApWapStartPage: - case EApGprsAccessPointName: - case EApIspLoginScript: - case EApIspInitString: - case EApWapAccessPointName: - case EApIspLoginName: - case EApIspLoginPass: - case EApIspIfAuthName: - case EApIspIfAuthPass: - { - HBufC* tmp = ConvertDelimToPerNLC( textToChange ); - textToChange.Zero(); - textToChange.Append( tmp->Des() ); - CleanupStack::PopAndDestroy( tmp ); - break; - } - case EApProxyServerAddress: - { - textToChange.Trim(); - break; - } - default: - { // no need for conversion - break; - } - } - if ( ( aData == EApIspLoginScript ) || ( aData == EApWapStartPage ) - || ( aData == EApGprsAccessPointName ) - || ( aData == EApProxyServerAddress ) ) - { - iApItem->WriteLongTextL( aData, textToChange ); - } - else - { - if ( aData == EApProxyPortNumber ) - { - // first remove non-number chars - HBufC* num = StripNonNumberLC( textToChange ); - textToChange.Zero(); - textToChange.Append( num->Des() ); - CleanupStack::PopAndDestroy( num ); - // and now get real numberic value - TInt tempint; - TLex lex; - lex.Assign( textToChange ); - if ( lex.Val( tempint ) ) - { // this means some error, set it to 0 - tempint = 0; - } - iApItem->WriteUint( EApProxyPortNumber, tempint ); - } - else - { - if ( ( aData == EApIspInitString ) ) - { - // must be prepared for the worst case... - TBuf8 textToChange8; - textToChange8.Copy( textToChange ); - iApItem->WriteTextL( aData, textToChange8 ); - } - else - { - if ( aData == EApWapAccessPointName ) - { - iApItem->SetNamesL( textToChange ); - } - else - { - iApItem->WriteTextL( aData, textToChange ); - } - } - } - } - retval = ETrue; - } - *iEventStore |= KApUiEventEdited; - CleanupStack::PopAndDestroy( 2 ); // aBuf, aBuf1 - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::ShowPopupTextSettingPageL") - return retval; + return EFalse; } @@ -2153,115 +438,7 @@ // HBufC* CApSettingsDlg::GetTextLC( TApMember aData ) { - APSETUILOGGER_ENTERFN( ESettings,"Settings::GetTextLC") - - HBufC* ret; - switch ( aData ) - { - case EApWapStartPage: - { // Long text !!! - if ( iApItem->ReadTextLengthL( aData ) ) - { - // allocates as much as needed... - ret = iApItem->ReadConstLongTextL( aData )->AllocLC(); - } - else - { - ret = iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_WAP_START_PAGE_DEFAULT ); - } - break; - } - case EApGprsAccessPointName: - { - // allocates as much as needed... - ret = iApItem->ReadConstLongTextL( aData )->AllocLC(); - break; - } - case EApIspLoginScript: - { - // allocates as much as needed... - ret = iApItem->ReadConstLongTextL( aData )->AllocLC(); - break; - } - case EApProxyServerAddress: - { - // allocates as much as needed... - ret = iApItem->ReadConstLongTextL( aData )->AllocLC(); - break; - } - case EApWapGatewayAddress: - case EApIspIPAddr: - case EApIspIPNetMask: - case EApWlanIpNetMask: - case EApIspIPGateway: - case EApWlanIpGateway: - case EApGprsIPNameServer1: - case EApIspIPNameServer1: - case EApGprsIPNameServer2: - case EApIspIPNameServer2: - { - ret = HBufC::NewLC( KModifiableTextLength ); - TPtr16 ptr( ret->Des() ); - iApItem->ReadTextL( aData, ptr ); - if ( ptr.Compare( KEmptyText ) == 0 ) - { - *ret = KDynIpAddress; - } - break; - } - case EApIspInitString: - { - ret = HBufC::NewLC( KModifiableTextLength ); - HBufC8* tmpValue8 = HBufC8::NewLC( KModifiableTextLength ); - TPtr8 ptr( tmpValue8->Des() ); - iApItem->ReadTextL( aData, ptr ); - ret->Des().Copy( ptr ); - CleanupStack::PopAndDestroy(); // tmpValue8 - break; - } - case EApProxyPortNumber: - { - TUint32 tempint; - iApItem->ReadUint( EApProxyPortNumber, tempint ); - ret = HBufC::NewLC( KMaxProxyPortNumberLength ); - TPtr itemTextPtr = ret->Des(); - itemTextPtr.Format( KTxtNumber, tempint ); - break; - } - default: - { - ret = HBufC::NewLC( KModifiableTextLength ); - TPtr16 ptr( ret->Des() ); - iApItem->ReadTextL( aData, ptr ); - break; - } - } - - switch ( aData ) - { - case EApWapStartPage: - case EApGprsAccessPointName: - case EApIspLoginScript: - case EApIspInitString: - case EApWapAccessPointName: - case EApIspLoginName: - case EApIspLoginPass: - case EApIspIfAuthName: - case EApIspIfAuthPass: - { - break; - } - default: - { - // nothing to do - break; - } - } - - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::GetTextLC") - return ret; + return NULL; } @@ -2272,132 +449,6 @@ void CApSettingsDlg::GetTextResId( TApMember aData, TInt& apage, TInt& aTextSettingPageFlags ) { - APSETUILOGGER_ENTERFN( ESettings,"Settings::GetTextResId") - - if ( ( aData != EApWapAccessPointName ) - && ( aData != EApIspDefaultTelNumber ) ) - { - aTextSettingPageFlags |= CAknTextSettingPage::EZeroLengthAllowed; - } - else - { - aTextSettingPageFlags &= (~CAknTextSettingPage::EZeroLengthAllowed); - } - - switch ( aData ) - { - case EApIspInitString: - { - apage = R_TEXT_SETTING_PAGE_MODEM_INIT_STRING; - break; - } - case EApWapAccessPointName: - { - apage = R_TEXT_SETTING_PAGE_CONN_NAME; - break; - } - case EApGprsAccessPointName: - { - apage = R_TEXT_SETTING_PAGE_GPRSAP_NAME; - break; - } - case EApIspLoginScript:// use EDWIN for script. - { - apage = R_TEXT_SETTING_PAGE_LOGIN_SCRIPT; - break; - } - case EApIspLoginName: - case EApIspIfAuthName: - { - apage = R_TEXT_SETTING_PAGE_LOGIN_NAME; - break; - } - case EApWapStartPage: - { - apage = R_TEXT_SETTING_PAGE_STARTING_PAGE; - break; - } - // use EDWINS as no such thing as PhoneNumber editor... - case EApIspDefaultTelNumber: - { - apage = R_TEXT_SETTING_PAGE_ACCESS_NUM; - break; - } - case EApIspIfCallbackInfo: - { - apage = R_TEXT_SETTING_PAGE_CB_NUM; - break; - } - case EApWapGatewayAddress: - { - apage = R_TEXT_SETTING_PAGE_GW_ADDR; - break; - } - case EApProxyServerAddress: - { - apage = R_TEXT_SETTING_PAGE_PROXY_SERVER_ADDR; - break; - } - case EApProxyPortNumber: - { - apage = R_TEXT_SETTING_PAGE_PROXY_PORT_NUMBER; - break; - } - case EApIspIPAddr: - { - apage = R_TEXT_SETTING_PAGE_ISPIP_ADDR; - break; - } - case EApIspIPNetMask: - case EApWlanIpNetMask: - { - apage = R_TEXT_SETTING_PAGE_ISP_NET_MASK; - break; - } - case EApIspIPGateway: - case EApWlanIpGateway: - { - apage = R_TEXT_SETTING_PAGE_ISP_GATEWAY; - break; - } - case EApGprsIPNameServer1: - case EApIspIPNameServer1: - { - apage = R_TEXT_SETTING_PAGE_NAME_SERV1; - break; - } - case EApGprsIPNameServer2: - case EApIspIPNameServer2: - { - apage = R_TEXT_SETTING_PAGE_NAME_SERV2; - break; - } - case EApIspLoginPass: - case EApIspIfAuthPass: - { // use EEikCtSecretEd - apage = R_TEXT_SETTING_PAGE_LOGIN_PASSWD; - break; - } - - case EApIspUseLoginScript: - {// use EDWIN: - apage = R_SETTING_APP_EDWIN_LOGIN_SCRIPT; - break; - } - case EApWlanNetworkName: - { - apage = R_TEXT_SETTING_PAGE_NETW_NAME; - break; - } - default: - { - __ASSERT_DEBUG( EFalse, Panic( EUnknownCase ) ); - apage = 0; - break; - } - } - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::GetTextResId") } @@ -2408,117 +459,6 @@ // void CApSettingsDlg::GetResId( TApMember aData, TInt& aattr ) { - APSETUILOGGER_ENTERFN( ESettings,"Settings::GetResId") - - // not text based ones: - switch ( aData ) - { - case EApWapCurrentBearer: - { - aattr = R_APUI_VIEW_BEARER_TYPE; - break; - } - case EApWapSecurity: - { - aattr = R_APUI_VIEW_WTLS_SECURITY; - break; - } - case EApWapWspOption: - { - aattr = R_APUI_VIEW_CONNECTION_TYPE; - break; - } - case EApIspPromptForLogin: - { - aattr = R_APUI_VIEW_PROMPT_PASSWORD; - break; - } - case EApGprsDisablePlainTextAuth: - case EApIspDisablePlainTextAuth: - { - aattr = R_APUI_VIEW_PASSWORD_AUTH; - break; - } - case EApIspBearerCallTypeIsdn: // used for data call type - { - aattr = R_APUI_VIEW_DATA_CALL_TYPE; - break; - } - case EApIspBearerSpeed: - { - aattr = R_APUI_VIEW_MAX_CONN_SPEED; - break; - } - case EApIspIfCallbackEnabled: - { - aattr = R_APUI_VIEW_USE_CALL_BACK; - break; - } - case EApIspIfCallbackType: - { - aattr = R_APUI_VIEW_CALL_BACK_TYPE; - break; - } - case EApIspEnableSWCompression: - case EApGprsHeaderCompression: - { - aattr = R_APUI_VIEW_ENABLE_PPP_COMP; - break; - } - case EApIspInitString: - { - aattr = R_APUI_VIEW_MODEM_INIT_STRING; - break; - } - case EApIspUseLoginScript: - { - aattr = R_APUI_VIEW_USE_LOGIN_SCRIPT; - break; - } - case EApGprsPdpType: - { - aattr = R_APUI_VIEW_PDP_TYPE; - break; - } - case EApIP6DNSAddrFromServer: - { - aattr = R_APUI_VIEW_SET_DNS_SERVERS_IP; - break; - } - case EApWlanNetworkName: - { - aattr = R_APUI_VIEW_WLAN_NETWORK_NAME; - break; - } - case EApWlanNetworkMode: - { - aattr = R_APUI_VIEW_WLAN_NETWORK_MODE; - break; - } - case EApWlanSecurityMode: - { - aattr = R_APUI_VIEW_WLAN_SECURITY_MODE; - break; - } - case EApWlanScanSSID: - { - aattr = R_APUI_VIEW_WLAN_HIDDEN_NETWORK; - break; - } - case EApWlanChannelId: - { - aattr = R_APUI_VIEW_AD_HOC; - break; - } - default: - { - __ASSERT_DEBUG( EFalse, Panic( EUnknownCase ) ); - aattr = 0; - break; - } - } - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::GetResId") } @@ -2531,421 +471,7 @@ CDesCArrayFlat* CApSettingsDlg::FillPopupSettingPageLC( TApMember aData, TInt& aCurrvalue ) { - APSETUILOGGER_ENTERFN( ESettings,"Settings::FillPopupSettingPageLC") - - CDesCArrayFlat* items = new( ELeave)CDesCArrayFlat( 1 ); - CleanupStack::PushL( items ); - - TUint32 tval( 0 ); - - switch ( aData ) - { - case EApIspPromptForLogin: - { - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_PROMPT_PASSWD_YES ) ); - CleanupStack::PopAndDestroy(); - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_PROMPT_PASSWD_NO ) ); - CleanupStack::PopAndDestroy(); - GetBoolDataValue( aData, ETrue, aCurrvalue ); - break; - } - case EApWapSecurity: - { - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_WTLS_SECURITY_ON ) ); - CleanupStack::PopAndDestroy(); - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_WTLS_SECURITY_OFF ) ); - CleanupStack::PopAndDestroy(); - GetBoolDataValue( aData, ETrue, aCurrvalue ); - break; - } - case EApIspIfCallbackEnabled: - { - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_USE_CB_YES ) ); - CleanupStack::PopAndDestroy(); - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_USE_CB_NO ) ); - CleanupStack::PopAndDestroy(); - GetBoolDataValue( aData, ETrue, aCurrvalue ); - break; - } - case EApIspEnableSWCompression: - case EApGprsHeaderCompression: - { - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_PPP_COMP_YES ) ); - CleanupStack::PopAndDestroy(); - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_PPP_COMP_NO ) ); - CleanupStack::PopAndDestroy(); - GetBoolDataValue( aData, ETrue, aCurrvalue ); - break; - } - case EApWapCurrentBearer: - { - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_BEARER_TYPE_GPRS ) ); - CleanupStack::PopAndDestroy(); - - if ( IsWlanSupported() ) - { - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_BEARER_TYPE_WLAN ) ); - CleanupStack::PopAndDestroy(); - } - - TBool isCsdSupported = - FeatureManager::FeatureSupported( KFeatureIdAppCsdSupport ); -#ifdef __TEST_CSD_SUPPORT - isCsdSupported = ETrue; -#endif // __TEST_CSD_SUPPORT - - if ( isCsdSupported ) - { - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_BEARER_TYPE_CSD ) ); - CleanupStack::PopAndDestroy(); - - if ( IsHSCSDEnabledL() ) - { - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_BEARER_TYPE_HSCSD ) ); - CleanupStack::PopAndDestroy(); - } - } - aCurrvalue = BearerType2BearerItemPosL( iBearerType ); - break; - } - case EApGprsDisablePlainTextAuth: - case EApIspDisablePlainTextAuth: - { - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_PASSWORD_AUTH_NORMAL ) ); - CleanupStack::PopAndDestroy(); - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_PASSWORD_AUTH_SECURE ) ); - CleanupStack::PopAndDestroy(); - GetBoolDataValue( aData, EFalse, aCurrvalue ); - // needs to be inverted? - break; - } - case EApWapWspOption: - { - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_CONN_TYPE_CONTIN ) ); - CleanupStack::PopAndDestroy(); - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_CONN_TYPE_TEMP ) ); - CleanupStack::PopAndDestroy(); - iApItem->ReadUint( aData, tval ); - aCurrvalue = Min( 1, tval ); - aCurrvalue = !aCurrvalue; - break; - } - case EApIspBearerCallTypeIsdn: // used for data call type - { - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_DATACALL_ANALOLGUE ) ); - CleanupStack::PopAndDestroy(); - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_DATACALL_ISDN_110 ) ); - CleanupStack::PopAndDestroy(); - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_DATACALL_ISDN_120 ) ); - CleanupStack::PopAndDestroy(); - iApItem->ReadUint( EApIspBearerCallTypeIsdn, tval ); - switch ( tval ) - { - case ECallTypeISDNv110: - { - aCurrvalue = KIspCallIsdn110; - break; - } - case ECallTypeISDNv120: - { - aCurrvalue = KIspCallIsdn120; - break; - } - default: - case ECallTypeAnalogue: - { - aCurrvalue = KIspCallAnalogue; - break; - } - } - break; - } - case EApIspBearerSpeed: - { - FillUpBearerSpeedValuesL( *items, aCurrvalue ); - break; - } - case EApIspIfCallbackType: - { - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_CB_USE_SERVER_NUMBER ) ); - CleanupStack::PopAndDestroy(); - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_CB_USE_OTHER_NUMBER ) ); - CleanupStack::PopAndDestroy(); - iApItem->ReadUint( aData, tval ); - if ( tval == ECallbackActionMSCBCPRequireClientSpecifiedNumber ) - { - aCurrvalue = 1; - } - else - { - aCurrvalue = 0; - } - break; - } - case EApIspUseLoginScript: - { - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_USE_LOGINS_YES ) ); - CleanupStack::PopAndDestroy(); - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_USE_LOGINS_NO ) ); - CleanupStack::PopAndDestroy(); - GetBoolDataValue( aData, ETrue, aCurrvalue ); - break; - } - case EApGprsPdpType: - { - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_PDP_TYPE_IPV4 ) ); - CleanupStack::PopAndDestroy(); - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_PDP_TYPE_IPV6 ) ); - CleanupStack::PopAndDestroy(); - iApItem->ReadUint( aData, tval ); - if ( tval == EIPv6 ) - { - aCurrvalue = 1; - } - else - { - aCurrvalue = 0; - } - break; - } - case EApIP6DNSAddrFromServer: - { - TApBearerType b = iApItem->BearerTypeL(); - TBool hasAuto = ( b != EApBearerTypeCSD ) - && ( b != EApBearerTypeHSCSD ) ; - if ( hasAuto ) - { - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_NEW_AP_DNS_SERVERS_AUTOMATIC ) ); - CleanupStack::PopAndDestroy(); - } - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_SET_IP_WELL_KNOWN ) ); - CleanupStack::PopAndDestroy(); - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_SET_IP_USER_DEFINED ) ); - CleanupStack::PopAndDestroy(); - TBool bval; - iApItem->ReadBool( aData, bval ); - if ( !bval ) - { - aCurrvalue = GetIPv6DNSTypeL(); - if ( !hasAuto ) - { // no Auto item, dec. currvalue - aCurrvalue--; - } - } - else - { - aCurrvalue = 0; - } - break; - } - case EApWlanNetworkName: - { - if ( IsWlanSupported() ) - { - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_WLAN_NETWORK_NAME_USER ) ); - CleanupStack::PopAndDestroy(); - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_WLAN_NETWORK_NAME_SCAN ) ); - CleanupStack::PopAndDestroy(); - // set current value as user defined: if not yet given, - // it is true, if it had been already specified, - // we could not know if it was the user or was it scanned - aCurrvalue = 0; - } - else - { - User::Leave( KErrNotSupported ); - } - break; - } - case EApWlanNetworkMode: - { - if ( IsWlanSupported() ) - { - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_WLAN_NETWORK_MODE_INFRA ) ); - CleanupStack::PopAndDestroy(); - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_WLAN_NETWORK_MODE_ADHOC ) ); - CleanupStack::PopAndDestroy(); - iApItem->ReadUint( aData, tval ); - if ( tval == EAdhoc ) - { - aCurrvalue = 1; - } - else - { - aCurrvalue = 0; - } - } - else - { - User::Leave( KErrNotSupported ); - } - break; - } - case EApWlanScanSSID: - { - if ( IsWlanSupported() ) - { - TBool bval(EFalse); - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_HIDDEN_NETWORK_NO ) ); - CleanupStack::PopAndDestroy(); - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_HIDDEN_NETWORK_YES ) ); - CleanupStack::PopAndDestroy(); - iApItem->ReadBool( aData, bval ); - if ( bval ) - { - aCurrvalue = 1; - } - else - { - aCurrvalue = 0; - } - } - else - { - User::Leave( KErrNotSupported ); - } - break; - } - case EApWlanChannelId: - { - if ( IsWlanSupported() ) - { - TUint32 channel(0); - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_AD_HOC_CHANNEL_AUTO ) ); - CleanupStack::PopAndDestroy(); - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_AD_HOC_CHANNEL_USER_DEFINED ) ); - CleanupStack::PopAndDestroy(); - iApItem->ReadUint( aData, channel ); - if ( channel ) - { - aCurrvalue = 1; - } - else - { - aCurrvalue = 0; - } - } - else - { - User::Leave( KErrNotSupported ); - } - break; - } - case EApWlanSecurityMode: - { - if ( IsWlanSupported() ) - { - TUint32 netmode(0); - - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_WLAN_SECURITY_MODE_OPEN ) ); - CleanupStack::PopAndDestroy(); - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_WLAN_SECURITY_MODE_WEP ) ); - CleanupStack::PopAndDestroy(); - - iApItem->ReadUint( EApWlanNetworkMode, netmode ); - if ( netmode == EInfra ) - { - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_WLAN_SECURITY_MODE_802_1X ) ); - CleanupStack::PopAndDestroy(); - items->AppendL( *iEikonEnv->AllocReadResourceLC( - R_APUI_VIEW_WLAN_SECURITY_MODE_WPA ) ); - CleanupStack::PopAndDestroy(); - } - - iApItem->ReadUint( aData, tval ); - switch ( tval ) - { - case EOpen: - { - aCurrvalue = 0; - break; - } - case EWep: - { - aCurrvalue = 1; - break; - } - case E802_1x: - { - aCurrvalue = 2; - if ( netmode != EInfra ) - { - aCurrvalue--; - } - break; - } - case EWpa: - case EWpa2: - { - aCurrvalue = 3; - if ( netmode != EInfra ) - { - aCurrvalue-= 2; - } - break; - } - default: - { - aCurrvalue = 0; - break; - } - } - } - else - { - User::Leave( KErrNotSupported ); - } - break; - } - default: - { - __ASSERT_DEBUG( EFalse, Panic ( EUnknownCase ) ); - User::Leave( KErrInvalidColumn ); - break; - } - } - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::FillPopupSettingPageLC") - return items; + return NULL; } @@ -2958,228 +484,6 @@ void CApSettingsDlg::UpdateFromPopupSettingPageL( TApMember aData, TInt aCurrvalue ) { - APSETUILOGGER_ENTERFN( ESettings,"Settings::UpdateFromPopupSettingPageL") - - switch ( aData ) - { - case EApWapSecurity: - case EApIspPromptForLogin: - case EApIspIfCallbackEnabled: - case EApIspEnableSWCompression: - case EApGprsHeaderCompression: - case EApIspUseLoginScript: - { // INVERTED! - iApItem->WriteBool( aData, !( TBool( aCurrvalue ) ) ); - break; - } - case EApWlanScanSSID: - case EApGprsDisablePlainTextAuth: - case EApIspDisablePlainTextAuth: - { // NOT INVERTED! - iApItem->WriteBool( aData, ( TBool( aCurrvalue ) ) ); - break; - } - case EApWapWspOption: - { - if ( aCurrvalue ) - { - iApItem->WriteUint( EApWapWspOption, - EWapWspOptionConnectionless ); - } - else - { - iApItem->WriteUint( EApWapWspOption, - EWapWspOptionConnectionOriented ); - } - break; - } - case EApWapCurrentBearer: - { - DoBearerChangeL( aCurrvalue ); - break; - } - case EApIspBearerSpeed: - { - iApItem->WriteUint( EApIspBearerSpeed, - GetBearerSpeedForSelection( aCurrvalue ) - ); - break; - } - case EApIspIfCallbackType: - { // UINT - if ( aCurrvalue ) - { - iApItem->WriteUint( EApIspIfCallbackType, - ECallbackActionMSCBCPRequireClientSpecifiedNumber ); - } - else - { - iApItem->WriteUint( EApIspIfCallbackType, - ECallbackActionMSCBCPAcceptServerSpecifiedNumber ); - } - break; - } - case EApIspBearerCallTypeIsdn: // used for data call type - { - // as order is the same in UI and in enum, simply write it - iApItem->WriteUint( EApIspBearerCallTypeIsdn, aCurrvalue ); - LimitSpeed(); - break; - } - case EApGprsPdpType: - { - // get value to write - if ( aCurrvalue ) - { - aCurrvalue = EIPv6; - } - else - { - aCurrvalue = EIPv4; - } - iApItem->WriteUint( EApGprsPdpType, aCurrvalue ); - break; - } - case EApIP6DNSAddrFromServer: - { - // if it is CSD or HSCSD, there is NO AUTOMATIC value, - // just the next two: Well-known & User defined... - // So in those cases, aCurrvalue must be 0 & 1, which - // corresponds to the normal 1, 2 so it should be incremented - TInt realvalue = aCurrvalue; - TApBearerType b = iApItem->BearerTypeL(); - if ( ( b == EApBearerTypeCSD ) || ( b == EApBearerTypeHSCSD ) ) - { - realvalue++; - } - - if ( realvalue == 2 ) - { // user defined!!! - TBool isip6( EFalse ); - if ( iApItem->BearerTypeL() == EApBearerTypeGPRS ) - { - TUint32 ival(0); - iApItem->ReadUint( EApGprsPdpType, ival ); - if ( ival == EIPv6 ) - { - isip6 = ETrue; - } - } - else - { - isip6 = !iL2Ipv4; - } - GetNameServersL( isip6 ); - } - else - { - if ( realvalue == 1 ) - { // well-known - // write default well known name server values - iApItem->WriteTextL( EApIP6NameServer1, - KKnownNameServer1 ); - iApItem->WriteTextL( EApIP6NameServer2, - KKnownNameServer2 ); - } - else - { - iApItem->WriteTextL( EApIP6NameServer1, KDynIpv6Address ); - iApItem->WriteTextL( EApIP6NameServer2, KDynIpv6Address ); - } - } - break; - } - case EApWlanNetworkMode: - { - if ( IsWlanSupported() ) - { - if ( aCurrvalue ) - { - iApItem->WriteUint( EApWlanNetworkMode, EAdhoc ); - LimitSecMode(); - } - else - { - iApItem->WriteUint( EApWlanNetworkMode, EInfra ); - } - - } - else - { - User::Leave( KErrNotSupported ); - } - break; - } - case EApWlanSecurityMode: - { - if ( IsWlanSupported() ) - { - TInt secmode(EOpen); - switch ( aCurrvalue ) - { - case KItemIndex0: - { - secmode = EOpen; - break; - } - case KItemIndex1: - { - secmode = EWep; - break; - } - case KItemIndex2: - { - secmode = E802_1x; - break; - } - case KItemIndex3: - { - secmode = EWpa; - break; - } - default: - { - secmode = EOpen; - break; - } - } - iApItem->WriteUint( EApWlanSecurityMode, secmode ); - } - else - { - User::Leave( KErrNotSupported ); - } - break; - } - case EApWlanChannelId: - { - if ( IsWlanSupported() ) - { - if ( aCurrvalue ) - { // user defined, ask number from user, offer 7 as default - TUint32 channel = GetAdHocChannelL(); - iApItem->WriteUint( EApWlanChannelId, channel ); - } - else - { // auto, write 0 - iApItem->WriteUint( EApWlanChannelId, aCurrvalue ); - } - } - else - { - User::Leave( KErrNotSupported ); - } - break; - } - default: - { - __ASSERT_DEBUG( EFalse, Panic( EUnknownCase ) ); - User::Leave( KErrInvalidColumn ); - break; - } - } - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::UpdateFromPopupSettingPageL") } @@ -3190,125 +494,7 @@ // CApSettingsDlg::TSaveAction CApSettingsDlg::CanSaveL( TApMember& aDataNeeded ) { - APSETUILOGGER_ENTERFN( ESettings,"Settings::CanSaveL") - - TSaveAction retval( EApCanSave ); - - // it is used in two cases, less code by doing it here - HBufC *sgd = HBufC::NewLC( KModifiableTextLength ); - TPtr16 ptr( sgd->Des() ); - - switch ( iBearerType ) - { - case EApBearerTypeCSD: - case EApBearerTypeHSCSD: - { - iApItem->ReadTextL( EApIspDefaultTelNumber, ptr ); - if ( *sgd == KEmptyText ) - { - retval = EApMustDelete; - if ( !( *iEventStore & KApUiEventExitRequested ) ) - { - if ( ! AskQueryL( R_APUI_AP_ACCESS_NUMBER_NOT ) ) - { - retval = EApShallGoBack; - aDataNeeded = EApIspDefaultTelNumber; - } - } - } - break; - } - case EApBearerTypeGPRS: - { - // nothing to do... - break; - } - case EApBearerTypeWLAN: - { - if ( IsWlanSupported() ) - { - iApItem->ReadTextL( EApWlanNetworkName, ptr ); - if ( *sgd == KEmptyText ) - { - retval = EApShallGoBack; - aDataNeeded = EApWlanNetworkName; - if ( !( *iEventStore & KApUiEventExitRequested ) ) - { - if ( AskQueryL( R_APUI_AP_WLAN_NAME_NOT_DEFINED ) ) - { - retval = EApMustDelete; - } - } - } - if ( (retval != EApShallGoBack) && (retval != EApMustDelete) - && IsNetMaskAndGatewayVisibleL() ) - { // now check compulsory fields - iApItem->ReadTextL( EApWlanIpNetMask, ptr ); - if ( ( ptr.Compare( KDynIpAddress ) == 0 ) - || ( ptr.Compare( KEmptyText ) == 0 ) ) - { - retval = EApShallGoBack; - aDataNeeded = EApWlanIpNetMask; - if ( AskQueryL( - R_APUI_VIEW_NETW_QUEST_IAP_INCOMPLETE_DELETE ) ) - { - retval = EApMustDelete; - } - } - else - { - iApItem->ReadTextL( EApIspIPGateway, ptr ); - if ( ( sgd->Compare( KDynIpAddress ) == 0 ) - || ( sgd->Compare( KEmptyText ) == 0 ) ) - { - retval = EApShallGoBack; - aDataNeeded = EApIspIPGateway; - if ( AskQueryL( - R_APUI_VIEW_NETW_QUEST_IAP_INCOMPLETE_DELETE ) - ) - { - retval = EApMustDelete; - } - } - } - } - if ( (retval != EApShallGoBack) && (retval != EApMustDelete) - && (!HasSecuritySettingsFilledL()) ) - { - retval = EApShallGoBack; - aDataNeeded = EApWlanSecuritySettings; - if ( !( *iEventStore & KApUiEventExitRequested ) ) - { - if ( AskQueryL( R_APUI_AP_WLAN_SEC_SETT_EMPTY ) ) - { - retval = EApMustDelete; - } - } - } - } - else - { - User::Leave( KErrNotSupported ); - } - break; - } - default: - { // in release, leave, in debug, PANIC - __ASSERT_DEBUG( EFalse, Panic( EInvalidBearerType ) ); - User::Leave( KErrInvalidBearerType ); - break; - } - } - CleanupStack::PopAndDestroy( sgd ); // sgd - - if ( ( retval == EApShallGoBack ) && - ( *iEventStore & KApUiEventExitRequested ) ) - { - retval = EApNoAction; - } - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::CanSaveL") - return retval; + User::Leave( KErrNotSupported ); } @@ -3322,35 +508,6 @@ // void CApSettingsDlg::ShowPopupIpAddrSettingPageL( TApMember aData ) { - APSETUILOGGER_ENTERFN( ESettings,"Settings::ShowPopupIpAddrSettingPageL") - - HBufC* aBuf = HBufC::NewLC( KModifiableTextLength ); - TPtr16 ptr( aBuf->Des() ); - - iApItem->ReadTextL( aData, ptr ); - - TBuf textToChange; - - textToChange.Append( ptr ); - - TInt page_resid( 0 ); - TInt TextSettingPageFlags( EAknSettingPageNoOrdinalDisplayed ); - GetTextResId( aData, page_resid, TextSettingPageFlags ); - - TInetAddr AddrToChange; - AddrToChange.Input( textToChange ); - CAknIpFieldSettingPage* dlg = - new( ELeave )CAknIpFieldSettingPage( page_resid, AddrToChange ); - if ( dlg->ExecuteLD( CAknSettingPage::EUpdateWhenAccepted ) ) - { - // first need to check phone number validity, if not, - // display error msg, - AddrToChange.Output( textToChange ); - iApItem->WriteTextL( aData, textToChange ); - } - CleanupStack::PopAndDestroy(); // aBuf - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::ShowPopupIpAddrSettingPageL") } @@ -3364,85 +521,6 @@ // void CApSettingsDlg::ShowPopupPhoneNumSettingPageL( TApMember aData ) { - APSETUILOGGER_ENTERFN( ESettings,"Settings::ShowPopupPhoneNumSettingPageL") - - HBufC* aBuf = HBufC::NewLC( KModifiableTextLength ); - TPtr16 ptr( aBuf->Des() ); - - if ( aData == EApIspIfCallbackInfo ) - { // 8 bit text - HBufC8* tmpValue8 = HBufC8::NewLC( KModifiableTextLength ); - TPtr8 ptr8( tmpValue8->Des() ); - iApItem->ReadTextL( aData, ptr8 ); - ptr.Copy( ptr8 ); - CleanupStack::PopAndDestroy(); // tmpvalue8 - } - else - { - iApItem->ReadTextL( aData, ptr ); - } - - TBuf textToChange; - - textToChange.Append( ptr ); - - TInt page_resid( 0 ); - TInt TextSettingPageFlags( EAknSettingPageNoOrdinalDisplayed ); - GetTextResId( aData, page_resid, TextSettingPageFlags ); - TBool mustgoon( ETrue ); - do - { - CAknSettingPage* dlg = - new( ELeave )CAknTextSettingPage( page_resid, - textToChange, - TextSettingPageFlags ); - if ( dlg->ExecuteLD( CAknSettingPage::EUpdateWhenAccepted ) ) - { - // first need to check phone number validity, - // if not, dispaly error msg, - // bearing in mind that if empty is not allowed, - // we can not got empty text from editor, so IF it is not a valid - // phone number, but it is empty, thna it is allowed and - // it is the user's wish, so go on as valid... - // MNAN-6XBFNB: Digits that are not western should also be accepted - // Convert digits to western and check the phone number like this. - TBuf temp; - temp = textToChange; - AknTextUtils::ConvertDigitsTo( temp, EDigitTypeWestern ); - - if ( CommonPhoneParser::IsValidPhoneNumber - ( temp, CommonPhoneParser::EContactCardNumber ) - || ( temp.Compare( KEmpty ) == 0) ) - { - if ( aData == EApIspIfCallbackInfo ) - { // 8 bit text - HBufC8* tmpValue8 = HBufC8::NewLC( KModifiableTextLength ); - TPtr8 ptr8( tmpValue8->Des() ); - iApItem->ReadTextL( aData, ptr8 ); - ptr8.Copy( textToChange ); - iApItem->WriteTextL( aData, ptr8 ); - CleanupStack::PopAndDestroy(); // tmpvalue8 - } - else - { - iApItem->WriteTextL( aData, textToChange ); - } - mustgoon = EFalse; - } - else - { // give invalid number message - ShowNoteL( R_APUI_VIEW_INVALID_NUMBER ); - } - } - else - { - mustgoon = EFalse; - } - } - while( mustgoon ); - CleanupStack::PopAndDestroy(); // aBuf - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::ShowPopupPhoneNumSettingPageL") } @@ -3454,32 +532,6 @@ // void CApSettingsDlg::ShowPopupPasswordPageL( TApMember aData ) { - APSETUILOGGER_ENTERFN( ESettings,"Settings::ShowPopupPasswordPageL") - - // must be prepared for the worst case... - TBuf newpass; - - TUint32 txtLength = iApItem->ReadTextLengthL( aData ); - // allocates as much as needed... - HBufC* oldpass = HBufC::NewLC( txtLength ); - TPtr16 ptr( oldpass->Des() ); - iApItem->ReadTextL( aData, ptr ); - - CAknAlphaPasswordSettingPage* dlg = - new( ELeave )CAknAlphaPasswordSettingPage( - R_TEXT_SETTING_PAGE_LOGIN_PASSWD, - newpass, ptr ); - CleanupStack::PushL(dlg); - // As password is asked only once... - dlg->SetMaxPasswordLength( KMaxLoginPasswordLength ); - CleanupStack::Pop(); - if ( dlg->ExecuteLD(CAknSettingPage::EUpdateWhenChanged) ) - { - iApItem->WriteTextL( aData, newpass ); - } - CleanupStack::PopAndDestroy(); // oldpass - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::ShowPopupPasswordPageL") } @@ -3491,17 +543,6 @@ void CApSettingsDlg::GetBoolDataValue( TApMember aData, TBool aInvert, TInt& aCurrvalue) { - APSETUILOGGER_ENTERFN( ESettings,"Settings::GetBoolDataValue") - - iApItem->ReadBool( aData, aCurrvalue); - // just to be on the sure side... - aCurrvalue = Min( KBoolMaxNumber, aCurrvalue); - if ( aInvert) - { - aCurrvalue = !aCurrvalue; - } - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::GetBoolDataValue") } @@ -3511,12 +552,6 @@ // void CApSettingsDlg::DoBearerChangeL( TInt aCurrvalue) { - APSETUILOGGER_ENTERFN( ESettings,"Settings::DoBearerChangeL") - - TApBearerType newbearer = BearerItemPos2BearerTypeL( aCurrvalue ); - HandleBearerChangeL( newbearer ); - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::DoBearerChangeL") } @@ -3527,25 +562,6 @@ // void CApSettingsDlg::HandleBearerChangeL( TApBearerType aBearer) { - APSETUILOGGER_ENTERFN( ESettings,"Settings::HandleBearerChangeL") - - if ( iBearerItemArray->At( BearerToArrayIndexL( aBearer)) == NULL) - { - CApAccessPointItem* ap = CApAccessPointItem::NewLC(); - ap->CopyFromL( *iApItem); - ap->WriteUint( EApWapAccessPointID, iApItem->WapUid()); - iBearerItemArray->At( BearerToArrayIndexL( aBearer)) = ap; - iApItem = ap; - CleanupStack::Pop(); // ap - } - else - { - iApItem = iBearerItemArray->At( BearerToArrayIndexL( aBearer)); - } - iApItem->SetBearerTypeL( aBearer ); - SetBearerTypeL( aBearer ); - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::HandleBearerChangeL") } @@ -3555,48 +571,7 @@ // TInt32 CApSettingsDlg::BearerToArrayIndexL( TApBearerType aBearer) { - APSETUILOGGER_ENTERFN( ESettings,"Settings::BearerToArrayIndexL") - - TInt32 retval( KBearerArrayGPRS ); - switch( aBearer ) - { - case EApBearerTypeCSD: - { - retval = KBearerArrayCSD; - break; - } - case EApBearerTypeGPRS: - { - retval = KBearerArrayGPRS; - break; - } - case EApBearerTypeHSCSD: - { - retval = KBearerArrayHSCSD; - break; - } - case EApBearerTypeWLAN: - { - if ( IsWlanSupported() ) - { - retval = KBearerArrayWLAN; - } - else - { - User::Leave( KErrNotSupported ); - } - break; - } - default: - { - __ASSERT_DEBUG( EFalse, Panic( EInvalidBearerType ) ); - User::Leave( KErrInvalidBearerType ); - break; - } - } - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::BearerToArrayIndexL") - return retval; + return 0; } /* @@ -3659,109 +634,6 @@ void CApSettingsDlg::FillUpBearerSpeedValuesL( CDesCArrayFlat& aItems, TInt& aCurrvalue ) { - APSETUILOGGER_ENTERFN( ESettings,"Settings::FillUpBearerSpeedValuesL") - - TUint32 tval( 0 ); - TUint32 bval( 0 ); - - iApItem->ReadUint( EApIspBearerSpeed, tval ); - iApItem->ReadUint( EApIspBearerCallTypeIsdn, bval ); - TApBearerType btype = iApItem->BearerTypeL(); - const TInt* actResSpeeds = NULL; - const TInt* actSpeeds = NULL; - - TBool isWcdma = - FeatureManager::FeatureSupported( KFeatureIdProtocolWcdma ); - - switch ( bval ) - { - case ECallTypeAnalogue: - { // CSD/HSCSD, Analogue - if ( btype == EApBearerTypeHSCSD ) - { - actResSpeeds = KResHcsdAnalogue; - actSpeeds = KHcsdAnalogue; - } - else - { - actResSpeeds = KResCsdAnalogue; - actSpeeds = KCsdAnalogue; - if ( isWcdma ) - { - actResSpeeds = KResCsdAnalogueWcdma; - actSpeeds = KCsdAnalogueWcdma; - } - } - break; - } - case ECallTypeISDNv110: - { // CSD/HSCSD, ISDN v110: - if ( btype == EApBearerTypeHSCSD ) - { - actResSpeeds = KResHcsdIsdn110; - actSpeeds = KHcsdIsdn110; - } - else - { - actResSpeeds = KResCsdIsdn110; - actSpeeds = KCsdIsdn110; - if ( isWcdma ) - { - actResSpeeds = KResCsdIsdn110Wcdma; - actSpeeds = KCsdIsdn110Wcdma; - } - } - break; - } - case ECallTypeISDNv120: - { - if ( btype == EApBearerTypeHSCSD ) - { - actResSpeeds = KResHcsdIsdn120; - actSpeeds = KHcsdIsdn120; - } - else - { - actResSpeeds = KResCsdIsdn120; - actSpeeds = KCsdIsdn120; - if ( isWcdma ) - { - actResSpeeds = KResCsdIsdn120Wcdma; - actSpeeds = KCsdIsdn120Wcdma; - } - } - break; - } - default: - { - break; - } - } - - if ( actResSpeeds ) - { - while ( *actResSpeeds != KEndOfArray ) - { - aItems.AppendL( *iEikonEnv->AllocReadResourceLC( *actResSpeeds ) ); - CleanupStack::PopAndDestroy(); - ++actResSpeeds; - } - } - - if( actSpeeds ) - { - aCurrvalue = 0; - TInt nextSpeed = *( actSpeeds + aCurrvalue + 1) ; - while ( ( nextSpeed != KEndOfArray ) - && ( *( actSpeeds + aCurrvalue) < ( TInt )tval ) - && ( nextSpeed <= ( TInt )tval ) ) - { - ++aCurrvalue; - nextSpeed = *( actSpeeds + aCurrvalue + 1) ; - } - } - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::FillUpBearerSpeedValuesL") } @@ -3772,229 +644,7 @@ // TBool CApSettingsDlg::SaveDataL( ) { - APSETUILOGGER_ENTERFN( ESettings,"Settings::SaveDataL") - - TApMember aDataNeeded; - TSaveAction action(EApCanSave); - TBool retval( ETrue ); - TInt err (KErrNone ); - - // first handle ALL db stuff because Symbian DB does handles - // consequtive transactions wrongly... - TTransactionResult ownTransaction = - iDataModel->StartTransactionLC( - /*aWrite*/EFalse, - /*aShowNote*/ETrue, - /*aRetry*/ETrue ); - if ( ownTransaction != EFailedWithLocked ) - { - action = CanSaveL(aDataNeeded); - switch ( action ) - { - case EApCanSave: -#ifdef __WINS__ - case EApMustDelete: -#endif // __WINS__ - { // save data - if ( ( *iOldApItem != *iApItem ) || ( *iUid == KApNoneUID ) - || iDataModel->iWepSecSettings - || iDataModel->iWpaSecSettings ) - { // save if different or NEW BLANK - *iEventStore |= KApUiEventEdited; - if ( *iUid == KApNoneUID ) - { - HBufC* buf = HBufC::NewLC( KApMaxConnNameLength ); - // now check if name is unique, if it is, - // save and commit, if it is not, show note - // and no save at all, Rollback! - TPtr16 ptr( buf->Des() ); - iApItem->ReadTextL( EApWapAccessPointName, ptr ); - TBool b(EFalse); - TRAP( err, b = - iDataModel->ApUtils()->IsValidNameL( ptr ) ); - CleanupStack::PopAndDestroy( buf ); - if ( b ) - { - TRAP( err, - iDataModel->CreateFromDataL( *iApItem ) ); - if ( err == KErrNone ) - { - iApItem->ReadUint( EApWapAccessPointID, - *iUid ); - *iEventStore |= KApUiEventCreatedBlank; - } - } - else - { - err = KErrAlreadyExists; - // no DB call after this point, as transaction must be rolled back, - // but we can do it only at the end - if ( ownTransaction == EOwnTransaction ) - { - CleanupStack::PopAndDestroy(); //Rollback - // set as if no need to commit... - ownTransaction = EUsingAlreadyStarted; - } - } - } - else - { - // If the name is not unique, - // it will leave with KErrAlreadyExists - TRAP( err, - iDataModel->UpdateAccessPointDataL( *iApItem ) ); - } - } - break; - } -#ifndef __WINS__ - case EApMustDelete: - { - if ( *iUid != KApNoneUID ) - { - TUint32 WapUid( 0 ); - iApItem->ReadUint( EApWapAccessPointID, WapUid ); - iDataModel->RemoveApL( WapUid ); - } - break; - } -#endif // __WINS__ - case EApShallGoBack: - { - switch ( aDataNeeded ) - { - case EApIspDefaultTelNumber: - { - SelectItem( KListIndexCSDAccessNumber ); - retval = EFalse; - break; - } - case EApWlanNetworkName: - { - if ( IsWlanSupported() ) - { - SelectItem( KListIndexWLANNetworkName ); - retval = EFalse; - } - else - { - User::Leave( KErrNotSupported ); - } - break; - } - case EApWlanIpNetMask: - case EApIspIPNetMask: - { - if ( IsWlanSupported() ) - { - SelectItem( KListIndexWLANSubnetMask ); - retval = EFalse; - } - else - { - User::Leave( KErrNotSupported ); - } - break; - } - case EApIspIPGateway: - case EApWlanIpGateway: - { - if ( IsWlanSupported() ) - { - SelectItem( KListIndexWLANDefaultGateway ); - retval = EFalse; - } - else - { - User::Leave( KErrNotSupported ); - } - break; - } - case EApWlanSecuritySettings: - { - if ( IsWlanSupported() ) - { - SelectItem( KListIndexWLANSecuritySettings ); - retval = EFalse; - ChangeSettingsL( EFalse ); - } - else - { - User::Leave( KErrNotSupported ); - } - break; - } - default: - {// otherwise, nothing to do... - __ASSERT_DEBUG( EFalse, Panic( EUnknownCase ) ); - break; - } - } - break; - } - case EApNoAction: - { // can not save, do not go back: Exit, do nothing but ignore... - break; - } - default: - { - __ASSERT_DEBUG( EFalse, Panic( EUnknownCase ) ); - break; - } - } - - if ( ownTransaction == EOwnTransaction ) - { - err = iDataModel->Database()->Database()->CommitTransaction(); - User::LeaveIfError( err ); - CleanupStack::Pop(); // RollbackTransaction - } - } - else - { - User::Leave( KErrLocked ); - } - // end transaction stuff - // and handle possible other stuff like - // displaying notifications, redirecting the user, etc... - - if ( err == KErrAlreadyExists ) - { - // Check if exit and if it is, Exit, - // if it is not, then show note - // and move user back to editor... - if ( !( *iEventStore & KApUiEventExitRequested ) ) - { - HBufC* buf = HBufC::NewLC( KApMaxConnNameLength ); - TPtr16 ptr( buf->Des() ); - iApItem->ReadTextL( EApWapAccessPointName, ptr ); - ShowNoteL( R_APUI_IAP_NAME_ALREADY_EXISTS, buf ); - CleanupStack::PopAndDestroy( buf ); // buf - SelectItem( KListIndexConnectionName ); - retval = EFalse; - ChangeSettingsL( EFalse ); - } - } - else - { - if ( err == KErrInvalidName ) - { - ShowNoteL( R_APUI_VIEW_INVALID_CONN_NAME ); - SelectItem( KListIndexConnectionName ); - retval = EFalse; - } - else - { - if ( !( *iEventStore & KApUiEventExitRequested ) ) - { - User::LeaveIfError( err ); - } - iOldApItem->CopyFromL( *iApItem ); - } - } - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::SaveDataL") - return retval; + return EFalse; } @@ -4005,46 +655,6 @@ // void CApSettingsDlg::HandleListStructureChangeL() { - APSETUILOGGER_ENTERFN( ESettings,"Settings::HandleListStructureChangeL") - - TUint32 l = iApItem->ReadTextLengthL( EApWapGatewayAddress ); - HBufC* buf = HBufC::NewLC( l ); - TPtr16 ptr( buf->Des() ); - iApItem->ReadTextL( EApWapGatewayAddress, ptr ); - - if ( ( iBearerType == EApBearerTypeCSD ) - || ( iBearerType == EApBearerTypeHSCSD ) ) - { - GetCSDSettingArrays( iVariant ); - } - else - { - if ( iBearerType == EApBearerTypeGPRS ) - { - GetGPRSSettingArrays( iVariant ); - } - else - { - if ( IsWlanSupported() ) - { - if ( iBearerType == EApBearerTypeWLAN ) - { - GetWLANSettingArraysL( iVariant ); - } - else - { - User::Leave( KErrInvalidBearer ); - } - } - else - { - User::Leave( KErrInvalidBearer ); - } - } - } - CleanupStack::PopAndDestroy( buf ); - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::HandleListStructureChangeL") } @@ -4055,86 +665,6 @@ // void CApSettingsDlg::LimitSpeed() { - APSETUILOGGER_ENTERFN( ESettings,"Settings::LimitSpeed") - - // now 'limit' the speeds - TUint32 speed( 0 ); - iApItem->ReadUint( EApIspBearerSpeed, speed ); - TUint32 calltype( EFalse ); - iApItem->ReadUint( EApIspBearerCallTypeIsdn, calltype ); - const TInt* actSpeeds = NULL; - TBool isWcdma = - FeatureManager::FeatureSupported( KFeatureIdProtocolWcdma ) ; - switch ( iBearerType ) - { - case EApBearerTypeCSD: - { - switch ( calltype ) - { - case ECallTypeISDNv110: - { - actSpeeds = isWcdma ? KCsdIsdn110Wcdma : KCsdIsdn110; - break; - } - case ECallTypeISDNv120: - { - actSpeeds = isWcdma ? KCsdIsdn120Wcdma : KCsdIsdn120; - break; - } - case ECallTypeAnalogue: - default: - { - actSpeeds = isWcdma ? KCsdAnalogueWcdma : KCsdAnalogue; - } - } - break; - } - case EApBearerTypeHSCSD: - { - switch ( calltype ) - { - case ECallTypeISDNv110: - { - actSpeeds = KHcsdIsdn110; - break; - } - case ECallTypeISDNv120: - { - actSpeeds = KHcsdIsdn120; - break; - } - case ECallTypeAnalogue: - default: - { - actSpeeds = KHcsdAnalogue; - } - } - break; - } - default: - { - break; - } - } - - if( actSpeeds ) - { - TInt tempSpeed = *actSpeeds; - TInt nextSpeed = *( actSpeeds + 1 ); - while ( ( nextSpeed != KEndOfArray ) - && ( tempSpeed < ( TInt )speed ) - && ( nextSpeed <= ( TInt )speed ) ) - { - tempSpeed = *( ++actSpeeds ); - nextSpeed = *( actSpeeds + 1 ); - } - speed = tempSpeed ; - } - - - iApItem->WriteUint( EApIspBearerSpeed, speed ); - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::LimitSpeed") } @@ -4144,12 +674,6 @@ // void CApSettingsDlg::SelectItem( TInt aItemIndex ) { - APSETUILOGGER_ENTERFN( ESettings,"Settings::SelectItem") - - iList->ScrollToMakeItemVisible( aItemIndex ); - iList->SetCurrentItemIndexAndDraw( aItemIndex ); - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::SelectItem") } @@ -4163,25 +687,7 @@ // HBufC* CApSettingsDlg::ConvertDelimToPerNLC( const TDesC& aInText ) { - APSETUILOGGER_ENTERFN( ESettings,"Settings::ConvertDelimToPerNLC") - - TInt size = aInText.Length(); - HBufC* outText = HBufC::NewLC( size ); - TPtr ptr = outText->Des(); - - for ( TInt ii=0; iiDes(); - - TText ch; - for (TInt ii=0; iiCurrentItemIndex(), 0 ) ); - TApMember* ptr; - TInt* tptr; - TInt* compulsptr; - switch ( iLevel ) - { - case 0: - { - ptr = iField; - tptr = iTitles; - compulsptr = iCompulsory; - break; - } - case 1: - { - ptr = iFieldAdvanced; - tptr = iTitlesAdvanced; - compulsptr = iCompulsoryAdvanced; - break; - } - case 2: - { - ptr = iFieldL2; - tptr = iTitlesL2; - compulsptr = iCompulsoryL2; - break; - } - default: - { - __ASSERT_DEBUG( EFalse, Panic( EUnknownCase ) ); - return; // just to suppress warnings about ptr's - // beeing used uninitialised - } - } - - - - ptr += itemnum; - tptr += itemnum; - compulsptr += itemnum; - TInt topitem( iList->TopItemIndex() ); - - TApBearerType bearer = iApItem->BearerTypeL(); - if ( bearer == EApBearerTypeGPRS ) - { - TUint32 tint; - iApItem->ReadUint( EApGprsPdpType, tint ); - if ( tint == EIPv6 ) - { - if ( iLevel == 1 ) - { - if ( itemnum ) - { - ptr++; - tptr++; - compulsptr++; - } - } - } - } - else - { // others - if ( bearer == EApBearerTypeWLAN ) - { - // if we are in iL2Ipv4, AND - // EApIspIPNetMask and EApIspIPGateway fields are not added - // skip those items... - if ( !IsNetMaskAndGatewayVisibleL() ) - { - if ( *ptr == EApIspIPNetMask ) - { - ptr++; - tptr++; - compulsptr++; - } - if ( *ptr == EApIspIPGateway ) - { - ptr++; - tptr++; - compulsptr++; - } - } - if ( !IsAdhocChannelVisible() ) - { - if ( ( *ptr == EApWlanChannelId ) - || ( *ptr == EApProxyServerAddress ) ) - { - ptr++; - tptr++; - compulsptr++; - } - } - } - else - { - // CSD - if ( *ptr == EApIspIPAddr ) - { - if ( !iL2Ipv4 ) - { - ptr++; - tptr++; - compulsptr++; - } - } - } - } - - - switch ( *ptr ) - { - case EApIspPromptForLogin: - case EApWapSecurity: - case EApIspIfCallbackEnabled: - case EApIspEnableSWCompression: - case EApGprsHeaderCompression: - case EApIspUseLoginScript: - case EApGprsDisablePlainTextAuth: - case EApIspDisablePlainTextAuth: - case EApWapWspOption: - case EApIspIfCallbackType: - case EApGprsPdpType: - case EApWlanNetworkMode: - case EApWlanScanSSID: - { // type 4 setting item with two available values - TBool changed( ETrue ); - if ( aQuick ) - { - InvertSettingsL( *ptr ); - } - else - { - changed = ShowPopupSettingPageL( *ptr ); - } - if ( changed ) - { - if ( *ptr == EApGprsPdpType ) - { - HandleListboxDataChangeL( EFalse ); - } - UpdateOnOffListBoxItemL( *ptr, *tptr, itemnum, *compulsptr ); - if ( *ptr == EApWlanNetworkMode ) - { - UpdateOnOffListBoxItemL( *( ptr+1 ), *( tptr+1 ), - itemnum+1, - *( compulsptr + 1 ) ); - if ( (itemnum+1) <= iList->BottomItemIndex() ) - { - iList->DrawItem( itemnum+1 ); - } - } - } - break; - } - case EApIspDefaultTelNumber: - case EApIspIfCallbackInfo: - { // type 1, Phone number editor - ShowPopupPhoneNumSettingPageL( *ptr ); - UpdateTextualListBoxItemL( *ptr, *tptr, itemnum, *compulsptr ); - break; - } - case EApWapGatewayAddress: - case EApIspIPAddr: - case EApIspIPNetMask: - case EApWlanIpNetMask: - case EApIspIPGateway: - case EApWlanIpGateway: - case EApGprsIPNameServer1: - case EApIspIPNameServer1: - case EApGprsIPNameServer2: - case EApIspIPNameServer2: - {// above ones are type 1, IP Address editors! - ShowPopupIpAddrSettingPageL( *ptr ); - UpdateTextualListBoxItemL( *ptr, *tptr, itemnum, *compulsptr ); - if ( *ptr == EApWapGatewayAddress ) - { - HandleListStructureChangeL(); - HandleListboxDataChangeL( EFalse ); - } - if ( *ptr == EApIspIPAddr ) - { - HandleListboxDataChangeL( EFalse ); - } - break; - } - case EApWapAccessPointName: - case EApGprsAccessPointName: - case EApIspLoginName: - case EApIspIfAuthName: - case EApIspLoginScript: - case EApWapStartPage: - case EApIspInitString: - case EApProxyServerAddress: - case EApProxyPortNumber: - { // type 1, Text setting item - if ( ShowPopupTextSettingPageL( *ptr ) ) - { - UpdateTextualListBoxItemL( *ptr, *tptr, itemnum, *compulsptr ); - if ( *ptr == EApWapAccessPointName ) - { - iTitlePane->SetTextL( iApItem->ConnectionName() ); - } - } - break; - } - case EApIspLoginPass: - case EApIspIfAuthPass: - - { // re-confirm, secreted, etc, - ShowPopupPasswordPageL( *ptr ); - UpdateTextualListBoxItemL( *ptr, *tptr, itemnum, *compulsptr ); - break; - } - case EApWapCurrentBearer: - case EApIspBearerCallTypeIsdn: // used for data call type - case EApIspBearerSpeed: - case EApWlanChannelId: - { // type 2, Pop-up setting item - if ( ShowPopupSettingPageL( *ptr ) ) - { - if ( *ptr == EApWapCurrentBearer ) - { - // if ==, the whole list needs to be updated ! - SetBearerTypeL( iApItem->BearerTypeL() ); - LimitSpeed(); - HandleListboxDataChangeL( EFalse ); - iList->SetTopItemIndex( topitem ); - iList->DrawNow(); - } - else - { - if ( *ptr == EApIspBearerCallTypeIsdn ) - { // first limit the speed if neccessary - LimitSpeed(); - // need to redraw EApIspBearerSpeed, too - // because it is possible that it had been changed - // to keep constrains simply update next field, - // too, 'cause they are next to each other... - UpdateOnOffListBoxItemL( *( ptr+1 ), *( tptr+1 ), - itemnum+1, - *( compulsptr + 1 ) ); - iList->DrawItem( itemnum+1 ); - } - UpdateOnOffListBoxItemL( *ptr, *tptr, - itemnum, *compulsptr ); - } - } - break; - } - case EApWlanSecurityMode: - { // type 2, Pop-up setting item - if ( ShowPopupSettingPageL( *ptr ) ) - { - // security mode has changed, re-create security settings! - UpdateOnOffListBoxItemL( *ptr, *tptr, - itemnum, *compulsptr ); - iHandler->iModel->UpdateSecurityModeL( *iApItem ); - } - break; - } - case EApIP6DNSAddrFromServer: - { - // if GPRS, PDP type Ipv4, DNS data query - // if GPRS, PDP type Ipv6, type 2, Pop-up setting item - TUint32 ival(0); - iApItem->ReadUint( EApGprsPdpType, ival ); - TBool changed( EFalse ); - if ( iApItem->BearerTypeL() == EApBearerTypeGPRS ) - { - if ( ival == EIPv6 ) - { - // GPRS, PDP type Ipv6, DNS pop-up setting item - changed = ShowPopupSettingPageL( *ptr ); - } - else - { - // GPRS, PDP type Ipv4, DNS data query - changed = GetNameServersL( EFalse ); - } - } - else - { // CSD/HSCSD - if ( iL2Ipv4 ) - { - changed = GetNameServersL( EFalse ); - } - else - { - changed = ShowPopupSettingPageL( *ptr ); - } - } - if ( changed ) - { - UpdateOnOffListBoxItemL( *ptr, *tptr, itemnum, *compulsptr ); - } - break; - } - case EApNetworkName: - { - ChangeNetworkGroupL(); - UpdateTextualListBoxItemL( *ptr, *tptr, itemnum, *compulsptr ); - break; - } - case EApIpv4Settings: - case EApIpv6Settings: - { - iL2Ipv4 = ( *ptr == EApIpv4Settings ); - if ( iLevel ) - { - // enter Ipv4 or Ipv6 settings - if ( iL2Ipv4 ) - { - // save current state so we can roll back to it - // if needed, e.g. if user fills but discards values... - if (!iBackupApItem ) - { - iBackupApItem = CApAccessPointItem::NewLC(); - CleanupStack::Pop(); // member var - } - iBackupApItem->CopyFromL( *iApItem ); - } - iLevel++; - HandleListStructureChangeL(); - iOldIndex = iList->CurrentItemIndex(); - iOldTopIndex = iList->TopItemIndex(); - iList->SetCurrentItemIndex( 0 ); - HandleListboxDataChangeL( EFalse ); - itemnum = 0; - } - break; - } - case EApWlanNetworkName: - { - if ( IsWlanSupported() ) - { - // Temporarily use plain text editor to input - // network name... - ChangeWlanNetworkNameL(); - // as it sets connection mode and security mode, - // we must update the full list... - HandleListboxDataChangeL( EFalse ); - } - else - { - User::Leave( KErrNotSupported ); - } - break; - } - case EApWlanSecuritySettings: - { - if ( IsWlanSupported() ) - { - iSecSettingsExitReason = ChangeWlanSecuritySettingsL(); - } - else - { - User::Leave( KErrNotSupported ); - } - break; - } -/* - case EApWlanChannelId: - { - breaaak; - } -*/ - default: - { - __ASSERT_DEBUG( EFalse, Panic( EUnknownCase ) ); - break; - } - } - SelectItem( itemnum ); - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::DoChangeSettingsL") } @@ -4618,105 +721,7 @@ // TApCallSpeed CApSettingsDlg::GetBearerSpeedForSelection( TInt aCurrvalue ) { - APSETUILOGGER_ENTERFN( ESettings,"Settings::GetBearerSpeedForSelection") - - TApCallSpeed sp( KSpeed9600 ); - - - TUint32 tval( 0 ); - iApItem->ReadUint( EApIspBearerCallTypeIsdn, tval ); - - const TInt* actSpeeds = NULL; - TBool isWcdma = - FeatureManager::FeatureSupported( KFeatureIdProtocolWcdma ); - - switch ( tval ) - { - case ECallTypeAnalogue: - { // CSD/HSCSD, Analogue - switch ( iBearerType ) - { - case EApBearerTypeCSD: - { - actSpeeds = isWcdma ? KCsdAnalogueWcdma : KCsdAnalogue; - break; - } - case EApBearerTypeHSCSD: - { - actSpeeds = KHcsdAnalogue; - break; - } - default: - { - // this can only mean programmer error as no other - // bearer type is supperted with speed settings - __ASSERT_DEBUG( EFalse, Panic( EUnknownCase ) ); - break; - } - } - break; - } - case ECallTypeISDNv110: - { - switch ( iBearerType ) - { - case EApBearerTypeCSD: - { - actSpeeds = isWcdma ? KCsdIsdn110Wcdma : KCsdIsdn110; - break; - } - case EApBearerTypeHSCSD: - { - actSpeeds = KHcsdIsdn110; - break; - } - default: - { - // this can only mean programmer error as no other - // bearer type is supperted with speed settings - __ASSERT_DEBUG( EFalse, Panic( EUnknownCase ) ); - break; - } - } - break; - } - case ECallTypeISDNv120: - { - switch ( iBearerType ) - { - case EApBearerTypeCSD: - { - actSpeeds = isWcdma ? KCsdIsdn120Wcdma : KCsdIsdn120; - break; - } - case EApBearerTypeHSCSD: - { - actSpeeds = KHcsdIsdn120; - break; - } - default: - { - // this can only mean programmer error as no other - // bearer type is supperted with speed settings - __ASSERT_DEBUG( EFalse, Panic( EUnknownCase ) ); - break; - } - } - break; - } - default: - { - // this can only mean programmer error as no other - // bearer type is supperted with speed settings - __ASSERT_DEBUG( EFalse, Panic( EUnknownCase ) ); - break; - } - } - - sp = (TApCallSpeed) *(actSpeeds + aCurrvalue); - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::GetBearerSpeedForSelection") - return sp; + User::Leave( KErrNotSupported ); } @@ -4727,116 +732,7 @@ // TInt CApSettingsDlg::GetCurrIndexFromBearerSpeed( ) { - APSETUILOGGER_ENTERFN( ESettings,"Settings::GetCurrIndexFromBearerSpeed") - - TUint32 tval( 0 ); - TUint32 bval( 0 ); - TInt retval( 0 ); - - iApItem->ReadUint( EApIspBearerSpeed, tval ); - iApItem->ReadUint( EApIspBearerCallTypeIsdn, bval ); - - TBool isWcdma = - FeatureManager::FeatureSupported( KFeatureIdProtocolWcdma ); - - const TInt* actSpeeds = NULL; - - switch ( bval ) - { - case ECallTypeAnalogue: - { // CSD/HSCSD, Analogue - switch ( iBearerType ) - { - case EApBearerTypeCSD: - { - actSpeeds = isWcdma ? KCsdAnalogueWcdma : KCsdAnalogue; - break; - } - case EApBearerTypeHSCSD: - { - actSpeeds = KHcsdAnalogue; - break; - } - default: - { - // this can only mean programmer error as no other - // bearer type is supperted with speed settings - __ASSERT_DEBUG( EFalse, Panic( EUnknownCase ) ); - break; - } - } - break; - } - case ECallTypeISDNv110: - { - switch ( iBearerType ) - { - case EApBearerTypeCSD: - { - actSpeeds = isWcdma ? KCsdIsdn110Wcdma : KCsdIsdn110; - break; - } - case EApBearerTypeHSCSD: - { - actSpeeds = KHcsdIsdn110; - break; - } - default: - { - // this can only mean programmer error as no other - // bearer type is supperted with speed settings - __ASSERT_DEBUG( EFalse, Panic( EUnknownCase ) ); - break; - } - } - break; - } - case ECallTypeISDNv120: - { - switch ( iBearerType ) - { - case EApBearerTypeCSD: - { - actSpeeds = isWcdma ? KCsdIsdn120Wcdma : KCsdIsdn120; - break; - } - case EApBearerTypeHSCSD: - { - actSpeeds = KHcsdIsdn120; - break; - } - default: - { - // this can only mean programmer error as no other - // bearer type is supperted with speed settings - __ASSERT_DEBUG( EFalse, Panic( EUnknownCase ) ); - break; - } - } - break; - } - default: - { - // this can only mean programmer error as no other - // bearer type is supperted with speed settings - __ASSERT_DEBUG( EFalse, Panic( EUnknownCase ) ); - break; - } - } - - if( actSpeeds ) - { - retval = 0; - while ( ( *( actSpeeds + retval + 1) != KEndOfArray ) - && ( *( actSpeeds + retval) < ( TInt )tval ) - && ( *( actSpeeds + retval + 1) <= ( TInt )tval ) ) - { - ++retval; - } - } - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::GetCurrIndexFromBearerSpeed") - return retval; + return 0; } @@ -4846,25 +742,7 @@ // HBufC* CApSettingsDlg::ReplaceWhiteSpaceCharactersLC( const TDesC& aInText ) { - APSETUILOGGER_ENTERFN( ESettings,"Settings::ReplaceWhiteSpaceCharactersLC") - - TInt size = aInText.Length(); - HBufC* aOutText = HBufC::NewLC( size ); - - TPtr ptr = aOutText->Des(); - - for ( TInt ii=0; iiiModel->EikEnv()->AllocReadResourceLC - ( - R_APUI_VIEW_NETWORK_GROUP - ); - - // needs this Dummy array to pass it to CAknSettingPage's constructor... - CDesCArrayFlat* aItemArray = new ( ELeave ) CDesCArrayFlat( 1 ); - CleanupStack::PushL( aItemArray ); - TUint32 prefUid( 0 ); - TInt currsel( -1 ); - iApItem->ReadUint( EApNetworkID, prefUid ); - - TInt prefInt( prefUid ); - CApNetSelPopupList* dlg = - CApNetSelPopupList::NewL( *iDataModel, *iHandler, currsel, - prefInt, *iEventStore, - aItemArray, ETrue ); - - CleanupStack::PushL( dlg ); - TPtrC ptr( titlebuf->Des() ); - dlg->SetSettingTextL( ptr ); - // dlg must be Pop-ed because ExecuteLD starts with PushL()... - CleanupStack::Pop(); - if ( dlg->ExecuteLD( CAknSettingPage::EUpdateWhenChanged ) ) - { - // update value in iApItem - // get networkitem and add it to item... - iApItem->WriteUint( EApNetworkID, prefInt ); - // update network data according to new ID - iDataModel->DataHandler()->ReadNetworkPartL( *iApItem ); - } - CleanupStack::PopAndDestroy( aItemArray ); // aItemArray - CleanupStack::PopAndDestroy( titlebuf ); // titlebuf - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::ChangeNetworkGroupL") } @@ -4925,28 +764,7 @@ // TInt CApSettingsDlg::IsHSCSDEnabledL() { - APSETUILOGGER_ENTERFN( ESettings,"Settings::IsHSCSDEnabledL") - - TInt EnableHSCSD( ETrue ); - -/* - // Connecting and initialization: - TInt err( KErrNone ); - CRepository* repository; - TRAP( err, repository = CRepository::NewL( KGeneralSettingsUid ) ); -// repository->Get( KGSHSCSDAccessPoints, EnableHSCSD ); - delete repository; -*/ - -#ifdef __TEST_NO_HSCSD - EnableHSCSD = EFalse; -#endif -#ifdef __TEST_HSCSD_SUPPORT - EnableHSCSD = ETrue; -#endif // __TEST_HSCSD_SUPPORT - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::IsHSCSDEnabledL") - return EnableHSCSD; + return EFalse; } @@ -4961,143 +779,6 @@ // void CApSettingsDlg::GetCSDSettingArrays( TInt variant ) { - APSETUILOGGER_ENTERFN( ESettings,"Settings::GetCSDSettingArrays") - - // If IPv6 support requested, is the only place where L2 level needed, - // so it is the only place when it is variated... - if ( iReqIpvType & EIPv6 ) - { - if ( iL2Ipv4 ) - { - iFieldL2 = - (TApMember*) &Fields_CSD_L2_IPv4[KApMember][0]; - iFieldCountL2 = - sizeof( Fields_CSD_L2_IPv4[KApMember] )/sizeof( TApMember ); - iTitlesL2 = - MUTABLE_CAST( TInt*, - &Fields_CSD_L2_IPv4[KResourceID][0] ); - iCompulsoryL2 = - MUTABLE_CAST( TInt*, - &Fields_CSD_L2_IPv4[KCompulsory][0] ); - } - else - { - iFieldL2 = - (TApMember*) &Fields_CSD_L2_IPv6[KApMember][0]; - iFieldCountL2 = - sizeof( Fields_CSD_L2_IPv6[KApMember] )/sizeof( TApMember ); - iTitlesL2 = - MUTABLE_CAST( TInt*, - &Fields_CSD_L2_IPv6[KResourceID][0] ); - iCompulsoryL2 = - MUTABLE_CAST( TInt*, - &Fields_CSD_L2_IPv6[KCompulsory][0] ); - } - } - - - - if ( variant & KWSPSettingsVisible ) - { - if ( iReqIpvType & EIPv6 ) - { - iField = (TApMember*) &Fields_CSD_WSP_IPv6[KApMember][0]; - iFieldCount = - sizeof( Fields_CSD_WSP_IPv6[KApMember] )/sizeof( TApMember ); - - iFieldAdvanced = - (TApMember*) &Fields_CSD_Advanced_WSP_IPv6[KApMember][0]; - iAdvancedFieldCount = - sizeof( Fields_CSD_Advanced_WSP_IPv6[KApMember] ) - / sizeof( TApMember ); - - iTitles = - MUTABLE_CAST( TInt*, &Fields_CSD_WSP_IPv6[KResourceID][0] ); - iTitlesAdvanced = - MUTABLE_CAST( TInt*, - &Fields_CSD_Advanced_WSP_IPv6[KResourceID][0] ); - - iCompulsory = - MUTABLE_CAST( TInt*, - &Fields_CSD_WSP_IPv6[KCompulsory][0] ); - iCompulsoryAdvanced = - MUTABLE_CAST( TInt*, - &Fields_CSD_Advanced_WSP_IPv6[KCompulsory][0] ); - - } - else - { - iField = (TApMember*) &Fields_CSD_WSP[KApMember][0]; - iFieldCount = - sizeof( Fields_CSD_WSP[KApMember] )/sizeof( TApMember ); - - iFieldAdvanced = - (TApMember*) &Fields_CSD_Advanced_WSP[KApMember][0]; - iAdvancedFieldCount = - sizeof( Fields_CSD_Advanced_WSP[KApMember] ) - / sizeof( TApMember ); - - iTitles = - MUTABLE_CAST( TInt*, &Fields_CSD_WSP[KResourceID][0] ); - iTitlesAdvanced = - MUTABLE_CAST( TInt*, - &Fields_CSD_Advanced_WSP[KResourceID][0] ); - - iCompulsory = - MUTABLE_CAST( TInt*, &Fields_CSD_WSP[KCompulsory][0] ); - iCompulsoryAdvanced = - MUTABLE_CAST( TInt*, - &Fields_CSD_Advanced_WSP[KCompulsory][0] ); - } - } - else - { - if ( iReqIpvType & EIPv6 ) - { - iField = (TApMember*) &Fields_CSD_IPv6[KApMember][0]; - iFieldCount = - sizeof( Fields_CSD_IPv6[KApMember] )/sizeof( TApMember ); - - iFieldAdvanced = - (TApMember*) &Fields_CSD_Advanced_IPv6[KApMember][0]; - iAdvancedFieldCount = - sizeof( Fields_CSD_Advanced_IPv6[KApMember] ) - / sizeof( TApMember ); - - iTitles = - MUTABLE_CAST( TInt*, - &Fields_CSD_IPv6[KResourceID][0] ); - iTitlesAdvanced = - MUTABLE_CAST( TInt*, - &Fields_CSD_Advanced_IPv6[KResourceID][0] ); - - iCompulsory = - MUTABLE_CAST( TInt*, - &Fields_CSD_IPv6[KCompulsory][0] ); - iCompulsoryAdvanced = - MUTABLE_CAST( TInt*, - &Fields_CSD_Advanced_IPv6[KCompulsory][0] ); - } - else - { - iField = (TApMember*) &Fields_CSD[KApMember][0]; - iFieldCount = sizeof( Fields_CSD[KApMember] )/sizeof( TApMember ); - - iFieldAdvanced = (TApMember*) &Fields_CSD_Advanced[KApMember][0]; - iAdvancedFieldCount = - sizeof( Fields_CSD_Advanced[KApMember] )/sizeof( TApMember ); - - iTitles = MUTABLE_CAST( TInt*, &Fields_CSD[KResourceID][0] ); - iTitlesAdvanced = - MUTABLE_CAST( TInt*, &Fields_CSD_Advanced[KResourceID][0] ); - - iCompulsory = MUTABLE_CAST( TInt*, &Fields_CSD[KCompulsory][0] ); - iCompulsoryAdvanced = - MUTABLE_CAST( TInt*, &Fields_CSD_Advanced[KCompulsory][0] ); - } - } - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::GetCSDSettingArrays") } @@ -5108,98 +789,6 @@ // void CApSettingsDlg::GetGPRSSettingArrays( TInt variant ) { - APSETUILOGGER_ENTERFN( ESettings,"Settings::GetGPRSSettingArrays") - - if ( variant & KWSPSettingsVisible ) - { - if ( iReqIpvType & EIPv6 ) - { - iField = ( TApMember* ) &Fields_GPRS_WSP_IPv6[ KApMember ][0]; - iFieldCount = sizeof( Fields_GPRS_WSP_IPv6[0] ) - / sizeof( TApMember ); - iFieldAdvanced = - ( TApMember* ) &Fields_GPRS_Advanced_WSP_IPv6[ KApMember ][0]; - iAdvancedFieldCount = - sizeof( Fields_GPRS_Advanced_WSP_IPv6[ KApMember ]) - / sizeof( TApMember ); - iTitles = - MUTABLE_CAST( TInt*, &Fields_GPRS_WSP_IPv6[ KResourceID ][0] ); - iTitlesAdvanced = - MUTABLE_CAST( - TInt*, - &Fields_GPRS_Advanced_WSP_IPv6[ KResourceID ][0] ); - iCompulsory = - MUTABLE_CAST( TInt*, &Fields_GPRS_WSP_IPv6[ KCompulsory ][0] ); - iCompulsoryAdvanced = - MUTABLE_CAST( - TInt*, - &Fields_GPRS_Advanced_WSP_IPv6[ KCompulsory ][0] ); - } - else - { - iField = ( TApMember* ) &Fields_GPRS_WSP[ KApMember ][0]; - iFieldCount = sizeof( Fields_GPRS_WSP[0] )/sizeof( TApMember ); - iFieldAdvanced = - ( TApMember* ) &Fields_GPRS_Advanced_WSP[ KApMember ][0]; - iAdvancedFieldCount = - sizeof( Fields_GPRS_Advanced_WSP[ KApMember ]) - / sizeof( TApMember ); - iTitles = - MUTABLE_CAST( TInt*, &Fields_GPRS_WSP[ KResourceID ][0] ); - iTitlesAdvanced = - MUTABLE_CAST( - TInt*, - &Fields_GPRS_Advanced_WSP[ KResourceID ][0] ); - iCompulsory = - MUTABLE_CAST( TInt*, &Fields_GPRS_WSP[ KCompulsory ][0] ); - iCompulsoryAdvanced = - MUTABLE_CAST( - TInt*, - &Fields_GPRS_Advanced_WSP[ KCompulsory ][0] ); - } - } - else - { - if ( iReqIpvType & EIPv6 ) - { - iField = ( TApMember* ) &Fields_GPRS_IPv6[ KApMember ][0]; - iFieldCount = sizeof( Fields_GPRS_IPv6[0] )/sizeof( TApMember ); - iFieldAdvanced = - ( TApMember* ) &Fields_GPRS_Advanced_IPv6[ KApMember ][0]; - iAdvancedFieldCount = - sizeof( Fields_GPRS_Advanced_IPv6[ KApMember ]) - / sizeof( TApMember ); - iTitles = - MUTABLE_CAST( TInt*, &Fields_GPRS_IPv6[ KResourceID ][0] ); - iTitlesAdvanced = - MUTABLE_CAST( TInt*, - &Fields_GPRS_Advanced_IPv6[ KResourceID ][0] ); - iCompulsory = - MUTABLE_CAST( TInt*, &Fields_GPRS_IPv6[ KCompulsory ][0] ); - iCompulsoryAdvanced = - MUTABLE_CAST( TInt*, - &Fields_GPRS_Advanced_IPv6[ KCompulsory ][0] ); - } - else - { - iField = ( TApMember* ) &Fields_GPRS[ KApMember ][0]; - iFieldCount = sizeof( Fields_GPRS[0] )/sizeof( TApMember ); - iFieldAdvanced = - ( TApMember* ) &Fields_GPRS_Advanced[ KApMember ][0]; - iAdvancedFieldCount = - sizeof( Fields_GPRS_Advanced[ KApMember ])/sizeof( TApMember ); - iTitles = - MUTABLE_CAST( TInt*, &Fields_GPRS[ KResourceID ][0] ); - iTitlesAdvanced = - MUTABLE_CAST( TInt*, &Fields_GPRS_Advanced[ KResourceID ][0] ); - iCompulsory = - MUTABLE_CAST( TInt*, &Fields_GPRS[ KCompulsory ][0] ); - iCompulsoryAdvanced = - MUTABLE_CAST( TInt*, &Fields_GPRS_Advanced[ KCompulsory ][0] ); - } - } - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::GetGPRSSettingArrays") } @@ -5211,92 +800,6 @@ // void CApSettingsDlg::GetWLANSettingArraysL( TInt /*aVariant*/ ) { - APSETUILOGGER_ENTERFN( ESettings,"Settings::GetWLANSettingArraysL") - - if ( IsWlanSupported() ) - { - // If IPv6 support requested, is the only place where L2 level needed, - // so it is the only place when it is variated... - if ( iReqIpvType & EIPv6 ) - { - if ( iL2Ipv4 ) - { - iFieldL2 = - (TApMember*) &Fields_WLAN_L2_IPv4[KApMember][0]; - iFieldCountL2 = - sizeof( Fields_WLAN_L2_IPv4[KApMember] ) - / sizeof( TApMember ); - iTitlesL2 = - MUTABLE_CAST( TInt*, - &Fields_WLAN_L2_IPv4[KResourceID][0] ); - iCompulsoryL2 = - MUTABLE_CAST( TInt*, - &Fields_WLAN_L2_IPv4[KCompulsory][0] ); - } - else - { - iFieldL2 = - (TApMember*) &Fields_CSD_L2_IPv6[KApMember][0]; - iFieldCountL2 = - sizeof( Fields_CSD_L2_IPv6[KApMember] ) - / sizeof( TApMember ); - iTitlesL2 = - MUTABLE_CAST( TInt*, - &Fields_CSD_L2_IPv6[KResourceID][0] ); - iCompulsoryL2 = - MUTABLE_CAST( TInt*, - &Fields_CSD_L2_IPv6[KCompulsory][0] ); - } - } - - - if ( iReqIpvType & EIPv6 ) - { - iField = ( TApMember* ) &Fields_WLAN_IPv6[ KApMember ][0]; - iFieldCount = sizeof( Fields_WLAN_IPv6[0] )/sizeof( TApMember ); - iFieldAdvanced = - ( TApMember* ) &Fields_WLAN_Advanced_IPv6[ KApMember ][0]; - iAdvancedFieldCount = - sizeof( Fields_WLAN_Advanced_IPv6[ KApMember ]) - / sizeof( TApMember ); - iTitles = - MUTABLE_CAST( TInt*, &Fields_WLAN_IPv6[ KResourceID ][0] ); - iTitlesAdvanced = - MUTABLE_CAST( TInt*, - &Fields_WLAN_Advanced_IPv6[ KResourceID ][0] ); - iCompulsory = - MUTABLE_CAST( TInt*, &Fields_WLAN_IPv6[ KCompulsory ][0] ); - iCompulsoryAdvanced = - MUTABLE_CAST( TInt*, - &Fields_WLAN_Advanced_IPv6[ KCompulsory ][0] ); - } - else - { - iField = ( TApMember* ) &Fields_WLAN_IPv4[ KApMember ][0]; - iFieldCount = sizeof( Fields_WLAN_IPv4[0] )/sizeof( TApMember ); - iFieldAdvanced = - ( TApMember* ) &Fields_WLAN_Advanced_IPv4[ KApMember ][0]; - iAdvancedFieldCount = - sizeof( Fields_WLAN_Advanced_IPv4[ KApMember ]) - / sizeof( TApMember ); - iTitles = - MUTABLE_CAST( TInt*, &Fields_WLAN_IPv4[ KResourceID ][0] ); - iTitlesAdvanced = - MUTABLE_CAST( TInt*, - &Fields_WLAN_Advanced_IPv4[ KResourceID ][0] ); - iCompulsory = - MUTABLE_CAST( TInt*, &Fields_WLAN_IPv4[ KCompulsory ][0] ); - iCompulsoryAdvanced = - MUTABLE_CAST( TInt*, - &Fields_WLAN_Advanced_IPv4[ KCompulsory ][0] ); - } - } - else - { - User::Leave( KErrNotSupported ); - } - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::GetWLANSettingArraysL") } @@ -5307,21 +810,7 @@ // TInt CApSettingsDlg::GetNameServersL( TBool aIp6 ) { - APSETUILOGGER_ENTERFN( ESettings,"Settings::GetNameServersL") - - TInt retval( 0 ); - - if ( (iReqIpvType & EIPv6) && aIp6 ) - { - retval = GetIpv6NameServerL(); - } - else - { - retval = GetIpv4NameServerL(); - } - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::GetNameServersL") - return retval; + return 0; } @@ -5337,35 +826,6 @@ TApMember /*aMember*/, TInt aRes, TInt aCompulsory ) { - APSETUILOGGER_ENTERFN( ESettings,"Settings::AddMenuListBoxItemL") - - // Define a heap descriptor to hold all the item text - // HBufC is non-modifiable - HBufC* title = iEikonEnv->AllocReadResourceLC( aRes ); - - // Define a heap descriptor to hold all the item text - TInt length = title->Length() + 10; - if ( aCompulsory ) - { - length += 3; - } - HBufC* itemText = HBufC::NewLC( length ); - - - // Define a modifiable pointer descriptor to be able to append text to the - // non-modifiable heap descriptor itemText - TPtr itemTextPtr = itemText->Des(); - itemTextPtr.Format( KTxtMenuListItemFormat, title ); - if ( aCompulsory ) - { - itemTextPtr.Append( KTxtCompulsory ); - } - - aItemArray.AppendL( *itemText ); - CleanupStack::PopAndDestroy( itemText ); - CleanupStack::PopAndDestroy( title ); // title - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::AddMenuListBoxItemL") } @@ -5375,34 +835,7 @@ // TBool CApSettingsDlg::AskQueryIfWcdmaL( TApMember aMember, TInt aCurrvalue ) { - APSETUILOGGER_ENTERFN( ESettings,"Settings::AskQueryIfWcdmaL") - - TBool accept = ETrue ; - TBool isWcdma = - FeatureManager::FeatureSupported( KFeatureIdProtocolWcdma ); - if ( isWcdma && iBearerType == EApBearerTypeCSD && - aMember == EApIspBearerSpeed ) - { - TApCallSpeed newSpeed = GetBearerSpeedForSelection( aCurrvalue ); - switch ( newSpeed) - { - case KSpeed28800: - case KSpeed38400: - case KSpeed56000: - { - accept = AskQueryL( R_APUI_IAP_CONF_MAX_SPEED_WCDMA ); - break; - } - default: - { - break; - } - - } - } - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::AskQueryIfWcdmaL") - return accept; + return EFalse; } @@ -5413,50 +846,7 @@ // TInt CApSettingsDlg::GetDomainNameServersTypeL() { - APSETUILOGGER_ENTERFN( ESettings,"Settings::GetDomainNameServersTypeL") - - TInt retval( 0 ); - // GPRS, net type 4: - // if IspNameServ <> 0.0.0.0 => User defined - // GPRS, net type 6: - // if IspIPv6NameServ <> 0.0.0.0 => User defined OR well-known - // CSD: - // if in IPv4settings: - // if IspNameServ <> 0.0.0.0 => User defined - // CSD: - // if in IPv6settings: - // if IspIPv6NameServ <> 0.0.0.0 => User defined OR well-known - - if ( iApItem->BearerTypeL() == EApBearerTypeGPRS ) - { - TUint32 ipnettype( 0 ); - iApItem->ReadUint( EApGprsPdpType, ipnettype ); - if ( ipnettype == EIPv6 ) - { - retval = GetIPv6DNSTypeL(); - } - else - { - retval = GetIPv4DNSTypeL(); - } - } - else - { // CSD - // IPv4settings: IspNameServ <> 0.0.0.0 => User defined - // IPv6settings: - // IspIPv6NameServ <> 0.0.0.0 => User defined OR well-known - if ( iL2Ipv4 ) - { // IPv4 settings - retval = GetIPv4DNSTypeL(); - } - else - { // IPv6 settings - retval = GetIPv6DNSTypeL(); - } - } - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::GetDomainNameServersTypeL") - return retval; + return 0; } @@ -5467,47 +857,7 @@ // TInt CApSettingsDlg::GetIpv4NameServerL() { - APSETUILOGGER_ENTERFN( ESettings,"Settings::GetIpv4NameServerL") - - HBufC* dns1 = HBufC::NewLC( KModifiableTextLength ); - HBufC* dns2 = HBufC::NewLC( KModifiableTextLength ); - TPtr dns1ptr( dns1->Des() ); - TPtr dns2ptr( dns2->Des() ); - - TInt ResId( 0 ); - - iApItem->ReadTextL( EApGprsIPNameServer1, dns1ptr ); - iApItem->ReadTextL( EApGprsIPNameServer2, dns2ptr ); - ResId = R_DNSIP4_QUERY; - - TInetAddr dns1Addr; - TInetAddr dns2Addr; - dns1Addr.Input( dns1ptr ); - dns2Addr.Input( dns2ptr ); - - CAknMultiLineIpQueryDialog* ipquery = - CAknMultiLineIpQueryDialog::NewL( dns1Addr, dns2Addr ); - - TInt retval = ipquery->ExecuteLD( ResId ); - if ( retval ) - { - dns1Addr.Output( dns1ptr ); - dns2Addr.Output( dns2ptr ); - if ( dns1ptr.Compare( KDynIpAddress ) == 0 ) - { // move 2nd to first, set second to Dynamic... - iApItem->WriteTextL( EApGprsIPNameServer1, dns2ptr ); - iApItem->WriteTextL( EApGprsIPNameServer2, KDynIpAddress ); - } - else - { - iApItem->WriteTextL( EApGprsIPNameServer1, dns1ptr ); - iApItem->WriteTextL( EApGprsIPNameServer2, dns2ptr ); - } - } - CleanupStack::PopAndDestroy( 2 ); // dns1, dns2 - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::GetIpv4NameServerL") - return retval; + return 0; } @@ -5517,72 +867,7 @@ // TInt CApSettingsDlg::GetIpv6NameServerL() { - APSETUILOGGER_ENTERFN( ESettings,"Settings::GetIpv6NameServerL") - - HBufC* dns1 = HBufC::NewLC( KModifiableTextLength ); - HBufC* dns2 = HBufC::NewLC( KModifiableTextLength ); - TPtr dns1ptr( dns1->Des() ); - TPtr dns2ptr( dns2->Des() ); - - TInt ResId( 0 ); - - iApItem->ReadTextL( EApIP6NameServer1, dns1ptr ); - iApItem->ReadTextL( EApIP6NameServer2, dns2ptr ); - ResId = R_DNSIP6_QUERY; - - if ( ( dns1ptr.Compare( KKnownNameServer1 ) == 0 ) - && ( dns2ptr.Compare( KKnownNameServer2 ) == 0 ) ) - { // special value, well-known - // in this case 'dynamic' string must be offered so - // temp data must be changed to 'dynamic' - dns1ptr = KDynIpv6Address; - dns2ptr = KDynIpv6Address; - } - - CApMultiLineDataQueryDialog* ipquery = - CApMultiLineDataQueryDialog::NewL( dns1ptr, dns2ptr ); - - TInt retval = ipquery->ExecuteLD( ResId ); - if ( retval ) - { - TInetAddr dns1Addr; - TInetAddr dns2Addr; - TInt err1( KErrNone ); - TInt err2( KErrNone ); - if ( dns1ptr.Compare( KEmpty ) != 0 ) - { - err1 = dns1Addr.Input( dns1ptr ); - } - if ( dns2ptr.Compare( KEmpty ) != 0 ) - { - err2 = dns2Addr.Input( dns2ptr ); - } - if ( err1 || err2 ) - { - ShowNoteL( R_APUI_VIEW_SET_INFO_INVALID_IP ); - GetIpv6NameServerL(); - } - else - { - if ( - ( dns1ptr.Compare( KDynIpv6Address ) == 0 ) || - ( dns1ptr.Compare( KEmpty ) == 0 ) - ) - { // swap them: move 2nd to first, set second to Dynamic... - iApItem->WriteTextL( EApIP6NameServer1, dns2ptr ); - iApItem->WriteTextL( EApIP6NameServer2, KDynIpv6Address ); - } - else - { // keep the original order - iApItem->WriteTextL( EApIP6NameServer1, dns1ptr ); - iApItem->WriteTextL( EApIP6NameServer2, dns2ptr ); - } - } - } - CleanupStack::PopAndDestroy( 2 ); // dns1, dns2 - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::GetIpv6NameServerL") - return retval; + return 0; } @@ -5593,63 +878,7 @@ // TInt CApSettingsDlg::GetIPv6DNSTypeL() { - APSETUILOGGER_ENTERFN( ESettings,"Settings::GetIPv6DNSTypeL") - - TInt retval( 0 ); - - HBufC* buf1 = HBufC::NewLC( KModifiableTextLength ); - TPtr16 ptr1( buf1->Des() ); - - HBufC* buf2 = HBufC::NewLC( KModifiableTextLength ); - TPtr16 ptr2( buf2->Des() ); - - // net type 6: if IspIPv6NameServ <> 0.0.0.0 - // => User defined OR well-known - iApItem->ReadTextL( EApIP6NameServer1, ptr1 ); - iApItem->ReadTextL( EApIP6NameServer2, ptr2 ); - - if ( ( ptr1.Compare( KKnownNameServer1 ) == 0 ) - && ( ptr2.Compare( KKnownNameServer2 ) == 0 ) ) - { // special value, well-known - retval = 1; - } - else - { - // dynamic, if 0:0:... - // OR EMPTY text... - if ( ( ( ptr1.Compare( KDynIpv6Address ) == 0 ) - || ( ptr1.Compare( KEmpty ) == 0 ) ) - &&( ( ptr2.Compare( KDynIpv6Address ) == 0 ) - ||( ptr2.Compare( KEmpty ) == 0 ) ) ) - { // dynamic, 0:0:... - // OR in case of CSD, HSCSD, it might be user defined, - // as for those bearers Dynamic is not possible... - TApBearerType bt = iApItem->BearerTypeL(); - switch (bt) - { - case EApBearerTypeCSD: - case EApBearerTypeHSCSD: - { - retval = 2; // consider it user defined - break; - } - default: - { - retval = 0; - break; - } - } - } - else - { // other value, user defined - retval = 2; - } - } - - CleanupStack::PopAndDestroy( 2 ); - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::GetIPv6DNSTypeL") - return retval; + return 0; } @@ -5662,34 +891,7 @@ // TInt CApSettingsDlg::GetIPv4DNSTypeL() { - APSETUILOGGER_ENTERFN( ESettings,"Settings::GetIPv4DNSTypeL") - - TInt retval( 0 ); - - HBufC* buf1 = HBufC::NewLC( KModifiableTextLength ); - TPtr16 ptr1( buf1->Des() ); - - HBufC* buf2 = HBufC::NewLC( KModifiableTextLength ); - TPtr16 ptr2( buf2->Des() ); - - // net type 4: if IspNameServ <> 0.0.0.0 => User defined - iApItem->ReadTextL( EApGprsIPNameServer1, ptr1 ); - iApItem->ReadTextL( EApGprsIPNameServer2, ptr2 ); - - if ( ( ptr1.Compare( KDynIpAddress ) == 0 ) - && ( ptr2.Compare( KDynIpAddress ) == 0 ) ) - { // dynamic, 0:0:... - retval = 0; - } - else - { // other value, user defined - retval = 2; - } - - CleanupStack::PopAndDestroy( 2 ); - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::GetIPv4DNSTypeL") - return retval; + return 0; } @@ -5702,26 +904,7 @@ // HBufC* CApSettingsDlg::StripNonNumberLC( const TDesC16& aInText ) { - APSETUILOGGER_ENTERFN( ESettings,"Settings::StripNonNumberLC") - -// CLOG( ( EApItem, 0, _L( "-> CApSettingsDlg::StripNonNumberLC" ) ) ); - - TInt size = aInText.Length(); - HBufC* aOutText = HBufC::NewLC( size ); - TPtr ptr = aOutText->Des(); - - for ( TInt ii=0; ii* bearerlist = - new(ELeave) CArrayFixFlat(4); - CleanupStack::PushL( bearerlist ); - - bearerlist->AppendL( EApBearerTypeGPRS ); - - if ( IsWlanSupported() ) - { - bearerlist->AppendL( EApBearerTypeWLAN ); - } - - TBool isCsdSupported = - FeatureManager::FeatureSupported( KFeatureIdAppCsdSupport ); - if ( isCsdSupported ) - { - bearerlist->AppendL( EApBearerTypeCSD ); - } - if ( IsHSCSDEnabledL() && isCsdSupported ) - { - bearerlist->AppendL( EApBearerTypeHSCSD ); - } - - __ASSERT_DEBUG( ( aPos < bearerlist->Count() ), \ - Panic( EInvalidBearerType ) ); - __ASSERT_DEBUG( ( aPos >= 0 ), Panic( EInvalidBearerType ) ); - - aPos = Max( aPos, 0 ); - aPos = Min( aPos, ( bearerlist->Count() - 1 ) ); - - bearer = bearerlist->At( aPos ); - - CleanupStack::PopAndDestroy( bearerlist ); - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::BearerItemPos2BearerTypeL") - return bearer; + User::Leave( KErrNotSupported ); } @@ -5867,122 +935,6 @@ // void CApSettingsDlg::ChangeWlanNetworkNameL() { - APSETUILOGGER_ENTERFN( ESettings,"Settings::ChangeWlanNetworkNameL") - - // Implement WLAN network name change - TInt currvalue( 0 ); - CDesCArrayFlat* items = FillPopupSettingPageLC( EApWlanNetworkName, - currvalue ); - - TInt attr_resid( 0 ); - GetResId( EApWlanNetworkName, attr_resid ); - HBufC* titlebuf; - CAknRadioButtonSettingPage* dlg; - if ( attr_resid ) - { - titlebuf = iEikonEnv->AllocReadResourceLC( attr_resid ); - dlg = new ( ELeave )CAknRadioButtonSettingPage( - R_RADIO_BUTTON_SETTING_PAGE, - currvalue, items ); - // must push 'cause SetSettingTextL can leave... - CleanupStack::PushL( dlg ); - TPtrC ptr( titlebuf->Des() ); - dlg->SetSettingTextL( ptr ); - CleanupStack::Pop(); // dlg - } - else - { - dlg = new ( ELeave )CAknRadioButtonSettingPage( - R_RADIO_BUTTON_SETTING_PAGE, currvalue, items ); - } - if ( dlg->ExecuteLD( CAknSettingPage::EUpdateWhenAccepted ) ) - { - if ( !currvalue ) - {// user defined - QueryWlanNetworkNameL(); - } - else - { // scan for, select one! - CConnectionUiUtilities* connUiUtils = - CConnectionUiUtilities::NewL(); - CleanupStack::PushL( connUiUtils ); - - TWlanSsid ssid; - TWlanConnectionMode connmode; - TWlanConnectionSecurityMode secmode; - TBool ret = connUiUtils->SearchWLANNetwork( ssid, - connmode, - secmode ); - if ( ret ) - { - HBufC* tmp = HBufC::NewLC( KCommsDbSvrMaxFieldLength ); - TPtr16 tmpPtr16 = tmp->Des(); - CnvUtfConverter::ConvertToUnicodeFromUtf8( tmpPtr16, ssid); - - iApItem->WriteTextL( EApWlanNetworkName, *tmp ); - CleanupStack::PopAndDestroy( tmp ); - // now handle connmode & secmode settings - if ( connmode == EWlanConnectionModeInfrastructure ) - { - iApItem->WriteUint( EApWlanNetworkMode, EInfra ); - } - else - { - if ( connmode == EWlanConnectionModeAdhoc ) - { - iApItem->WriteUint( EApWlanNetworkMode, EAdhoc ); - } - else - { - User::Leave( KErrNotSupported ); - } - } - switch (secmode) - { - case EWlanConnectionSecurityOpen: - { - iApItem->WriteUint( EApWlanSecurityMode, EOpen ); - break; - } - case EWlanConnectionSecurityWep: - { - iApItem->WriteUint( EApWlanSecurityMode, EWep ); - break; - } - case EWlanConnectionSecurity802d1x: - { - iApItem->WriteUint( EApWlanSecurityMode, E802_1x ); - break; - } - case EWlanConnectionSecurityWpa: - { - iApItem->WriteUint( EApWlanSecurityMode, EWpa ); - break; - } - case EWlanConnectionSecurityWpaPsk: - { - iApItem->WriteUint( EApWlanSecurityMode, EWpa ); - break; - } - default: - { - break; - } - } - - } - CleanupStack::PopAndDestroy( connUiUtils ); - } - } - if ( attr_resid ) - { - // titlebuf, text title readed from resource... - CleanupStack::PopAndDestroy(); - } - // items, will also delete all elements in the array! - CleanupStack::PopAndDestroy( items ); - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::ChangeWlanNetworkNameL") } @@ -5992,58 +944,7 @@ // TInt CApSettingsDlg::ChangeWlanSecuritySettingsL() { - APSETUILOGGER_ENTERFN( ESettings,"Settings::ChangeWlanSecuritySettingsL") - - TInt retval(0); - TUint32 secmode( 0 ); - iApItem->ReadUint( EApWlanSecurityMode, secmode ); - - TBool need2changeid( EFalse ); - TUint32 origServiceId(0); - iApItem->ReadUint( EApIapServiceId, origServiceId ); - if ( iOriginalBearerType != iApItem->BearerTypeL() ) - { - need2changeid = ETrue; - iApItem->WriteUint( EApIapServiceId, 0 ); - } - - switch ( secmode ) - { - case EOpen: - { - ShowNoteL( R_APUI_VIEW_NO_SECURITY_SETTINGS ); - break; - } - case EWep: - { - retval = ChangeWepSecuritySettingsL(); - break; - } - case E802_1x: - { - retval = Change8021xSecuritySettingsL(); - break; - } - case EWpa: - case EWpa2: - { - retval = ChangeWpaSecuritySettingsL(); - break; - } - default: - { - // some weird error, repair it... - __ASSERT_DEBUG( EFalse, Panic( EInvalidBearerType ) ); - break; - } - } - if ( need2changeid ) - { - iApItem->WriteUint( EApIapServiceId, origServiceId ); - } - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::ChangeWlanSecuritySettingsL") - return retval; + return 0; } @@ -6053,9 +954,7 @@ // TInt CApSettingsDlg::ChangeWepSecuritySettingsL() { - APSETUILOGGER_ENTERFN( ESettings,"Settings::ChangeWepSecuritySettingsL<->") - - return iHandler->iModel->ChangeWepSettingsL( iApItem ); + return 0; } @@ -6066,9 +965,7 @@ // TInt CApSettingsDlg::ChangeWpaSecuritySettingsL() { - APSETUILOGGER_ENTERFN( ESettings,"Settings::ChangeWpaSecuritySettingsL<->") - - return iHandler->iModel->ChangeWpaSettingsL( iApItem ); + return 0; } @@ -6078,9 +975,7 @@ // TInt CApSettingsDlg::Change8021xSecuritySettingsL() { - APSETUILOGGER_ENTERFN( ESettings,"Settings::Change8021xSecuritySettingsL<->") - - return iHandler->iModel->Change8021xSettingsL( iApItem ); + return 0; } @@ -6092,15 +987,7 @@ // TBool CApSettingsDlg::IsWlanSupported() { - APSETUILOGGER_ENTERFN( ESettings,"Settings::IsWlanSupported") - - TBool retval = FeatureManager::FeatureSupported( KFeatureIdProtocolWlan ); -#ifdef __TEST_WLAN_SUPPORT - retval = ETrue; -#endif // __TEST_WLAN_SUPPORT - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::IsWlanSupported") - return retval; + return EFalse; } @@ -6111,26 +998,7 @@ // TBool CApSettingsDlg::QueryWlanNetworkNameL() { - APSETUILOGGER_ENTERFN( ESettings,"Settings::QueryWlanNetworkNameL") - - TBool retval( EFalse ); - - HBufC* buff = HBufC::NewLC( KModifiableTextLength ); - TPtr16 ptr( buff->Des() ); - iApItem->ReadTextL( EApWlanNetworkName, ptr ); - - CAknQueryDialog* dlg = - CAknQueryDialog::NewL( ptr, CAknQueryDialog::ENoTone ); - - if ( dlg->ExecuteLD( R_APUI_WLAN_NAME_QUERY ) ) - { - iApItem->WriteTextL( EApWlanNetworkName, ptr ); - retval = ETrue; - } - CleanupStack::PopAndDestroy( buff ); - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::QueryWlanNetworkNameL") - return retval; + return EFalse; } @@ -6140,23 +1008,7 @@ // TBool CApSettingsDlg::IsNetMaskAndGatewayVisibleL() { - APSETUILOGGER_ENTERFN( ESettings,"Settings::IsNetMaskAndGatewayVisibleL") - - TBool retval(EFalse); - // display only if: - // Phone IP Addr. <> Automatic (0.0.0.0) - HBufC* tmpValue = HBufC::NewLC( KModifiableTextLength ); - TPtr ptr( tmpValue->Des() ); - iApItem->ReadTextL( EApIspIPAddr, ptr ); - if ( ( tmpValue->Compare( KDynIpAddress ) != 0 ) - && ( tmpValue->Compare( KEmptyText ) != 0 ) ) - { - retval = ETrue; - } - CleanupStack::PopAndDestroy( tmpValue ); - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::IsNetMaskAndGatewayVisibleL") - return retval; + return EFalse; } @@ -6167,29 +1019,7 @@ // TUint32 CApSettingsDlg::GetAdHocChannelL() { - APSETUILOGGER_ENTERFN( ESettings,"Settings::GetAdHocChannelL") - - // Get real ad-hoc channel - // Default: KDefAdhocChannel - TInt channel( KDefAdhocChannel ); - TUint32 retval(0); - iApItem->ReadUint( EApWlanChannelId, retval ); - channel = TInt(retval); - if ( !channel ) - { - channel = KDefAdhocChannel; - } - - CAknNumberQueryDialog* dlg = - CAknNumberQueryDialog::NewL( channel, CAknQueryDialog::ENoTone ); - - if ( dlg->ExecuteLD( R_APUI_WLAN_ADHOC_CHANNEL_QUERY ) ) - { - retval = channel; - } - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::GetAdHocChannelL") - return retval; + return 0; } @@ -6200,18 +1030,7 @@ // TBool CApSettingsDlg::IsAdhocChannelVisible() { - APSETUILOGGER_ENTERFN( ESettings,"Settings::IsAdhocChannelVisible") - - TBool retval(EFalse); - TUint32 netmode( 0 ); - iApItem->ReadUint( EApWlanNetworkMode, netmode ); - if ( netmode == EAdhoc ) - { - retval = ETrue; - } - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::IsAdhocChannelVisible") - return retval; + return EFalse; } @@ -6222,9 +1041,7 @@ // TBool CApSettingsDlg::HasSecuritySettingsFilledL() { - APSETUILOGGER_ENTERFN( ESettings,"Settings::HasSecuritySettingsFilledL<->") - - return iDataModel->HasWlanSecSettingsFilledL( *iApItem ); + return EFalse; } @@ -6235,29 +1052,6 @@ // void CApSettingsDlg::LimitSecMode() { - APSETUILOGGER_ENTERFN( ESettings,"Settings::LimitSecMode") - - TUint32 secmode( 0 ); - iApItem->ReadUint( EApWlanSecurityMode, secmode ); - switch ( secmode ) - { - case EOpen: - case EWep: - // nothing to do in this case - { - break; - } - case E802_1x: - case EWpa: - case EWpa2: - default: - { - iApItem->WriteUint( EApWlanSecurityMode, EOpen ); - break; - } - } - - APSETUILOGGER_LEAVEFN( ESettings,"Settings::LimitSecMode") } @@ -6270,46 +1064,7 @@ CApSettingsDlg::TSaveAction CApSettingsDlg::CanSaveWlanCompulsoriesL( TApMember& aDataNeeded ) { - TSaveAction retval( EApCanSave ); - - HBufC *sgd = HBufC::NewLC( KModifiableTextLength ); - TPtr16 ptr( sgd->Des() ); - - if ( (retval != EApShallGoBack) && (retval != EApMustDelete) - && IsNetMaskAndGatewayVisibleL() ) - { // now check compulsory fields - iApItem->ReadTextL( EApWlanIpNetMask, ptr ); - if ( ( ptr.Compare( KDynIpAddress ) == 0 ) - || ( ptr.Compare( KEmptyText ) == 0 ) ) - { - retval = EApShallGoBack; - aDataNeeded = EApWlanIpNetMask; - if ( AskQueryL( - R_APUI_VIEW_NETW_QUEST_IAP_INCOMPLETE_DELETE ) ) - { - retval = EApMustDelete; - } - } - else - { - iApItem->ReadTextL( EApIspIPGateway, ptr ); - if ( ( sgd->Compare( KDynIpAddress ) == 0 ) - || ( sgd->Compare( KEmptyText ) == 0 ) ) - { - retval = EApShallGoBack; - aDataNeeded = EApIspIPGateway; - if ( AskQueryL( - R_APUI_VIEW_NETW_QUEST_IAP_INCOMPLETE_DELETE ) - ) - { - retval = EApMustDelete; - } - } - } - } - CleanupStack::PopAndDestroy( sgd ); // sgd - - return retval; + User::Leave( KErrNotSupported ); } @@ -6319,26 +1074,6 @@ // void CApSettingsDlg::RestoreIpv4SettingsL() { - HBufC* buf = HBufC::NewLC( KModifiableTextLength ); - TPtr ptr( buf->Des() ); - - iBackupApItem->ReadTextL( EApIspIPAddr, ptr ); - iApItem->WriteTextL( EApIspIPAddr, ptr ); - - iBackupApItem->ReadTextL( EApIspIPNetMask, ptr ); - iApItem->WriteTextL( EApIspIPNetMask, ptr ); - - iBackupApItem->ReadTextL( EApIspIPGateway, ptr ); - iApItem->WriteTextL( EApIspIPGateway, ptr ); - - iBackupApItem->ReadTextL( EApIspIPNameServer1, ptr ); - iApItem->WriteTextL( EApIspIPNameServer1, ptr ); - - iBackupApItem->ReadTextL( EApIspIPNameServer2, ptr ); - iApItem->WriteTextL( EApIspIPNameServer2, ptr ); - - CleanupStack::PopAndDestroy( buf ); - } diff -r 84c6623982f6 -r ed07dcc72692 apengine/apsettingshandlerui/src/ApSettingsModel.cpp --- a/apengine/apsettingshandlerui/src/ApSettingsModel.cpp Fri Sep 17 08:32:43 2010 +0300 +++ b/apengine/apsettingshandlerui/src/ApSettingsModel.cpp Mon Oct 04 00:43:42 2010 +0300 @@ -81,17 +81,7 @@ TBool aIncludeEasyWlan, TBool aNoEdit ) { - APSETUILOGGER_ENTERFN( EModel,"Model::NewL") - CApSettingsModel* db = - new( ELeave ) CApSettingsModel( aIspFilter, aBearerFilter, - aSortType, aReqIpvType, aVariant, - aVpnFilterType, aIncludeEasyWlan, - aNoEdit ); - CleanupStack::PushL( db ); - db->ConstructL( NULL ); - CleanupStack::Pop(); // db - APSETUILOGGER_LEAVEFN( EModel,"Model::NewL") - return db; + return NULL; } @@ -108,17 +98,7 @@ TBool aIncludeEasyWlan, TBool aNoEdit ) { - APSETUILOGGER_ENTERFN( EModel,"Model::NewL2") - CApSettingsModel* db = - new( ELeave ) CApSettingsModel( aIspFilter, aBearerFilter, - aSortType, aReqIpvType, aVariant, - aVpnFilterType, aIncludeEasyWlan, - aNoEdit ); - CleanupStack::PushL( db ); - db->ConstructL( &aDb ); - CleanupStack::Pop(); // db - APSETUILOGGER_LEAVEFN( EModel,"Model::NewL2") - return db; + return NULL; } @@ -127,22 +107,6 @@ */ CApSettingsModel::~CApSettingsModel( ) { - APSETUILOGGER_ENTERFN( EModel,"~Model") - delete iFeatureManagerWrapper; - - delete iApData; - delete iUtils; - delete iVpnApEngine; - if ( iDbOwned ) - { - delete iDb; - } - if (iop) - { - delete iop; - } - - APSETUILOGGER_LEAVEFN( EModel,"~Model") } @@ -157,24 +121,6 @@ TBool aNoEdit ) { - APSETUILOGGER_ENTERFN( EModel,"Model") - - iWepUiExitReason = 0; - iParams.iIspFilter = aIspFilter; - iParams.iBearerFilter = aBearerFilter; - iParams.iSortType = aSortType; - iReqIpvType = aReqIpvType; - iApData = NULL; - iDb = NULL; - iUtils = NULL; - iDbOwned = ETrue; - iVpnFilterType = aVpnFilterType; - iVariant = aVariant; - iIncludeEasyWlan = aIncludeEasyWlan; - iNoEdit = aNoEdit; - iInRefresh = EFalse; - iNeedRefresh = EFalse; - APSETUILOGGER_LEAVEFN( EModel,"Model") } @@ -185,30 +131,6 @@ // void CApSettingsModel::ConstructL( CActiveApDb* aDb ) { - APSETUILOGGER_ENTERFN( EModel,"Model::ConstructL") - if ( aDb ) - { - iDbOwned = EFalse; - iDb = aDb; - } - else - { - iDb = CActiveApDb::NewL( EDatabaseTypeIAP ); - iDbOwned = ETrue; - } - iApData = CApDataHandler::NewLC( *iDb->Database() ); - CleanupStack::Pop( iApData ); // as it is a member - iUtils = CApUtils::NewLC( *iDb->Database() ); - CleanupStack::Pop( iUtils ); // - iVpnApEngine = CVpnApEngine::NewLC( iDb->Database() ); - CleanupStack::Pop( iVpnApEngine ); // - - iFeatureManagerWrapper = CFeatureManagerWrapper::NewL(); - iHelpSupported = FeatureManager::FeatureSupported( KFeatureIdHelp ); - iProtectionSupported = FeatureManager::FeatureSupported( - KFeatureIdSettingsProtection ); - - APSETUILOGGER_LEAVEFN( EModel,"Model::ConstructL") } @@ -219,8 +141,7 @@ // CActiveApDb* CApSettingsModel::Database() { - APSETUILOGGER_ENTERFN( EModel,"Model::Database<->") - return iDb; + return NULL; } @@ -235,10 +156,7 @@ TInt aIspFilter, TInt aBearerFilter, TInt aSortType, TInt aReqIpvType ) { - APSETUILOGGER_ENTERFN( EModel,"Model::AllListItemDataL<->") - return AllListItemDataL( aFailedLocked, aList, aIspFilter, - aBearerFilter, aSortType, aReqIpvType, - iVpnFilterType, iIncludeEasyWlan ); + return 0; } @@ -258,44 +176,7 @@ TBool aIncludeEasyWlan ) { - APSETUILOGGER_ENTERFN( EModel,"Model::AllListItemDataL2") - TInt retval( 0 ); - if (iInRefresh) - { - APSETUILOGGER_WRITE( EModel,"AllListItemData overrun->"); - iNeedRefresh = ETrue; - } - else - { - iInRefresh = ETrue; - aFailedLocked = EFalse; - CApSelect* apselect = CApSelect::NewLC( *iDb->Database(), aIspFilter, - aBearerFilter, aSortType, - aReqIpvType, - aVpnFilterType, - aIncludeEasyWlan ); - APSETUILOGGER_WRITE( EModel,"ApSelect::NewLC returned"); - - retval = apselect->AllListItemDataL( aList ); - - APSETUILOGGER_WRITE( EModel,"ApSelect::AllListItemDataL returned"); - - CleanupStack::PopAndDestroy( apselect ); // apselect - retval = aList.Count(); - - iInRefresh = EFalse; - } - if (iNeedRefresh && !iInRefresh) - { - APSETUILOGGER_WRITE( EModel,"add. refresh starts"); - retval = AllListItemDataL( aFailedLocked, aList, aIspFilter, - aBearerFilter, aSortType, aReqIpvType, - aVpnFilterType, aIncludeEasyWlan ); - iNeedRefresh = EFalse; - APSETUILOGGER_WRITE( EModel,"add. refresh ends"); - } - APSETUILOGGER_LEAVEFN( EModel,"Model::AllListItemDataL2") - return retval; + return 0; } @@ -307,12 +188,7 @@ TInt CApSettingsModel::AllListItemDataL( TBool& aFailedLocked, CApListItemList& aList ) { - APSETUILOGGER_ENTERFN( EModel,"Model::AllListItemDataL ->") - return AllListItemDataL( aFailedLocked, aList, iParams.iIspFilter, - iParams.iBearerFilter, - iParams.iSortType, - iReqIpvType, iVpnFilterType, - iIncludeEasyWlan ); + return 0; } @@ -324,29 +200,6 @@ void CApSettingsModel::AccessPointDataL( TUint32 aUid, CApAccessPointItem& aApItem ) { - APSETUILOGGER_ENTERFN( EModel,"Model::AccessPointDataL") - TTransactionResult ownTransaction = StartTransactionLC( /*aWrite*/EFalse, - /*aShowNote*/ETrue, - /*aRetry*/ETrue ); - if ( ownTransaction != EFailedWithLocked ) - { - iApData->AccessPointDataL( aUid, aApItem ); // adds normal ap - // Load wlan data, only loads if WLAN ap. - TRAPD( err, LoadWlanL( aApItem ) ); - if ( err != KErrUnknown) - { - User::LeaveIfError( err ); - } - - if ( ownTransaction == EOwnTransaction ) - { - TInt err = CommitTransaction(); - User::LeaveIfError( err ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - } - - APSETUILOGGER_LEAVEFN( EModel,"Model::AccessPointDataL") } @@ -357,43 +210,7 @@ // TBool CApSettingsModel::UpdateAccessPointDataL( CApAccessPointItem& aApItem ) { - APSETUILOGGER_ENTERFN( EModel,"Model::UpdateAccessPointDataL") - TBool nameChanged( EFalse ); -// It should be aWrite ETrue, but there is an error in Symbian stuff -// causing a memory leak -// TTransactionResult ownTransaction = StartTransactionLC( /*aWrite*/ETrue, - TTransactionResult ownTransaction = StartTransactionLC( /*aWrite*/EFalse, - /*aShowNote*/ETrue, - /*aRetry*/ETrue ); - if ( ownTransaction != EFailedWithLocked ) - { - TBool isnew(EFalse); - if ( aApItem.BearerTypeL() == EApBearerTypeWLAN ) - { // it is WLAN... - // check that there were no bearer-change, because if orig. bearer - // was NOT wlan, then we shouls consider it as a new record!!! - if ( iUtils->BearerTypeL( aApItem.WapUid() ) != EApBearerTypeWLAN ) - { - isnew = ETrue; - } - } - iApData->UpdateAccessPointDataL( aApItem, nameChanged ); - // write wlan data, only writes if WLAN ap. - WriteWlanL( aApItem, isnew ); - -#ifdef __WINS__ - ShowNoteL( R_APUI_VIEW_SAVED ); -#endif - if ( ownTransaction == EOwnTransaction ) - { - TInt err = CommitTransaction(); - User::LeaveIfError( err ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - } - - APSETUILOGGER_LEAVEFN( EModel,"Model::UpdateAccessPointDataL") - return nameChanged; + return EFalse; } @@ -405,8 +222,7 @@ // CApDataHandler* CApSettingsModel::DataHandler() { - APSETUILOGGER_ENTERFN( EModel,"Model::DataHandler <->") - return iApData; + return NULL; } @@ -417,8 +233,7 @@ // CApUtils* CApSettingsModel::ApUtils() { - APSETUILOGGER_ENTERFN( EModel,"Model::ApUtils <->") - return iUtils; + return NULL; } @@ -428,8 +243,6 @@ // void CApSettingsModel::SetParams( TApSettingsParams aParams ) { - APSETUILOGGER_ENTERFN( EModel,"Model::SetParams <->") - iParams = aParams; } @@ -439,7 +252,7 @@ // TApSettingsParams CApSettingsModel::Params() { - APSETUILOGGER_ENTERFN( EModel,"Model::Params <->") + User::Leave( KErrNotSupported ); return iParams; } @@ -451,8 +264,7 @@ // CVpnApEngine* CApSettingsModel::VpnEngine() { - APSETUILOGGER_ENTERFN( EModel,"Model::VpnEngine <->") - return iVpnApEngine; + return NULL; } @@ -462,13 +274,6 @@ // void CApSettingsModel::LaunchHelpL() { -#ifdef __SERIES60_HELP - APSETUILOGGER_ENTERFN( EModel,"Model::LaunchHelpL") - HlpLauncher::LaunchHelpApplicationL( - EikEnv()->WsSession(), - EikEnv()->EikAppUi()->AppHelpContextL() ); - APSETUILOGGER_LEAVEFN( EModel,"Model::LaunchHelpL") -#endif // __SERIES60_HELP } @@ -478,49 +283,6 @@ // void CApSettingsModel::RemoveApL( TUint32 aUid ) { - APSETUILOGGER_ENTERFN( EModel,"Model::RemoveApL") -// DELETE OPERATION STARTS HERE - TBuf sgd; - iUtils->NameL( aUid, sgd ); - HBufC* temp = StringLoader::LoadLC( R_APUI_VIEW_DELETING_AP, sgd ); - - APSETUILOGGER_WRITE( EModel,"Creating thread"); - - if (!iop) - { - iop = CApSettingsDeleteOperation::NewL( - KApWaitNote, R_APUI_VIEW_WAIT_NOTE, - aUid, *temp - ); - APSETUILOGGER_WRITE( EModel,"Thread created"); - } - else - { - if (iop->State() != CApSettingsDeleteOperation::EProcOffDialogOff ) - { - ShowNoteL( R_APUI_VIEW_TEXT_CANNOT_ACCESS_DB ); - User::Leave( KErrInUse ); - } - else - { - iop->SetUid( aUid ); - iop->SetNoteTextL( *temp ); - } - } - - TRAPD(err, iop->StartL() ); - - APSETUILOGGER_WRITE_FORMAT( EModel, "Thread StartL returned, code:%d", err); - - if ( err != KErrNone ) - { - User::Leave( err ); - } - - CleanupStack::PopAndDestroy( temp ); - APSETUILOGGER_LEAVEFN( EModel,"Model::RemoveApL") -// DELETE OPERATION ENDS HERE - } @@ -534,90 +296,7 @@ TBool aWrite, TBool aShowNote, TBool aRetry, TBool aLFFSChecking /* ETrue */ ) { - APSETUILOGGER_ENTERFN( EModel,"Model::StartTransactionLC") - TTransactionResult retval( EOwnTransaction ); - - // Before attempting db modification, check if we would go below Critical - // Level in FFS (disk). The value used for checking is an estimate. - // Reading the db also allocates some bytes (transaction log), but - // this is not estimated and not checked, because it should be small - // enough, and would slow down operation. (Typical use is to read a lot - // and write much less.) - if ( aLFFSChecking && - aWrite && - FFSSpaceBelowCriticalLevelL - ( /*aShowErrorNote=*/EFalse, KEstimatedFfsUsage ) - ) - { - User::Leave( KErrDiskFull ); - } - - CCommsDatabase* aDb = iDb->Database(); - TInt err( KErrNone ); - if ( !aDb->InTransaction() ) - { - TInt retriesLeft( aRetry ? KRetryCount : 1 ); - err = aDb->BeginTransaction(); - while ( ( ( err == KErrLocked ) || ( err == KErrAccessDenied ) ) - && --retriesLeft ) - { - User::After( KRetryWait ); - err = aDb->BeginTransaction(); - if (aWrite ) - { - TRAP(err, GetWriteLockL() ); - } - } - if ( err && aShowNote ) - { - ShowNoteL( R_APUI_VIEW_TEXT_CANNOT_ACCESS_DB ); - } - switch ( err ) - { - case KErrNone: - { - CleanupStack::PushL( - TCleanupItem( RollbackTransactionOnLeave, aDb ) ); - break; - } - case KErrLocked: - case KErrAccessDenied: - { - retval = EFailedWithLocked; - break; - } - default: - { - User::LeaveIfError( err ); - break; - } - } - } - else - { - if ( aWrite ) - { - TRAP(err, GetWriteLockL() ); - } - if ( err && aShowNote ) - { - ShowNoteL( R_APUI_VIEW_TEXT_CANNOT_ACCESS_DB ); - } - if ( err != KErrLocked ) - { - User::LeaveIfError( err ); - } - if ( err ) - { - retval = EFailedWithLocked; - } - else - { - retval = EUsingAlreadyStarted; - } - } - APSETUILOGGER_LEAVEFN( EModel,"Model::StartTransactionLC") - return retval; + User::Leave( KErrNotSupported ); } @@ -627,16 +306,6 @@ // void CApSettingsModel::GetWriteLockL( ) { - APSETUILOGGER_ENTERFN( EModel,"Model::GetWriteLockL") - CCommsDbTableView* v = - iDb->Database()->OpenTableLC( TPtrC(WAP_ACCESS_POINT ) ); - TUint32 dummyUid( KApNoneUID ); - TInt err = v->InsertRecord( dummyUid ); - User::LeaveIfError( err ); - v->CancelRecordChanges(); - User::LeaveIfError( err ); - CleanupStack::PopAndDestroy( v ); - APSETUILOGGER_LEAVEFN( EModel,"Model::GetWriteLockL") } // --------------------------------------------------------- @@ -645,10 +314,6 @@ // void CApSettingsModel::RollbackTransactionOnLeave( TAny* aDb ) { - APSETUILOGGER_ENTERFN( EModel,"Model::RollbackTransactionOnLeave") - CCommsDatabase* db = STATIC_CAST( CCommsDatabase*, aDb ); - db->RollbackTransaction(); - APSETUILOGGER_LEAVEFN( EModel,"Model::RollbackTransactionOnLeave") } @@ -659,10 +324,7 @@ // TInt CApSettingsModel::CommitTransaction() { - APSETUILOGGER_ENTERFN( EModel,"Model::CommitTransaction") - TInt err = iDb->Database()->CommitTransaction(); - APSETUILOGGER_LEAVEFN( EModel,"Model::CommitTransaction") - return err; + return KErrNotSupported; } @@ -674,21 +336,7 @@ TBool CApSettingsModel::FFSSpaceBelowCriticalLevelL ( TBool aShowErrorNote, TInt aBytesToWrite /*=0*/ ) { - APSETUILOGGER_ENTERFN( EModel,"Model::FFSSpaceBelowCriticalLevelL") - TBool ret( EFalse ); - if ( SysUtil::FFSSpaceBelowCriticalLevelL - ( &( EikEnv()->FsSession()), aBytesToWrite ) ) - { - ret = ETrue; - if ( aShowErrorNote ) - { - CErrorUI* errorUi = CErrorUI::NewLC( *EikEnv() ); - errorUi->ShowGlobalErrorNoteL( KErrDiskFull ); - CleanupStack::PopAndDestroy(); // errorUi - } - } - APSETUILOGGER_LEAVEFN( EModel,"Model::FFSSpaceBelowCriticalLevelL") - return ret; + return EFalse; } @@ -701,30 +349,7 @@ TInt CApSettingsModel::NetWorkListDataL( TBool& aFailedLocked, CApNetworkItemList& aList ) { - APSETUILOGGER_ENTERFN( EModel,"Model::NetWorkListDataL") - TInt retval( KErrNone ); - aFailedLocked = EFalse; - TTransactionResult ownTransaction = StartTransactionLC( /*aWrite*/EFalse, - /*aShowNote*/EFalse, - /*aRetry*/ETrue ); - if ( ownTransaction != EFailedWithLocked ) - { - CApNetworks* apnet = CApNetworks::NewLC( *iDb->Database() ); - retval = apnet->AllListItemDataL( aList ); - CleanupStack::PopAndDestroy( apnet ); // apSelect - if ( ownTransaction == EOwnTransaction ) - { - TInt err = CommitTransaction(); - User::LeaveIfError( err ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - } - else - { - aFailedLocked = ETrue; - } - APSETUILOGGER_LEAVEFN( EModel,"Model::NetWorkListDataL") - return retval; + return KErrNotSupported; } @@ -735,8 +360,7 @@ // TInt CApSettingsModel::RequestedIPvType( ) { - APSETUILOGGER_ENTERFN( EModel,"Model::RequestedIPvType<->") - return iReqIpvType; + return 0; } @@ -749,17 +373,7 @@ // TBool CApSettingsModel::Need2DeleteSelect( TInt aResourceId, TInt aCount ) { - APSETUILOGGER_ENTERFN( EModel,"Model::Need2DeleteSelect") - TBool retval( EFalse ); - - if ( ( aCount == 0 ) - && - ( aResourceId == R_APSETTINGSUI_MENU_SELECT_NORMAL ) ) - { - retval = ETrue; - } - APSETUILOGGER_LEAVEFN( EModel,"Model::Need2DeleteSelect") - return retval; + return EFalse; } @@ -771,34 +385,7 @@ TBool CApSettingsModel::Need2DeleteOpen( TInt aResourceId, TInt aCount, TUint32 aUid, TBool aNeedsNone ) { - APSETUILOGGER_ENTERFN( EModel,"Model::Need2DeleteOpen") - TBool retval( EFalse ); - TBool noItem( EFalse ); - TBool onlyItemIsNone( EFalse ); - TBool editOnlyVPN( EFalse ); - TBool noEdit( EFalse ); - - noItem = ( aCount == 0) && - ( ( aResourceId == R_APSETTINGSUI_MENU_NORMAL ) || - ( aResourceId == R_APSETTINGSUI_MENU_SELECT_NORMAL ) ); - - onlyItemIsNone = ( aNeedsNone ) && ( aUid == KApNoneUID ) - && ( ( aResourceId == R_APSETTINGSUI_MENU_SELECT_ONLY ) || - ( aResourceId == R_APSETTINGSUI_MENU_SELECT_NORMAL ) || - ( aResourceId == R_APSETTINGSUI_MENU_NORMAL ) ); - - editOnlyVPN = ( iVariant & KApUiEditOnlyVPNs ) - && ( ( aResourceId == R_APSETTINGSUI_SELECT_ONLY_MENUBAR ) || - ( aResourceId == R_APSETTINGSUI_SELECT_NORMAL_MENUBAR ) || - ( aResourceId == R_APSETTINGSUI_MENU_NORMAL ) ); - noEdit = ( iNoEdit ) - && ( ( aResourceId == R_APSETTINGSUI_MENU_SELECT_NORMAL ) || - ( aResourceId == R_APSETTINGSUI_MENU_NORMAL ) ); - - retval = noItem || onlyItemIsNone || editOnlyVPN || noEdit; - - APSETUILOGGER_LEAVEFN( EModel,"Model::Need2DeleteOpen") - return retval; + return EFalse; } @@ -810,59 +397,7 @@ TBool CApSettingsModel::Need2DeleteDeleteL( TInt aResourceId, TInt aCount, TUint32 aUid, TBool aNeedsNone ) { - APSETUILOGGER_ENTERFN( EModel,"Model::Need2DeleteDeleteL") - TBool retval( EFalse ); - TBool noItem( EFalse ); - TBool onlyItemIsNone( EFalse ); - TBool editOnlyVPN( EFalse ); - TBool noEdit( EFalse ); - - noItem = ( aCount == 0) && - ( ( aResourceId == R_APSETTINGSUI_MENU_NORMAL ) || - ( aResourceId == R_APSETTINGSUI_MENU_SELECT_NORMAL ) ); - - onlyItemIsNone = ( aNeedsNone ) && ( aUid == KApNoneUID ) - && ( ( aResourceId == R_APSETTINGSUI_MENU_SELECT_ONLY ) || - ( aResourceId == R_APSETTINGSUI_MENU_SELECT_NORMAL ) || - ( aResourceId == R_APSETTINGSUI_MENU_NORMAL ) ); - - editOnlyVPN = ( iVariant & KApUiEditOnlyVPNs ) - && ( ( aResourceId == R_APSETTINGSUI_SELECT_ONLY_MENUBAR ) || - ( aResourceId == R_APSETTINGSUI_SELECT_NORMAL_MENUBAR ) || - ( aResourceId == R_APSETTINGSUI_MENU_NORMAL ) ); - - noEdit = ( iNoEdit ) - && ( ( aResourceId == R_APSETTINGSUI_MENU_SELECT_NORMAL ) || - ( aResourceId == R_APSETTINGSUI_MENU_NORMAL ) ); - - if ( editOnlyVPN ) - { - // check if current item is VPN... - if ( ( aCount != 0 ) && ( aUid != KApNoneUID ) ) - { - retval = ! iVpnApEngine->IsVpnApL( aUid ); - } - else - { - retval = ETrue; - } - } - else - { - if ( onlyItemIsNone || noItem ) - { - retval = ETrue; - } - } - if ( !retval ) - { - if (noEdit) - { - retval = ETrue; - } - } - APSETUILOGGER_LEAVEFN( EModel,"Model::Need2DeleteDeleteL") - return retval; + return EFalse; } @@ -875,38 +410,7 @@ TInt aResourceId, TInt aCount ) { - APSETUILOGGER_ENTERFN( EModel,"Model::Need2DeleteNewUseExisting") - TBool noEdit( EFalse ); - TBool retval( EFalse ); - - if ( iProtectionSupported ) - { - if ( aResourceId == R_APSETTINGSUI_MENU_SELECT_NORMAL || - aResourceId == R_APSETTINGSUI_MENU_NORMAL ) - { - TRAP_IGNORE( retval = CApProtHandler::IsTableProtectedL( iDb->Database() )); - } - } - - if ( aCount == 0) - { - if ( ( aResourceId == R_APSETTINGSUI_MENU_NORMAL ) || - ( aResourceId == R_APSETTINGSUI_MENU_SELECT_NORMAL ) ) - { - retval = ETrue; - } - } - - noEdit = ( iNoEdit ) - && ( ( aResourceId == R_APSETTINGSUI_MENU_SELECT_NORMAL ) || - ( aResourceId == R_APSETTINGSUI_MENU_NORMAL ) ); - - if (noEdit) - { - retval = ETrue; - } - APSETUILOGGER_LEAVEFN( EModel,"Model::Need2DeleteNewUseExisting") - return retval; + return EFalse; } @@ -917,42 +421,7 @@ // TBool CApSettingsModel::Need2DeleteNewL( TInt aResourceId ) { - APSETUILOGGER_ENTERFN( EModel,"Model::Need2DeleteNewL") - TBool noEdit( EFalse ); - TBool retval( EFalse ); - - if ( iProtectionSupported ) - { - if ( aResourceId == R_APSETTINGSUI_MENU_SELECT_NORMAL || - aResourceId == R_APSETTINGSUI_MENU_NORMAL ) - { - if ( CApProtHandler::IsTableProtectedL( iDb->Database() )) - { - retval = ETrue; - } - } - } - - if ( iVariant & KApUiEditOnlyVPNs ) - { - if ( ( aResourceId == R_APSETTINGSUI_MENU_SELECT_NORMAL ) || - ( aResourceId == R_APSETTINGSUI_MENU_NORMAL ) - ) - { - retval = ETrue; - } - } - - noEdit = ( iNoEdit ) - && ( ( aResourceId == R_APSETTINGSUI_MENU_SELECT_NORMAL ) || - ( aResourceId == R_APSETTINGSUI_MENU_NORMAL ) ); - - if (noEdit) - { - retval = ETrue; - } - APSETUILOGGER_LEAVEFN( EModel,"Model::Need2DeleteNewL") - return retval; + return EFalse; } @@ -964,19 +433,7 @@ // TBool CApSettingsModel::Need2DeleteHelp( TInt aResourceId ) { - APSETUILOGGER_ENTERFN( EModel,"Model::Need2DeleteHelp") - TBool retval( EFalse ); - - if ( !iHelpSupported ) - { - if ( aResourceId == R_APSETTINGSUI_MENU_NORMAL ) - { - retval = ETrue; - } - } - - APSETUILOGGER_LEAVEFN( EModel,"Model::Need2DeleteHelp") - return retval; + return EFalse; } @@ -993,35 +450,7 @@ // HBufC* CApSettingsModel::GetLinkedVpnAccessPointLC( TUint32 aUid ) { - APSETUILOGGER_ENTERFN( EModel,"Model::GetLinkedVpnAccessPointLC") - HBufC* retval = HBufC::NewLC( KCommsDbSvrMaxFieldLength ); - - // Get iap for the above WAP, aUid - TUint32 homeiap = iUtils->IapIdFromWapIdL( aUid ); - - // now get ALL VPN_SERVICE entry ID where HOME_IAP == iap - // Select * from VPN_SERVICE where HOME_IAP == homeiap - CCommsDbTableView* t; - t = iDb->Database()->OpenViewMatchingUintLC( TPtrC(VPN_SERVICE), - TPtrC(VPN_SERVICE_IAP), - homeiap ); - TInt err = t->GotoFirstRecord(); - // if not found, no such, simply exit, no change in passed array - if ( err != KErrNotFound ) - { - User::LeaveIfError( err ); - TPtr sgd = retval->Des(); - t->ReadTextL( TPtrC(COMMDB_NAME), sgd ); - CleanupStack::PopAndDestroy( t );//t - } - else - { - CleanupStack::PopAndDestroy( 2, retval );// retval, t - retval = NULL; - } - - APSETUILOGGER_LEAVEFN( EModel,"Model::GetLinkedVpnAccessPointLC") - return retval; + return NULL; } @@ -1032,12 +461,7 @@ // CEikonEnv* CApSettingsModel::EikEnv() { - APSETUILOGGER_ENTERFN( EModel,"Model::EikEnv<->") - if ( !iEikEnv ) - { - iEikEnv = CEikonEnv::Static(); - } - return iEikEnv; + return NULL; } @@ -1048,26 +472,7 @@ // TUint32 CApSettingsModel::CreateFromDataL( CApAccessPointItem& aApItem ) { - APSETUILOGGER_ENTERFN( EModel,"Model::CreateFromDataL") - TTransactionResult ownTransaction = StartTransactionLC( /*aWrite*/EFalse, - /*aShowNote*/ETrue, - /*aRetry*/ETrue ); - if ( ownTransaction != EFailedWithLocked ) - { - iApData->CreateFromDataL( aApItem ); // adds normal ap - // write wlan data, only writes if WLAN ap. - WriteWlanL( aApItem, ETrue ); - - if ( ownTransaction == EOwnTransaction ) - { - TInt err = CommitTransaction(); - User::LeaveIfError( err ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - } - - APSETUILOGGER_LEAVEFN( EModel,"Model::CreateFromDataL") - return aApItem.WapUid(); + return 0; } @@ -1080,8 +485,6 @@ // TInt CApSettingsModel::ChangeWepSettingsL( CApAccessPointItem* aApItem ) { - APSETUILOGGER_ENTERFN( EModel,"Model::ChangeWepSettingsL - ERROR: not suported") - aApItem = aApItem; return KErrNotSupported; } @@ -1093,8 +496,6 @@ // TInt CApSettingsModel::ChangeWpaSettingsL( CApAccessPointItem* aApItem ) { - APSETUILOGGER_ENTERFN( EModel,"Model::ChangeWpaSettingsL - ERROR: not suported") - aApItem = aApItem; return KErrNotSupported; } @@ -1106,8 +507,6 @@ // TInt CApSettingsModel::Change8021xSettingsL( CApAccessPointItem* aApItem ) { - APSETUILOGGER_ENTERFN( EModel,"Model::Change8021xSettingsL - ERROR: not suported") - aApItem = aApItem; return KErrNotSupported; } @@ -1119,7 +518,6 @@ // void CApSettingsModel::ClearWEPAndWPASettings() { - APSETUILOGGER_ENTERFN( EModel,"Model::ClearWEPAndWPASettings - ERROR: not suported") } @@ -1130,9 +528,6 @@ void CApSettingsModel::WriteWlanL( CApAccessPointItem& aApItem, TBool aIsNew ) { - APSETUILOGGER_ENTERFN( EModel,"Model::WriteWlanL - ERROR: not supported") - aApItem; - aIsNew; User::Leave( KErrNotSupported ); } @@ -1143,8 +538,6 @@ // void CApSettingsModel::LoadWlanL( CApAccessPointItem& aApItem ) { - APSETUILOGGER_ENTERFN( EModel,"Model::LoadWlanL - ERROR: not supported") - aApItem; User::Leave( KErrNotSupported ); } @@ -1155,8 +548,6 @@ // TBool CApSettingsModel::HasWlanSecSettingsFilledL( CApAccessPointItem& aApItem ) { - APSETUILOGGER_ENTERFN( EModel,"Model::HasWlanSecSettingsFilledL - ERROR: not supported") - aApItem; return EFalse; } @@ -1167,8 +558,6 @@ // void CApSettingsModel::UpdateSecurityModeL( CApAccessPointItem& aApItem ) { - APSETUILOGGER_ENTERFN( EModel,"Model::UpdateSecurityModeL - ERROR: not supported") - aApItem; User::Leave( KErrNotSupported ); } diff -r 84c6623982f6 -r ed07dcc72692 apengine/apsettingshandlerui/src/FeatureManagerWrapper.cpp --- a/apengine/apsettingshandlerui/src/FeatureManagerWrapper.cpp Fri Sep 17 08:32:43 2010 +0300 +++ b/apengine/apsettingshandlerui/src/FeatureManagerWrapper.cpp Mon Oct 04 00:43:42 2010 +0300 @@ -28,7 +28,6 @@ // CFeatureManagerWrapper::CFeatureManagerWrapper() : CBase() { - APSETUILOGGER_ENTERFN( EOther,"FeatureWrapper::CFeatureManagerWrapper<->") } // --------------------------------------------------------- @@ -37,14 +36,6 @@ // CFeatureManagerWrapper::~CFeatureManagerWrapper() { - APSETUILOGGER_ENTERFN( EOther,"FeatureWrapper::~CFeatureManagerWrapper") - - if ( iIsFeatureMgrInitialized ) - { - FeatureManager::UnInitializeLib(); - } - - APSETUILOGGER_LEAVEFN( EOther,"FeatureWrapper::~CFeatureManagerWrapper") } @@ -54,12 +45,6 @@ // void CFeatureManagerWrapper::ConstructL() { - APSETUILOGGER_ENTERFN( EOther,"FeatureWrapper::ConstructL") - - FeatureManager::InitializeLibL(); - iIsFeatureMgrInitialized = ETrue ; - - APSETUILOGGER_LEAVEFN( EOther,"FeatureWrapper::ConstructL") } @@ -69,16 +54,7 @@ // CFeatureManagerWrapper* CFeatureManagerWrapper::NewL() { - APSETUILOGGER_ENTERFN( EOther,"FeatureWrapper::NewL") - - CFeatureManagerWrapper* self = new ( ELeave ) CFeatureManagerWrapper; - - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop( self ); - - APSETUILOGGER_LEAVEFN( EOther,"FeatureWrapper::NewL") - return self; + return NULL; } //End of file. diff -r 84c6623982f6 -r ed07dcc72692 apengine/apsettingshandlerui/src/TextOverrides.cpp --- a/apengine/apsettingshandlerui/src/TextOverrides.cpp Fri Sep 17 08:32:43 2010 +0300 +++ b/apengine/apsettingshandlerui/src/TextOverrides.cpp Mon Oct 04 00:43:42 2010 +0300 @@ -32,15 +32,7 @@ // CTextOverrides* CTextOverrides::NewL( ) { - APSETUILOGGER_ENTERFN( EOther,"TxtOverride::NewL") - - CTextOverrides* db = new( ELeave ) CTextOverrides(); - CleanupStack::PushL( db ); - db->ConstructL( ); - CleanupStack::Pop(); // db - - APSETUILOGGER_LEAVEFN( EOther,"TxtOverride::NewL") - return db; + return NULL; } @@ -48,15 +40,6 @@ // Destructor CTextOverrides::~CTextOverrides() { - APSETUILOGGER_ENTERFN( EOther,"TxtOverride::~CTextOverrides") - - if ( iTxtArray ) - { - iTxtArray->ResetAndDestroy(); - } - delete iTxtArray; - - APSETUILOGGER_LEAVEFN( EOther,"TxtOverride::~CTextOverrides") } @@ -72,15 +55,6 @@ // void CTextOverrides::ConstructL( ) { - APSETUILOGGER_ENTERFN( EOther,"TxtOverride::ConstructL") - - iTxtArray = new( ELeave ) CArrayPtrFlat( KTxtOverrideGran ); - for (TInt i=0; i<=KTTextIdMax; i++ ) - { - iTxtArray->AppendL( NULL); - } - - APSETUILOGGER_LEAVEFN( EOther,"TxtOverride::ConstructL") } @@ -91,15 +65,6 @@ void CTextOverrides::SetTextOverrideL( TTextID aText2Change, const TDesC& aNewText ) { - APSETUILOGGER_ENTERFN( EOther,"TxtOverride::SetTextOverrideL") - - ValidateIdL( aText2Change ); - - HBufC* a = aNewText.AllocL(); - iTxtArray->Delete( aText2Change ); - iTxtArray->InsertL( aText2Change, a ); - - APSETUILOGGER_LEAVEFN( EOther,"TxtOverride::SetTextOverrideL") } @@ -109,16 +74,7 @@ // const TDesC& CTextOverrides::TextOverrideL( TTextID aTextId ) { - APSETUILOGGER_ENTERFN( EOther,"TxtOverride::TextOverrideL") - - ValidateIdL( aTextId ); - if ( !IsTextOverridenL( aTextId ) ) - { - User::Leave( KTxtNotOverriden ); - } - - APSETUILOGGER_LEAVEFN( EOther,"TxtOverride::TextOverrideL") - return *iTxtArray->At( aTextId ); + User::Leave( KErrNotSupported ); } @@ -128,21 +84,7 @@ // TBool CTextOverrides::IsTextOverridenL( TTextID aTextId ) { - APSETUILOGGER_ENTERFN( EOther,"TxtOverride::IsTextOverridenL") - - TBool retval( EFalse ); - ValidateIdL( aTextId ); - if ( iTxtArray->At( aTextId ) ) - { - retval = ETrue; - } - else - { - retval = EFalse; - } - - APSETUILOGGER_LEAVEFN( EOther,"TxtOverride::IsTextOverridenL") - return retval; + return EFalse; } @@ -152,14 +94,6 @@ // void CTextOverrides::ValidateIdL( TTextID aTextId ) { - APSETUILOGGER_ENTERFN( EOther,"TxtOverride::ValidateIdL") - - if ( ( aTextId < KTTextIdMin ) || ( aTextId > KTTextIdMax ) ) - { - User::Leave( KErrInvalidTextId ); - } - - APSETUILOGGER_LEAVEFN( EOther,"TxtOverride::ValidateIdL") } diff -r 84c6623982f6 -r ed07dcc72692 apengine/apsettingshandlerui/src/apsettingsdeleteoperation.cpp --- a/apengine/apsettingshandlerui/src/apsettingsdeleteoperation.cpp Fri Sep 17 08:32:43 2010 +0300 +++ b/apengine/apsettingshandlerui/src/apsettingsdeleteoperation.cpp Mon Oct 04 00:43:42 2010 +0300 @@ -62,20 +62,7 @@ const TDesC& aNoteText ) { - APSETUILOGGER_ENTERFN( EDelete,"DeleteOp::NewL") - - CApSettingsDeleteOperation* db = - new ( ELeave ) CApSettingsDeleteOperation( - aNoteControlId, - aResourceID, - aUid - ); - CleanupStack::PushL( db ); - db->ConstructL( aNoteText ); - CleanupStack::Pop(); - - APSETUILOGGER_LEAVEFN( EDelete,"DeleteOp::NewL") - return db; + return NULL; } @@ -85,12 +72,6 @@ // void CApSettingsDeleteOperation::ConstructL( const TDesC& aNoteText ) { - APSETUILOGGER_ENTERFN( EDelete,"DeleteOp::ConstructL") - - iErrorUi = CErrorUI::NewL( *CCoeEnv::Static() ); - iNoteText = aNoteText.AllocL(); - - APSETUILOGGER_LEAVEFN( EDelete,"DeleteOp::ConstructL") } @@ -108,8 +89,6 @@ iResourceID( aResourceID ), iUid( aUid ) { - CActiveScheduler::Add(this); - APSETUILOGGER_WRITE( EModel,"Thread added to scheduler"); } @@ -119,26 +98,6 @@ // CApSettingsDeleteOperation::~CApSettingsDeleteOperation() { - APSETUILOGGER_ENTERFN( EDelete,"DeleteOp::~CApSettingsDeleteOperation") - - if(iDeleteOperation.Handle() != 0) - { - // wait for deletion to finish - TRequestStatus status; - iDeleteOperation.Logon(status); - User::WaitForRequest(status); - - iDeleteOperation.Close(); - } - - Cancel(); - - delete iWaitDialog; - - delete iNoteText; - delete iErrorUi; - - APSETUILOGGER_LEAVEFN( EDelete,"DeleteOp::~CApSettingsDeleteOperation") } @@ -150,67 +109,6 @@ // void CApSettingsDeleteOperation::RunL() { - APSETUILOGGER_ENTERFN( EDelete,"DeleteOp::RunL") - - switch ( iState ) - { - case EProcOnDialogOn: - { // two chances : - // 1. Process finished normally - // 2. Process leaved with error - iState = EProcOffDialogOn; - if ( iWaitDialog ) - { - iWaitDialog->ProcessFinishedL(); - } - if ( iStatus.Int() != KErrNone ) - { - // some error has occured - iErr = iStatus.Int(); - } - Next(); - break; - } - case EProcOffDialogOn: - { - // now we wait for the dialog to be dismissed - // just to be able to delete it - // stays in this state as long as DialogDismissedL() - // is not called, it will move it out into - // EProcOffDialogOff and it also deletes - Next(); - break; - } - case EProcOnDialogOff: - { // this can't be, as dialog MUST stay as long as operation... - iState = EProcOffDialogOff; - Next(); - break; - } - case EProcOffDialogOff: - { // now we can safely delete the dialog - if ( iWaitDialog ) - { - delete iWaitDialog; - } - if ( iErr != KErrNone ) - { - // some error has occured - iErrorUi->ShowGlobalErrorNoteL( iErr ); - } - iDeleteOperation.Kill( iErr ); - iDeleteOperation.Close(); -// delete this; - break; - } - default: - { - __ASSERT_DEBUG( EFalse, Panic( EInvalidState ) ); - break; - } - } - - APSETUILOGGER_LEAVEFN( EDelete,"DeleteOp::RunL") } @@ -220,14 +118,6 @@ // void CApSettingsDeleteOperation::DoCancel() { // must be here as it is pure virtual in base... - APSETUILOGGER_ENTERFN( EDelete,"DeleteOp::DoCancel") - - if (iDeleteOperation.Handle() != 0 && iStatus == KRequestPending) - { - iDeleteOperation.LogonCancel(iStatus); - } - - APSETUILOGGER_LEAVEFN( EDelete,"DeleteOp::DoCancel") } @@ -238,43 +128,6 @@ // void CApSettingsDeleteOperation::DialogDismissedL( TInt /*aButtonId*/ ) { - APSETUILOGGER_ENTERFN( EDelete,"DeleteOp::DialogDismissedL") - - switch ( iState ) - { - case EProcOnDialogOn: - { // can't be, it means that dialog is dismissed by user - // but process is still runing... - iState = EProcOnDialogOff; - break; - } - case EProcOffDialogOn: - { - // set dialog off - iState = EProcOffDialogOff; - // as proc is already off, it circles in RunL, - break; - } - case EProcOnDialogOff: - { // can't be, it is already off... - iState = EProcOnDialogOff; - Next(); - break; - } - case EProcOffDialogOff: - {// can't be, it is already off... - iState = EProcOffDialogOff; - Next(); - break; - } - default: - { - __ASSERT_DEBUG( EFalse, Panic( EInvalidState ) ); - break; - } - } - - APSETUILOGGER_LEAVEFN( EDelete,"DeleteOp::DialogDismissedL") } @@ -284,58 +137,6 @@ // void CApSettingsDeleteOperation::StartL() { - APSETUILOGGER_ENTERFN( EDelete,"DeleteOp::StartL") - - iStatus = KRequestPending; - // set the internal state as both is running - iState = EProcOnDialogOn; - - // now we can start wait note... - StartWaitNoteL(); - - // now start new thread with operation - StartDeleteOperationThreadL(); - - SetActive(); - // now we can wait on it... - // wait until the started thread completes (delete operation completes) - // and it will enter RunL. RunL will notify the wait dialog about the - // completion of the process. - // As the dialog shall wait ~0.5 sec till display AND must be visible - // for ~1.5 sec. as a minimum, but must stay up as long as the 'process' - // on it is waiting for does not completes, we have the following chances: - // if the process is shorter than 0.5, - // after operation completes, state moves to EProcOffDialogOn, - // dialog will be notified about completion by RunL, and RunL starts - // circle and wait for the dialog to finish, multiply re-entering - // and leaving RunL, as long as the state is EProcOffDialogOn. - // As time was shorter than 0.5, thus dialog will not show itself - // and will call DialogDismissedL, which will change the - // state to EProcOffDialogOff, which, on entering - // RunL again, will delete the dialog and kill the thread. - // if the process was longer than 0.5 but shorter than 0.5+1.5sec, - // after operation completes, state moves to EProcOffDialogOn, - // dialog will be notified about completion by RunL, and RunL starts - // circle and wait for the dialog to finish, multiply re-entering - // and leaving RunL, as long as the state is EProcOffDialogOn. - // As time was longer than 0.5, thus dialog will show itself - // and will stay up for 1.5 sec, as process ended between - // 0.5 and (0.5+1.5). After it dialog will call DialogDismissedL, - // which will change the state to EProcOffDialogOff, which, on - // entering RunL again, will delete the dialog and kill the thread. - // if the process was longer than 0.5+1.5 - // after operation completes, state moves to EProcOffDialogOn, - // dialog will be notified about completion by RunL, and RunL starts - // circle and wait for the dialog to finish, multiply re-entering - // and leaving RunL, as long as the state is EProcOffDialogOn. - // As time was longer than 0.5+1.5, thus dialog will show itself - // and will stay up for as long as 'process/operation' is not finished. - // As thread completes, notifies dialog, after it dialog will - // call back DialogDismissedL, which will change the state - // to EProcOffDialogOff, which, on entering RunL again, - // will delete the dialog and kill the thread. - - APSETUILOGGER_LEAVEFN( EDelete,"DeleteOp::StartL") } @@ -346,14 +147,6 @@ // void CApSettingsDeleteOperation::Next() { - APSETUILOGGER_ENTERFN( EDelete,"DeleteOp::Next") - - iStatus = KRequestPending; - SetActive(); - TRequestStatus *status = &iStatus; - User::RequestComplete( status, KErrNone ); // Invoke RunL() - - APSETUILOGGER_LEAVEFN( EDelete,"DeleteOp::Next") } @@ -365,22 +158,7 @@ // TInt CApSettingsDeleteOperation::RunDeleteThread( TAny* aPtr ) { - APSETUILOGGER_ENTERFN( EDelete,"DeleteOp::RunDeleteThread") - - CApSettingsDeleteOperation* aop = - STATIC_CAST( CApSettingsDeleteOperation*, aPtr ); - - - CTrapCleanup* TheTrapCleanup = CTrapCleanup::New(); // get cleanup stack - - TRAPD(r, aop->DoRunDeleteThreadL( aop ) ); - - delete TheTrapCleanup; // destroy cleanup stack - - aop->iErr = r; - - APSETUILOGGER_LEAVEFN( EDelete,"DeleteOp::RunDeleteThread") - return ( r ); + return ( 0 ); } @@ -392,62 +170,7 @@ TInt CApSettingsDeleteOperation::DoRunDeleteThreadL( CApSettingsDeleteOperation* aop ) { - APSETUILOGGER_ENTERFN( EDelete,"DeleteOp::DoRunDeleteThreadL") - - CCommsDatabase* db = CCommsDatabase::NewL( EDatabaseTypeIAP ); - CleanupStack::PushL( db ); - - APSETUILOGGER_WRITE( EDelete,"Commsdb created"); - - CApDataHandler* handler = CApDataHandler::NewLC( *db ); - - APSETUILOGGER_WRITE( EDelete,"CApDataHandler created"); - - CVpnApEngine* vpnengine = CVpnApEngine::NewLC( db ); - - APSETUILOGGER_WRITE( EDelete,"CVpnApEngine created"); - - TBool ownTransaction = StartTransactionLC( db, - /*aWrite*/ETrue, - /*aRetry*/ETrue ); - - APSETUILOGGER_WRITE( EDelete,"Tr.started"); - -// NORMAL OPERATION STARTS - TBool isvpn = vpnengine->IsVpnApL( aop->iUid ); - - APSETUILOGGER_WRITE( EDelete,"IsVpnApL returned"); - - // if linked to a VPN, the VPN also must be deleted - // deleting the VPN part is the delete operation's responsibility... - if ( isvpn ) - { - vpnengine->DeleteVpnL( aop->iUid ); - } - else - { - handler->RemoveAPL( aop->iUid ); - } - - APSETUILOGGER_WRITE( EDelete,"RemoveAPL returned"); - - - if ( ownTransaction ) - { - TInt err = db->CommitTransaction(); - User::LeaveIfError( err ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - APSETUILOGGER_WRITE( EDelete," delete finished"); - - CleanupStack::PopAndDestroy( 3, db ); //db,handler,vpnengine - -// NORMAL OPERATION ENDS - - - APSETUILOGGER_LEAVEFN( EDelete,"DeleteOp::DoRunDeleteThreadL") - return KErrNone; + return KErrNotSupported; } @@ -458,23 +181,6 @@ // void CApSettingsDeleteOperation::StartWaitNoteL() { - APSETUILOGGER_ENTERFN( EDelete,"DeleteOp::StartWaitNoteL") - - if ( iWaitDialog ) - { - delete iWaitDialog; - iWaitDialog = NULL; - } - iWaitDialog = - new ( ELeave ) CAknWaitDialog - ( REINTERPRET_CAST(CEikDialog**,&iWaitDialog) ); - iWaitDialog->PrepareLC( iResourceID ); - iWaitDialog->SetTone( CAknNoteDialog::ENoTone ); - iWaitDialog->SetTextL( *iNoteText ); - iWaitDialog->SetCallback( this ); - iWaitDialog->RunLD(); - - APSETUILOGGER_LEAVEFN( EDelete,"DeleteOp::StartWaitNoteL") } @@ -485,27 +191,6 @@ // void CApSettingsDeleteOperation::StartDeleteOperationThreadL() { - APSETUILOGGER_ENTERFN( EDelete,"DeleteOp::StartDeleteOperationThreadL") - - TInt err = iDeleteOperation.Create - ( - KDeleteThreadName, // aName - RunDeleteThread, // aFunction - KDeleteThreadStackSize, // aStackSize - NULL, // Use this heap. - this // aPtr - ); - APSETUILOGGER_WRITE_FORMAT( EDelete, "iDeleteOperation create returned, code:%d", err); - - User::LeaveIfError( err ); - // on termination/death of this thread, it will call RunL - iDeleteOperation.Logon( iStatus ); - // let's start the thread - iDeleteOperation.Resume(); - // set the internal state as both is running - iState = EProcOnDialogOn; - - APSETUILOGGER_LEAVEFN( EDelete,"DeleteOp::StartDeleteOperationThreadL") } @@ -520,37 +205,7 @@ TBool aWrite, TBool aRetry /*ETrue*/ ) { - APSETUILOGGER_ENTERFN( EDelete,"DeleteOp::StartTransactionLC") - - TBool retval( EFalse ); - if ( !aDb->InTransaction() ) - { - TInt retriesLeft( aRetry ? KRetryCount : 1 ); - TInt err = aDb->BeginTransaction(); - while ( ( err == KErrLocked ) && --retriesLeft ) - { - User::After( KRetryWait ); - err = aDb->BeginTransaction(); - if (aWrite ) - { - TRAP_IGNORE( GetWriteLockL( aDb ) ); - } - } - if ( err ) - { - ShowNoteL( R_APUI_VIEW_TEXT_CANNOT_ACCESS_DB ); - } - User::LeaveIfError( err ); - CleanupStack::PushL( TCleanupItem( RollbackTransactionOnLeave, aDb ) ); - retval = ETrue; - } - else - { - retval = EFalse; - } - - APSETUILOGGER_LEAVEFN( EDelete,"DeleteOp::StartTransactionLC") - return retval; + return EFalse; } @@ -560,17 +215,6 @@ // void CApSettingsDeleteOperation::GetWriteLockL( CCommsDatabase* aDb ) { - APSETUILOGGER_ENTERFN( EDelete,"DeleteOp::GetWriteLockL") - - CCommsDbTableView* v = aDb->OpenTableLC( TPtrC(WAP_ACCESS_POINT ) ); - TUint32 aDummyUid( KApNoneUID ); - TInt err = v->InsertRecord( aDummyUid ); - User::LeaveIfError( err ); - v->CancelRecordChanges(); - User::LeaveIfError( err ); - CleanupStack::PopAndDestroy(); // v - - APSETUILOGGER_LEAVEFN( EDelete,"DeleteOp::GetWriteLockL") } // --------------------------------------------------------- @@ -579,12 +223,6 @@ // void CApSettingsDeleteOperation::RollbackTransactionOnLeave( TAny* aDb ) { - APSETUILOGGER_ENTERFN( EDelete,"DeleteOp::RollbackTransactionOnLeave") - - CCommsDatabase* db = STATIC_CAST( CCommsDatabase*, aDb ); - db->RollbackTransaction(); - - APSETUILOGGER_LEAVEFN( EDelete,"DeleteOp::RollbackTransactionOnLeave") } @@ -596,18 +234,7 @@ const TDesC& aColumn, TUint32& aValue ) { - APSETUILOGGER_ENTERFN( EDelete,"DeleteOp::ReadUintL") - - __ASSERT_DEBUG( (atable), Panic( ENullPointer ) ) ; - TRAPD( err, atable->ReadUintL( aColumn, aValue ) ); - if ( err != KErrNone ) - { // do not leave if readed value is not present in table... - if ( err != KErrUnknown ) - User::Leave( err ); - } - - APSETUILOGGER_LEAVEFN( EDelete,"DeleteOp::ReadUintL") - return err; + return KErrNotSupported; } @@ -617,12 +244,5 @@ // void CApSettingsDeleteOperation::SetNoteTextL( const TDesC& aNoteText ) { - APSETUILOGGER_ENTERFN( EDelete,"DeleteOp::SetNoteTextL") - - delete iNoteText; - iNoteText = NULL; // must NULL it to satisfy CodeScanner... - iNoteText = aNoteText.AllocL(); - - APSETUILOGGER_LEAVEFN( EDelete,"DeleteOp::SetNoteTextL") } // End of File diff -r 84c6623982f6 -r ed07dcc72692 apengine/apsettingshandlerui/src/apsettingshandlerui.cpp --- a/apengine/apsettingshandlerui/src/apsettingshandlerui.cpp Fri Sep 17 08:32:43 2010 +0300 +++ b/apengine/apsettingshandlerui/src/apsettingshandlerui.cpp Mon Oct 04 00:43:42 2010 +0300 @@ -45,22 +45,7 @@ TInt aBearerFilter, TInt aSortType ) { - APSETUILOGGER_CREATE; - APSETUILOGGER_ENTERFN( EAPI,"Handler::NewLC") - - CApSettingsHandler* db = - new( ELeave ) CApSettingsHandler( aStartWithSelection, - aListType, - aSelMenuType ); - CleanupStack::PushL( db ); - - - - db->ConstructL( aIspFilter, aBearerFilter, aSortType ); - - APSETUILOGGER_LEAVEFN( EAPI,"Handler::NewLC") - - return db; + return NULL; } @@ -80,20 +65,7 @@ TInt aSortType ) { - APSETUILOGGER_CREATE; - APSETUILOGGER_ENTERFN( EAPI,"Handler::NewLC2") - - CApSettingsHandler* db = - new( ELeave ) CApSettingsHandler( aStartWithSelection, - aListType, - aSelMenuType ); - CleanupStack::PushL( db ); - - db->ConstructL( aDb, aIspFilter, aBearerFilter, aSortType ); - - APSETUILOGGER_LEAVEFN( EAPI,"Handler::NewLC2") - - return db; + return NULL; } @@ -112,22 +84,7 @@ TInt aReqIpvType ) { - APSETUILOGGER_CREATE; - APSETUILOGGER_ENTERFN( EAPI,"Handler::NewLC3") - - CApSettingsHandler* db = - new( ELeave ) CApSettingsHandler( aStartWithSelection, - aListType, - aSelMenuType, - aReqIpvType - ); - CleanupStack::PushL( db ); - - db->ConstructL( aIspFilter, aBearerFilter, aSortType ); - - APSETUILOGGER_LEAVEFN( EAPI,"Handler::NewLC3") - - return db; + return NULL; } @@ -148,22 +105,7 @@ TInt aReqIpvType ) { - APSETUILOGGER_CREATE; - APSETUILOGGER_ENTERFN( EAPI,"Handler::NewLC4") - - CApSettingsHandler* db = - new( ELeave ) CApSettingsHandler( aStartWithSelection, - aListType, - aSelMenuType, - aReqIpvType - ); - CleanupStack::PushL( db ); - - db->ConstructL( aDb, aIspFilter, aBearerFilter, aSortType ); - - APSETUILOGGER_LEAVEFN( EAPI,"Handler::NewLC4") - - return db; + return NULL; } @@ -185,23 +127,7 @@ TVpnFilterType aVpnFilterType ) { - APSETUILOGGER_CREATE; - APSETUILOGGER_ENTERFN( EAPI,"Handler::NewLC5") - - CApSettingsHandler* db = - new( ELeave ) CApSettingsHandler( aStartWithSelection, - aListType, - aSelMenuType, - aReqIpvType - ); - CleanupStack::PushL( db ); - - db->ConstructL( aIspFilter, aBearerFilter, - aSortType, aVpnFilterType ); - - APSETUILOGGER_LEAVEFN( EAPI,"Handler::NewLC5") - - return db; + return NULL; } @@ -221,23 +147,7 @@ TVpnFilterType aVpnFilterType ) { - APSETUILOGGER_CREATE; - APSETUILOGGER_ENTERFN( EAPI,"Handler::NewLC6") - - CApSettingsHandler* db = - new( ELeave ) CApSettingsHandler( aStartWithSelection, - aListType, - aSelMenuType, - aReqIpvType - ); - CleanupStack::PushL( db ); - - db->ConstructL( aDb, aIspFilter, aBearerFilter, - aSortType, aVpnFilterType ); - - APSETUILOGGER_LEAVEFN( EAPI,"Handler::NewLC6") - - return db; + return NULL; } @@ -262,35 +172,13 @@ TBool aIncludeEasyWlan ) { - APSETUILOGGER_CREATE; - APSETUILOGGER_ENTERFN( EAPI,"Handler::NewLC7") - - CApSettingsHandler* db = - new( ELeave ) CApSettingsHandler( aStartWithSelection, - aListType, - aSelMenuType, - aReqIpvType - ); - CleanupStack::PushL( db ); - - db->ConstructL( aDb, aIspFilter, aBearerFilter, - aSortType, aVpnFilterType, aIncludeEasyWlan ); - - APSETUILOGGER_LEAVEFN( EAPI,"Handler::NewLC7") - return db; + return NULL; } // Destructor EXPORT_C CApSettingsHandler::~CApSettingsHandler() { - APSETUILOGGER_DELETE; - - APSETUILOGGER_WRITE( EAPI,"Handler:: deleting implementation"); - - delete iImpl; - - APSETUILOGGER_WRITE( EAPI,"Handler::~finished"); } @@ -308,7 +196,6 @@ iReqIpvType( EIPv4 ), iEventStore( KApUiEventNone ) { - iHelpMajor = KHelpUidApSettingsHandler; } @@ -329,7 +216,6 @@ iReqIpvType( aReqIpvType ), iEventStore( KApUiEventNone ) { - iHelpMajor = KHelpUidApSettingsHandler; } @@ -342,12 +228,6 @@ TInt aBearerFilter, TInt aSortType ) { - APSETUILOGGER_ENTERFN( EAPI,"Handler::ConstructL") - - DoConstructL( NULL, aIspFilter, aBearerFilter, - aSortType, EVpnFilterBoth, EFalse ); - - APSETUILOGGER_LEAVEFN( EAPI,"Handler::ConstructL") } @@ -361,12 +241,6 @@ TInt aBearerFilter, TInt aSortType ) { - APSETUILOGGER_ENTERFN( EAPI,"Handler::ConstructL2") - - DoConstructL( &aDb, aIspFilter, aBearerFilter, - aSortType, EVpnFilterBoth, EFalse ); - - APSETUILOGGER_LEAVEFN( EAPI,"Handler::ConstructL2") } @@ -382,12 +256,6 @@ TVpnFilterType aVpnFilterType ) { - APSETUILOGGER_ENTERFN( EAPI,"Handler::ConstructL3") - - DoConstructL( NULL, aIspFilter, aBearerFilter, - aSortType, aVpnFilterType, EFalse ); - - APSETUILOGGER_LEAVEFN( EAPI,"Handler::ConstructL3") } @@ -404,12 +272,6 @@ TVpnFilterType aVpnFilterType ) { - APSETUILOGGER_ENTERFN( EAPI,"Handler::ConstructL4") - - DoConstructL( &aDb, aIspFilter, aBearerFilter, - aSortType, aVpnFilterType, EFalse ); - - APSETUILOGGER_LEAVEFN( EAPI,"Handler::ConstructL4") } @@ -428,12 +290,6 @@ TBool aIncludeEasyWlan ) { - APSETUILOGGER_ENTERFN( EAPI,"Handler::ConstructL5") - - DoConstructL( &aDb, aIspFilter, aBearerFilter, - aSortType, aVpnFilterType, aIncludeEasyWlan ); - - APSETUILOGGER_LEAVEFN( EAPI,"Handler::ConstructL5") } @@ -445,11 +301,6 @@ TInt aBearerFilter, TInt aSortType ) { - APSETUILOGGER_ENTERFN( EAPI,"Handler::SetFilterL") - - iImpl->SetFilterL( aIspFilter, aBearerFilter, aSortType ); - - APSETUILOGGER_LEAVEFN( EAPI,"Handler::SetFilterL") } @@ -462,12 +313,6 @@ EXPORT_C void CApSettingsHandler::SetTextOverrideL( TTextID aText2Change, const TDesC& aNewText ) { - APSETUILOGGER_ENTERFN( EAPI,"Handler::SetTextOverrideL") - - __ASSERT_DEBUG( iImpl, Panic( ENullPointer ) ); - iImpl->SetTextOverrideL( aText2Change, aNewText ); - - APSETUILOGGER_LEAVEFN( EAPI,"Handler::SetTextOverrideL") } @@ -477,10 +322,7 @@ // EXPORT_C const TDesC& CApSettingsHandler::TextOverrideL( TTextID aTextId ) { - APSETUILOGGER_ENTERFN( EAPI,"Handler::TextOverrideL<->") - - __ASSERT_DEBUG( iImpl, Panic( ENullPointer ) ); - return iImpl->TextOverrideL( aTextId ); + User::Leave( KErrNotSupported ); } @@ -492,13 +334,7 @@ EXPORT_C TInt CApSettingsHandler::RunSettingsL( TUint32 aHighLight, TUint32& aSelected ) { - APSETUILOGGER_ENTERFN( EAPI,"Handler::RunSettingsL") - - iImpl->RunSettingsL( aHighLight, aSelected ); - - APSETUILOGGER_LEAVEFN( EAPI,"Handler::RunSettingsL") - - return iImpl->EventStore(); + return 0; } @@ -509,8 +345,7 @@ // EXPORT_C TInt CApSettingsHandler::Cvt() { - APSETUILOGGER_ENTERFN( EAPI,"Handler::Cvt<->") - return KErrNone; + return KErrNotSupported; } @@ -521,12 +356,8 @@ TInt CApSettingsHandler::DoRunSettingsL( TUint32 /*aHighLight*/, TUint32& /*aSelected*/ ) { - APSETUILOGGER_ENTERFN( EAPI,"Handler::DoRunSettingsL@Deprecated") - - // Deprecated as moved to iImpl - __ASSERT_DEBUG( EFalse, Panic( ENullPointer ) ); User::Leave(KErrNotSupported); - return KErrNone; + return KErrNotSupported; } @@ -536,13 +367,7 @@ // EXPORT_C TInt CApSettingsHandler::RunViewerL( TUint32 aUid ) { - APSETUILOGGER_ENTERFN( EAPI,"Handler::RunViewerL") - - iImpl->RunViewerL( aUid ); - - APSETUILOGGER_LEAVEFN( EAPI,"Handler::RunViewerL") - - return iImpl->EventStore(); + return 0; } @@ -553,12 +378,8 @@ // TInt CApSettingsHandler::DoRunViewerL( TUint32 /*aUid*/ ) { - APSETUILOGGER_ENTERFN( EAPI,"Handler::DoRunViewerL@Deprecated") - - // Deprecated as moved to iImpl - __ASSERT_DEBUG( EFalse, Panic( ENullPointer ) ); User::Leave(KErrNotSupported); - return KErrNone; + return KErrNotSupported; } @@ -570,10 +391,6 @@ void CApSettingsHandler::HandleApDeleteCmdL( TUint32 /*aUid*/, TBool /*aIsLast*/ ) { - APSETUILOGGER_ENTERFN( EAPI,"Handler::HandleApDeleteCmdL@Deprecated") - - // Deprecated as moved to iImpl - __ASSERT_DEBUG( EFalse, Panic( ENullPointer ) ); User::Leave(KErrNotSupported); } @@ -585,12 +402,8 @@ TUint32 CApSettingsHandler::HandleApBlankNewL( TInt /*aBearers*/, TInt /*aIsps*/ ) { - APSETUILOGGER_ENTERFN( EAPI,"Handler::HandleApBlankNewL@Deprecated") - - // Deprecated as moved to iImpl - __ASSERT_DEBUG( EFalse, Panic( ENullPointer ) ); User::Leave(KErrNotSupported); - return KErrNone; + return KErrNotSupported; } @@ -601,10 +414,6 @@ // TUint32 CApSettingsHandler::HandleApUseOldNewL() { - APSETUILOGGER_ENTERFN( EAPI,"Handler::HandleApUseOldNewL@Deprecated") - - // Deprecated as moved to iImpl - __ASSERT_DEBUG( EFalse, Panic( ENullPointer ) ); User::Leave(KErrNotSupported); return KErrNone; } @@ -618,12 +427,8 @@ TUint32 CApSettingsHandler::EditAfterCreateL( TUint32 /*aUid*/, CApAccessPointItem* /*aItem*/ ) { - APSETUILOGGER_ENTERFN( EAPI,"Handler::EditAfterCreateL@Deprecated") - - // Deprecated as moved to iImpl - __ASSERT_DEBUG( EFalse, Panic( ENullPointer ) ); User::Leave(KErrNotSupported); - return KErrNone; + return KErrNotSupported; } @@ -639,22 +444,6 @@ TVpnFilterType aVpnFilterType, TBool aIncludeEasyWlan ) { - APSETUILOGGER_ENTERFN( EAPI,"Handler::DoConstructL") - - // must place it to a temp variable, otherwise CodeScanner reports - // it as a bad practice putting up member to Cleanupstack, but - // we have NO NewL so we must use this. - CApSettingsHandlerImpl* tmp = CApSettingsHandlerImpl::NewLC( - *aDb, iStartWithSelection, - iListType, iSelMenuType, - aIspFilter, aBearerFilter, - aSortType, iReqIpvType, - aVpnFilterType, aIncludeEasyWlan, - ETrue ); - CleanupStack::Pop(tmp); // will soon be a member, need to pop - iImpl = tmp; - - APSETUILOGGER_LEAVEFN( EAPI,"Handler::DoConstructL") } @@ -667,10 +456,6 @@ void CApSettingsHandler::DoRunSetPageSettingsL( TUint32 /*aHighLight*/, TUint32& /*aSelected*/ ) { - APSETUILOGGER_ENTERFN( EAPI,"Handler::DoRunSetPageSettingsL@Deprecated") - - // Deprecated as moved to iImpl - __ASSERT_DEBUG( EFalse, Panic( ENullPointer ) ); User::Leave(KErrNotSupported); } @@ -683,10 +468,6 @@ void CApSettingsHandler::DoRunListSettingsL( TUint32 /*aHighLight*/, TUint32& /*aSelected*/ ) { - APSETUILOGGER_ENTERFN( EAPI,"Handler::DoRunListSettingsL@Deprecated") - - // Deprecated as moved to iImpl - __ASSERT_DEBUG( EFalse, Panic( ENullPointer ) ); User::Leave(KErrNotSupported); } @@ -698,12 +479,8 @@ // TUint32 CApSettingsHandler::DoHandleApUseOldNewL( TUint32 /*aSelected*/ ) { - APSETUILOGGER_ENTERFN( EAPI,"Handler::DoHandleApUseOldNewL@Deprecated") - - // Deprecated as moved to iImpl - __ASSERT_DEBUG( EFalse, Panic( ENullPointer ) ); User::Leave(KErrNotSupported); - return KErrNone; + return KErrNotSupported; } @@ -714,12 +491,8 @@ // TUint32 CApSettingsHandler::SelectApToCopyL() { - APSETUILOGGER_ENTERFN( EAPI,"Handler::SelectApToCopyL@Deprecated") - - // Deprecated as moved to iImpl - __ASSERT_DEBUG( EFalse, Panic( ENullPointer ) ); User::Leave(KErrNotSupported); - return KErrNone; + return KErrNotSupported; } @@ -730,12 +503,8 @@ // TUint32 CApSettingsHandler::DoHandleApBlankNewL( TInt /*aBearers*/, TInt /*aIsps*/ ) { - APSETUILOGGER_ENTERFN( EAPI,"Handler::DoHandleApBlankNewL@Deprecated") - - // Deprecated as moved to iImpl - __ASSERT_DEBUG( EFalse, Panic( ENullPointer ) ); User::Leave(KErrNotSupported); - return KErrNone; + return KErrNotSupported; } @@ -747,10 +516,6 @@ // void CApSettingsHandler::HandleNetworkDeleteCmdL( TUint32 /*aUid*/ ) { - APSETUILOGGER_ENTERFN( EAPI,"Handler::HandleNetworkDeleteCmdL@Deprecated") - - // Deprecated as moved to iImpl - __ASSERT_DEBUG( EFalse, Panic( ENullPointer ) ); User::Leave(KErrNotSupported); } @@ -762,12 +527,8 @@ // TInt CApSettingsHandler::GetVariantL() { - APSETUILOGGER_ENTERFN( EAPI,"Handler::GetVariantL@Deprecated") - - // Deprecated as moved to iImpl - __ASSERT_DEBUG( EFalse, Panic( ENullPointer ) ); User::Leave(KErrNotSupported); - return KErrNone; + return KErrNotSupported; } @@ -777,12 +538,8 @@ // TInt CApSettingsHandler::ConfirmDeleteL( TUint32 /*aUid*/, TBool /*aIsLast*/ ) { - APSETUILOGGER_ENTERFN( EAPI,"Handler::ConfirmDeleteL@Deprecated") - - // Deprecated as moved to iImpl - __ASSERT_DEBUG( EFalse, Panic( ENullPointer ) ); User::Leave(KErrNotSupported); - return KErrNone; + return KErrNotSupported; } @@ -794,10 +551,6 @@ void CApSettingsHandler::HandleRunSettingsL( TUint32 /*aHighLight*/, TUint32& /*aSelected*/ ) { - APSETUILOGGER_ENTERFN( EAPI,"Handler::HandleRunSettingsL@Deprecated") - - // Deprecated as moved to iImpl - __ASSERT_DEBUG( EFalse, Panic( ENullPointer ) ); User::Leave(KErrNotSupported); } @@ -810,10 +563,6 @@ void CApSettingsHandler::ChooseBearerTypeL( TInt /*aBearers*/, CApAccessPointItem& /*aItem*/ ) { - APSETUILOGGER_ENTERFN( EAPI,"Handler::ChooseBearerTypeL@Deprecated") - - // Deprecated as moved to iImpl - __ASSERT_DEBUG( EFalse, Panic( ENullPointer ) ); User::Leave(KErrNotSupported); } @@ -826,12 +575,8 @@ // TUint32 CApSettingsHandler::HandleDuplicateL( TUint32 /*aUid*/ ) { - APSETUILOGGER_ENTERFN( EAPI,"Handler::HandleDuplicateL@Deprecated") - - // Deprecated as moved to iImpl - __ASSERT_DEBUG( EFalse, Panic( ENullPointer ) ); User::Leave(KErrNotSupported); - return KErrNone; + return KErrNotSupported; } diff -r 84c6623982f6 -r ed07dcc72692 apengine/apsettingshandlerui/src/apsettingshandleruiImpl.cpp --- a/apengine/apsettingshandlerui/src/apsettingshandleruiImpl.cpp Fri Sep 17 08:32:43 2010 +0300 +++ b/apengine/apsettingshandlerui/src/apsettingshandleruiImpl.cpp Mon Oct 04 00:43:42 2010 +0300 @@ -95,20 +95,7 @@ TInt aSortType, TBool aNoEdit ) { - APSETUILOGGER_CREATE; - - CApSettingsHandlerImpl* db = - new( ELeave ) CApSettingsHandlerImpl( aStartWithSelection, - aListType, - aSelMenuType, - aNoEdit ); - CleanupStack::PushL( db ); - - db->ConstructL( aIspFilter, aBearerFilter, aSortType ); - - APSETUILOGGER_LEAVEFN( EApImpl,"Impl::NewLC") - - return db; + return NULL; } @@ -129,20 +116,7 @@ TBool aNoEdit ) { - APSETUILOGGER_CREATE; - - CApSettingsHandlerImpl* db = - new( ELeave ) CApSettingsHandlerImpl( aStartWithSelection, - aListType, - aSelMenuType, - aNoEdit ); - CleanupStack::PushL( db ); - - db->ConstructL( aDb, aIspFilter, aBearerFilter, aSortType ); - - APSETUILOGGER_LEAVEFN( EApImpl,"Impl::NewLC2") - - return db; + return NULL; } @@ -162,22 +136,7 @@ TBool aNoEdit ) { - APSETUILOGGER_CREATE; - - CApSettingsHandlerImpl* db = - new( ELeave ) CApSettingsHandlerImpl( aStartWithSelection, - aListType, - aSelMenuType, - aReqIpvType, - aNoEdit - ); - CleanupStack::PushL( db ); - - db->ConstructL( aIspFilter, aBearerFilter, aSortType ); - - APSETUILOGGER_LEAVEFN( EApImpl,"Impl::NewLC3") - - return db; + return NULL; } @@ -199,22 +158,7 @@ TBool aNoEdit ) { - APSETUILOGGER_CREATE; - - CApSettingsHandlerImpl* db = - new( ELeave ) CApSettingsHandlerImpl( aStartWithSelection, - aListType, - aSelMenuType, - aReqIpvType, - aNoEdit - ); - CleanupStack::PushL( db ); - - db->ConstructL( aDb, aIspFilter, aBearerFilter, aSortType ); - - APSETUILOGGER_LEAVEFN( EApImpl,"Impl::NewLC4") - - return db; + return NULL; } @@ -237,23 +181,7 @@ TBool aNoEdit ) { - APSETUILOGGER_CREATE; - - CApSettingsHandlerImpl* db = - new( ELeave ) CApSettingsHandlerImpl( aStartWithSelection, - aListType, - aSelMenuType, - aReqIpvType, - aNoEdit - ); - CleanupStack::PushL( db ); - - db->ConstructL( aIspFilter, aBearerFilter, - aSortType, aVpnFilterType ); - - APSETUILOGGER_LEAVEFN( EApImpl,"Impl::NewLC5") - - return db; + return NULL; } @@ -274,23 +202,7 @@ TBool aNoEdit ) { - APSETUILOGGER_CREATE; - - CApSettingsHandlerImpl* db = - new( ELeave ) CApSettingsHandlerImpl( aStartWithSelection, - aListType, - aSelMenuType, - aReqIpvType, - aNoEdit - ); - CleanupStack::PushL( db ); - - db->ConstructL( aDb, aIspFilter, aBearerFilter, - aSortType, aVpnFilterType ); - - APSETUILOGGER_LEAVEFN( EApImpl,"Impl::NewLC6") - - return db; + return NULL; } @@ -316,22 +228,7 @@ TBool aNoEdit ) { - APSETUILOGGER_CREATE; - - CApSettingsHandlerImpl* db = - new( ELeave ) CApSettingsHandlerImpl( aStartWithSelection, - aListType, - aSelMenuType, - aReqIpvType, - aNoEdit - ); - CleanupStack::PushL( db ); - db->ConstructL( aDb, aIspFilter, aBearerFilter, - aSortType, aVpnFilterType, aIncludeEasyWlan ); - - APSETUILOGGER_LEAVEFN( EApImpl,"Impl::NewLC7") - - return db; + return NULL; } @@ -339,39 +236,6 @@ // Destructor CApSettingsHandlerImpl::~CApSettingsHandlerImpl() { - APSETUILOGGER_DELETE; - - if ( iTextOverrides ) - { - delete iTextOverrides; - iTextOverrides = NULL; - APSETUILOGGER_WRITE( EAPI,"EApImpl::txtoverrides deleted"); - } - if ( iExt ) - { - if ( iExt->iResOffset ) - { - iModel->EikEnv()->DeleteResourceFile( iExt->iResOffset ); - APSETUILOGGER_WRITE( EAPI,"EApImpl::Resource file deleted"); - } - if ( iExt->iIsFeatureManagerInitialised ) - { - FeatureManager::UnInitializeLib(); - APSETUILOGGER_WRITE( EAPI,"EApImpl::FeatMan. uninitialised"); - } - } - - if ( iModel ) - { - delete iModel; - iModel = NULL; - } - - APSETUILOGGER_WRITE( EAPI,"EApImpl::imodel deleted"); - - delete iExt; - - APSETUILOGGER_WRITE( EAPI,"EApImpl::iext deleted"); } @@ -390,7 +254,6 @@ iEventStore( KApUiEventNone ), iNoEdit( aNoEdit ) { - iHelpMajor = KHelpUidApSettingsHandler; } @@ -413,7 +276,6 @@ iEventStore( KApUiEventNone ), iNoEdit( aNoEdit ) { - iHelpMajor = KHelpUidApSettingsHandler; } @@ -426,12 +288,6 @@ TInt aBearerFilter, TInt aSortType ) { - APSETUILOGGER_ENTERFN( EApImpl,"Impl::ConstructL") - - DoConstructL( NULL, aIspFilter, aBearerFilter, - aSortType, EVpnFilterBoth, EFalse ); - - APSETUILOGGER_LEAVEFN( EApImpl,"Impl::ConstructL") } @@ -445,12 +301,6 @@ TInt aBearerFilter, TInt aSortType ) { - APSETUILOGGER_ENTERFN( EApImpl,"Impl::ConstructL2") - - DoConstructL( &aDb, aIspFilter, aBearerFilter, - aSortType, EVpnFilterBoth, EFalse ); - - APSETUILOGGER_LEAVEFN( EApImpl,"Impl::ConstructL2") } @@ -466,12 +316,6 @@ TVpnFilterType aVpnFilterType ) { - APSETUILOGGER_ENTERFN( EApImpl,"Impl::ConstructL3") - - DoConstructL( NULL, aIspFilter, aBearerFilter, - aSortType, aVpnFilterType, EFalse ); - - APSETUILOGGER_LEAVEFN( EApImpl,"Impl::ConstructL3") } @@ -488,12 +332,6 @@ TVpnFilterType aVpnFilterType ) { - APSETUILOGGER_ENTERFN( EApImpl,"Impl::ConstructL4") - - DoConstructL( &aDb, aIspFilter, aBearerFilter, - aSortType, aVpnFilterType, EFalse ); - - APSETUILOGGER_LEAVEFN( EApImpl,"Impl::ConstructL4") } @@ -512,12 +350,6 @@ TBool aIncludeEasyWlan ) { - APSETUILOGGER_ENTERFN( EApImpl,"Impl::ConstructL5") - - DoConstructL( &aDb, aIspFilter, aBearerFilter, - aSortType, aVpnFilterType, aIncludeEasyWlan ); - - APSETUILOGGER_LEAVEFN( EApImpl,"Impl::ConstructL5") } @@ -529,13 +361,6 @@ TInt aBearerFilter, TInt aSortType ) { - APSETUILOGGER_ENTERFN( EApImpl,"Impl::SetFilterL") - - iIspFilter = aIspFilter; - iBearerFilter = aBearerFilter; - iExt->iSortType = aSortType; - - APSETUILOGGER_LEAVEFN( EApImpl,"Impl::SetFilterL") } @@ -548,12 +373,6 @@ void CApSettingsHandlerImpl::SetTextOverrideL( TTextID aText2Change, const TDesC& aNewText ) { - APSETUILOGGER_ENTERFN( EApImpl,"Impl::SetTextOverrideL") - - __ASSERT_DEBUG( iTextOverrides, Panic( ENullPointer ) ); - iTextOverrides->SetTextOverrideL( aText2Change, aNewText ); - - APSETUILOGGER_LEAVEFN( EApImpl,"Impl::SetTextOverrideL") } @@ -563,10 +382,7 @@ // const TDesC& CApSettingsHandlerImpl::TextOverrideL( TTextID aTextId ) { - APSETUILOGGER_ENTERFN( EApImpl,"Impl::TextOverrideL <- ->") - - __ASSERT_DEBUG( iTextOverrides, Panic( ENullPointer ) ); - return iTextOverrides->TextOverrideL( aTextId ); + User::Leave( KErrNotSupported ); } @@ -578,26 +394,7 @@ TInt CApSettingsHandlerImpl::RunSettingsL( TUint32 aHighLight, TUint32& aSelected ) { - APSETUILOGGER_ENTERFN( EApImpl,"Impl::RunSettingsL") - - // this function is only called from outside, need to init iEventStore - iEventStore = KApUiEventNone; - - TRAPD( err, HandleRunSettingsL( aHighLight, aSelected ) ); - if ( iEventStore & KApUiEventInternal ) - { - // internal 'exit', not an error, - // clear flag and return normally - iEventStore &= (~KApUiEventInternal); - } - else - { - User::LeaveIfError(err); - } - - APSETUILOGGER_LEAVEFN( EApImpl,"Impl::RunSettingsL") - - return iEventStore; + return 0; } @@ -608,9 +405,7 @@ // TInt CApSettingsHandlerImpl::Cvt() { - APSETUILOGGER_ENTERFN( EApImpl,"Impl::Cvt") - - return KErrNone; + return KErrNotSupported; } @@ -621,21 +416,6 @@ TInt CApSettingsHandlerImpl::DoRunSettingsL( TUint32 aHighLight, TUint32& aSelected ) { - APSETUILOGGER_ENTERFN( EApImpl,"Impl::DoRunSettingsL") - - __ASSERT_DEBUG( iTextOverrides, Panic( ENullPointer ) ); - - if ( ( iListType == EApSettingsSelListIsPopUp ) || - ( iListType == EApSettingsSelListIsPopUpWithNone ) ) - { - DoRunSetPageSettingsL( aHighLight, aSelected ); - } - else - { - DoRunListSettingsL( aHighLight, aSelected ); - } - - APSETUILOGGER_LEAVEFN( EApImpl,"Impl::DoRunSettingsL") return 0; } @@ -646,65 +426,7 @@ // TInt CApSettingsHandlerImpl::RunViewerL( TUint32 aUid ) { - APSETUILOGGER_ENTERFN( EApImpl,"Impl::RunViewerL") - - // this function is only called from outside, need to init iEventStore - iEventStore = KApUiEventNone; - -#ifdef __TEST_OOMDEBUG - if ( iMemTestOn ) - { - TInt leavecode( KErrNoMemory ); - TInt ts( GetTestStateL() ); - - TBuf<48> buf; - buf.Format( _L("\r\n\t( ts: %d )"), ts ); - APSETUILOGGER_WRITE_BUF( EApImpl, buf ); - - if ( ts == KViewerTest ) - { - TBuf<48> buf; - APSETUILOGGER_WRITE_BUF( EApImpl, _L("Starting KViewerTest memtest") ); - - TUint32 rate( 0 ); - TUint32 retrycount( KOOMRetryCount ); - TUint32 retryoffset( KOOMRetryOffset ); - for ( - rate = 1; - ((rate < 50000) && (leavecode == KErrNoMemory)) - || retrycount; - rate++ - ) - { - __UHEAP_SETFAIL( RHeap::EDeterministic, rate ); - TRAP( leavecode, DoRunViewerL( aUid ) ); - __UHEAP_RESET; - if ( !leavecode ) - { - retrycount--; - rate += retryoffset; - } - } - User::LeaveIfError( leavecode ); - buf.Format( _L("\t Memtest finished, max. rate was: %d )"), rate ); - APSETUILOGGER_WRITE_BUF( EApImpl, buf ); - } - else - { - DoRunViewerL( aUid ); - } - } - else - { - DoRunViewerL( aUid ); - } -#else - DoRunViewerL( aUid ); -#endif // __TEST_OOMDEBUG - - APSETUILOGGER_LEAVEFN( EApImpl,"Impl::RunViewerL") - - return iEventStore; + return 0; } @@ -715,114 +437,7 @@ // TInt CApSettingsHandlerImpl::DoRunViewerL( TUint32 aUid ) { - APSETUILOGGER_ENTERFN( EApImpl,"Impl::DoRunViewerL") - - TInt retval( KErrNone ); - - TBool protSupported = FeatureManager::FeatureSupported( - KFeatureIdSettingsProtection ); - - - TTransactionResult ownTransaction = iModel->StartTransactionLC - ( - /*aWrite*/EFalse, - /*aShowNote*/ETrue, - /*aRetry*/ETrue - ); - if ( ownTransaction != EFailedWithLocked ) - { - TBool isinuse = iModel->ApUtils()->IsAPInUseL( aUid ); - TBool isprotected(EFalse); - if ( protSupported ) - { - isprotected = iModel->ApUtils()->IsReadOnlyL( aUid ); - isprotected |= CApProtHandler::IsTableProtectedL( - iModel->Database()->Database() ); - } - - TBool isvpn = iModel->VpnEngine()->IsVpnApL( aUid ); - - if ( ownTransaction == EOwnTransaction ) - { - TInt err = iModel->CommitTransaction(); - User::LeaveIfError( err ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - if ( isinuse ) - { - // Ap is in use right now, can not edit or delete, - // show information note qtn_set_note_iap_in_use - ShowNoteL( R_APUI_NOTE_AP_IN_USE_EDIT ); - } - else - { - if ( protSupported && isprotected ) - { - ShowNoteL( R_APUI_NOTE_PROTECTED_AP_SETT ); - } - else - { // not in use, not protected, check if it is vpn - if ( isvpn ) - { - ShowNoteL( R_APUI_NOTE_VPN_AP_SETT ); - } - else - { // may start wondering about editing... - TApBearerType bearer = iModel->ApUtils()->BearerTypeL( aUid ); -#ifdef __TEST_LAN_BEARER - if ( bearer == EApBearerTypeLAN ) - { - User::Leave( KErrNotSupported ); - // ShowNoteL( R_APUI_AP_LAN_NOT_SUPPORTED ); - // Leave needed? - } - else - { - CApSettingsDlg* iMyDialog = - CApSettingsDlg::NewL( iIspFilter, - iBearerFilter, - iExt->iSortType, - iEventStore, - iReqIpvType - ); - - iMyDialog->SetTextOverrides( iTextOverrides ); - - retval = iMyDialog->ConstructAndRunLD( - *iModel, *this, aUid ); - } -#else - if ( bearer == EApBearerTypeLANModem ) - { - User::Leave( KErrNotSupported ); - // ShowNoteL( R_APUI_AP_LAN_NOT_SUPPORTED ); - // Leave needed? - } - else - { - CApSettingsDlg* iMyDialog = - CApSettingsDlg::NewL( iIspFilter, - iBearerFilter, - iExt->iSortType, - iEventStore, - iReqIpvType - ); - - iMyDialog->SetTextOverrides( iTextOverrides ); - - retval = iMyDialog->ConstructAndRunLD( - *iModel, *this, aUid ); - } -#endif // __TEST_LAN_BEARER - } - } - } - } - - APSETUILOGGER_LEAVEFN( EApImpl,"Impl::DoRunViewerL") - - return retval; + return 0; } @@ -833,135 +448,6 @@ // void CApSettingsHandlerImpl::HandleApDeleteCmdL( TUint32 aUid, TBool aIsLast ) { - APSETUILOGGER_ENTERFN( EApImpl,"Impl::HandleApDeleteCmdL") - - // OOD handling. If disk space is low, - // we try to get some spare. - RFs fs; - User::LeaveIfError( fs.Connect() ); - CleanupClosePushL( fs ); - TBool diskLow = SysUtil::FFSSpaceBelowCriticalLevelL - ( &fs, KEstimatedDeleteFfsOverhead ); - - RSharedDataClient sdClient; - if ( diskLow ) - { - User::LeaveIfError( sdClient.Connect() ); - CleanupClosePushL( sdClient ); - sdClient.RequestFreeDiskSpaceLC - ( KEstimatedDeleteFfsOverhead ); - } - - // check that the Ap is not used so it can be deleted!! - TTransactionResult ownTransaction = iModel->StartTransactionLC( - /*aWrite*/EFalse, - /*aShowNote*/ETrue, - /*aRetry*/ETrue ); - if ( ownTransaction != EFailedWithLocked ) - { - TBool isinuse = iModel->ApUtils()->IsAPInUseL( aUid ); - TApBearerType bearer = iModel->ApUtils()->BearerTypeL( aUid ); -#ifdef __TEST_LAN_BEARER - if ( bearer == EApBearerTypeLAN ) - { - User::Leave( KErrNotSupported ); - } -#endif // __TEST_LAN_BEARER - if ( bearer == EApBearerTypeLANModem ) - { - User::Leave( KErrNotSupported ); - // Leave needed? - } - - TBool protSupported = FeatureManager::FeatureSupported( - KFeatureIdSettingsProtection ); - TBool isprotected(EFalse); - if ( protSupported ) - { - isprotected = iModel->ApUtils()->IsReadOnlyL( aUid ); - } - - if ( ownTransaction == EOwnTransaction ) - { - TInt err = iModel->CommitTransaction(); - User::LeaveIfError( err ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - if ( isinuse ) - { - // Ap is in use right now, can not edit or delete, - // show information note qtn_set_note_iap_in_use - ShowNoteL( R_APUI_NOTE_AP_IN_USE_DELETE ); - } - else - { // not in use, maybe protected? - if ( protSupported && isprotected ) - { - ShowNoteL( R_APUI_NOTE_PROTECTED_AP ); - } - else - { // not in use or protected, may start wondering about delete... - // need to check whether it is the last one... - TBool candelete( ETrue ); - // Linked to VPN? - TBool isvpn = iModel->VpnEngine()->IsVpnApL( aUid ); - if ( !isvpn ) - { - if ( iExt->iVariant & KApUiEditOnlyVPNs ) - { - candelete = EFalse; - } - else - { - HBufC* sgd = NULL; - sgd = iModel->GetLinkedVpnAccessPointLC( aUid ); - if ( sgd ) - {// has linked VPN, - // According to current spec. there should - // be something like linked to VPN, Delete? - // BUT it causes incomplete access point to exist - // hard to handle, therefore last minute change - // is that it can not be delted. - /* - if ( !AskQueryL( R_APUI_IAP_DEL_IAP_ASSOCIATED, sgd ) ) - { - candelete = EFalse; - } - */ - ShowNoteL( R_APUI_NOTE_AP_IN_USE_DELETE ); - candelete = EFalse; - - CleanupStack::PopAndDestroy( sgd ); - } - else - { // simply confirm - candelete = ConfirmDeleteL( aUid, aIsLast ); - } - } - } - else - { // simply confirm - candelete = ConfirmDeleteL( aUid, aIsLast ); - } - if ( candelete ) - { // seems that we can delete it, so let's go on - iModel->RemoveApL( aUid ); - iEventStore |= KApUiEventDeleted; - } - } - } - } - - if ( diskLow ) - { - // Cancel RequestFreeDiskSpaceLC (by popping off an destroy); - // close sdClient. - CleanupStack::PopAndDestroy( 2 ); - } - CleanupStack::PopAndDestroy(); // fs, will also close it - - APSETUILOGGER_LEAVEFN( EApImpl,"Impl::HandleApDeleteCmdL") } @@ -971,61 +457,7 @@ // TUint32 CApSettingsHandlerImpl::HandleApBlankNewL( TInt aBearers, TInt aIsps ) { - APSETUILOGGER_ENTERFN( EApImpl,"Impl::HandleApBlankNewL") - - TUint32 retval( KErrNone ); - -#ifdef __TEST_OOMDEBUG - if ( iMemTestOn ) - { - TInt leavecode( KErrNoMemory ); - - TInt ts( GetTestStateL() ); - - if ( ts == KCreateBlankTest ) - { - TBuf<48> buf; - APSETUILOGGER_WRITE_BUF( EApImpl, _L("Starting KCreateBlankTest memtest") ); - - TUint32 rate( 0 ); - TUint32 retrycount( KOOMRetryCount ); - TUint32 retryoffset( KOOMRetryOffset ); - for ( - rate = 1; - ((rate < 50000) && (leavecode == KErrNoMemory)) - || retrycount; - rate++ - ) - { - __UHEAP_SETFAIL( RHeap::EDeterministic, rate ); - TRAP( leavecode, - retval = DoHandleApBlankNewL( aBearers, aIsps ) ); - __UHEAP_RESET; - if ( !leavecode ) - { - retrycount--; - rate += retryoffset; - } - } - User::LeaveIfError( leavecode ); - buf.Format( _L("\t Memtest finished, max. rate was: %d )"), rate ); - APSETUILOGGER_WRITE_BUF( EApImpl, buf ); - } - else - { - retval = DoHandleApBlankNewL( aBearers, aIsps ); - } - } - else - { - retval = DoHandleApBlankNewL( aBearers, aIsps ); - } -#else - retval = DoHandleApBlankNewL( aBearers, aIsps ); -#endif // __TEST_OOMDEBUG - - APSETUILOGGER_LEAVEFN( EApImpl,"Impl::HandleApBlankNewL") - return retval; + return 0; } @@ -1037,115 +469,7 @@ // TUint32 CApSettingsHandlerImpl::HandleApUseOldNewL() { - APSETUILOGGER_ENTERFN( EApImpl,"Impl::HandleApUseOldNewL") - - TUint32 retval = KErrNone; - -#ifdef __TEST_OOMDEBUG - if ( iMemTestOn ) - { - TInt leavecode( KErrNoMemory ); - TInt ts( GetTestStateL() ); - - TBuf<48> buf; - buf.Format( _L("\r\n\t( ts: %d )"), ts ); - APSETUILOGGER_WRITE_BUF( EApImpl, buf ); - - if ( ts == KQueryTest ) - { - TBuf<48> buf; - APSETUILOGGER_WRITE_BUF( EApImpl, _L("Starting KQueryTest memtest") ); - TUint32 rate( 0 ); - TUint32 retrycount( KOOMRetryCount ); - TUint32 retryoffset( KOOMRetryOffset ); - for ( - rate = 1; - ((rate < 50000) && (leavecode == KErrNoMemory)) - || retrycount; - rate++ - ) - { - __UHEAP_MARK; - __UHEAP_SETFAIL( RHeap::EDeterministic, rate ); - TRAP( leavecode, retval = SelectApToCopyL() ); - __UHEAP_RESET; - __UHEAP_MARKEND; - if ( !leavecode ) - { - retrycount--; - rate += retryoffset; - } - } - User::LeaveIfError( leavecode ); - buf.Format( _L("\t Memtest finished, max. rate was: %d )"), rate ); - APSETUILOGGER_WRITE_BUF( EApImpl, buf ); - } - else - { - retval = SelectApToCopyL(); - } - } - else - { - retval = SelectApToCopyL(); - } -#else - retval = SelectApToCopyL(); -#endif // __TEST_OOMDEBUG - - if ( retval != (TUint32)KErrNone ) - { // so user had chosen something -#ifdef __TEST_OOMDEBUG - if ( iMemTestOn ) - { - TInt leavecode( KErrNoMemory ); - TInt ts( GetTestStateL() ); - if ( ts == KCreateUseExistTest ) - { - TBuf<48> buf; - APSETUILOGGER_WRITE_BUF - ( _L("Starting KCreateUseExistTest memtest") ); - TUint32 rate( 0 ); - TUint32 retrycount( KOOMRetryCount ); - TUint32 retryoffset( KOOMRetryOffset ); - for ( - rate = 1; - ((rate < 50000) && (leavecode == KErrNoMemory)) - || retrycount; - rate++ - ) - { - __UHEAP_SETFAIL( RHeap::EDeterministic, rate ); - TRAP( leavecode, retval = DoHandleApUseOldNewL( retval ) ); - __UHEAP_RESET; - if ( !leavecode ) - { - retrycount--; - rate += retryoffset; - } - } - User::LeaveIfError( leavecode ); - buf.Format( _L("\t Memtest finished, max. rate was: %d )"), - rate ); - APSETUILOGGER_WRITE_BUF( EApImpl, buf ); - } - else - { - retval = DoHandleApUseOldNewL( retval ); - } - } - else - { - retval = DoHandleApUseOldNewL( retval ); - } -#else - retval = DoHandleApUseOldNewL( retval ); -#endif // __TEST_OOMDEBUG - } - - APSETUILOGGER_LEAVEFN( EApImpl,"Impl::HandleApUseOldNewL") - - return retval; + return 0; } @@ -1157,23 +481,7 @@ TUint32 CApSettingsHandlerImpl::EditAfterCreateL( TUint32 aUid, CApAccessPointItem* aItem ) { - APSETUILOGGER_ENTERFN( EApImpl,"Impl::EditAfterCreateL") - - CApSettingsDlg* iMySetDialog = CApSettingsDlg::NewL - ( - KEApIspTypeAll, - EApBearerTypeAll, - KEApSortNameAscending, - iEventStore, - iReqIpvType - ); - - iMySetDialog->SetTextOverrides( iTextOverrides ); - iMySetDialog->ConstructAndRunLD( *iModel, *this, aUid, aItem ); - - APSETUILOGGER_LEAVEFN( EApImpl,"Impl::EditAfterCreateL") - - return aUid; + return 0; } @@ -1189,90 +497,6 @@ TVpnFilterType aVpnFilterType, TBool aIncludeEasyWlan ) { - APSETUILOGGER_ENTERFN( EApImpl,"Impl::DoConstructL") - - iExt = new ( ELeave )TApSetHandlerImplExtra; - iExt->iResOffset = 0; - iExt->iIsIpv6Supported = EFalse; - iExt->iIsFeatureManagerInitialised = EFalse; - iExt->iExtra = 0; - iExt->iSortType = KEApSortNameAscending; - iExt->iVpnFilterType = aVpnFilterType; - iExt->iVariant = GetVariantL(); - iExt->iIncludeEasyWlan = aIncludeEasyWlan; - -#ifdef __TEST_CDMA_WRITE_PROTECT - iExt->iVariant |= KApUiEditOnlyVPNs; -#endif // __TEST_CDMA_WRITE_PROTECT - iIspFilter = KEApIspTypeAll; - iBearerFilter = aBearerFilter; - - // get IPv6 features from feature manager - FeatureManager::InitializeLibL(); - iExt->iIsFeatureManagerInitialised = ETrue; - - iExt->iIsIpv6Supported = - FeatureManager::FeatureSupported( KFeatureIdIPv6 ); -#ifdef __TEST_IPV6_SUPPORT - iExt->iIsIpv6Supported = ETrue; -#endif // __TEST_IPV6_SUPPORT - - // we ask IPv6 only if it is asked by client AND supported by the phone - iReqIpvType = iExt->iIsIpv6Supported ? iReqIpvType : EIPv4; - - -#ifdef __TEST_OOMDEBUG - RFs fs; - User::LeaveIfError( fs.Connect() ); - CleanupClosePushL( fs ); - TUint att; - if ( fs.Att( KTestFileName, att ) == KErrNone ) - { - iMemTestOn = ETrue; - } - else - { - iMemTestOn = EFalse; - } - CleanupStack::PopAndDestroy(); // fs, will also close it -#endif // __TEST_OOMDEBUG - iTextOverrides = CTextOverrides::NewL(); - // No need to PushL( iTextOverrides ), it's pointer is owned - // & will be deleted in destructor, because 'this' is already - // on the CleanupStack... - if ( aDb ) - { - iModel = CApSettingsModel::NewL( *aDb, aIspFilter, - aBearerFilter, aSortType, - iReqIpvType, - iExt->iVpnFilterType, - iExt->iVariant, - iExt->iIncludeEasyWlan, - iNoEdit ); - } - else - { - iModel = CApSettingsModel::NewL( aIspFilter, aBearerFilter, - aSortType, iReqIpvType, - iExt->iVpnFilterType, - iExt->iVariant, - iExt->iIncludeEasyWlan, - iNoEdit ); - } - SetFilterL( aIspFilter, aBearerFilter, aSortType ); - - // can't use resource here because it has not been added yet.... - TFileName resourceFile; - resourceFile.Append( KApSettingsResDriveZ ); - resourceFile.Append( KDC_RESOURCE_FILES_DIR ); - resourceFile.Append( KApSettingsResFileName ); - BaflUtils::NearestLanguageFile( iModel->EikEnv()->FsSession(), - resourceFile ); - // as we are not an Application having iCoeEnv, we must figure it out, - // no matter what it takes. Also it is getted once per construction... - iExt->iResOffset = iModel->EikEnv()->AddResourceFileL( resourceFile ); - - APSETUILOGGER_LEAVEFN( EApImpl,"Impl::DoConstructL") } @@ -1285,69 +509,6 @@ void CApSettingsHandlerImpl::DoRunSetPageSettingsL( TUint32 aHighLight, TUint32& aSelected ) { - APSETUILOGGER_ENTERFN( EApImpl,"Impl::DoRunSetPageSettingsL") - - TInt aHigh = aHighLight; - - HBufC* titlebuf; - - if ( iTextOverrides->IsTextOverridenL( EPopupPromptText ) ) - { - titlebuf = iTextOverrides->TextOverrideL( - EPopupPromptText - ).AllocLC(); - } - else - { - titlebuf = iModel->EikEnv()->AllocReadResourceLC - ( - R_APUI_VIEW_DEFAULT_AP - ); - } - /* - * We need to pass an int& as starting selection to - * CAknRadioButtonSettingPage - * But we use preferred UID & not list-item nuber... - * Also it sets selection in it's ConstructL() but our list is filled - * up dynamically and it must be done after ConstructL() - * (list must be already constructed...) - * Therefore we pass a dummy int& initialized to 0 as - * selecting the 0th element does no harm... - */ - TInt Dummy( -1 ); - // needs this Dummy array to pass it to CAknSettingPage's constructor... - CDesCArrayFlat* aItemArray = new ( ELeave ) CDesCArrayFlat( 1 ); - CleanupStack::PushL( aItemArray ); - CApSelPopupList* dlg = CApSelPopupList::NewL - ( - *iModel, - *this, - Dummy, - aHigh, - iSelMenuType, - iIspFilter, - iBearerFilter, - iExt->iSortType, - iEventStore, - aItemArray, - iListType == EApSettingsSelListIsPopUpWithNone, - iReqIpvType, - iExt->iVpnFilterType, - iExt->iIncludeEasyWlan, - iNoEdit - ); - CleanupStack::PushL( dlg ); - TPtrC ptr( titlebuf->Des() ); - dlg->SetSettingTextL( ptr ); - // dlg must be Pop-ed because ExecuteLD starts with PushL()... - CleanupStack::Pop(); - if ( dlg->ExecuteLD( CAknSettingPage::EUpdateWhenChanged ) ) - { - aSelected = aHigh; - } - CleanupStack::PopAndDestroy( 2 ); // aItemArray, titlebuf - - APSETUILOGGER_LEAVEFN( EApImpl,"Impl::DoRunSetPageSettingsL") } @@ -1359,24 +520,6 @@ void CApSettingsHandlerImpl::DoRunListSettingsL( TUint32 aHighLight, TUint32& aSelected ) { - APSETUILOGGER_ENTERFN( EApImpl,"Impl::DoRunListSettingsL") - - CApSelectorDialog* iMyDialog = CApSelectorDialog::NewL - ( - iListType, - iSelMenuType, - iIspFilter, - iBearerFilter, - iExt->iSortType, - iEventStore, - iNoEdit, - iReqIpvType - ); - iMyDialog->SetTextOverrides( iTextOverrides ); - - iMyDialog->ConstructAndRunLD( *iModel, *this, aHighLight, aSelected ); - - APSETUILOGGER_LEAVEFN( EApImpl,"Impl::DoRunListSettingsL") } @@ -1387,74 +530,7 @@ // TUint32 CApSettingsHandlerImpl::DoHandleApUseOldNewL( TUint32 aSelected ) { - APSETUILOGGER_ENTERFN( EApImpl,"Impl::DoHandleApUseOldNewL") - - TInt retval = KErrNone; - - TTransactionResult ownTransaction = iModel->StartTransactionLC - ( /*aWrite*/ETrue, - /*aShowNote*/ETrue, - /*aRetry*/ETrue - ); - if ( ownTransaction != EFailedWithLocked ) - { - // check the original bearer's type - TApBearerType bearer = iModel->ApUtils()->BearerTypeL( aSelected ); -#ifdef __TEST_LAN_BEARER - if ( bearer == EApBearerTypeLAN ) - { - User::Leave( KErrNotSupported ); -// ShowNoteL( R_APUI_AP_LAN_NOT_SUPPORTED ); -// User::Leave( KLeaveWithoutAlert ); - } -#endif // __TEST_LAN_BEARER - if ( bearer == EApBearerTypeLANModem ) - { - User::Leave( KErrNotSupported ); -// ShowNoteL( R_APUI_AP_LAN_NOT_SUPPORTED ); -// User::Leave( KLeaveWithoutAlert ); - } - TBool isprotected( EFalse ); - - TBool protSupported = FeatureManager::FeatureSupported( - KFeatureIdSettingsProtection ); - - if ( protSupported ) - { - isprotected = iModel->ApUtils()->IsReadOnlyL( aSelected ); - isprotected |= CApProtHandler::IsTableProtectedL( - iModel->Database()->Database() ); - } - if ( isprotected ) - { - ShowNoteL( R_APUI_NOTE_PROTECTED_AP_SETT ); - } - if ( !isprotected ) - { - TUint32 aUid = iModel->DataHandler()->CreateCopyFromL( aSelected ); - if ( ownTransaction == EOwnTransaction ) - { - TInt err = iModel->CommitTransaction(); - User::LeaveIfError( err ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - iEventStore |= KApUiEventCreatedUsedOld; - retval = aUid; - EditAfterCreateL( aUid ); - } - else - { - if ( ownTransaction == EOwnTransaction ) - { - TInt err = iModel->CommitTransaction(); - User::LeaveIfError( err ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - } - } - - APSETUILOGGER_LEAVEFN( EApImpl,"Impl::DoHandleApUseOldNewL") - return retval; + return KErrNotSupported; } @@ -1465,22 +541,7 @@ // TUint32 CApSettingsHandlerImpl::SelectApToCopyL() { - APSETUILOGGER_ENTERFN( EApImpl,"Impl::SelectApToCopyL") - - // = KErrNone just to suppress compiler warning C4701 - TUint32 aSelected = KErrNone; - TUint32 retval = KErrNone; - - CApSelQueryDialog* dlg = new ( ELeave ) CApSelQueryDialog( *iModel, - &aSelected ); - TInt iQueryOk = dlg->ExecuteLD( R_LIST_QUERY ); - if ( iQueryOk ) - { - retval = aSelected; - } - - APSETUILOGGER_LEAVEFN( EApImpl,"Impl::SelectApToCopyL") - return retval; + return KErrNotSupported; } @@ -1493,109 +554,7 @@ // TUint32 CApSettingsHandlerImpl::DoHandleApBlankNewL( TInt aBearers, TInt aIsps ) { - APSETUILOGGER_ENTERFN( EApImpl,"Impl::DoHandleApBlankNewL") - - CApAccessPointItem* apitem = CApAccessPointItem::NewLC(); -/* -KEApIspTypeInternetOnly: - EApBearerTypeCSD, EApBearerTypeHSCSD, EApBearerTypeGPRS - -KEApIspTypeInternetAndWAP - EApBearerTypeCSD, EApBearerTypeHSCSD, EApBearerTypeGPRS - -KEApIspTypeWAPOnly - EApBearerTypeCSD, EApBearerTypeHSCSD, EApBearerTypeSMS, EApBearerTypeGPRS - -KEApIspTypeWAPMandatory - EApBearerTypeCSD, EApBearerTypeHSCSD, EApBearerTypeSMS, EApBearerTypeGPRS - -KEApIspTypeAll - All - - - EIspTypeInternetOnly, - EIspTypeWAPOnly, - EIspTypeInternetAndWAP - -*/ - ChooseBearerTypeL( aBearers, *apitem ); - - if ( aIsps & KEApIspTypeAll ) - { - apitem->WriteUint( EApIspIspType, EIspTypeInternetAndWAP ); - } - else - { - if ( aIsps & KEApIspTypeWAPOnly ) - { // EApBearerTypeCSD, EApBearerTypeHSCSD, EApBearerTypeGPRS, - apitem->WriteUint( EApIspIspType, EIspTypeWAPOnly ); - } - else - { - if ( aIsps & - ( KEApIspTypeWAPMandatory | KEApIspTypeMMSMandatory ) ) - { // EApBearerTypeCSD, EApBearerTypeHSCSD, EApBearerTypeGPRS - apitem->WriteUint( EApIspIspType, EIspTypeInternetAndWAP ); - } - else - { - if ( aIsps & KEApIspTypeInternetAndWAP ) - { - apitem->WriteUint( EApIspIspType, EIspTypeInternetAndWAP ); - } - else - { - if ( aIsps & KEApIspTypeInternetOnly ) - { - apitem->WriteUint( EApIspIspType, - EIspTypeInternetOnly ); - } - else - { - __ASSERT_DEBUG( EFalse, Panic( EInvalidIspRequest ) ); - } - } - } - } - } -/* -KEApIspTypeInternetOnly -KEApIspTypeWAPOnly -KEApIspTypeInternetAndWAP -KEApIspTypeWAPMandatory -KEApIspTypeAll -*/ - -// apitem->WriteUint( EApIspIspType, EIspTypeInternetOnly ); - - TUint32 aUid( KApNoneUID ); - HBufC* buf = HBufC::NewLC( KApMaxConnNameLength ); - TPtr16 ptr( buf->Des() ); - apitem->ReadTextL( EApWapAccessPointName, ptr ); - - TTransactionResult ownTransaction = iModel->StartTransactionLC( - ETrue, // aWrite - ETrue, // aShowNote - ETrue ); // aRetry - if ( ownTransaction != EFailedWithLocked ) - { - if ( iModel->ApUtils()->MakeValidNameL( ptr ) ) - { - apitem->SetNamesL( ptr ); - } - if ( ownTransaction == EOwnTransaction ) - { - TInt err = iModel->CommitTransaction(); - User::LeaveIfError( err ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - } - - aUid = EditAfterCreateL( KApNoneUID, apitem ); - CleanupStack::PopAndDestroy( 2 ); // apitem, buf - - APSETUILOGGER_LEAVEFN( EApImpl,"Impl::DoHandleApBlankNewL") - return aUid; + return 0; } @@ -1607,73 +566,6 @@ // void CApSettingsHandlerImpl::HandleNetworkDeleteCmdL( TUint32 aUid ) { - APSETUILOGGER_ENTERFN( EApImpl,"Impl::HandleNetworkDeleteCmdL") - - // check that the Ap is not used so it can be deleted!! - TTransactionResult ownTransaction = iModel->StartTransactionLC( - /*aWrite*/EFalse, - /*aShowNote*/ETrue, - /*aRetry*/ETrue ); - if ( ownTransaction != EFailedWithLocked ) - { - TBool protSupported = FeatureManager::FeatureSupported( - KFeatureIdSettingsProtection ); - if ( protSupported ) - { - TBool isprotected = iModel->ApUtils()->IsReadOnlyL( aUid ); - if ( isprotected ) - { - ShowNoteL( R_APUI_NOTE_PROTECTED_AP ); - return; - } - } - if ( ownTransaction == EOwnTransaction ) - { - TInt err = iModel->CommitTransaction(); - User::LeaveIfError( err ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - // not protected, may start wondering about delete... - // simply confirm - - // OOD handling. If disk space is low, - // we try to get some spare. - RFs fs; - User::LeaveIfError( fs.Connect() ); - CleanupClosePushL( fs ); - TBool diskLow = SysUtil::FFSSpaceBelowCriticalLevelL - ( &fs, KEstimatedDeleteFfsOverhead ); - RSharedDataClient sdClient; - if ( diskLow ) - { - User::LeaveIfError( sdClient.Connect() ); - CleanupClosePushL( sdClient ); - sdClient.RequestFreeDiskSpaceLC - ( KEstimatedDeleteFfsOverhead ); - } - // Handle getting the name, showing the query, - // and deleting the network group. - // get the name: - CApNetworkItem* net = CApNetworkItem::NewLC(); - iModel->DataHandler()->ReadNetworkL( aUid, *net ); - HBufC* buf = net->Name().AllocLC(); - if ( AskQueryL( R_APUI_IAP_ARE_YOU_SURE_TO_DEL, buf ) ) - { - iModel->DataHandler()->RemoveNetworkL( aUid ); - } - CleanupStack::PopAndDestroy( buf ); // buf - CleanupStack::PopAndDestroy( net ); - if ( diskLow ) - { - // Cancel RequestFreeDiskSpaceLC (by popping off an destroy); - // close scClient. - CleanupStack::PopAndDestroy( 2 ); - } - CleanupStack::PopAndDestroy(); // fs, will also close it - } - - APSETUILOGGER_LEAVEFN( EApImpl,"Impl::HandleNetworkDeleteCmdL") } @@ -1704,71 +596,7 @@ // TInt CApSettingsHandlerImpl::ConfirmDeleteL( TUint32 aUid, TBool aIsLast ) { - APSETUILOGGER_ENTERFN( EApImpl,"Impl::ConfirmDeleteL") - - TInt retval( 0 ); - HBufC* sgd = HBufC::NewLC( KModifiableTextLength ); - TPtr ptr( sgd->Des() ); - - // OOD handling. If disk space is low, - // we try to get some spare. - RFs fs; - User::LeaveIfError( fs.Connect() ); - CleanupClosePushL( fs ); - TBool diskLow = SysUtil::FFSSpaceBelowCriticalLevelL - ( &fs, KEstimatedDeleteFfsOverhead ); - - RSharedDataClient sdClient; - if ( diskLow ) - { - User::LeaveIfError( sdClient.Connect() ); - CleanupClosePushL( sdClient ); - sdClient.RequestFreeDiskSpaceLC - ( KEstimatedDeleteFfsOverhead ); - } - - TTransactionResult ownTransaction = iModel->StartTransactionLC - ( - /*aWrite*/ETrue, - /*aShowNote*/ETrue, - /*aRetry*/ETrue, - /*aLFFSChecking*/EFalse - ); - if ( ownTransaction != EFailedWithLocked ) - { - iModel->ApUtils()->NameL( aUid, ptr ); - if ( ownTransaction == EOwnTransaction ) - { - TInt err = iModel->CommitTransaction(); - User::LeaveIfError( err ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - - if ( aIsLast ) - { // we are deleting the last one, needs to confirm - retval = AskQueryL( R_APUI_IAP_DEL_LAST_AP, sgd ); - } - else - { // not the last one, simply confirm - // handle exotic language number conversion here - TPtr t(sgd->Des()); - AknTextUtils::LanguageSpecificNumberConversion( t ); - retval = AskQueryL( R_APUI_IAP_ARE_YOU_SURE_TO_DEL, sgd ); - } - } - - - CleanupStack::PopAndDestroy(); // sgd - if ( diskLow ) - { - // Cancel RequestFreeDiskSpaceLC (by popping off an destroy); - // close scClient. - CleanupStack::PopAndDestroy( 2 ); - } - CleanupStack::PopAndDestroy(); // fs, will also close it - - APSETUILOGGER_LEAVEFN( EApImpl,"Impl::ConfirmDeleteL") - return retval; + return 0; } @@ -1782,80 +610,6 @@ void CApSettingsHandlerImpl::HandleRunSettingsL( TUint32 aHighLight, TUint32& aSelected ) { - APSETUILOGGER_ENTERFN( EApImpl,"Impl::HandleRunSettingsL") - - if ( iStartWithSelection == EFalse ) - { - RunViewerL( aHighLight ); - } - else - { -#ifdef __TEST_OOMDEBUG - if ( iMemTestOn ) - { - TInt leavecode( KErrNoMemory ); - TInt state( GetTestStateL() ); - - if ( ( ( - ( iListType == EApSettingsSelListIsPopUp ) || - ( iListType == EApSettingsSelListIsPopUpWithNone ) ) && - ( state == KPopupListTest ) ) - || - ( - ( iListType == EApSettingsSelListIsListPane ) && - ( state == KDialogListTest ) ) ) - { - TBuf<48> buf; - if ( state == KDialogListTest ) - { - APSETUILOGGER_WRITE_BUF( EApImpl, \ - _L("Doing memtest KDialogListTest") ); - } - if ( state == KPopupListTest ) - { - APSETUILOGGER_WRITE_BUF( EApImpl, \ - _L("Doing memtest KPopupListTest") ); - } - TUint32 rate( 0 ); - TUint32 retrycount( KOOMRetryCount ); - TUint32 retryoffset( KOOMRetryOffset ); - for ( - rate = 1; - ((rate < 50000) && (leavecode == KErrNoMemory)) - || retrycount; - rate++ - ) - { - __UHEAP_SETFAIL( RHeap::EDeterministic, rate ); - TRAP( leavecode, - DoRunSettingsL( aHighLight, aSelected ) ); - __UHEAP_RESET; - if ( !leavecode ) - { - retrycount--; - rate += retryoffset; - } - } - User::LeaveIfError( leavecode ); - buf.Format( _L("\t Memtest finished, max. rate was: %d )"), - rate ); - APSETUILOGGER_WRITE_BUF( EApImpl, buf ); - } - else - { - DoRunSettingsL( aHighLight, aSelected ); - } - } - else - { - DoRunSettingsL( aHighLight, aSelected ); - } -#else - DoRunSettingsL( aHighLight, aSelected ); -#endif // __TEST_OOMDEBUG - } - - APSETUILOGGER_LEAVEFN( EApImpl,"Impl::HandleRunSettingsL") } @@ -1866,89 +620,6 @@ void CApSettingsHandlerImpl::ChooseBearerTypeL( TInt aBearers, CApAccessPointItem& aItem ) { - APSETUILOGGER_ENTERFN( EApImpl,"Impl::ChooseBearerTypeL") - - // Check for support in each case!!!!! - TBool gprssupported = ETrue; - TBool csdsupported = ETrue; // OK - TBool hscsdsupported = ETrue; // NO WAY TO CHECK IT - TBool wlansupported = ETrue; // OK - TBool lansupported = ETrue; // NO WAY TO CHECK IT - TBool lanmodemsupported = ETrue; // NO WAY TO CHECK IT - TBool cdmasupported = ETrue; // OK - - if ( iExt->iIsFeatureManagerInitialised ) - { - cdmasupported = FeatureManager::FeatureSupported( KFeatureIdProtocolWcdma ); - csdsupported = FeatureManager::FeatureSupported( KFeatureIdAppCsdSupport ); - wlansupported = FeatureManager::FeatureSupported( KFeatureIdProtocolWlan ); - } - - if ( ( ( aBearers & EApBearerTypeAll ) || - ( aBearers & EApBearerTypeGPRS ) ) && - gprssupported ) - { - aItem.SetBearerTypeL( EApBearerTypeGPRS ); - } - else - { - if ( ( ( aBearers & EApBearerTypeAll ) || - ( aBearers & EApBearerTypeHSCSD ) ) - && hscsdsupported ) - { - aItem.SetBearerTypeL( EApBearerTypeHSCSD ); - } - else - { - if ( ( ( aBearers & EApBearerTypeAll ) || - (aBearers & EApBearerTypeCSD ) ) && csdsupported ) - { - aItem.SetBearerTypeL( EApBearerTypeCSD ); - } - else - { - if ( ( ( aBearers & EApBearerTypeAll ) || - ( aBearers & EApBearerTypeWLAN ) ) - && wlansupported ) - { - aItem.SetBearerTypeL( EApBearerTypeWLAN ); - } - else - { - if ( ( ( aBearers & EApBearerTypeAll ) || - ( aBearers & EApBearerTypeLAN ) ) - && lansupported ) - { - aItem.SetBearerTypeL( EApBearerTypeLAN ); - } - else - { - if ( ( ( aBearers & EApBearerTypeAll ) || - ( aBearers & EApBearerTypeLANModem ) ) - && lanmodemsupported ) - { - aItem.SetBearerTypeL( EApBearerTypeLANModem ); - } - else - { - if ( ( ( aBearers & EApBearerTypeAll ) || - ( aBearers & EApBearerTypeCDMA ) ) - && cdmasupported ) - { - aItem.SetBearerTypeL( EApBearerTypeCDMA ); - } - else - { - User::Leave( KErrInvalidBearerType ); - } - } - } - } - } - } - } - - APSETUILOGGER_LEAVEFN( EApImpl,"Impl::ChooseBearerTypeL") } @@ -1960,59 +631,7 @@ // TUint32 CApSettingsHandlerImpl::HandleDuplicateL( TUint32 aUid ) { - APSETUILOGGER_ENTERFN( EApImpl,"Impl::HandleDuplicateL") - - TUint32 retval(KErrNone); - // so user had chosen something -#ifdef __TEST_OOMDEBUG - if ( iMemTestOn ) - { - TInt leavecode( KErrNoMemory ); - TInt ts( GetTestStateL() ); - if ( ts == KCreateUseExistTest ) - { - TBuf<48> buf; - APSETUILOGGER_WRITE_BUF - ( _L("Starting KCreateUseExistTest memtest") ); - TUint32 rate( 0 ); - TUint32 retrycount( KOOMRetryCount ); - TUint32 retryoffset( KOOMRetryOffset ); - for ( - rate = 1; - ((rate < 50000) && (leavecode == KErrNoMemory)) - || retrycount; - rate++ - ) - { - __UHEAP_SETFAIL( RHeap::EDeterministic, rate ); - TRAP( leavecode, retval = DoHandleApUseOldNewL( aUid ) ); - __UHEAP_RESET; - if ( !leavecode ) - { - retrycount--; - rate += retryoffset; - } - } - User::LeaveIfError( leavecode ); - buf.Format( _L("\t Memtest finished, max. rate was: %d )"), - rate ); - APSETUILOGGER_WRITE_BUF( EApImpl, buf ); - } - else - { - retval = DoHandleApUseOldNewL( aUid ); - } - } - else - { - retval = DoHandleApUseOldNewL( aUid ); - } -#else - retval = DoHandleApUseOldNewL( aUid ); -#endif // __TEST_OOMDEBUG - - APSETUILOGGER_LEAVEFN( EApImpl,"Impl::HandleDuplicateL") - return retval; + return KErrNotSupported; } diff -r 84c6623982f6 -r ed07dcc72692 apengine/apsettingshandlerui/src/apsettingsui.cpp --- a/apengine/apsettingshandlerui/src/apsettingsui.cpp Fri Sep 17 08:32:43 2010 +0300 +++ b/apengine/apsettingshandlerui/src/apsettingsui.cpp Mon Oct 04 00:43:42 2010 +0300 @@ -47,22 +47,7 @@ TVpnFilterType aVpnFilterType ) { - APSETUILOGGER_CREATE; - APSETUILOGGER_ENTERFN( EAPI,"SettingsUi::NewLC") - - CApSettingsUi* db = - new( ELeave ) CApSettingsUi( aStartWithSelection, - aListType, - aSelMenuType, - aReqIpvType - ); - CleanupStack::PushL( db ); - - - db->ConstructL( aIspFilter, aBearerFilter, - aSortType, aVpnFilterType ); - APSETUILOGGER_LEAVEFN( EAPI,"SettingsUi::NewLC") - return db; + return NULL; } @@ -70,9 +55,6 @@ // Destructor EXPORT_C CApSettingsUi::~CApSettingsUi() { - APSETUILOGGER_DELETE; - - delete iImpl; } @@ -102,23 +84,6 @@ TVpnFilterType aVpnFilterType ) { - APSETUILOGGER_ENTERFN( EAPI,"SettingsUi::ConstructL"); - - // must place it to a temp variable, otherwise CodeScanner reports - // it as a bad practice putting up member to Cleanupstack, but - // we have NO NewL so we must use this. - CApSettingsHandlerImpl* tmp = CApSettingsHandlerImpl::NewLC( - iStartWithSelection, - iListType, iSelMenuType, - aIspFilter, aBearerFilter, - aSortType, iReqIpvType, - aVpnFilterType, - EFalse ); - - CleanupStack::Pop( tmp ); // soon will be a member, need to pop - iImpl = tmp; - - APSETUILOGGER_LEAVEFN( EAPI,"SettingsUi::ConstructL") } @@ -130,14 +95,7 @@ EXPORT_C TInt CApSettingsUi::RunSettingsL( TUint32 aHighLight, TUint32& aSelected ) { - APSETUILOGGER_ENTERFN( EAPI,"SettingsUi::RunSettingsL") - __ASSERT_DEBUG( iImpl, Panic( ENullPointer ) ); - - iImpl->RunSettingsL( aHighLight, aSelected ); - - APSETUILOGGER_LEAVEFN( EAPI,"SettingsUi::RunSettingsL") - - return iImpl->EventStore(); + return 0; } diff -r 84c6623982f6 -r ed07dcc72692 bearermanagement/S60MCPR/inc/s60mcpr.h --- a/bearermanagement/S60MCPR/inc/s60mcpr.h Fri Sep 17 08:32:43 2010 +0300 +++ b/bearermanagement/S60MCPR/inc/s60mcpr.h Mon Oct 04 00:43:42 2010 +0300 @@ -63,6 +63,7 @@ EMPMStartIAPNotificationMsg, EMPMErrorNotificationMsg, EMPMStartupErrorIgnoredMsg, + EMPMStopIAPNotificationMsg, }; public: typedef Messages::TMessageSigVoid TMPMReselectBestIAPCompletedMsg; @@ -72,6 +73,7 @@ typedef Messages::TMessageSigNumber TMPMStartIAPNotificationMsg; typedef Messages::TMessageSigNumber TMPMErrorNotificationMsg; typedef Messages::TMessageSigVoid TMPMStartupErrorIgnoredMsg; + typedef Messages::TMessageSigNumber TMPMStopIAPNotificationMsg; }; /** diff -r 84c6623982f6 -r ed07dcc72692 bearermanagement/S60MCPR/inc/s60mcpractivities.h --- a/bearermanagement/S60MCPR/inc/s60mcpractivities.h Fri Sep 17 08:32:43 2010 +0300 +++ b/bearermanagement/S60MCPR/inc/s60mcpractivities.h Mon Oct 04 00:43:42 2010 +0300 @@ -30,11 +30,6 @@ // Forward declarations class CS60MetaConnectionProvider; -enum TS60MCprActivities - { - ECFActivityS60McprServiceIdMessage2Handler = ESock::ECFActivityCustom + 10 - }; - /** * S60MCprActivities namespace contains the * definition of S60MCPR's activity map. diff -r 84c6623982f6 -r ed07dcc72692 bearermanagement/S60MCPR/inc/s60mcpractivityids.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bearermanagement/S60MCPR/inc/s60mcpractivityids.h Mon Oct 04 00:43:42 2010 +0300 @@ -0,0 +1,34 @@ +/* +* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: S60 MCPR's activities. +* +*/ + +/** +@file s60mcpractivityids.h +S60 MCPR's activity id's. +*/ + +#ifndef S60MCPRACTIVITYIDS_H +#define S60MCPRACTIVITYIDS_H + +enum TS60MCprActivities + { + ECFActivityS60McprServiceIdMessage2Handler = ESock::ECFActivityCustom + 10, + ECFActivityS60McprStopIAP, + ECFActivityS60McprDataClientIdle, + ECFActivityS60DataClientStatusChangeConsumeActivity + }; + +#endif //S60MCPRACTIVITYIDS_H diff -r 84c6623982f6 -r ed07dcc72692 bearermanagement/S60MCPR/inc/s60mcprstates.h --- a/bearermanagement/S60MCPR/inc/s60mcprstates.h Fri Sep 17 08:32:43 2010 +0300 +++ b/bearermanagement/S60MCPR/inc/s60mcprstates.h Mon Oct 04 00:43:42 2010 +0300 @@ -30,6 +30,7 @@ #include "s60mcpr.h" #include "s60mpmrequests.h" +#include "s60mcpractivityids.h" /** * S60McprState namespace packages all S60 specific state, forks and @@ -58,6 +59,7 @@ const TInt KConsumeRejectedMsg = 11054; const TInt KInformMigrationCompleted = 11055; const TInt KRequestReConnectToCurrentSP = 11056; + const TInt KStopActivityNotRunning = 11057; /** * Execution context @@ -172,6 +174,68 @@ virtual void DoL(); DECLARE_SMELEMENT_FOOTER( TRetrieveServiceId ) + /** + * STATE: Waits for StopIAPNotification message. + * @return ETrue if message is accepted. + */ + DECLARE_SMELEMENT_HEADER( TAwaitingStopIAPNotification, + MeshMachine::TState, + NetStateMachine::MState, + TContext ) + virtual TBool Accept(); + DECLARE_SMELEMENT_FOOTER( TAwaitingStopIAPNotification ) + + /** + * TRANSITION/ACTION: Sends Stop to Service Provider + */ + DECLARE_SMELEMENT_HEADER( TSendStop, + MeshMachine::TStateTransition, + NetStateMachine::MStateTransition, + TContext ) + virtual void DoL(); + DECLARE_SMELEMENT_FOOTER( TSendStop ) + + + /** + * STATE: Waits for Stopped or Error + * @return ETrue if message is accepted. + */ + DECLARE_SMELEMENT_HEADER( TAwaitingStoppedOrError, + MeshMachine::TState, + NetStateMachine::MState, + TContext ) + virtual TBool Accept(); + DECLARE_SMELEMENT_FOOTER( TAwaitingStoppedOrError ) + + + /** + * STATE: Waits for TIdle + */ + DECLARE_SMELEMENT_HEADER( TAwaitingDataClientIdle, + MeshMachine::TState, + NetStateMachine::MState, + TContext ) + virtual TBool Accept(); + DECLARE_SMELEMENT_FOOTER( TAwaitingDataClientIdle ) + + /** + * STATE: Waits for TDataClientStatusChange + */ + DECLARE_SMELEMENT_HEADER( TAwaitingDataClientStatusChange, + MeshMachine::TState, + NetStateMachine::MState, + TContext ) + virtual TBool Accept(); + DECLARE_SMELEMENT_FOOTER( TAwaitingDataClientStatusChange ) + + + /** + * FORK/MUTEX: Waits for StopIAPActivity to complete + */ + DECLARE_SERIALIZABLE_STATE( TStopActivityNotRunning, + MeshMachine::TActivityIdMutex, + MeshMachine::TTag ) + class CS60ErrorRecoveryActivity : public MeshMachine::CNodeRetryActivity { public: diff -r 84c6623982f6 -r ed07dcc72692 bearermanagement/S60MCPR/src/s60mcpr.cpp --- a/bearermanagement/S60MCPR/src/s60mcpr.cpp Fri Sep 17 08:32:43 2010 +0300 +++ b/bearermanagement/S60MCPR/src/s60mcpr.cpp Mon Oct 04 00:43:42 2010 +0300 @@ -381,23 +381,14 @@ TMpmNotificationStopIAP& notification = static_cast( const_cast( aNotification ) ); - // Allow TStop message only when ServiceProvider exists and the IAP matches or is unspecified. - // - if ( ServiceProvider() && - (((RMetaServiceProviderInterface*)ServiceProvider())->ProviderInfo().APId() == notification.iInfo.iIap || - notification.iInfo.iIap == 0 )) - { - S60MCPRLOGSTRING2("S60MCPR<%x>::PolicyNotification() EMPMStopIAPNotification IAP %d",(TInt*)this,notification.iInfo.iIap); - PostToClients( TNodeCtxId( 0, Id() ), - TCFServiceProvider::TStop( KErrDisconnected ).CRef(), - TClientType( TCFClientType::EServProvider) ); - } -#ifdef _DEBUG - else - { - S60MCPRLOGSTRING2("S60MCPR<%x>::PolicyNotification() EMPMStopIAPNotification NO MATCH! IAP %d",(TInt*)this,notification.iInfo.iIap); - } -#endif + S60MCPRLOGSTRING2("S60MCPR<%x>::PolicyNotification() EMPMStopIAPNotification IAP %d",(TInt*)this, notification.iInfo.iIap); + + // Send stop notification into meshmachine. + // + RNodeInterface ni; + ni.OpenPostMessageClose( NodeId(), + NodeId(), + TCFS60MCPRMessage::TMPMStopIAPNotificationMsg( notification.iInfo.iIap ).CRef() ); break; } default: diff -r 84c6623982f6 -r ed07dcc72692 bearermanagement/S60MCPR/src/s60mcpractivities.cpp --- a/bearermanagement/S60MCPR/src/s60mcpractivities.cpp Fri Sep 17 08:32:43 2010 +0300 +++ b/bearermanagement/S60MCPR/src/s60mcpractivities.cpp Mon Oct 04 00:43:42 2010 +0300 @@ -21,6 +21,7 @@ */ #include "s60mcpractivities.h" +#include "s60mcpractivityids.h" using namespace Messages; using namespace MeshMachine; @@ -183,6 +184,7 @@ DECLARE_DEFINE_NODEACTIVITY( ECFActivityMonitorProviderStatus, MCprDataClientStatusChange, TCFControlProvider::TDataClientStatusChange ) + SINGLE_NODEACTIVITY_ENTRY( S60MCprStates::THandleMPMAndCoreDataClientStatusChangeAndDestroyOrphans, CoreNetStates::TAwaitingDataClientStatusChange ) NODEACTIVITY_END() @@ -406,12 +408,78 @@ } // S60MCprServiceIdRMessage2HandlerActivity // ----------------------------------------------------------------------------- +// S60MCprStopIAPActivity +// ----------------------------------------------------------------------------- +// + +namespace S60MCprStopIAPActivity + { + DECLARE_DEFINE_NODEACTIVITY( ECFActivityS60McprStopIAP, + MCprStopIAPActivity, + TCFS60MCPRMessage::TMPMStopIAPNotificationMsg) + + FIRST_NODEACTIVITY_ENTRY( S60MCprStates::TAwaitingStopIAPNotification, + MeshMachine::TNoTag ) + + NODEACTIVITY_ENTRY( KNoTag, + S60MCprStates::TSendStop, + S60MCprStates::TAwaitingStoppedOrError, + MeshMachine::TNoTag ) + + LAST_NODEACTIVITY_ENTRY( KNoTag, + MeshMachine::TDoNothing ) + + NODEACTIVITY_END() + } // S60MCprStopIAPActivity + +// ----------------------------------------------------------------------------- +// S60MCprDataClientIdleActivity +// ----------------------------------------------------------------------------- +// + +namespace S60MCprDataClientIdleActivity + { + DECLARE_DEFINE_CUSTOM_NODEACTIVITY( ECFActivityS60McprDataClientIdle, + MCprDataClientIdleActivity, + TCFControlProvider::TIdle, + MeshMachine::CNodeRetryActivity::NewL) + + FIRST_NODEACTIVITY_ENTRY( CoreNetStates::TAwaitingDataClientIdle, + S60MCprStates::TStopActivityNotRunning ) + + LAST_NODEACTIVITY_ENTRY( S60MCprStates::KStopActivityNotRunning, + CoreNetStates::THandleDataClientIdle ) + + NODEACTIVITY_END() + } // S60MCprDataClientIdleActivity + +// ----------------------------------------------------------------------------- +// S60MCprDataClientStatusChangeConsumeActivity +// ----------------------------------------------------------------------------- +// + +namespace S60MCprDataClientStatusChangeConsumeActivity + { + DECLARE_DEFINE_NODEACTIVITY( ECFActivityS60DataClientStatusChangeConsumeActivity, + MCprDataClientStatusChangeConsumeActivity, + TCFControlProvider::TDataClientStatusChange) + + SINGLE_NODEACTIVITY_ENTRY( MeshMachine::TDoNothing, + S60MCprStates::TAwaitingDataClientStatusChange ) + + NODEACTIVITY_END() + } // S60MCprDataClientStatusChangeConsumeActivity + + + +// ----------------------------------------------------------------------------- // S60MCprActivities - activitymap // ----------------------------------------------------------------------------- // namespace S60MCprActivities { DEFINE_ACTIVITY_MAP(S60MCprActivityMap) + ACTIVITY_MAP_ENTRY(S60MCprDataClientStatusChangeConsumeActivity, MCprDataClientStatusChangeConsumeActivity) ACTIVITY_MAP_ENTRY(S60MCprMonitorDataClientStatusActivity, MCprDataClientStatusChange) ACTIVITY_MAP_ENTRY(S60MCprSelectActivity, S60MCprSelect) // in s60mcprsimpleselectactivity.cpp ACTIVITY_MAP_ENTRY(S60MCprSimpleSelectActivity, MCprSimpleSelect) // in s60mcprsimpleselectactivity.cpp @@ -419,6 +487,8 @@ ACTIVITY_MAP_ENTRY(S60MCprMobilityActivity, MCprMobility) // in s60mcprmobilityactivity.cpp ACTIVITY_MAP_ENTRY(S60MCprConnectionGoneDownRecoveryActivity, MCprConnectionGoneDownRecovery) ACTIVITY_MAP_ENTRY(S60MCprServiceIdRMessage2HandlerActivity, S60MCprServiceIdLegacyRMessage2Handler) + ACTIVITY_MAP_ENTRY(S60MCprStopIAPActivity, MCprStopIAPActivity) + ACTIVITY_MAP_ENTRY(S60MCprDataClientIdleActivity, MCprDataClientIdleActivity) ACTIVITY_MAP_END_BASE(MobilityMCprActivities, mobilityMCprActivities) } diff -r 84c6623982f6 -r ed07dcc72692 bearermanagement/S60MCPR/src/s60mcprstates.cpp --- a/bearermanagement/S60MCPR/src/s60mcprstates.cpp Fri Sep 17 08:32:43 2010 +0300 +++ b/bearermanagement/S60MCPR/src/s60mcprstates.cpp Mon Oct 04 00:43:42 2010 +0300 @@ -21,6 +21,7 @@ */ #include +#include #include "s60mcprstates.h" @@ -390,6 +391,129 @@ } } + +// ----------------------------------------------------------------------------- +// TAwaitingStopIAPNotification::Accept +// ----------------------------------------------------------------------------- +// +DEFINE_SMELEMENT( TAwaitingStopIAPNotification, NetStateMachine::MState, TContext ) +TBool TAwaitingStopIAPNotification::Accept() + { + TUint32 iapId( 0 ); + TCFS60MCPRMessage::TMPMStopIAPNotificationMsg* msg = + message_cast(&iContext.iMessage); + if ( msg ) + { + iapId = msg->iValue; + // Only accept the notification if it matches current service provider, or if the IAP is undefined + if ( iContext.Node().ServiceProvider() && + (((RMetaServiceProviderInterface*)iContext.Node().ServiceProvider())->ProviderInfo().APId() == iapId || + iapId == 0 ) ) + { + return ETrue; + } +#ifdef _DEBUG + else + { + S60MCPRLOGSTRING2("S60MCPR<%x>::TAwaitingStopIAPNotification() NO MATCH! IAP %d",(TInt*)this,iapId); + } +#endif + } + return EFalse; + } + +// ----------------------------------------------------------------------------- +// TProcessError::DoL +// ----------------------------------------------------------------------------- +// +DEFINE_SMELEMENT( TSendStop, NetStateMachine::MStateTransition, TContext ) +void TSendStop::DoL() // codescanner::leave + { + __ASSERT_DEBUG(iContext.iNodeActivity, User::Panic(KS60MCprPanic, KPanicNoActivity)); + __ASSERT_DEBUG(iContext.Node().ServiceProvider(), User::Panic(KS60MCprPanic, KPanicNoServiceProvider)); + + // Send TStop to current Service Provider. + iContext.iNodeActivity->PostRequestTo( + iContext.Node().ServiceProvider()->RecipientId(), + TCFServiceProvider::TStop( KErrDisconnected ).CRef() ); + } + +// ----------------------------------------------------------------------------- +// TAwaitingStoppedOrError::Accept +// ----------------------------------------------------------------------------- +// +DEFINE_SMELEMENT( TAwaitingStoppedOrError, NetStateMachine::MState, TContext ) +TBool TAwaitingStoppedOrError::Accept() + { + __ASSERT_DEBUG(iContext.iNodeActivity, User::Panic(KS60MCprPanic, KPanicNoActivity)); + + if ( iContext.iMessage.IsMessage() ) + { + return ETrue; + } + + // Error is returned if S60MCPR leaves IPProtoMCPr before Stopped is received + if( iContext.iMessage.IsMessage() ) + { + // Ignore the error code. It's better than crashing. + // Propagating might lead to situation where self-posted message ends up to a dead node. + return ETrue; + } + + // Rare scenario: if the stopping service provider is sending a TStateChange message, + // and a mobility activity is ongoing, the message must be ignored in order to keep + // harmful connection stages such as KLinkLayerClosed from reaching the client + TUint32 mobilityActivities = iContext.Node().CountActivities( ECFActivityMCprMobility ); + TBool isStateChange = iContext.iMessage.IsMessage(); + TBool isServProvider = + iContext.iPeer && + iContext.iPeer->Type() == TCFClientType::EServProvider && + iContext.iPeer->Flags() & TCFClientType::EActive; + + S60MCPRLOGSTRING4("S60MCPR<%x>::TAwaitingStoppedOrError() M %d, SC %d, SP %d",(TInt*)this, + mobilityActivities, isStateChange, isServProvider ); + + if ( isStateChange && isServProvider && mobilityActivities > 0 ) + { + // Discard the message + iContext.iMessage.ClearMessageId(); + } + + return EFalse; + } + +// ----------------------------------------------------------------------------- +// TAwaitingDataClientIdle::Accept +// ----------------------------------------------------------------------------- +// +DEFINE_SMELEMENT( TAwaitingDataClientIdle, NetStateMachine::MState, TContext ) +TBool TAwaitingDataClientIdle::Accept() + { + if (!iContext.iMessage.IsMessage()) + { + return EFalse; + } + __ASSERT_DEBUG(iContext.iPeer, User::Panic(KS60MCprPanic, KPanicPeerMessage)); + iContext.iPeer->ClearFlags(TCFClientType::EActive); + return ETrue; + } + +// ----------------------------------------------------------------------------- +// TAwaitingDataClientStatusChange::Accept +// ----------------------------------------------------------------------------- +// +DEFINE_SMELEMENT( TAwaitingDataClientStatusChange, NetStateMachine::MState, TContext ) +TBool TAwaitingDataClientStatusChange::Accept() + { + // Consume the received DataClientStatusChange if a DataClientIdle activity is running + if (iContext.iMessage.IsMessage() && + (iContext.Node().CountActivities( ECFActivityS60McprDataClientIdle ) > 0)) + { + return ETrue; + } + return EFalse; + } + // ----------------------------------------------------------------------------- // TRetrieveServiceId::DoL // ----------------------------------------------------------------------------- diff -r 84c6623982f6 -r ed07dcc72692 bearermanagement/mpm/src/mpmcommsdataccess.cpp --- a/bearermanagement/mpm/src/mpmcommsdataccess.cpp Fri Sep 17 08:32:43 2010 +0300 +++ b/bearermanagement/mpm/src/mpmcommsdataccess.cpp Mon Oct 04 00:43:42 2010 +0300 @@ -1313,9 +1313,6 @@ { MPMLOGSTRING( "CMPMCommsDatAccess::CheckWlanL: IAP is WLAN" ) wlan = EWlanIap; - TInt ssidLength( 0 ); - commsDbWlanTableView->ReadColumnLengthL( TPtrC( NU_WLAN_SSID ), - ssidLength ); } else { diff -r 84c6623982f6 -r ed07dcc72692 bearermanagement/mpm/src/mpmserversession.cpp --- a/bearermanagement/mpm/src/mpmserversession.cpp Fri Sep 17 08:32:43 2010 +0300 +++ b/bearermanagement/mpm/src/mpmserversession.cpp Mon Oct 04 00:43:42 2010 +0300 @@ -885,6 +885,23 @@ ERoaming, *this ); + TWlanIapType iapType = MyServer().CommsDatAccess()->CheckWlanL( iMigrateIap ); + + // If this is a cellular IAP, we must check the current cellular data usage setting in case it + // has changed to disabled mode while MPM was waiting for a migrate confirmation. If cellular + // data usage has been disabled, terminate the connection attempt with KErrPermissionDenied. + if ( iapType == ENotWlanIap ) + { + TInt cellularUsage = MyServer().DataUsageWatcher()->CellularDataUsage(); + if ( cellularUsage == ECmCellularDataUsageDisabled ) + { + MPMLOGSTRING( "Trying to migrate to cellular IAP, but cellular data usage is disabled, stopping" ) + iMigrateState = EMigrateNone; + RoamingConfirmationCompletedL( KErrPermissionDenied, EMsgQueryThisTime, EFalse ); + return; + } + } + iMigrateState = EMigrateUserConfirmation; // Confirm only if this IAP is not already in use @@ -910,13 +927,13 @@ reconnect = ETrue; } - //Display confirm dialog only if we are moving to cellular IAP - if ( MyServer().CommsDatAccess()->CheckWlanL( iMigrateIap ) == ENotWlanIap ) + // Display confirm dialog only if we are moving to cellular IAP + if ( iapType == ENotWlanIap ) { // Check that connection preferences don't deny queries, and // enough time has elapsed from the last query cancelled by the user. if ( !( iIapSelection->MpmConnPref().NoteBehaviour() & TExtendedConnPref::ENoteBehaviourConnDisableQueries ) && - !MyServer().IsConnPermQueryTimerOn() ) + !MyServer().IsConnPermQueryTimerOn() ) { if ( MyServer().RoamingWatcher()->RoamingStatus() == EMPMInternationalRoaming ) { @@ -1719,7 +1736,7 @@ availableIAPs = GetAvailableIAPs(); MPMLOGSTRING2( "CMPMServerSession::HandleServerRegisterPrefIAPNotifL \ -- IAPs count: %d", availableIAPs.iCount) +- available IAPs count: %d", availableIAPs.iCount) #ifdef _DEBUG for (TUint i = 0; i < availableIAPs.Count(); i++) @@ -1739,12 +1756,6 @@ PrefIAPNotificationL( availableIAPs, EBearerMan ); } - // In case the mobility application register to preferred IAP notification - // we have to make sure we get availability every once in a while. - // - RArray iapPath; - CleanupClosePushL( iapPath ); - CleanupStack::PopAndDestroy( &iapPath ); aMessage.Complete( KErrNone ); } diff -r 84c6623982f6 -r ed07dcc72692 cmmanager/cmmgr/cmmpluginbase/src/ccmpluginbaseeng.cpp --- a/cmmanager/cmmgr/cmmpluginbase/src/ccmpluginbaseeng.cpp Fri Sep 17 08:32:43 2010 +0300 +++ b/cmmanager/cmmgr/cmmpluginbase/src/ccmpluginbaseeng.cpp Mon Oct 04 00:43:42 2010 +0300 @@ -2471,6 +2471,11 @@ aClientPluginInstance->iBearerSpecRecordArray ); } } + + if( retVal ) + { + retVal = ETrue; + } OstTraceFunctionExit0( CCMPLUGINBASEENG_GETBOOLATTRIBUTEL_EXIT ); return retVal; diff -r 84c6623982f6 -r ed07dcc72692 cmmanager/cmmgr/cmmplugins/cmpluginpacketdata/src/cmpluginpacketdata.cpp --- a/cmmanager/cmmgr/cmmplugins/cmpluginpacketdata/src/cmpluginpacketdata.cpp Fri Sep 17 08:32:43 2010 +0300 +++ b/cmmanager/cmmgr/cmmplugins/cmpluginpacketdata/src/cmpluginpacketdata.cpp Mon Oct 04 00:43:42 2010 +0300 @@ -216,7 +216,7 @@ CRepository* repository = CRepository::NewLC( KCRUidCoreApplicationUIs ); TInt connAllowed( ECoreAppUIsNetworkConnectionAllowed ); - repository->Get( KCoreAppUIsNetworkConnectionAllowed, connAllowed ); + (void) repository->Get( KCoreAppUIsNetworkConnectionAllowed, connAllowed ); CleanupStack::PopAndDestroy( repository ); if ( !connAllowed ) diff -r 84c6623982f6 -r ed07dcc72692 cmmanager/cmmgr/cmmplugins/cmpluginwlan/rom/cmmpluginwlan.iby --- a/cmmanager/cmmgr/cmmplugins/cmpluginwlan/rom/cmmpluginwlan.iby Fri Sep 17 08:32:43 2010 +0300 +++ b/cmmanager/cmmgr/cmmplugins/cmpluginwlan/rom/cmmpluginwlan.iby Mon Oct 04 00:43:42 2010 +0300 @@ -18,8 +18,11 @@ #ifndef CMMPLUGINWLAN_IBY__ #define CMMPLUGINWLAN_IBY__ +#ifdef __PROTOCOL_WLAN + ECOM_PLUGIN(cmpluginwlan.dll,10281BB2.rsc) +#endif // __PROTOCOL_WLAN #endif // CMMPLUGINWLAN_IBY__ diff -r 84c6623982f6 -r ed07dcc72692 cmmanager/cmmgr/cmmserver/inc/cmmcache.h --- a/cmmanager/cmmgr/cmmserver/inc/cmmcache.h Fri Sep 17 08:32:43 2010 +0300 +++ b/cmmanager/cmmgr/cmmserver/inc/cmmcache.h Mon Oct 04 00:43:42 2010 +0300 @@ -587,6 +587,12 @@ * changed in commsdat. */ void NotifyPluginsForTableChangesL( const TUint32 aTableId ); + + /** + * Try to load unknown plugin dynamically during running-time + * Return the index number if loaded successfully; otherwise, return -1 + */ + TInt RefreshPluginL( const TUint32 aBearerType ); private: // Monitors changes in the database. diff -r 84c6623982f6 -r ed07dcc72692 cmmanager/cmmgr/cmmserver/src/cmmcache.cpp --- a/cmmanager/cmmgr/cmmserver/src/cmmcache.cpp Fri Sep 17 08:32:43 2010 +0300 +++ b/cmmanager/cmmgr/cmmserver/src/cmmcache.cpp Mon Oct 04 00:43:42 2010 +0300 @@ -457,7 +457,18 @@ } if ( !plugin ) { - User::Leave( KErrArgument ); + TInt index = RefreshPluginL( aBearerType ); + if ( index < 0 || index >= iPlugins->Count() ) + { + User::Leave( KErrArgument ); + } + else + { + TCmPluginInitParam pluginParams( Session() ); + plugin = ( *iPlugins )[index]->CreateInstanceL( pluginParams ); + CleanupStack::PushL( plugin ); + plugin->CreateNewL( aConnMethodId ); + } } @@ -1789,6 +1800,61 @@ } // --------------------------------------------------------------------------- +// Try to load unknown plugin dynamically during running-time. Some plugin +// (e.g., VPN) might be installed after CmManager starts up. So, try to load +// it. Only one plugin can be possibly loaded in a time. +// --------------------------------------------------------------------------- +// +TInt CCmmCache::RefreshPluginL( const TUint32 aBearerType ) + { + OstTraceFunctionEntry0( CCMMCACHE_REFRESHPLUGIN_ENTRY ); + + TInt ret( KErrNotFound ); + + // Get a list of all the bearer types. + RPointerArray implArray; + CmmCleanupResetAndDestroyPushL( implArray ); + REComSession::ListImplementationsL( TUid::Uid( KCMPluginInterfaceUid ), implArray ); + + CCmPluginBaseEng* plugin = NULL; + for ( TInt i = 0; i < implArray.Count(); i++ ) + { + TUid uid = ( implArray )[i]->ImplementationUid(); + + if ( uid.iUid == aBearerType ) + { + TCmPluginInitParam params( iTrans->Session() ); + + TRAPD( err, plugin = STATIC_CAST( CCmPluginBaseEng*, REComSession::CreateImplementationL( + uid, + _FOFF( CCmPluginBaseEng, iDtor_ID_Key ), + ( TAny* )¶ms ) ) ); + + if ( !err ) + { + CleanupStack::PushL( plugin ); + + // We may not think the priority position in the plugin array for this newly loaded plugin + // and just simply append it in the end of the plugin array + iPlugins->AppendL( plugin ); + + ret = iPlugins->Count() - 1; + + CleanupStack::Pop( plugin ); + } + + // Don't need to go further in the for loop + break; + } + } + + CleanupStack::PopAndDestroy( &implArray ); + + OstTraceFunctionExit0( CCMMCACHE_REFRESHPLUGIN_EXIT ); + return ret; + } + +// --------------------------------------------------------------------------- // Tells the cache that an error has occured with a database listener. Any // reads to this table need go through the database, since cache can't know if // it has up-to-date information. diff -r 84c6623982f6 -r ed07dcc72692 cmmanager/cmmgr/cmmserver/src/cmmdestinationinstance.cpp --- a/cmmanager/cmmgr/cmmserver/src/cmmdestinationinstance.cpp Fri Sep 17 08:32:43 2010 +0300 +++ b/cmmanager/cmmgr/cmmserver/src/cmmdestinationinstance.cpp Mon Oct 04 00:43:42 2010 +0300 @@ -460,9 +460,16 @@ break; case CMManager::ESnapPurposeIntranet: { - _LIT( KDestinationTextId, "txt_occ_dblist_intranet"); - resolvedText = CCmManagerTextResolver::ResolveTextL( KDestinationTextId ); - isLocalised = ETrue; + // Intranet is handled in a special way. If localised metadata is OFF + // destination's network record name is returned + TUint32 localized( 0 ); + GetMetadataL( CMManager::ESnapMetadataDestinationIsLocalised, localized ); + if ( localized ) + { + _LIT( KDestinationTextId, "txt_occ_dblist_intranet"); + resolvedText = CCmManagerTextResolver::ResolveTextL( KDestinationTextId ); + isLocalised = ETrue; + } } break; default: @@ -1631,15 +1638,10 @@ User::Leave( KErrArgument ); } - TUint32 temp = ~( - CMManager::ESnapMetadataInternet | - CMManager::ESnapMetadataDestinationIsLocalised | - CMManager::ESnapMetadataPurpose ); if ( aMetadata == CMManager::ENotLocalisedDest ) { - // Clear old ESnapMetadataInternet-bit, - // ESnapMetadataDestinationIsLocalised-bits and ESnapMetadataPurpose-bits. - iMetadataRecord->iMetadata = iMetadataRecord->iMetadata & temp; + // Clear old ESnapMetadataDestinationIsLocalised-bits. + iMetadataRecord->iMetadata = iMetadataRecord->iMetadata & ~( CMManager::ESnapMetadataDestinationIsLocalised ); } else { @@ -1648,6 +1650,11 @@ User::Leave( KErrAlreadyExists ); } + TUint32 temp = ~( + CMManager::ESnapMetadataInternet | + CMManager::ESnapMetadataDestinationIsLocalised | + CMManager::ESnapMetadataPurpose ); + // Clear old ESnapMetadataInternet-bit, // ESnapMetadataDestinationIsLocalised-bits and ESnapMetadataPurpose-bits. TUint32 value = iMetadataRecord->iMetadata & temp; diff -r 84c6623982f6 -r ed07dcc72692 cmmanager/cpdestinationplugin/src/cpdestinationentryitem.cpp --- a/cmmanager/cpdestinationplugin/src/cpdestinationentryitem.cpp Fri Sep 17 08:32:43 2010 +0300 +++ b/cmmanager/cpdestinationplugin/src/cpdestinationentryitem.cpp Mon Oct 04 00:43:42 2010 +0300 @@ -151,8 +151,7 @@ if (mDestinationId != 0 && mAps->count() > 1) { HbToolBar *tb = view->toolBar(); HbIcon arrangeIcon("qtg_mono_sort"); - HbAction *arrangeAction - = tb->addAction(arrangeIcon, "", this, SLOT(activateArrangeMode())); + (void) tb->addAction(arrangeIcon, "", this, SLOT(activateArrangeMode())); } OstTraceFunctionExit0(CPDESTINATIONENTRYITEMDATA_CREATESETTINGVIEW_EXIT); return view; @@ -656,8 +655,7 @@ // Toolbar HbToolBar *tb = view->toolBar(); HbIcon okIcon("qtg_mono_tick"); - HbAction *doneAction - = tb->addAction(okIcon, "", this, SLOT(viewDone())); + (void) tb->addAction(okIcon, "", this, SLOT(viewDone())); OstTraceFunctionExit0(CPDESTINATIONENTRYITEMDATA_CREATEARRANGEMODEVIEW_EXIT); } diff -r 84c6623982f6 -r ed07dcc72692 connectionmonitoring/connmon/connectionmonitor/BWINSCW/CONNMON_EKA2U.def --- a/connectionmonitoring/connmon/connectionmonitor/BWINSCW/CONNMON_EKA2U.def Fri Sep 17 08:32:43 2010 +0300 +++ b/connectionmonitoring/connmon/connectionmonitor/BWINSCW/CONNMON_EKA2U.def Mon Oct 04 00:43:42 2010 +0300 @@ -97,4 +97,6 @@ ?NewL@CConnMonWlanNetwork@@SAPAV1@ABV?$TBuf@$0CA@@@IIIIIABV?$TBuf8@$05@@ABVTDesC16@@@Z @ 96 NONAME ; class CConnMonWlanNetwork * CConnMonWlanNetwork::NewL(class TBuf<32> const &, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, class TBuf8<6> const &, class TDesC16 const &) ?SecurityModeV2@CConnMonWlanNetwork@@QAEIXZ @ 97 NONAME ; unsigned int CConnMonWlanNetwork::SecurityModeV2(void) ?IsProtectedSetupSupported@CConnMonWlanNetwork@@QAEHXZ @ 98 NONAME ; int CConnMonWlanNetwork::IsProtectedSetupSupported(void) + ??0TConnMonIapInfo@@QAE@ABV0@@Z @ 99 NONAME ; TConnMonIapInfo::TConnMonIapInfo(class TConnMonIapInfo const &) + ??4TConnMonIapInfo@@QAEAAV0@ABV0@@Z @ 100 NONAME ; class TConnMonIapInfo & TConnMonIapInfo::operator=(class TConnMonIapInfo const &) diff -r 84c6623982f6 -r ed07dcc72692 connectionmonitoring/connmon/connectionmonitor/EABI/ConnMon_EKA2U.def --- a/connectionmonitoring/connmon/connectionmonitor/EABI/ConnMon_EKA2U.def Fri Sep 17 08:32:43 2010 +0300 +++ b/connectionmonitoring/connmon/connectionmonitor/EABI/ConnMon_EKA2U.def Mon Oct 04 00:43:42 2010 +0300 @@ -161,4 +161,7 @@ _ZN19CConnMonWlanNetwork14SecurityModeV2Ev @ 160 NONAME _ZN19CConnMonWlanNetwork25IsProtectedSetupSupportedEv @ 161 NONAME _ZN19CConnMonWlanNetwork4NewLERK4TBufILi32EEjjjjjRK5TBuf8ILi6EERK7TDesC16 @ 162 NONAME + _ZN15TConnMonIapInfoC1ERKS_ @ 163 NONAME + _ZN15TConnMonIapInfoC2ERKS_ @ 164 NONAME + _ZN15TConnMonIapInfoaSERKS_ @ 165 NONAME diff -r 84c6623982f6 -r ed07dcc72692 connectionmonitoring/connmon/connectionmonitor/group/ConnMon.mmp --- a/connectionmonitoring/connmon/connectionmonitor/group/ConnMon.mmp Fri Sep 17 08:32:43 2010 +0300 +++ b/connectionmonitoring/connmon/connectionmonitor/group/ConnMon.mmp Mon Oct 04 00:43:42 2010 +0300 @@ -11,7 +11,7 @@ * * Contributors: * -* Description: Builds ConnMon.dll. +* Description: Builds connmon.dll. * */ @@ -19,7 +19,7 @@ MACRO EPOC_SDK=0x07010000 -TARGET ConnMon.dll +TARGET connmon.dll TARGETTYPE dll UID 0x1000008d 0x101F6CEE diff -r 84c6623982f6 -r ed07dcc72692 connectionmonitoring/connmon/connectionmonitor/group/ConnMonExe.mmp --- a/connectionmonitoring/connmon/connectionmonitor/group/ConnMonExe.mmp Fri Sep 17 08:32:43 2010 +0300 +++ b/connectionmonitoring/connmon/connectionmonitor/group/ConnMonExe.mmp Mon Oct 04 00:43:42 2010 +0300 @@ -11,13 +11,13 @@ * * Contributors: * -* Description: Builds ConnMonExe.exe. +* Description: Builds connmonexe.exe. * */ #include -target ConnMonExe.exe +target connmonexe.exe targettype exe uid 0x1000008c 0x101F6CF0 diff -r 84c6623982f6 -r ed07dcc72692 connectionmonitoring/connmon/connectionmonitor/inc/ConnMonServ.h --- a/connectionmonitoring/connmon/connectionmonitor/inc/ConnMonServ.h Fri Sep 17 08:32:43 2010 +0300 +++ b/connectionmonitoring/connmon/connectionmonitor/inc/ConnMonServ.h Mon Oct 04 00:43:42 2010 +0300 @@ -20,7 +20,6 @@ #include -_LIT( KConnMonDLL, "ConnMon.dll" ); _LIT( KConnMonStartupSemaphore, "ConnMonStartupSemaphore" ); // Security policy diff -r 84c6623982f6 -r ed07dcc72692 connectionmonitoring/connmon/connectionmonitor/rom/connmon.iby --- a/connectionmonitoring/connmon/connectionmonitor/rom/connmon.iby Fri Sep 17 08:32:43 2010 +0300 +++ b/connectionmonitoring/connmon/connectionmonitor/rom/connmon.iby Mon Oct 04 00:43:42 2010 +0300 @@ -18,7 +18,7 @@ #ifndef __CONNMON_IBY__ #define __CONNMON_IBY__ -file=ABI_DIR\BUILD_DIR\CONNMON.DLL SHARED_LIB_DIR\CONNMON.DLL -file=ABI_DIR\BUILD_DIR\CONNMONEXE.EXE PROGRAMS_DIR\CONNMONEXE.EXE +file=ABI_DIR\BUILD_DIR\connmon.dll SHARED_LIB_DIR\connmon.dll +file=ABI_DIR\BUILD_DIR\connmonexe.exe PROGRAMS_DIR\connmonexe.exe #endif diff -r 84c6623982f6 -r ed07dcc72692 connectionmonitoring/connmon/connectionmonitor/src/CWlanSupport.cpp --- a/connectionmonitoring/connmon/connectionmonitor/src/CWlanSupport.cpp Fri Sep 17 08:32:43 2010 +0300 +++ b/connectionmonitoring/connmon/connectionmonitor/src/CWlanSupport.cpp Mon Oct 04 00:43:42 2010 +0300 @@ -3090,6 +3090,7 @@ if ( err != KErrNone ) { LOGIT2("UnpackToL: error <%d> reading data, stopping. i %d", err, i) + delete net; break; } diff -r 84c6623982f6 -r ed07dcc72692 connectionmonitoring/connmon/connectionmonitor/src/ConnMonSess.cpp --- a/connectionmonitoring/connmon/connectionmonitor/src/ConnMonSess.cpp Fri Sep 17 08:32:43 2010 +0300 +++ b/connectionmonitoring/connmon/connectionmonitor/src/ConnMonSess.cpp Mon Oct 04 00:43:42 2010 +0300 @@ -2196,6 +2196,13 @@ } } } + else // ( rc != KErrNone ) + { + if ( ptrData ) + { + delete ptrData; + } + } break; } case EReqPluginGetQuery: @@ -2416,6 +2423,8 @@ if ( globalThBefore != globalThAfter ) { // Global threshold has changed -> send to plug-in engines + // Dead code in else-clause is for possible future use. Static analysis exception added. + // coverity[dead_error_line] if ( internal ) { if ( aValue == 1 ) @@ -2615,7 +2624,7 @@ // This method gets the bearer only for an internal connection. This is OK // since data volume events are not supported for external connections. - iCmServer->Iap()->GetBearer( aConnId, bearer, bearerInfo ); + (void) iCmServer->Iap()->GetBearer( aConnId, bearer, bearerInfo ); // Set minimum if ( bearer == EBearerWLAN || bearer == EBearerLAN ) @@ -2630,7 +2639,7 @@ { minimum = KMinimumWCDMADataThreshold; } - + // Check threshold if ( aThreshold < minimum ) { diff -r 84c6623982f6 -r ed07dcc72692 connectionmonitoring/connmon/connectionmonitor/src/RConnMon.cpp --- a/connectionmonitoring/connmon/connectionmonitor/src/RConnMon.cpp Fri Sep 17 08:32:43 2010 +0300 +++ b/connectionmonitoring/connmon/connectionmonitor/src/RConnMon.cpp Mon Oct 04 00:43:42 2010 +0300 @@ -1320,4 +1320,49 @@ aBearerGroups2 = iBearerGroups2; } +// ----------------------------------------------------------------------------- +// TConnMonIapInfo Copy constructor +// ----------------------------------------------------------------------------- +// +EXPORT_C TConnMonIapInfo::TConnMonIapInfo( const TConnMonIapInfo& aConnMonIapInfo ) + :iCount( 0 ) + { + if ( aConnMonIapInfo.iCount <= KConnMonMaxIAPCount ) + { + iCount = aConnMonIapInfo.iCount; + for ( TInt i=0; i < iCount; i++ ) + { + iIap[ i ] = aConnMonIapInfo.iIap[ i ]; + } + } + else + { + LOGIT1("Client [%d]: TConnMonIapInfo iCount out of range", this) + } + } + +// ----------------------------------------------------------------------------- +// TConnMonIapInfo::operator= +// ----------------------------------------------------------------------------- +// +EXPORT_C TConnMonIapInfo& TConnMonIapInfo::operator=( const TConnMonIapInfo& aConnMonIapInfo ) + { + if ( this != &aConnMonIapInfo ) + { + if ( aConnMonIapInfo.iCount <= KConnMonMaxIAPCount ) + { + iCount = aConnMonIapInfo.iCount; + for ( TInt i=0; i < iCount; i++ ) + { + iIap[ i ] = aConnMonIapInfo.iIap[ i ]; + } + } + else + { + LOGIT1("Client [%d]: TConnMonIapInfo iCount out of range", this) + } + } + return *this; + } + // End-of-file diff -r 84c6623982f6 -r ed07dcc72692 connectionmonitoring/connmon/dataconnectionlogger/group/dcl.mmp --- a/connectionmonitoring/connmon/dataconnectionlogger/group/dcl.mmp Fri Sep 17 08:32:43 2010 +0300 +++ b/connectionmonitoring/connmon/dataconnectionlogger/group/dcl.mmp Mon Oct 04 00:43:42 2010 +0300 @@ -11,7 +11,7 @@ * * Contributors: * -* Description: Builds DataConnectionLogger.exe. +* Description: Builds dataconnectionlogger.exe. * */ @@ -19,7 +19,7 @@ MACRO EPOC_SDK=0x07010000 -TARGET DataConnectionLogger.exe +TARGET dataconnectionlogger.exe TARGETTYPE exe UID 0x1000008D 0x101F6CFE diff -r 84c6623982f6 -r ed07dcc72692 connectionmonitoring/connmon/dataconnectionlogger/rom/DataConnectionLogger.iby --- a/connectionmonitoring/connmon/dataconnectionlogger/rom/DataConnectionLogger.iby Fri Sep 17 08:32:43 2010 +0300 +++ b/connectionmonitoring/connmon/dataconnectionlogger/rom/DataConnectionLogger.iby Mon Oct 04 00:43:42 2010 +0300 @@ -20,7 +20,7 @@ #include -file=ABI_DIR\BUILD_DIR\Dataconnectionlogger.exe PROGRAMS_DIR\Dataconnectionlogger.exe +file=ABI_DIR\BUILD_DIR\dataconnectionlogger.exe PROGRAMS_DIR\dataconnectionlogger.exe #ifndef __COMMDB_PROTECTION data=DATAZ_\private\101F6CFE\backup_registration.xml private\101F6CFE\backup_registration.xml diff -r 84c6623982f6 -r ed07dcc72692 connectionmonitoring/connmon/dataconnectionlogger/src/dcl.cpp --- a/connectionmonitoring/connmon/dataconnectionlogger/src/dcl.cpp Fri Sep 17 08:32:43 2010 +0300 +++ b/connectionmonitoring/connmon/dataconnectionlogger/src/dcl.cpp Mon Oct 04 00:43:42 2010 +0300 @@ -963,8 +963,8 @@ CleanupStack::Pop( eventUpdate ); } + break; // for } - break; // for } LOGEXITFN("CEngine::LogDataChangeEventL()") } diff -r 84c6623982f6 -r ed07dcc72692 connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifInc/cellulardataconfirmation.h --- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifInc/cellulardataconfirmation.h Fri Sep 17 08:32:43 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,107 +0,0 @@ -/* -* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Prompt Dialog implementation -* -*/ - -#ifndef __CELLULARDATACONFIRMATION_H__ -#define __CELLULARDATACONFIRMATION_H__ - -#include -#include -#include -#include "ConnectionDialogsNotifBase.h" -#include "ConnectionUiUtilitiesCommon.h" - -class CDeviceDialogObserver; - - -NONSHARABLE_CLASS ( CCellularDataConfirmation ) : public CConnectionDialogsNotifBase - { - public: - /** - * Two-phased constructor. - */ - static CCellularDataConfirmation* NewL( - const TBool aResourceFileResponsible ); - - /** - * Destructor - */ - ~CCellularDataConfirmation(); - - /** - * Start the Notifier - * @param aBuffer Buffer - * @param aReplySlot Identifies which message argument to use for the - * reply. This message argument will refer to a - * modifiable descriptor, a TDes8 type, into which - * data can be returned. - * @param aMessage Message - * return - - */ - void StartL( const TDesC8& aBuffer, - TInt aReplySlot, - const RMessagePtr2& aMessage ); - - /** - * Cancel() the notifier - * @param - - * return - - */ - void Cancel(); - - /** - * RegisterL register the client notifier function - * @param - - * return TNotifierInfo - */ - TNotifierInfo RegisterL(); - - /** - * CompleteL the notifier is complete - * @param aStatus status - * return - - */ - void CompleteL( TInt aStatus ); - /** - * Sets the selected choice of the presented dialog - * @param aChoice TInt - * return - - */ - void SetSelectedChoice( TInt aChoice ); - - private: - /** - * Constructor - */ - CCellularDataConfirmation(); - - private: - /** Pointer to the device dialog interface for handling the dialog */ - CHbDeviceDialogSymbian* iDialog; - /** The observer to handle the data received from the orbit dialog */ - CDeviceDialogObserver* iObserver; - /* The choice selected by the user from the dialog */ - TMsgQueryLinkedResults iChoice; - /* Information if request was already completed, in case the - * observer receives the data signal and the signal about closing the - * dialog. - */ - TBool iCompleted; - - - }; - -#endif //__CELLULARDATACONFIRMATION_H__ diff -r 84c6623982f6 -r ed07dcc72692 connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifInc/devicedialogobserver.h --- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifInc/devicedialogobserver.h Fri Sep 17 08:32:43 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,69 +0,0 @@ -/* -* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Prompt Dialog implementation -* -*/ - -#ifndef __DEVICEDIALOGOBSERVER_H__ -#define __DEVICEDIALOGOBSERVER_H__ - -#include "cellulardataconfirmation.h" - -NONSHARABLE_CLASS ( CDeviceDialogObserver ) : public CBase, public MHbDeviceDialogObserver - { - public: - /** - * Two-phased constructor. - */ - static CDeviceDialogObserver* NewL( CCellularDataConfirmation* aNotifier ); - - /** - * Destructor - */ - ~CDeviceDialogObserver(); - - /** - * Handles the user input received from the dialog - * @param aData CHbSymbianVariantMap& - */ - void DataReceived(CHbSymbianVariantMap& aData); - - /** - * Handles the closing of the dialog - * @param aCompletionCode TInt - */ - void DeviceDialogClosed(TInt /*aCompletionCode*/); - /** - * Sets the available choices for the query into the class variable - * @param aChoices RArray - */ - void SetChoices( RArray& aChoices ); - private: - /** - * Constructor - */ - CDeviceDialogObserver( CCellularDataConfirmation* aNotifier ); - - private: - /* Pointer to the object that triggered the dialog opening, - * needed to update the information about the user input. - */ - CCellularDataConfirmation* iNotifier; - /* The order of the buttons in the dialog, in order to map the - * data received from the dialog into the actual selected choice. - */ - RArray iChoiceIds; - }; - -#endif /* __DEVICEDIALOGOBSERVER_H__ */ diff -r 84c6623982f6 -r ed07dcc72692 connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/ActiveOfflineWlanDisabledNote.cpp --- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/ActiveOfflineWlanDisabledNote.cpp Fri Sep 17 08:32:43 2010 +0300 +++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/ActiveOfflineWlanDisabledNote.cpp Mon Oct 04 00:43:42 2010 +0300 @@ -20,9 +20,13 @@ #include "ActiveOfflineWlanDisabledNote.h" #include -#include +#include #include +// CONSTANTS + +// Empty string +_LIT( KEmpty, "" ); // ================= MEMBER FUNCTIONS ======================= @@ -60,10 +64,8 @@ HBufC* stringLabel = StringLoader::LoadLC( R_OFFLINE_NOT_POSSIBLE ); CleanupStack::PushL( stringLabel ); - CAknGlobalNote* globalNote = CAknGlobalNote::NewLC(); - globalNote->ShowNoteL( EAknGlobalInformationNote, *stringLabel ); - - CleanupStack::PopAndDestroy( globalNote ); + CHbDeviceNotificationDialogSymbian::NotificationL( + KEmpty, stringLabel->Des(), KEmpty); CleanupStack::PopAndDestroy( stringLabel ); iNotif->SetCancelledFlag( ETrue ); diff -r 84c6623982f6 -r ed07dcc72692 connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/ActiveSelectWLanDlgPlugin.cpp --- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/ActiveSelectWLanDlgPlugin.cpp Fri Sep 17 08:32:43 2010 +0300 +++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/ActiveSelectWLanDlgPlugin.cpp Mon Oct 04 00:43:42 2010 +0300 @@ -19,12 +19,11 @@ // INCLUDE FILES #include #include -#include +#include #include #include #include #include -//#include #include "ActiveSelectWLanDlgPlugin.h" #include "SelectWLANDlg.h" @@ -34,6 +33,9 @@ // CONSTANTS +// Empty string +_LIT( KEmpty, "" ); + /** * For iPeriodic Timer, 10 seconds * The interval between refreshing available wlan networks. @@ -291,7 +293,12 @@ CleanupStack::PopAndDestroy( stringLabel ); ***/ -//// 3.1 solution: prevent deadlock, does not work in 3.0 because of avkon +//// 10.1 solution: ditch avkon altogether + CHbDeviceNotificationDialogSymbian::NotificationL( + KEmpty, stringLabel->Des(), KEmpty); + CleanupStack::PopAndDestroy( stringLabel ); + +/*** 3.1 solution: prevent deadlock, does not work in 3.0 because of avkon RAknUiServer* globalNote = CAknSgcClient::AknSrv(); if ( globalNote->Handle() ) { @@ -300,7 +307,7 @@ } CleanupStack::PopAndDestroy( stringLabel ); -//// End of 3.1 solution +*** End of 3.1 solution ***/ /*** 3.0 solution CAknInformationNote* myLocalGlobalNote = new ( ELeave ) diff -r 84c6623982f6 -r ed07dcc72692 connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/ActiveWLANNetworkUnavailableNote.cpp --- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/ActiveWLANNetworkUnavailableNote.cpp Fri Sep 17 08:32:43 2010 +0300 +++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/ActiveWLANNetworkUnavailableNote.cpp Mon Oct 04 00:43:42 2010 +0300 @@ -20,12 +20,16 @@ #include "ActiveWLANNetworkUnavailableNote.h" #include -#include +#include #include // CONSTANTS +// Empty string +_LIT( KEmpty, "" ); + + // ================= MEMBER FUNCTIONS ======================= @@ -70,10 +74,8 @@ R_WLAN_NETWORK_UNAVAILABLE ); } - CAknGlobalNote* globalNote = CAknGlobalNote::NewLC(); - globalNote->ShowNoteL( EAknGlobalErrorNote, *stringLabel ); - - CleanupStack::PopAndDestroy( globalNote ); + CHbDeviceNotificationDialogSymbian::NotificationL( + KEmpty, stringLabel->Des(), KEmpty); CleanupStack::PopAndDestroy( stringLabel ); } diff -r 84c6623982f6 -r ed07dcc72692 connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/ConnUiUtilsNotif.cpp --- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/ConnUiUtilsNotif.cpp Fri Sep 17 08:32:43 2010 +0300 +++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/ConnUiUtilsNotif.cpp Mon Oct 04 00:43:42 2010 +0300 @@ -28,7 +28,6 @@ #include "WLANNetworkUnavailableNoteNotif.h" #include "wlanpowersavetestnotif.h" #include "easywapidlgnotif.h" -#include "cellulardataconfirmation.h" // CONSTANTS @@ -110,11 +109,6 @@ CleanupStack::PushL( serNotify ); aNotifiers->AppendL( serNotify ); CleanupStack::Pop( serNotify ); - - serNotify = CCellularDataConfirmation::NewL( resourceFileResponsible ); - CleanupStack::PushL( serNotify ); - aNotifiers->AppendL( serNotify ); - CleanupStack::Pop( serNotify ); serNotify = CWlanPowerSaveQueryNotif::NewL( resourceFileResponsible ); CleanupStack::PushL( serNotify ); diff -r 84c6623982f6 -r ed07dcc72692 connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/SelectWLANDlg.cpp --- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/SelectWLANDlg.cpp Fri Sep 17 08:32:43 2010 +0300 +++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/SelectWLANDlg.cpp Mon Oct 04 00:43:42 2010 +0300 @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include "ConnUiUtilsNotif.hrh" #include "SelectWLANDlg.h" @@ -53,6 +53,8 @@ // Name of the MBM file containing icons _LIT( KFileIcons, "ConnectionUiUtilities.mbm" ); +// Empty string +_LIT( KEmpty, "" ); LOCAL_D const TInt KIconsGranularity = 4; @@ -232,16 +234,8 @@ HBufC* stringLabel = StringLoader::LoadLC( R_INFO_NO_NETWORKS_FOUND ); - //RAknUiServer* globalNote = CAknSgcClient::AknSrv(); - //if ( globalNote->Handle() ) - // { - // globalNote->ShowGlobalNoteL( *stringLabel, - // EAknGlobalInformationNote ); - // } - - CAknGlobalNote* globalNote = CAknGlobalNote::NewLC(); - globalNote->ShowNoteL( EAknGlobalInformationNote, *stringLabel ); - CleanupStack::PopAndDestroy( globalNote ); + CHbDeviceNotificationDialogSymbian::NotificationL( + KEmpty, stringLabel->Des(), KEmpty); CleanupStack::PopAndDestroy( stringLabel ); // set network prefs because we still need ssid diff -r 84c6623982f6 -r ed07dcc72692 connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/WlanNetworkDataProvider.cpp --- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/WlanNetworkDataProvider.cpp Fri Sep 17 08:32:43 2010 +0300 +++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/WlanNetworkDataProvider.cpp Mon Oct 04 00:43:42 2010 +0300 @@ -355,7 +355,7 @@ CRepository* repository = CRepository::NewLC( KCRUidCoreApplicationUIs ); TInt connAllowed = 1; - repository->Get( KCoreAppUIsNetworkConnectionAllowed, connAllowed ); + (void) repository->Get( KCoreAppUIsNetworkConnectionAllowed, connAllowed ); CleanupStack::PopAndDestroy(); // repository if ( !connAllowed ) { diff -r 84c6623982f6 -r ed07dcc72692 connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/cellulardataconfirmation.cpp --- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/cellulardataconfirmation.cpp Fri Sep 17 08:32:43 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,198 +0,0 @@ -/* -* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Prompt Dialog implementation -* -*/ - - -// INCLUDE FILES -#include -#include -#include -#include "ConnectionDialogsLogger.h" -#include "cellulardataconfirmation.h" -#include "ConnectionDialogsNotifBase.h" -#include "ConnectionDialogsUidDefs.h" -#include "ConnUiUtilsNotif.h" -#include "devicedialogobserver.h" - - -// CONSTANTS -const TInt KVariableLength = 30; -_LIT( KHomenetwork, "homenetwork"); -_LIT(KType, "com.nokia.ipconnmgmt.promptdialog/1.0"); - -// --------------------------------------------------------- -// CCellularDataConfirmation::CCellularDataConfirmation() -// --------------------------------------------------------- -// -CCellularDataConfirmation::CCellularDataConfirmation() - { - iCompleted = EFalse; - iChoice = EMsgQueryCancelled; - iObserver = NULL; - iDialog = NULL; - } - -// --------------------------------------------------------- -// CCellularDataConfirmation::~CCellularDataConfirmation() -// --------------------------------------------------------- -// -CCellularDataConfirmation::~CCellularDataConfirmation() - { - CLOG_ENTERFN( "CCellularDataConfirmation::~CCellularDataConfirmation" ); - delete iDialog; - delete iObserver; - CLOG_LEAVEFN( "CCellularDataConfirmation::~CCellularDataConfirmation" ); - } - -// --------------------------------------------------------- -// CCellularDataConfirmation* CCellularDataConfirmation::NewL -// --------------------------------------------------------- -// -CCellularDataConfirmation* CCellularDataConfirmation::NewL( - const TBool aResourceFileResponsible ) - { - CLOG_ENTERFN( "CCellularDataConfirmation::NewL" ); - CCellularDataConfirmation* self = new ( ELeave ) CCellularDataConfirmation(); - CleanupStack::PushL( self ); - self->ConstructL( KResourceFileName, aResourceFileResponsible ); - CleanupStack::Pop(); - CLOG_LEAVEFN( "CCellularDataConfirmation::NewL" ); - return self; - } - -// --------------------------------------------------------- -// void CCellularDataConfirmation::StartL -// --------------------------------------------------------- -// -void CCellularDataConfirmation::StartL( const TDesC8& aBuffer, - TInt aReplySlot, - const RMessagePtr2& aMessage ) - { - CLOG_ENTERFN( "CCellularDataConfirmation::StartL" ); - iChoice = EMsgQueryCancelled; - TPckgBuf input; - TConnUiUiDestConnMethodNoteId noteInfo; - input.Copy( aBuffer ); - noteInfo = input(); - iReplySlot = aReplySlot; - iMessage = aMessage; - - // Create the list box items - RArray choices; - - // Observer is needed in order to get the user inputs - iObserver = CDeviceDialogObserver::NewL( this ); - iDialog = CHbDeviceDialogSymbian::NewL(); - - // The variant map is needed to construct the dialog correctly, - // information whether we are in home network is needed - TBuf key(KHomenetwork); - TBool homeNetwork; - if ( noteInfo.iNoteId == EConfirmMethodUsageQueryInHomeNetwork ) - { - homeNetwork = ETrue; - choices.Append(EMsgQueryAutomatically); - choices.Append(EMsgQueryThisTime); - choices.Append(EMsgQueryCancelled); - } - else - { - homeNetwork = EFalse; - choices.Append(EMsgQueryThisTime); - choices.Append(EMsgQueryAutomatically); - choices.Append(EMsgQueryCancelled); - } - // Set the choice order for the observer so that it knows which button press - // means which choice - iObserver->SetChoices(choices); - - // Create the variant data information for the plugin - CHbSymbianVariantMap* map = CHbSymbianVariantMap::NewL(); - CleanupStack::PushL( map ); - CHbSymbianVariant *variant = CHbSymbianVariant::NewL ( &homeNetwork, CHbSymbianVariant::EBool ); - CleanupStack::PushL( variant ); - TInt error = map->Add( key, variant); - User::LeaveIfError( error ); - CleanupStack::Pop( variant ); // map's cleanup sequence handles variant. - - // Show the dialog. - error = iDialog->Show( KType, *map, iObserver ); - User::LeaveIfError( error ); - CleanupStack::PopAndDestroy( map ); - CLOG_LEAVEFN( "CCellularDataConfirmation::StartL" ); - } - -// --------------------------------------------------------- -// void CConfirmationQueryNotif::CompleteL( TInt aStatus ) -// --------------------------------------------------------- -// -void CCellularDataConfirmation::CompleteL( TInt aStatus ) - { - CLOG_ENTERFN( "CCellularDataConfirmation::CompleteL" ); - if ( !iCompleted ) - { - if ( !iMessage.IsNull() ) - { - iMessage.WriteL( iReplySlot, TPckg( iChoice ) ); - iMessage.Complete( aStatus ); - iCompleted = ETrue; - } - } - CLOG_LEAVEFN( "CCellularDataConfirmation::CompleteL" ); - } - -// --------------------------------------------------------------- -// void CConfirmationQueryNotif::SetSelectedChoiceL( TInt aChoice ) -// ---------------------------------------------------------------- -// -void CCellularDataConfirmation::SetSelectedChoice ( TInt aChoice ) - { - CLOG_ENTERFN( "CCellularDataConfirmation::SetSelectedChoice" ); - iChoice = (TMsgQueryLinkedResults)aChoice; - CLOG_LEAVEFN( "CCellularDataConfirmation::SetSelectedChoice" ); - } - -// --------------------------------------------------------------- -// void CCellularDataConfirmation::Cancel() -// ---------------------------------------------------------------- -// -void CCellularDataConfirmation::Cancel() - { - CLOG_ENTERFN( "CCellularDataConfirmation::Cancel" ); - if ( !iCompleted ) - { - iDialog->Cancel(); - TRAP_IGNORE( iMessage.WriteL( iReplySlot, - TPckg( EMsgQueryCancelled ) )); - iMessage.Complete( KErrCancel ); - } - CLOG_LEAVEFN( "CCellularDataConfirmation::Cancel" ); - } - -// --------------------------------------------------------------- -// CCellularDataConfirmation::TNotifierInfo -// CCellularDataConfirmation::RegisterL() -// ---------------------------------------------------------------- -// -CCellularDataConfirmation::TNotifierInfo CCellularDataConfirmation::RegisterL() - { - CLOG_ENTERFN( "CCellularDataConfirmation::RegisterL" ); - iInfo.iUid = KUidConfirmationQuery; - iInfo.iPriority = ENotifierPriorityHigh; - iInfo.iChannel = KUidConfirmationQuery; - CLOG_LEAVEFN( "CCellularDataConfirmation::RegisterL" ); - return iInfo; - } diff -r 84c6623982f6 -r ed07dcc72692 connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/devicedialogobserver.cpp --- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/devicedialogobserver.cpp Fri Sep 17 08:32:43 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,90 +0,0 @@ -/* -* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Prompt Dialog implementation -* -*/ - -#include -#include "devicedialogobserver.h" - -_LIT(KButton, "button"); - -// --------------------------------------------------------- -// CDeviceDialogObserver* CDeviceDialogObserver::NewL -// --------------------------------------------------------- -// -CDeviceDialogObserver* CDeviceDialogObserver::NewL( CCellularDataConfirmation* aNotifier ) - { - CDeviceDialogObserver* self = new ( ELeave ) CDeviceDialogObserver( aNotifier ); - return self; - } - -// --------------------------------------------------------- -// CDeviceDialogObserver::CDeviceDialogObserver -// --------------------------------------------------------- -// -CDeviceDialogObserver::CDeviceDialogObserver( CCellularDataConfirmation* aNotifier ): - iNotifier( aNotifier ) - { - - } - -// --------------------------------------------------------- -// CDeviceDialogObserver::~CDeviceDialogObserver() -// --------------------------------------------------------- -// -CDeviceDialogObserver::~CDeviceDialogObserver() - { - - } - -// --------------------------------------------------------- -// void CConfirmationQuery::SetChoices -// --------------------------------------------------------- -// -void CDeviceDialogObserver::SetChoices( RArray& aChoices ) - { - iChoiceIds = aChoices; - } - -// --------------------------------------------------------- -// void CDeviceDialogObserver::DataReceived -// --------------------------------------------------------- -// -void CDeviceDialogObserver::DataReceived( CHbSymbianVariantMap& aData ) -{ - // The key that is returned by the promptdialog is "button", - // meaning the id of the pressed button. - TInt intData = *(TInt*)(aData.Get(KButton)->Data()); - - TInt status = KErrNone; - - iNotifier->SetSelectedChoice( iChoiceIds[intData-1] ); - TRAP_IGNORE( iNotifier->CompleteL( status )); - -} - -// --------------------------------------------------------- -// void CDeviceDialogObserver::DeviceDialogClosed -// --------------------------------------------------------- -// -void CDeviceDialogObserver::DeviceDialogClosed( TInt /*aCompletionCode*/ ) -{ - // Dialog was closed, let's complete with that error code - TInt status = KErrCancel; - iNotifier->SetSelectedChoice( EMsgQueryCancelled ); - TRAP_IGNORE( iNotifier->CompleteL( status )); -} - - diff -r 84c6623982f6 -r ed07dcc72692 connectionutilities/ConnectionDialogs/ConnectionUiUtilities/inc/ConnectionUiUtilitiesImpl.h --- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/inc/ConnectionUiUtilitiesImpl.h Fri Sep 17 08:32:43 2010 +0300 +++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/inc/ConnectionUiUtilitiesImpl.h Mon Oct 04 00:43:42 2010 +0300 @@ -41,6 +41,7 @@ class TConnectionPrefs; class CAknGlobalNote; class CConnectionStatusPopup; +class CCellularDataConfirmation; // CLASS DECLARATION @@ -479,6 +480,9 @@ // Connection status (via, error) implementation CConnectionStatusPopup* iConnStatusPopup; + // Cellular confirmation prompt + CCellularDataConfirmation* iCellularConfirmation; + }; diff -r 84c6623982f6 -r ed07dcc72692 connectionutilities/ConnectionDialogs/ConnectionUiUtilities/inc/cellulardataconfirmation.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/inc/cellulardataconfirmation.h Mon Oct 04 00:43:42 2010 +0300 @@ -0,0 +1,104 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Prompt Dialog implementation +* +*/ + +#ifndef __CELLULARDATACONFIRMATION_H__ +#define __CELLULARDATACONFIRMATION_H__ + +#include +#include +#include +#include "ConnectionUiUtilitiesCommon.h" + +class CDeviceDialogObserver; + + +NONSHARABLE_CLASS ( CCellularDataConfirmation ) : public CBase + { + public: + /** + * Two-phased constructor. + */ + static CCellularDataConfirmation* NewL( ); + + /** + * Destructor + */ + ~CCellularDataConfirmation(); + + /** + * Start the Notifier + * @param aResult Result of user selection + * @param aHomeNetwork Home or foreign network. + * @param aStatus Status object of notifier + */ + void StartL( TMsgQueryLinkedResults& aResult, + const TBool aHomeNetwork, + TRequestStatus& aStatus ); + + /** + * Cancel() the notifier + * @param - + * return - + */ + void Cancel(); + + /** + * CompleteL the notifier is complete + * @param aStatus status + * return - + */ + void CompleteL( TInt aStatus ); + /** + * Sets the selected choice of the presented dialog + * @param aChoice TInt + * return - + */ + void SetSelectedChoice( TInt aChoice ); + + private: + /** + * Constructor + */ + CCellularDataConfirmation(); + + /** + * Second-phase constructor + */ + void ConstructL(); + + + private: + /** Pointer to the device dialog interface for handling the dialog */ + CHbDeviceDialogSymbian* iDialog; + /** The observer to handle the data received from the orbit dialog */ + CDeviceDialogObserver* iObserver; + + /* Information if request was already completed, in case the + * observer receives the data signal and the signal about closing the + * dialog. + */ + TBool iCompleted; + + /** Request status. Not owned. */ + TRequestStatus* iStatus; + + /** Result of query. Not owned. */ + TMsgQueryLinkedResults* iResult; + + }; + +#endif //__CELLULARDATACONFIRMATION_H__ diff -r 84c6623982f6 -r ed07dcc72692 connectionutilities/ConnectionDialogs/ConnectionUiUtilities/inc/devicedialogobserver.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/inc/devicedialogobserver.h Mon Oct 04 00:43:42 2010 +0300 @@ -0,0 +1,69 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Prompt Dialog implementation +* +*/ + +#ifndef __DEVICEDIALOGOBSERVER_H__ +#define __DEVICEDIALOGOBSERVER_H__ + +#include "cellulardataconfirmation.h" + +NONSHARABLE_CLASS ( CDeviceDialogObserver ) : public CBase, public MHbDeviceDialogObserver + { + public: + /** + * Two-phased constructor. + */ + static CDeviceDialogObserver* NewL( CCellularDataConfirmation* aNotifier ); + + /** + * Destructor + */ + ~CDeviceDialogObserver(); + + /** + * Handles the user input received from the dialog + * @param aData CHbSymbianVariantMap& + */ + void DataReceived(CHbSymbianVariantMap& aData); + + /** + * Handles the closing of the dialog + * @param aCompletionCode TInt + */ + void DeviceDialogClosed(TInt /*aCompletionCode*/); + /** + * Sets the available choices for the query into the class variable + * @param aChoices RArray + */ + void SetChoices( RArray& aChoices ); + private: + /** + * Constructor + */ + CDeviceDialogObserver( CCellularDataConfirmation* aNotifier ); + + private: + /* Pointer to the object that triggered the dialog opening, + * needed to update the information about the user input. + */ + CCellularDataConfirmation* iNotifier; + /* The order of the buttons in the dialog, in order to map the + * data received from the dialog into the actual selected choice. + */ + RArray iChoiceIds; + }; + +#endif /* __DEVICEDIALOGOBSERVER_H__ */ diff -r 84c6623982f6 -r ed07dcc72692 connectionutilities/ConnectionDialogs/ConnectionUiUtilities/src/ConnectionUiUtilitiesImpl.cpp --- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/src/ConnectionUiUtilitiesImpl.cpp Fri Sep 17 08:32:43 2010 +0300 +++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/src/ConnectionUiUtilitiesImpl.cpp Mon Oct 04 00:43:42 2010 +0300 @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include @@ -45,6 +44,7 @@ #include "ChangeConnectionDlg.h" #include "ActiveCChangeConnectionDlg.h" #include "connectionstatuspopup.h" +#include "cellulardataconfirmation.h" #include #include @@ -89,7 +89,8 @@ iDummy( EFalse ), iDummySecMode( EWlanConnectionSecurityOpen ), iDummyExtSecMode( EWlanConnectionExtentedSecurityModeOpen ), - iConnStatusPopup( NULL ) + iConnStatusPopup( NULL ), + iCellularConfirmation( NULL ) { for ( TInt i = 0; i < KNumberOfWrappedDialogs; i++ ) { @@ -111,6 +112,7 @@ FeatureManager::FeatureSupported( KFeatureIdProtocolWlan ); FeatureManager::UnInitializeLib(); iConnStatusPopup = CConnectionStatusPopup::NewL(); + iCellularConfirmation = CCellularDataConfirmation::NewL(); } @@ -132,6 +134,7 @@ } delete iConnStatusPopup; + delete iCellularConfirmation; } // --------------------------------------------------------- @@ -163,6 +166,7 @@ TBool CConnectionUiUtilitiesImpl::AlwaysAskPageL( TCuuAlwaysAskResults& aResult ) { + // Not used LoadResourceFileL(); // options array CDesCArrayFlat* values = new( ELeave )CDesCArrayFlat( 1 ); @@ -370,6 +374,7 @@ TWlanConnectionExtentedSecurityMode& aExtSecurityMode, TBool& aProtectedSetupSupported ) { + // Used only in to-be-removed apengine TBool result( EFalse ); if ( iIsWlanSupported ) @@ -518,6 +523,9 @@ // TBool CConnectionUiUtilitiesImpl::OffLineWlanNote() { + // Maps to KUidCOfflineWlanNoteDlg + // Not used + CLOG_ENTERFN( "CConnectionUiUtilitiesImpl::OffLineWlanNote" ); if ( iIsWlanSupported ) @@ -552,7 +560,7 @@ void CConnectionUiUtilitiesImpl::OffLineWlanNote( TRequestStatus& aStatus ) { CLOG_ENTERFN( "CConnectionUiUtilitiesImpl::OffLineWlanNote Async" ); - + // Not used if ( iIsWlanSupported ) { if ( iActiveWrapper[EOffLineWlan] ) @@ -573,6 +581,7 @@ // void CConnectionUiUtilitiesImpl::CancelOffLineWlanNote() { + // Not used if ( iIsWlanSupported ) { if ( iActiveWrapper[EOffLineWlan] ) @@ -592,6 +601,8 @@ // void CConnectionUiUtilitiesImpl::OffLineWlanDisabledNote() { + // Maps to KUidCOfflineWlanNoteDlg + // Not used if ( iIsWlanSupported ) { if ( !iActiveWrapper[EWlanDisabled] ) @@ -613,6 +624,7 @@ // TBool CConnectionUiUtilitiesImpl::EasyWepDlg( TDes* aKey, TBool& aHex ) { + // Not used TInt status = KErrNone; if ( iIsWlanSupported ) @@ -640,6 +652,7 @@ // void CConnectionUiUtilitiesImpl::EasyWepDlgAsync( TRequestStatus& aStatus, TDes* aKey, TBool& aHex ) { + // Not used if ( iIsWlanSupported ) { if ( !iActiveWrapper[EWlanEasyWep] ) @@ -675,6 +688,7 @@ // TBool CConnectionUiUtilitiesImpl::EasyWpaDlg( TDes* aKey ) { + // Not used TInt status = KErrNone; if ( iIsWlanSupported ) { @@ -721,6 +735,7 @@ // void CConnectionUiUtilitiesImpl::CancelEasyWpaDlg() { + // Not used if ( iIsWlanSupported ) { iActiveWrapper[EWlanEasyWpa]->Cancel(); @@ -733,6 +748,9 @@ // void CConnectionUiUtilitiesImpl::WLANNetworkUnavailableNote() { + // Maps to KUidCOfflineWlanNoteDlg + // Not used + if ( iIsWlanSupported ) { if ( !iActiveWrapper[EWlanNetwUnavail] ) @@ -771,6 +789,7 @@ TWlanConnectionSecurityMode& aSecurityMode, TBool& aProtectedSetupSupported ) { + // Not used TBool result( EFalse ); if ( iIsWlanSupported ) @@ -883,6 +902,7 @@ TWlanConnectionExtentedSecurityMode& aExtSecurityMode, TBool& aProtectedSetupSupported ) { + // Not used CLOG_ENTERFN( "CConnectionUiUtilitiesImpl::SearchWLANNetworkAsync" ); if ( iIsWlanSupported ) @@ -916,8 +936,8 @@ TMsgQueryLinkedResults& aResult, const TBool aHomeNetwork, TRequestStatus& aStatus ) - { - iNotif.ConfirmMethodUsageQuery( aResult, aHomeNetwork, aStatus ); + { + TRAP_IGNORE( iCellularConfirmation->StartL( aResult, aHomeNetwork, aStatus ) ); } // --------------------------------------------------------- @@ -926,7 +946,7 @@ // void CConnectionUiUtilitiesImpl::CancelConfirmMethodUsageQuery() { - iNotif.CancelConfirmMethodUsageQuery(); + iCellularConfirmation->Cancel(); } @@ -938,6 +958,7 @@ TBool& aDisable, TRequestStatus& aStatus ) { + // Not used iNotif.WlanPowerSaveTestNote( aDisable, aStatus ); } @@ -957,6 +978,7 @@ // TBool CConnectionUiUtilitiesImpl::EasyWapiDlg( TDes* aKey ) { + // Not used TInt status( KErrNone ); if ( iIsWlanSupported ) diff -r 84c6623982f6 -r ed07dcc72692 connectionutilities/ConnectionDialogs/ConnectionUiUtilities/src/cellulardataconfirmation.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/src/cellulardataconfirmation.cpp Mon Oct 04 00:43:42 2010 +0300 @@ -0,0 +1,171 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Prompt Dialog implementation +* +*/ + + +// INCLUDE FILES +#include +#include +#include +#include "ConnectionDialogsLogger.h" +#include "cellulardataconfirmation.h" +#include "ConnectionDialogsNotifBase.h" +#include "ConnectionDialogsUidDefs.h" +#include "devicedialogobserver.h" + + +// CONSTANTS +_LIT( KHomenetwork, "homenetwork" ); +_LIT( KType, "com.nokia.ipconnmgmt.promptdialog/1.0" ); + +// --------------------------------------------------------- +// CCellularDataConfirmation::CCellularDataConfirmation() +// --------------------------------------------------------- +// +CCellularDataConfirmation::CCellularDataConfirmation(): +iDialog( NULL ), iObserver( NULL ), iCompleted( EFalse ), +iStatus( NULL ), iResult( NULL ) + { + } + +// --------------------------------------------------------- +// CCellularDataConfirmation::~CCellularDataConfirmation() +// --------------------------------------------------------- +// +CCellularDataConfirmation::~CCellularDataConfirmation() + { + CLOG_ENTERFN( "CCellularDataConfirmation::~CCellularDataConfirmation" ); + delete iDialog; + delete iObserver; + CLOG_LEAVEFN( "CCellularDataConfirmation::~CCellularDataConfirmation" ); + } + +// --------------------------------------------------------- +// CCellularDataConfirmation* CCellularDataConfirmation::NewL +// --------------------------------------------------------- +// +CCellularDataConfirmation* CCellularDataConfirmation::NewL( ) + { + CLOG_ENTERFN( "CCellularDataConfirmation::NewL" ); + CCellularDataConfirmation* self = new ( ELeave ) CCellularDataConfirmation(); + CleanupStack::PushL( self ); + self->ConstructL( ); + CleanupStack::Pop(); + CLOG_LEAVEFN( "CCellularDataConfirmation::NewL" ); + return self; + } + +void CCellularDataConfirmation::ConstructL() + { + } + +// --------------------------------------------------------- +// void CCellularDataConfirmation::StartL +// --------------------------------------------------------- +// +void CCellularDataConfirmation::StartL( TMsgQueryLinkedResults& aResult, + const TBool aHomeNetwork, + TRequestStatus& aStatus ) + { + CLOG_ENTERFN( "CCellularDataConfirmation::StartL" ); + aResult = EMsgQueryCancelled; + iResult = &aResult; + aStatus = KRequestPending; + iStatus = &aStatus; + + // Create the list box items + RArray choices; + + // The variant map is needed to construct the dialog correctly, + // information whether we are in home network is needed + if ( aHomeNetwork ) + { + choices.Append( EMsgQueryAutomatically ); + choices.Append( EMsgQueryThisTime ); + choices.Append( EMsgQueryCancelled ); + } + else + { + choices.Append( EMsgQueryThisTime ); + choices.Append( EMsgQueryAutomatically ); + choices.Append( EMsgQueryCancelled ); + } + + // Observer is needed in order to get the user inputs + iObserver = CDeviceDialogObserver::NewL( this ); + iDialog = CHbDeviceDialogSymbian::NewL(); + + // Set the choice order for the observer so that it knows which button press + // means which choice + iObserver->SetChoices( choices ); + + // Create the variant data information for the plugin + CHbSymbianVariantMap* map = CHbSymbianVariantMap::NewL(); + CleanupStack::PushL( map ); + CHbSymbianVariant *variant + = CHbSymbianVariant::NewL( &aHomeNetwork, CHbSymbianVariant::EBool ); + CleanupStack::PushL( variant ); + User::LeaveIfError( map->Add( KHomenetwork, variant ) ); + CleanupStack::Pop( variant ); // map's cleanup sequence handles variant. + + // Show the dialog. + User::LeaveIfError( iDialog->Show( KType, *map, iObserver ) ); + + CleanupStack::PopAndDestroy( map ); + CLOG_LEAVEFN( "CCellularDataConfirmation::StartL" ); + } + +// --------------------------------------------------------- +// void CConfirmationQueryNotif::CompleteL( TInt aStatus ) +// --------------------------------------------------------- +// +void CCellularDataConfirmation::CompleteL( TInt aStatus ) + { + CLOG_ENTERFN( "CCellularDataConfirmation::CompleteL" ); + if ( !iCompleted ) + { + iCompleted = ETrue; + User::RequestComplete( iStatus, aStatus ); + } + CLOG_LEAVEFN( "CCellularDataConfirmation::CompleteL" ); + } + +// --------------------------------------------------------------- +// void CConfirmationQueryNotif::SetSelectedChoiceL( TInt aChoice ) +// ---------------------------------------------------------------- +// +void CCellularDataConfirmation::SetSelectedChoice ( TInt aChoice ) + { + CLOG_ENTERFN( "CCellularDataConfirmation::SetSelectedChoice" ); + *iResult = (TMsgQueryLinkedResults)aChoice; + CLOG_LEAVEFN( "CCellularDataConfirmation::SetSelectedChoice" ); + } + +// --------------------------------------------------------------- +// void CCellularDataConfirmation::Cancel() +// ---------------------------------------------------------------- +// +void CCellularDataConfirmation::Cancel() + { + CLOG_ENTERFN( "CCellularDataConfirmation::Cancel" ); + if ( !iCompleted ) + { + iDialog->Cancel(); + User::RequestComplete( iStatus, KErrCancel ); + } + CLOG_LEAVEFN( "CCellularDataConfirmation::Cancel" ); + } + diff -r 84c6623982f6 -r ed07dcc72692 connectionutilities/ConnectionDialogs/ConnectionUiUtilities/src/devicedialogobserver.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/src/devicedialogobserver.cpp Mon Oct 04 00:43:42 2010 +0300 @@ -0,0 +1,90 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Prompt Dialog implementation +* +*/ + +#include +#include "devicedialogobserver.h" + +_LIT(KButton, "button"); + +// --------------------------------------------------------- +// CDeviceDialogObserver* CDeviceDialogObserver::NewL +// --------------------------------------------------------- +// +CDeviceDialogObserver* CDeviceDialogObserver::NewL( CCellularDataConfirmation* aNotifier ) + { + CDeviceDialogObserver* self = new ( ELeave ) CDeviceDialogObserver( aNotifier ); + return self; + } + +// --------------------------------------------------------- +// CDeviceDialogObserver::CDeviceDialogObserver +// --------------------------------------------------------- +// +CDeviceDialogObserver::CDeviceDialogObserver( CCellularDataConfirmation* aNotifier ): + iNotifier( aNotifier ) + { + + } + +// --------------------------------------------------------- +// CDeviceDialogObserver::~CDeviceDialogObserver() +// --------------------------------------------------------- +// +CDeviceDialogObserver::~CDeviceDialogObserver() + { + + } + +// --------------------------------------------------------- +// void CConfirmationQuery::SetChoices +// --------------------------------------------------------- +// +void CDeviceDialogObserver::SetChoices( RArray& aChoices ) + { + iChoiceIds = aChoices; + } + +// --------------------------------------------------------- +// void CDeviceDialogObserver::DataReceived +// --------------------------------------------------------- +// +void CDeviceDialogObserver::DataReceived( CHbSymbianVariantMap& aData ) +{ + // The key that is returned by the promptdialog is "button", + // meaning the id of the pressed button. + TInt intData = *(TInt*)(aData.Get(KButton)->Data()); + + TInt status = KErrNone; + + iNotifier->SetSelectedChoice( iChoiceIds[intData-1] ); + TRAP_IGNORE( iNotifier->CompleteL( status )); + +} + +// --------------------------------------------------------- +// void CDeviceDialogObserver::DeviceDialogClosed +// --------------------------------------------------------- +// +void CDeviceDialogObserver::DeviceDialogClosed( TInt /*aCompletionCode*/ ) +{ + // Dialog was closed, let's complete with that error code + TInt status = KErrCancel; + iNotifier->SetSelectedChoice( EMsgQueryCancelled ); + TRAP_IGNORE( iNotifier->CompleteL( status )); +} + + diff -r 84c6623982f6 -r ed07dcc72692 connectionutilities/ConnectionDialogs/DisconnectDlg/src/DisconnectDlgUi.cpp --- a/connectionutilities/ConnectionDialogs/DisconnectDlg/src/DisconnectDlgUi.cpp Fri Sep 17 08:32:43 2010 +0300 +++ b/connectionutilities/ConnectionDialogs/DisconnectDlg/src/DisconnectDlgUi.cpp Mon Oct 04 00:43:42 2010 +0300 @@ -53,8 +53,9 @@ EXPORT_C CArrayPtr* NotifierArray() { - CArrayPtrFlat* array = new( ELeave ) - CArrayPtrFlat( KPluginGranularity ); + CArrayPtrFlat* array = NULL; + TRAP_IGNORE( array = new (ELeave) + CArrayPtrFlat( KPluginGranularity ); ) if ( array ) { diff -r 84c6623982f6 -r ed07dcc72692 connectionutilities/ConnectionDialogs/cconndlg/inc/ConnDlgPlugin.h --- a/connectionutilities/ConnectionDialogs/cconndlg/inc/ConnDlgPlugin.h Fri Sep 17 08:32:43 2010 +0300 +++ b/connectionutilities/ConnectionDialogs/cconndlg/inc/ConnDlgPlugin.h Mon Oct 04 00:43:42 2010 +0300 @@ -30,7 +30,6 @@ #include #include -#include // ENUMERATIONS diff -r 84c6623982f6 -r ed07dcc72692 connectionutilities/ConnectionDialogs/ecomsrc/connectiondialogswrapper.cpp --- a/connectionutilities/ConnectionDialogs/ecomsrc/connectiondialogswrapper.cpp Fri Sep 17 08:32:43 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,215 +0,0 @@ -/* -* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implementation of ecom plugin -* -*/ - - -// INCLUDE FILES -#include "ConnectionDialogsUidDefs.h" -#include "ConnectionDialogsLogger.h" - -#include -#include // link against aknnotifierwrapper.lib - - -// CONSTANTS -const TInt KMyPriority = MEikSrvNotifierBase2::ENotifierPriorityLow; -const TInt KArrayGranularity = 5; - - -// --------------------------------------------------------- -// CleanupArray() -// --------------------------------------------------------- -// -void CleanupArray( TAny* aArray ) - { - CArrayPtrFlat* - subjects = static_cast*>( aArray ); - TInt lastInd = subjects->Count()-1; - for ( TInt i = lastInd; i >= 0; i-- ) - { - subjects->At( i )->Release(); - } - - delete subjects; - } - -// --------------------------------------------------------- -// DoCreateNotifierArrayL() -// --------------------------------------------------------- -// -CArrayPtr* DoCreateNotifierArrayL() - { - CLOG_CREATE; - CArrayPtrFlat* subjects = - new ( ELeave )CArrayPtrFlat( KArrayGranularity ); - - CleanupStack::PushL( TCleanupItem( CleanupArray, subjects ) ); - - // Create Wrappers - - _LIT( KCConnDlgPluginName, "CCONNDLGPLUGIN.DLL" ); - _LIT( KDisconnectDlgName, "DISCONNECTDLG.DLL" ); - _LIT( KConnUiUtilsNotifName, "ConnUiUtilsNotif.DLL" ); - - // Session owning notifier(if default implementation is enough) - CAknCommonNotifierWrapper* master = - CAknCommonNotifierWrapper::NewL( KUidCConnDlgIap, - KUidCConnDlgIap, - KMyPriority, - KCConnDlgPluginName, - 1 ); // we don't use synch reply - - CleanupStack::PushL( master ); - subjects->AppendL( master ); - CleanupStack::Pop( master ); - - subjects->AppendL( new( ELeave ) CAknNotifierWrapperLight( *master, - KUidCConnDlgNewIap, - KUidCConnDlgNewIap, - KMyPriority ) ); - - subjects->AppendL( new( ELeave ) CAknNotifierWrapperLight( *master, - KUidCConnDlgAuthentication, - KUidCConnDlgAuthentication, - KMyPriority ) ); - - subjects->AppendL( new( ELeave ) CAknNotifierWrapperLight( *master, - KUidCConnDlgReconnect, - KUidCConnDlgReconnect, - KMyPriority ) ); - - subjects->AppendL( new( ELeave ) CAknNotifierWrapperLight( *master, - KUidCConnDlgQos, - KUidCConnDlgQos, - KMyPriority ) ); - - subjects->AppendL( new( ELeave ) CAknNotifierWrapperLight( *master, - KUidCConnDlgSelectConn, - KUidCConnDlgSelectConn, - KMyPriority ) ); - - // Disconnect dialog - subjects->AppendL( CAknCommonNotifierWrapper::NewL( KUidDisconnectDlg, - KUidDisconnectDlg, - KMyPriority, - KDisconnectDlgName, - 1 ) ); - - // WLAN wrappers - master = CAknCommonNotifierWrapper::NewL( KUidSelectWLanDlg, - KUidSelectWLanDlg, - KMyPriority, - KConnUiUtilsNotifName, - 1 ); - - CleanupStack::PushL( master ); - subjects->AppendL( master ); - CleanupStack::Pop( master ); - - - subjects->AppendL( new( ELeave ) CAknNotifierWrapperLight( *master, - KUidCOfflineWlanNoteDlg, - KUidCOfflineWlanNoteDlg, - KMyPriority ) ); - - subjects->AppendL( new( ELeave ) CAknNotifierWrapperLight( *master, - KUidCOfflineWlanDisabledNoteDlg, - KUidCOfflineWlanDisabledNoteDlg, - KMyPriority ) ); - - subjects->AppendL( new( ELeave ) CAknNotifierWrapperLight( *master, - KUidEasyWepDlg, - KUidEasyWepDlg, - KMyPriority ) ); - - subjects->AppendL( new( ELeave ) CAknNotifierWrapperLight( *master, - KUidEasyWpaDlg, - KUidEasyWpaDlg, - KMyPriority ) ); - - subjects->AppendL( new( ELeave ) CAknNotifierWrapperLight( *master, - KUidWLANNetworkUnavailableNoteDlg, - KUidWLANNetworkUnavailableNoteDlg, - KMyPriority ) ); - - // ALR WRAPPERS - - subjects->AppendL( new( ELeave ) CAknNotifierWrapperLight( *master, - KUidConfirmationQuery, - KUidConfirmationQuery, - KMyPriority ) ); - - subjects->AppendL( new( ELeave ) CAknNotifierWrapperLight( *master, - KUidConnectViaNote, - KUidConnectViaNote, - KMyPriority ) ); - - // WLAN wrappers - - subjects->AppendL( new( ELeave ) CAknNotifierWrapperLight( *master, - KUidWlanPowerSaveTestNote, - KUidWlanPowerSaveTestNote, - KMyPriority ) ); - - subjects->AppendL( new( ELeave ) CAknNotifierWrapperLight( *master, - KUidEasyWapiDlg, - KUidEasyWapiDlg, - KMyPriority ) ); - - CleanupStack::Pop(); // array cleanup - return( subjects ); - } - -// --------------------------------------------------------- -// NotifierArray() -// --------------------------------------------------------- -// -CArrayPtr* NotifierArray() - // old Lib main entry point - { - CArrayPtr* array = 0; - TRAP_IGNORE( array = DoCreateNotifierArrayL() ); - return array; - } - -// --------------------------------------------------------- -// ImplementationTable -// --------------------------------------------------------- -// -const TImplementationProxy ImplementationTable[] = - { -#ifdef __EABI__ - {{0x10207375}, ( TFuncPtr )NotifierArray} -#else - {{0x10207375}, NotifierArray} -#endif - }; - -// --------------------------------------------------------- -// ImplementationGroupProxy -// entry point -// --------------------------------------------------------- -// -EXPORT_C const TImplementationProxy* ImplementationGroupProxy( - TInt& aTableCount ) - { - aTableCount = sizeof( ImplementationTable ) / - sizeof( TImplementationProxy ) ; - return ImplementationTable; - } - - -// End of File diff -r 84c6623982f6 -r ed07dcc72692 connectionutilities/ConnectionDialogs/group/ConnUiUtilsNotif.mmp --- a/connectionutilities/ConnectionDialogs/group/ConnUiUtilsNotif.mmp Fri Sep 17 08:32:43 2010 +0300 +++ b/connectionutilities/ConnectionDialogs/group/ConnUiUtilsNotif.mmp Mon Oct 04 00:43:42 2010 +0300 @@ -69,8 +69,6 @@ SOURCE wlanpowersavetest.cpp SOURCE wlanpowersavetestnotif.cpp SOURCE easywapidlgnotif.cpp -SOURCE cellulardataconfirmation.cpp -SOURCE devicedialogobserver.cpp SOURCEPATH ../src SOURCE ConnectionInfo.cpp @@ -92,11 +90,15 @@ SYSTEMINCLUDE /epoc32/include/libc SYSTEMINCLUDE /epoc32/include/uikon +// Hb orbit headers +SYSTEMINCLUDE /epoc32/include/mw/hb/hbcore +SYSTEMINCLUDE /epoc32/include/mw/hb/hbwidgets + + LIBRARY euser.lib eikdlg.lib eiksrv.lib cone.lib eikcore.lib eikcoctl.lib LIBRARY bafl.lib avkon.lib AknSkins.lib Ecom.lib LIBRARY eiksrvui.lib LIBRARY commonengine.lib -LIBRARY AKNNOTIFY.LIB LIBRARY AknIcon.lib LIBRARY egul.lib LIBRARY centralrepository.lib @@ -114,7 +116,7 @@ #if defined(ARMCC) DEFFILE ../ConnectionUiUtilities/EABI/ConnUiUtilsNotif.DEF #elif defined( WINSCW ) - DEFFILE ../ConnectionUiUtilities/BWinsCw/ConnUiUtilsNotif.DEF +DEFFILE ../ConnectionUiUtilities/BWinsCw/ConnUiUtilsNotif.DEF #endif DEBUGLIBRARY flogger.lib diff -r 84c6623982f6 -r ed07dcc72692 connectionutilities/ConnectionDialogs/group/ConnectionUiUtilities.mmp --- a/connectionutilities/ConnectionDialogs/group/ConnectionUiUtilities.mmp Fri Sep 17 08:32:43 2010 +0300 +++ b/connectionutilities/ConnectionDialogs/group/ConnectionUiUtilities.mmp Mon Oct 04 00:43:42 2010 +0300 @@ -45,6 +45,8 @@ SOURCE ActiveCChangeConnectionDlg.cpp SOURCE ActiveWrapper.cpp SOURCE connectionstatuspopup.cpp +SOURCE cellulardataconfirmation.cpp +SOURCE devicedialogobserver.cpp SOURCEPATH ../src SOURCE ConnectionInfo.cpp @@ -71,7 +73,6 @@ LIBRARY euser.lib cone.lib eikcore.lib eikcoctl.lib avkon.lib eikdlg.lib LIBRARY bafl.lib commonengine.lib commdb.lib AknSkins.lib FeatMgr.lib -LIBRARY AknNotify.lib LIBRARY Ecom.lib LIBRARY centralrepository.lib LIBRARY aknlayout.lib diff -r 84c6623982f6 -r ed07dcc72692 connectionutilities/ConnectionDialogs/group/bld.inf --- a/connectionutilities/ConnectionDialogs/group/bld.inf Fri Sep 17 08:32:43 2010 +0300 +++ b/connectionutilities/ConnectionDialogs/group/bld.inf Mon Oct 04 00:43:42 2010 +0300 @@ -49,8 +49,6 @@ //gnumakefile DisconnectDlgIcons.MK //gnumakefile ConnUiUtilsIcons.MK -./connectiondialogswrapper.mmp - ./CConnDlgClient.mmp ./CConnDlgPlugin.mmp diff -r 84c6623982f6 -r ed07dcc72692 connectionutilities/ConnectionDialogs/group/connectiondialogswrapper.mmp --- a/connectionutilities/ConnectionDialogs/group/connectiondialogswrapper.mmp Fri Sep 17 08:32:43 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,57 +0,0 @@ -/* -* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* This is project specification file for the connectiondialogswrapper -* -* -*/ - - -#include - -TARGET connectiondialogswrapper.DLL -CAPABILITY CAP_ECOM_PLUGIN -TARGETTYPE PLUGIN - -UID 0x10009D8D 0x10207374 - -LANG SC - -SOURCEPATH ../ecomsrc -SOURCE connectiondialogswrapper.cpp - -// Component specific internal headers -USERINCLUDE ../inc - -// ADO specific internal headers -SYSTEMINCLUDE ../../../inc - -//Macro to /epoc32 headers -MW_LAYER_SYSTEMINCLUDE - -START RESOURCE ../data/10207374.rss -TARGET connectiondialogswrapper.rsc -END - - -LIBRARY ECOM.LIB -LIBRARY AKNNOTIFIERWRAPPER.LIB -LIBRARY EUSER.LIB - -DEBUGLIBRARY flogger.lib -DEBUGLIBRARY efsrv.lib -DEBUGLIBRARY cone.lib - - -// End of File diff -r 84c6623982f6 -r ed07dcc72692 connectionutilities/ConnectionDialogs/inc/ConnectionInfoKey.h --- a/connectionutilities/ConnectionDialogs/inc/ConnectionInfoKey.h Fri Sep 17 08:32:43 2010 +0300 +++ b/connectionutilities/ConnectionDialogs/inc/ConnectionInfoKey.h Mon Oct 04 00:43:42 2010 +0300 @@ -51,13 +51,6 @@ virtual TInt Compare( TInt aLeft, TInt aRight ) const; /** - * At function - * @param nIndex Index of the element ot be returned - * @return TAny* The element at the given index - */ - virtual TAny* At( TInt anIndex ) const; - - /** * TConnectionInfoKey constructor * @return - */ diff -r 84c6623982f6 -r ed07dcc72692 connectionutilities/ConnectionDialogs/rom/ConnectionDialogs.iby --- a/connectionutilities/ConnectionDialogs/rom/ConnectionDialogs.iby Fri Sep 17 08:32:43 2010 +0300 +++ b/connectionutilities/ConnectionDialogs/rom/ConnectionDialogs.iby Mon Oct 04 00:43:42 2010 +0300 @@ -18,8 +18,9 @@ #ifndef __CONNECTIONDIALOGS_IBY__ #define __CONNECTIONDIALOGS_IBY__ - -ECOM_PLUGIN(connectiondialogswrapper.DLL,10207374.rsc) +// Dialog wrapper is not used anymore as dialogs and +// avkon notifier API has been deprecated. +// ECOM_PLUGIN(connectiondialogswrapper.DLL,10207374.rsc) #endif diff -r 84c6623982f6 -r ed07dcc72692 connectionutilities/ConnectionDialogs/src/ActiveIAPListing.cpp --- a/connectionutilities/ConnectionDialogs/src/ActiveIAPListing.cpp Fri Sep 17 08:32:43 2010 +0300 +++ b/connectionutilities/ConnectionDialogs/src/ActiveIAPListing.cpp Mon Oct 04 00:43:42 2010 +0300 @@ -551,9 +551,9 @@ CRepository* cr = CRepository::NewLC( KCRUidProfileEngine ); - TInt selectedProfile; + TInt selectedProfile( 0 ); - TRAP_IGNORE( cr->Get( KProEngActiveProfile, selectedProfile ) ); + (void) cr->Get( KProEngActiveProfile, selectedProfile ); // To get also VPN APs TUint bearerSet = iPrefs.iBearerSet | ECommDbBearerVirtual; diff -r 84c6623982f6 -r ed07dcc72692 connectionutilities/ConnectionDialogs/src/ConnectionInfoKey.cpp --- a/connectionutilities/ConnectionDialogs/src/ConnectionInfoKey.cpp Fri Sep 17 08:32:43 2010 +0300 +++ b/connectionutilities/ConnectionDialogs/src/ConnectionInfoKey.cpp Mon Oct 04 00:43:42 2010 +0300 @@ -136,18 +136,4 @@ return retval; } - -// --------------------------------------------------------- -// CConnectionInfoKey::At( TInt anIndex ) const -// --------------------------------------------------------- -// -TAny* CConnectionInfoKey::At( TInt anIndex ) const - { - TDesC16 tem( iPtr->At( anIndex )->Name() ); - TAny* ptr = ( TAny* )&tem; - - return ptr; - } - - // End of File diff -r 84c6623982f6 -r ed07dcc72692 dbcreator/commsdatcreator/Inc/cdcprocessorglobal.h --- a/dbcreator/commsdatcreator/Inc/cdcprocessorglobal.h Fri Sep 17 08:32:43 2010 +0300 +++ b/dbcreator/commsdatcreator/Inc/cdcprocessorglobal.h Mon Oct 04 00:43:42 2010 +0300 @@ -36,7 +36,6 @@ class RCmConnectionMethodExt; class RCmDestinationExt; class CReaderBase; -class CommsDat::CMDBSession; struct TCmGenConnSettings; class RCmManagerExt; diff -r 84c6623982f6 -r ed07dcc72692 dbcreator/commsdatcreator/Src/cdcprocessorglobal.cpp --- a/dbcreator/commsdatcreator/Src/cdcprocessorglobal.cpp Fri Sep 17 08:32:43 2010 +0300 +++ b/dbcreator/commsdatcreator/Src/cdcprocessorglobal.cpp Mon Oct 04 00:43:42 2010 +0300 @@ -227,12 +227,16 @@ CleanupStack::PushL( defaultGPRS ); defaultGPRS->iRecordName.SetL( KDefaultGPRSRecordName ); - - defaultGPRS->FindL( *db ); + + if ( !defaultGPRS->FindL( *db ) ) + { + CLOG_WRITE( "! Error : CProcessorGlobal::ProcessTagL: Default AP not found" ); + User::Leave( KErrNotFound ); + } defaultGPRS->iAPN.SetL( *ptrTag ); - defaultGPRS->ModifyL( *db ); + defaultGPRS->ModifyL( *db ); CleanupStack::PopAndDestroy( defaultGPRS ); @@ -320,7 +324,11 @@ bearerRecord->iRecordName.SetL( KModemBearerPacketData ); } - bearerRecord->FindL( *iSession ); // CHECK: Leaves if record not found + if( !bearerRecord->FindL( *iSession ) ) + { + CLOG_WRITE( "! Error : CProcessorGlobal::ProcessTagL: Modem bearer record not found" ); + User::Leave( KErrNotFound ); + } // Convert input parameter TLex lex( *ptrTag ); @@ -371,7 +379,11 @@ // Open the record "WlanBearer" bearerRecord->iRecordName.SetL( KLANBearerWlan ); - User::LeaveIfError( bearerRecord->FindL( *iSession ) ); + if( !bearerRecord->FindL( *iSession ) ) + { + CLOG_WRITE( "! Error : CProcessorGlobal::ProcessTagL: LAN bearer record not found" ); + User::Leave( KErrNotFound ); + } // Convert the input paramater to UINT TLex lex( *ptrTag ); @@ -496,19 +508,22 @@ globalSettings->iRecordName.SetL( KGlobalSettingsRecordName ); - if( globalSettings->FindL( *db ) ) + if( !globalSettings->FindL( *db ) ) { - //Gprs attach mode - if ( iAttachWhenNeeded ) - { - CLOG_WRITE( "GPRS attach mode : attach when needed\n" ) - globalSettings->iGPRSAttachMode = RPacketService::EAttachWhenNeeded; - } - else - { - CLOG_WRITE( "GPRS attach mode : attach when available\n" ) - globalSettings->iGPRSAttachMode = RPacketService::EAttachWhenPossible; - } + CLOG_WRITE( "! Error : CProcessorGlobal::ProcessAPL: Global settings not found" ); + User::Leave( KErrNotFound ); + } + + //Gprs attach mode + if ( iAttachWhenNeeded ) + { + CLOG_WRITE( "GPRS attach mode : attach when needed\n" ) + globalSettings->iGPRSAttachMode = RPacketService::EAttachWhenNeeded; + } + else + { + CLOG_WRITE( "GPRS attach mode : attach when available\n" ) + globalSettings->iGPRSAttachMode = RPacketService::EAttachWhenPossible; } globalSettings->ModifyL( *db ); @@ -677,7 +692,11 @@ settingsTypeField->SetL( aTableType ); - deviceSettingsTable->FindL( *iSession ); + if( !deviceSettingsTable->FindL( *iSession ) ) + { + CLOG_WRITE( "! Error : CProcessorGlobal::SaveGlobalWlanParameterL: Table not found" ); + User::Leave( KErrNotFound ); + } // Convert the input parameter to integer TLex lex( *aValue ); diff -r 84c6623982f6 -r ed07dcc72692 dbcreator/commsdatcreator/Src/cdcreaderxml.cpp --- a/dbcreator/commsdatcreator/Src/cdcreaderxml.cpp Fri Sep 17 08:32:43 2010 +0300 +++ b/dbcreator/commsdatcreator/Src/cdcreaderxml.cpp Mon Oct 04 00:43:42 2010 +0300 @@ -742,73 +742,70 @@ { TPtrC8 ptrBuf8; ptrBuf8.Set( buf ); - - if (result == KErrNone || result == KErrEof) - { - switch ( iCharSet ) - { - case ECharSetUnicode: - { - //simply copy to a Unicode descriptor - TPtrC16 ptrBuf16( ( TText16* )ptrBuf8.Ptr(), \ - ptrBuf8.Length() / KAsciiUnicodeRatio ); + + switch ( iCharSet ) + { + case ECharSetUnicode: + { + //simply copy to a Unicode descriptor + TPtrC16 ptrBuf16( ( TText16* )ptrBuf8.Ptr(), \ + ptrBuf8.Length() / KAsciiUnicodeRatio ); - TPtrC16 ptrLine; - result = ExtractLine(ptrBuf16, ptrLine); + TPtrC16 ptrLine; + result = ExtractLine(ptrBuf16, ptrLine); - if ( result == KErrNone ) - { - delete iLine; - iLine = NULL; - iLine = ptrLine.AllocL(); - - //Increment the file position - iFilePos += iLine->Length() * KAsciiUnicodeRatio; - } - - break; - } - case ECharSetAscii: - case ECharSetUtf8: - default: - { - //conversion to Unicode is needed - HBufC16* hBuf16 = HBufC16::NewLC( KMaxLineSize ); - TPtr16 ptrBuf16( hBuf16->Des() ); + if ( result == KErrNone ) + { + delete iLine; + iLine = NULL; + iLine = ptrLine.AllocL(); - if( iCharSet == ECharSetUtf8 ) - { - CnvUtfConverter::ConvertToUnicodeFromUtf8 - ( ptrBuf16, ptrBuf8 ); - } - else - { - ptrBuf16.Copy( ptrBuf8 ); - } - - TPtrC16 ptrLine; - result = ExtractLine(ptrBuf16, ptrLine); + //Increment the file position + iFilePos += iLine->Length() * KAsciiUnicodeRatio; + } + + break; + } + case ECharSetAscii: + case ECharSetUtf8: + default: + { + //conversion to Unicode is needed + HBufC16* hBuf16 = HBufC16::NewLC( KMaxLineSize ); + TPtr16 ptrBuf16( hBuf16->Des() ); + + if( iCharSet == ECharSetUtf8 ) + { + CnvUtfConverter::ConvertToUnicodeFromUtf8 + ( ptrBuf16, ptrBuf8 ); + } + else + { + ptrBuf16.Copy( ptrBuf8 ); + } - if ( result == KErrNone ) - { - delete iLine; - iLine = NULL; - iLine = ptrLine.AllocL(); + TPtrC16 ptrLine; + result = ExtractLine(ptrBuf16, ptrLine); + + if ( result == KErrNone ) + { + delete iLine; + iLine = NULL; + iLine = ptrLine.AllocL(); - // Increment the file position - // Line in unicode format converted back to UTF-8 - // for getting the right lenght and osition in file - CnvUtfConverter::ConvertFromUnicodeToUtf8( - buf, iLine->Des() ); - iFilePos += buf.Length(); - } + // Increment the file position + // Line in unicode format converted back to UTF-8 + // for getting the right lenght and osition in file + CnvUtfConverter::ConvertFromUnicodeToUtf8( + buf, iLine->Des() ); + iFilePos += buf.Length(); + } - CleanupStack::PopAndDestroy( hBuf16 ); + CleanupStack::PopAndDestroy( hBuf16 ); - break; - }//case - }//switch - }//if + break; + }//case + }//switch }//if return result; diff -r 84c6623982f6 -r ed07dcc72692 ipcm_pub/access_point_engine_api/access_point_engine_api.metaxml --- a/ipcm_pub/access_point_engine_api/access_point_engine_api.metaxml Fri Sep 17 08:32:43 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,18 +0,0 @@ - - - Access Point Engine API - Provides applications the possibility to access the Access Point information stored in the communications database. - c++ - networkingutilities - - - - - - - - - yes - no - - diff -r 84c6623982f6 -r ed07dcc72692 ipcm_pub/access_point_engine_api/access_point_settings_handler_api.metaxml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ipcm_pub/access_point_engine_api/access_point_settings_handler_api.metaxml Mon Oct 04 00:43:42 2010 +0300 @@ -0,0 +1,18 @@ + + + Access Point Settings Handler API + Provides applications with the possibility to include Access Point choice. + c++ + networkingutilities + + + + + + + + + yes + no + + diff -r 84c6623982f6 -r ed07dcc72692 ipcm_pub/access_point_settings_handler_api/access_point_engine_api.metaxml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ipcm_pub/access_point_settings_handler_api/access_point_engine_api.metaxml Mon Oct 04 00:43:42 2010 +0300 @@ -0,0 +1,18 @@ + + + Access Point Engine API + Provides applications the possibility to access the Access Point information stored in the communications database. + c++ + networkingutilities + + + + + + + + + yes + no + + diff -r 84c6623982f6 -r ed07dcc72692 ipcm_pub/access_point_settings_handler_api/access_point_settings_handler_api.metaxml --- a/ipcm_pub/access_point_settings_handler_api/access_point_settings_handler_api.metaxml Fri Sep 17 08:32:43 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,18 +0,0 @@ - - - Access Point Settings Handler API - Provides applications with the possibility to include Access Point choice. - c++ - networkingutilities - - - - - - - - - yes - no - - diff -r 84c6623982f6 -r ed07dcc72692 ipcm_pub/connection_monitor_server_api/inc/rconnmon.h --- a/ipcm_pub/connection_monitor_server_api/inc/rconnmon.h Fri Sep 17 08:32:43 2010 +0300 +++ b/ipcm_pub/connection_monitor_server_api/inc/rconnmon.h Mon Oct 04 00:43:42 2010 +0300 @@ -694,6 +694,18 @@ { } /** + * Copy constructor. + */ + IMPORT_C TConnMonIapInfo( const TConnMonIapInfo& aConnMonIapInfo ); + + /** + * Assignment operator. + * + * @param aConnMonIapInfo The object which is assigned. + */ + IMPORT_C TConnMonIapInfo& operator=( const TConnMonIapInfo& aConnMonIapInfo ); + + /** * This method returns the number of IAPs contained in this class. * * @return Number of IAPs. diff -r 84c6623982f6 -r ed07dcc72692 keepalive/flextimer/server/traces/OstTraceDefinitions.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/keepalive/flextimer/server/traces/OstTraceDefinitions.h Mon Oct 04 00:43:42 2010 +0300 @@ -0,0 +1,4 @@ +#ifndef __OSTTRACEDEFINITIONS_H__ +#define __OSTTRACEDEFINITIONS_H__ +#include +#endif diff -r 84c6623982f6 -r ed07dcc72692 keepalive/flextimer/server/traces/fixed_id.definitions --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/keepalive/flextimer/server/traces/fixed_id.definitions Mon Oct 04 00:43:42 2010 +0300 @@ -0,0 +1,35 @@ +#Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt. +[GROUP]TRACE_INTERNAL=0x40 +[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERSERVER_CONSTRUCTL=0x6 +[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERSERVER_DEL=0x1 +[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERSERVER_EXIT=0x5 +[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERSERVER_MAINERROR=0x7 +[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERSERVER_MAINEXIT=0x8 +[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERSERVER_NEWSESSIONL=0x3 +[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERSERVER_NEWSESSIONLVER=0x2 +[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERSERVER_START=0x4 +[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERSESSION=0x9 +[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERSESSIOND=0xa +[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERSESSION_ABORT=0xf +[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERSESSION_ABORT_ERROR=0x10 +[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERSESSION_ADDERROR=0x21 +[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERSESSION_ADDTIMER=0x1f +[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERSESSION_AFTERPANIC=0x15 +[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERSESSION_AFTERTICKSPANIC=0x17 +[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERSESSION_AFTERTICKSTIMER=0x18 +[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERSESSION_AFTERTIMER=0x16 +[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERSESSION_ATPANIC=0x11 +[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERSESSION_ATTIMER=0x12 +[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERSESSION_ATUTCPANIC=0x13 +[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERSESSION_ATUTCTIMER=0x14 +[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERSESSION_CANCEL=0x1a +[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERSESSION_CANCELERROR=0x19 +[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERSESSION_CONFIG=0x1c +[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERSESSION_CONFIGERROR=0x1b +[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERSESSION_CONFIGUNKNOWN=0x1e +[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERSESSION_CONFIGWIN=0x1d +[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERSESSION_DOADDTIMER=0x20 +[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERSESSION_ERROR=0xc +[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERSESSION_MSG=0xb +[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERSESSION_TIMEOUT=0xd +[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERSESSION_TIMEOUT_ERROR=0xe