# HG changeset patch # User hgs # Date 1273781421 -10800 # Node ID 8607022817570225c55ae01433d008b2071087db # Parent 9c97ad6591ae0d8a4dc9af97d396bba82b024c12 201017 diff -r 9c97ad6591ae -r 860702281757 apengine/apeng/group/APEngine.MMP --- a/apengine/apeng/group/APEngine.MMP Mon May 03 12:53:07 2010 +0300 +++ b/apengine/apeng/group/APEngine.MMP Thu May 13 23:10:21 2010 +0300 @@ -73,11 +73,6 @@ LIBRARY Vpnapi.lib LIBRARY centralrepository.lib - -LIBRARY WEPSecuritySettingsUi.lib -LIBRARY WPASecuritySettingsUi.lib - - #if defined(ARMCC) DEFFILE ../EABI/ApEngine_EKA2.def #elif defined( WINSCW ) diff -r 9c97ad6591ae -r 860702281757 apengine/apeng/src/APDataHandler.cpp --- a/apengine/apeng/src/APDataHandler.cpp Mon May 03 12:53:07 2010 +0300 +++ b/apengine/apeng/src/APDataHandler.cpp Thu May 13 23:10:21 2010 +0300 @@ -38,17 +38,13 @@ #include "ApEngineCommons.h" #include "ApUtils.h" #include "ApEngineVer.h" -#include "ApEngineLogger.h" +#include "ApEngineLogger.h" #include "ApNetworkItem.h" #include "APItemExtra.h" #include "APItemCdmaData.h" #include "APItemWlanData.h" #include "ApSpeedLookup.h" -#include -#include - - // CONSTANTS #if defined(_DEBUG) _LIT( KErrInvalidIntendedType, "Invalid intended default type" ); @@ -256,140 +252,8 @@ // EXPORT_C TUint32 CApDataHandler::CreateCopyFromL( TUint32 aBaseId ) { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::CreateCopyFromL" ) ) ); - - if ( iExt->iVariant & KApUiEditOnlyVPNs ) - { - User::Leave( KErrNotSupported ); - } - - CApAccessPointItem* holder = CApAccessPointItem::NewLC(); - - TBool ownTransaction = ApCommons::StartPushedTransactionLC( *iDb ); - AccessPointDataL( aBaseId, *holder ); - TUint32 oldwlanid( 0 ); - holder->ReadUint( EApIapServiceId, oldwlanid ); - - TUint32 retval( 0 ); - TBool aNameChanged( EFalse ); - - TApBearerType bearer = holder->BearerTypeL(); - CWEPSecuritySettings* wepSecSettings = NULL; - CWPASecuritySettings* wpaSecSettings( NULL ); - // only one of the above might be loaded once, so after copying - // we might need to PopAndDestroy only one item - TBool pushed(EFalse); - - if ( bearer == EApBearerTypeWLAN ) - { - TUint32 secmode( 0 ); - holder->ReadUint( EApWlanSecurityMode, secmode ); - switch ( secmode ) - { - case EOpen: - { - break; - } - case EWep: - { - wepSecSettings = CWEPSecuritySettings::NewL(); - CleanupStack::PushL( wepSecSettings ); - pushed = ETrue; - TUint32 wlanid( 0 ); - holder->ReadUint( EApIapServiceId, wlanid ); - wepSecSettings->LoadL( wlanid, *iDb ); - break; - } - case E802_1x: - { - wpaSecSettings = - CWPASecuritySettings::NewL( ESecurityMode8021x ); - CleanupStack::PushL( wpaSecSettings ); - pushed = ETrue; - TUint32 wlanid( 0 ); - holder->ReadUint( EApIapServiceId, wlanid ); - wpaSecSettings->LoadL( wlanid, *iDb ); - break; - } - case EWpa: - case EWpa2: - { - wpaSecSettings = - CWPASecuritySettings::NewL( ESecurityModeWpa ); - CleanupStack::PushL( wpaSecSettings ); - pushed = ETrue; - TUint32 wlanid( 0 ); - holder->ReadUint( EApIapServiceId, wlanid ); - wpaSecSettings->LoadL( wlanid, *iDb ); - break; - } - default: - { - __ASSERT_DEBUG( EFalse, ApCommons::Panic( ENotSupported ) ); - // do nothing in urel - break; - } - } - - } - - retval = DoUpdateAccessPointDataL( *holder, ETrue, aNameChanged ); - - if ( bearer == EApBearerTypeWLAN ) - { - TUint32 wlanid(0); - holder->ReadUint( EApIapServiceId, wlanid ); - // now check if it is WEP... - // read up security mode - TUint32 secmode( 0 ); - holder->ReadUint( EApWlanSecurityMode, secmode ); - switch ( secmode ) - { - case EOpen: - { - break; - } - case EWep: - { - // we have to try to save - wepSecSettings->SaveL( wlanid, *iDb ); - break; - } - case E802_1x: - { - wpaSecSettings->SaveL( wlanid, *iDb, - ESavingNewAPAsACopy, oldwlanid ); - break; - } - case EWpa: - case EWpa2: - { - wpaSecSettings->SaveL( wlanid, *iDb, - ESavingNewAPAsACopy, oldwlanid ); - break; - } - default: - { - __ASSERT_DEBUG( EFalse, ApCommons::Panic( ENotSupported ) ); - // do nothing in urel - break; - } - } - } - if ( pushed ) - { - CleanupStack::PopAndDestroy(); // the sec. settings - } - - if ( ownTransaction ) - { - ApCommons::CommitTransaction( *iDb ); - CleanupStack::Pop(); // RollbackTransactionOnLeave - } - CleanupStack::PopAndDestroy( holder ); // holder - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::CreateCopyFromL" ) ) ); - return retval; + CLOG( ( EHandler, 0, _L( "-> CApDataHandler::CreateCopyFromL - ERROR: not suported" ) ) ); + User::Leave( KErrNotSupported ); } @@ -2530,71 +2394,8 @@ // void CApDataHandler::RemoveWlanL( TUint32 aUid ) { - CLOG( ( EHandler, 0, _L( "-> CApDataHandler::RemoveWlanL" ) ) ); - - CCommsDbTableView* table = NULL; - - // now check the WLAN table for corresponding record and delete them, too - table = iDb->OpenViewMatchingUintLC - ( TPtrC(WLAN_SERVICE), TPtrC(WLAN_SERVICE_ID), aUid ); - - TInt res = table->GotoFirstRecord(); // O.K. - if ( res == KErrNone ) - { // exists, delete it - TUint32 tempint( 0 ); - ApCommons::ReadUintL( table, TPtrC(WLAN_SECURITY_MODE), tempint ); - // now tempint holds the security mode - // we have to delete security settings, too - switch ( tempint ) - { - case EOpen: - case EWep: - { - break; - } - case E802_1x: - { - CWPASecuritySettings* wpa = - CWPASecuritySettings::NewL( ESecurityMode8021x ); - CleanupStack::PushL( wpa ); - wpa->DeleteL( aUid ); - CleanupStack::PopAndDestroy( wpa ); - break; - } - case EWpa: - case EWpa2: - { - CWPASecuritySettings* wpa = - CWPASecuritySettings::NewL( ESecurityModeWpa ); - CleanupStack::PushL( wpa ); - wpa->DeleteL( aUid ); - CleanupStack::PopAndDestroy( wpa ); - break; - } - default: - { - // some weird error, repair it... - __ASSERT_DEBUG( EFalse, ApCommons::Panic( ENotSupported ) ); - break; - } - } - - 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 ); - } - } - - // only need to destroy if it was successfully created! - CleanupStack::PopAndDestroy( table ); // table - - CLOG( ( EHandler, 1, _L( "<- CApDataHandler::RemoveWlanL" ) ) ); + CLOG( ( EHandler, 0, _L( "-> CApDataHandler::RemoveWlanL - ERROR: not suported" ) ) ); + User::Leave( KErrNotSupported ); } diff -r 9c97ad6591ae -r 860702281757 apengine/apsettingshandlerui/group/Apsettingshandlerui.mmp --- a/apengine/apsettingshandlerui/group/Apsettingshandlerui.mmp Mon May 03 12:53:07 2010 +0300 +++ b/apengine/apsettingshandlerui/group/Apsettingshandlerui.mmp Thu May 13 23:10:21 2010 +0300 @@ -89,8 +89,6 @@ LIBRARY FeatMgr.lib LIBRARY AknInputLanguage.lib -LIBRARY WEPSecuritySettingsUi.lib -LIBRARY WPASecuritySettingsUi.lib LIBRARY ConnectionUiUtilities.lib LIBRARY centralrepository.lib diff -r 9c97ad6591ae -r 860702281757 apengine/apsettingshandlerui/inc/ApSettingsModel.h --- a/apengine/apsettingshandlerui/inc/ApSettingsModel.h Mon May 03 12:53:07 2010 +0300 +++ b/apengine/apsettingshandlerui/inc/ApSettingsModel.h Thu May 13 23:10:21 2010 +0300 @@ -44,10 +44,8 @@ class CEikonEnv; class CWEPSecuritySettings; -class CWEPSecuritySettingsUi; class CWPASecuritySettings; -class CWPASecuritySettingsUi; @@ -676,11 +674,9 @@ public: CWEPSecuritySettings* iWepSecSettings; ///< WEP settings data - CWEPSecuritySettingsUi* iWepSecSettingsUi; ///< WEP settings UI TInt iWepUiExitReason; ///< WEP UI exit reason CWPASecuritySettings* iWpaSecSettings; ///< WPA settings data - CWPASecuritySettingsUi* iWpaSecSettingsUi; ///< WPA settings UI TInt iWpaUiExitReason; ///< WPA UI exit reason TBool iNoEdit; diff -r 9c97ad6591ae -r 860702281757 apengine/apsettingshandlerui/src/ApSettingsModel.cpp --- a/apengine/apsettingshandlerui/src/ApSettingsModel.cpp Mon May 03 12:53:07 2010 +0300 +++ b/apengine/apsettingshandlerui/src/ApSettingsModel.cpp Thu May 13 23:10:21 2010 +0300 @@ -44,9 +44,6 @@ #include "ApNetworks.h" #include "FeatureManagerWrapper.h" -#include -#include - #include #include "ApSettingsHandlerLogger.h" @@ -145,11 +142,6 @@ delete iop; } - delete iWepSecSettings; - delete iWepSecSettingsUi; - - delete iWpaSecSettings; - delete iWpaSecSettingsUi; APSETUILOGGER_LEAVEFN( EModel,"~Model") } @@ -1088,35 +1080,9 @@ // TInt CApSettingsModel::ChangeWepSettingsL( CApAccessPointItem* aApItem ) { - APSETUILOGGER_ENTERFN( EModel,"Model::ChangeWepSettingsL") - TInt retval(0); - - if ( !iWepSecSettings ) - { - iWepSecSettings = CWEPSecuritySettings::NewL(); - TUint32 iapid( 0 ); - aApItem->ReadUint( EApIapServiceId, iapid ); - iWepSecSettings->LoadL( iapid, *Database()->Database() ); - } - - if ( !iWepSecSettingsUi ) - { - iWepSecSettingsUi = CWEPSecuritySettingsUi::NewL( *EikEnv() ); - } - - iWepUiExitReason = iWepSecSettings->EditL( *iWepSecSettingsUi, - aApItem->ConnectionName() ); - - if ( iWepUiExitReason & CWEPSecuritySettings::EExitReq ) - { - retval += KApUiEventExitRequested; - } - if ( iWepUiExitReason & CWEPSecuritySettings::EShutDownReq ) - { - retval += KApUiEventShutDownRequested; - } - APSETUILOGGER_LEAVEFN( EModel,"Model::ChangeWepSettingsL") - return retval; + APSETUILOGGER_ENTERFN( EModel,"Model::ChangeWepSettingsL - ERROR: not suported") + aApItem = aApItem; + return KErrNotSupported; } @@ -1127,35 +1093,9 @@ // TInt CApSettingsModel::ChangeWpaSettingsL( CApAccessPointItem* aApItem ) { - APSETUILOGGER_ENTERFN( EModel,"Model::ChangeWpaSettingsL") - TInt retval(0); - - if ( !iWpaSecSettings ) - { - iWpaSecSettings = CWPASecuritySettings::NewL( ESecurityModeWpa ); - TUint32 iapid( 0 ); - aApItem->ReadUint( EApIapServiceId, iapid ); - iWpaSecSettings->LoadL( iapid, *Database()->Database() ); - } - - if ( !iWpaSecSettingsUi ) - { - iWpaSecSettingsUi = CWPASecuritySettingsUi::NewL( *EikEnv() ); - } - - iWpaUiExitReason = iWpaSecSettings->EditL( *iWpaSecSettingsUi, - aApItem->ConnectionName() ); - - if ( iWpaUiExitReason & CWPASecuritySettings::EExitReq ) - { - retval += KApUiEventExitRequested; - } - if ( iWpaUiExitReason & CWPASecuritySettings::EShutDownReq ) - { - retval += KApUiEventShutDownRequested; - } - APSETUILOGGER_LEAVEFN( EModel,"Model::ChangeWpaSettingsL") - return retval; + APSETUILOGGER_ENTERFN( EModel,"Model::ChangeWpaSettingsL - ERROR: not suported") + aApItem = aApItem; + return KErrNotSupported; } @@ -1166,35 +1106,9 @@ // TInt CApSettingsModel::Change8021xSettingsL( CApAccessPointItem* aApItem ) { - APSETUILOGGER_ENTERFN( EModel,"Model::Change8021xSettingsL") - TInt retval(0); - - if ( !iWpaSecSettings ) - { - iWpaSecSettings = CWPASecuritySettings::NewL( ESecurityMode8021x ); - TUint32 iapid( 0 ); - aApItem->ReadUint( EApIapServiceId, iapid ); - iWpaSecSettings->LoadL( iapid, *Database()->Database() ); - } - - if ( !iWpaSecSettingsUi ) - { - iWpaSecSettingsUi = CWPASecuritySettingsUi::NewL( *EikEnv() ); - } - - iWpaUiExitReason = iWpaSecSettings->EditL( *iWpaSecSettingsUi, - aApItem->ConnectionName() ); - - if ( iWpaUiExitReason & CWPASecuritySettings::EExitReq ) - { - retval += KApUiEventExitRequested; - } - if ( iWpaUiExitReason & CWPASecuritySettings::EShutDownReq ) - { - retval += KApUiEventShutDownRequested; - } - APSETUILOGGER_LEAVEFN( EModel,"Model::Change8021xSettingsL") - return retval; + APSETUILOGGER_ENTERFN( EModel,"Model::Change8021xSettingsL - ERROR: not suported") + aApItem = aApItem; + return KErrNotSupported; } @@ -1205,19 +1119,10 @@ // void CApSettingsModel::ClearWEPAndWPASettings() { - APSETUILOGGER_ENTERFN( EModel,"Model::ClearWEPAndWPASettings") - - delete iWepSecSettings; - iWepSecSettings = NULL; - - delete iWpaSecSettings; - iWpaSecSettings = NULL; - - APSETUILOGGER_LEAVEFN( EModel,"Model::ClearWEPAndWPASettings") + APSETUILOGGER_ENTERFN( EModel,"Model::ClearWEPAndWPASettings - ERROR: not suported") } - // --------------------------------------------------------- // CApSettingsModel::WriteWlanL // --------------------------------------------------------- @@ -1225,284 +1130,34 @@ void CApSettingsModel::WriteWlanL( CApAccessPointItem& aApItem, TBool aIsNew ) { - APSETUILOGGER_ENTERFN( EModel,"Model::WriteWlanL") - // now check if it is WLAN and handle security savings... - 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!!! - TUint32 wlanid(0); - aApItem.ReadUint( EApIapServiceId, wlanid ); - - TUint32 oldwlanid(wlanid); - - TTypeOfSaving savetype( ESavingEditedAP ); - - if ( aIsNew ) - { - savetype = ESavingBrandNewAP; - oldwlanid = 0; - } - // now check if it is WEP... - // read up security mode - TUint32 secmode( 0 ); - aApItem.ReadUint( EApWlanSecurityMode, secmode ); - - - TBool fresh(EFalse); - - - switch ( secmode ) - { - case EOpen: - { - break; - } - case EWep: - { - // we have to try to save if: - // 1. it is a changed AP, it is possible that only - // sec. settings have been changed. - // In this case, iWepSecSettings might be NULL!! - // 2. it's sec. settings had been edited - - if ( !iWepSecSettings ) - { - iWepSecSettings = CWEPSecuritySettings::NewL(); - fresh = ETrue; - iWepSecSettings->LoadL( oldwlanid, - *Database()->Database() ); - } - - if ( ( iWepUiExitReason & CWEPSecuritySettings::EValid ) - || ( fresh ) ) - { // save WEP settings, too, into same transaction... - iWepSecSettings->SaveL( wlanid, *iDb->Database() ); - } - break; - } - case E802_1x: - { - - if ( !iWpaSecSettings ) - { - iWpaSecSettings = - CWPASecuritySettings::NewL( ESecurityMode8021x ); - fresh = ETrue; - iWpaSecSettings->LoadL( oldwlanid, - *Database()->Database() ); - } - - if ( ( iWpaUiExitReason & CWPASecuritySettings::EValid ) - || ( fresh ) ) - { // save WPA settings, too, into same transaction... - iWpaSecSettings->SaveL( wlanid, *iDb->Database(), - savetype, oldwlanid ); - } - break; - } - case EWpa: - case EWpa2: - { - - if ( !iWpaSecSettings ) - { - iWpaSecSettings = - CWPASecuritySettings::NewL( ESecurityModeWpa ); - fresh = ETrue; - iWpaSecSettings->LoadL( oldwlanid, - *Database()->Database() ); - } - - if ( ( iWpaUiExitReason & CWPASecuritySettings::EValid ) - || ( fresh ) ) - { // save WPA settings, too, into same transaction... - iWpaSecSettings->SaveL( wlanid, *iDb->Database(), - savetype, oldwlanid ); - } - break; - } - default: - { - __ASSERT_DEBUG( EFalse, Panic( EUnknownCase ) ); - // do nothing in urel - break; - } - } - } - APSETUILOGGER_LEAVEFN( EModel,"Model::WriteWlanL") + APSETUILOGGER_ENTERFN( EModel,"Model::WriteWlanL - ERROR: not supported") + aApItem; + aIsNew; + User::Leave( KErrNotSupported ); } - - - // --------------------------------------------------------- // CApSettingsModel::LoadWlanL // --------------------------------------------------------- // void CApSettingsModel::LoadWlanL( CApAccessPointItem& aApItem ) { - APSETUILOGGER_ENTERFN( EModel,"Model::LoadWlanL") - // now check if it is WLAN and handle security savings... - if ( aApItem.BearerTypeL() == EApBearerTypeWLAN ) - { // it is WLAN... - // now check if it is WEP... - // read up security mode - TUint32 secmode( 0 ); - aApItem.ReadUint( EApWlanSecurityMode, secmode ); - switch ( secmode ) - { - case EOpen: - { - break; - } - case EWep: - { - if ( !iWepSecSettings ) - { - iWepSecSettings = CWEPSecuritySettings::NewL(); - } - - if ( !iWepSecSettingsUi ) - { - iWepSecSettingsUi = - CWEPSecuritySettingsUi::NewL( *EikEnv() ); - } - TUint32 wlanid( 0 ); - aApItem.ReadUint( EApIapServiceId, wlanid ); - iWepSecSettings->LoadL( wlanid, *Database()->Database() ); - break; - } - case E802_1x: - { - if ( !iWpaSecSettings ) - { - iWpaSecSettings = - CWPASecuritySettings::NewL( ESecurityMode8021x ); - } - - if ( !iWpaSecSettingsUi ) - { - iWpaSecSettingsUi = - CWPASecuritySettingsUi::NewL( *EikEnv() ); - } - TUint32 wlanid( 0 ); - aApItem.ReadUint( EApIapServiceId, wlanid ); - iWpaSecSettings->LoadL( wlanid, *Database()->Database() ); - break; - } - case EWpa: - case EWpa2: - { - if ( !iWpaSecSettings ) - { - iWpaSecSettings = - CWPASecuritySettings::NewL( ESecurityModeWpa ); - } - - if ( !iWpaSecSettingsUi ) - { - iWpaSecSettingsUi = - CWPASecuritySettingsUi::NewL( *EikEnv() ); - } - TUint32 wlanid( 0 ); - aApItem.ReadUint( EApIapServiceId, wlanid ); - iWpaSecSettings->LoadL( wlanid, *Database()->Database() ); - break; - } - default: - { - __ASSERT_DEBUG( EFalse, Panic( EUnknownCase ) ); - // do nothing in urel - break; - } - } - } - APSETUILOGGER_LEAVEFN( EModel,"Model::LoadWlanL") + APSETUILOGGER_ENTERFN( EModel,"Model::LoadWlanL - ERROR: not supported") + aApItem; + User::Leave( KErrNotSupported ); } - - - //---------------------------------------------------------- // CApSettingsModel::HasWlanSecSettingsFilledL //---------------------------------------------------------- // TBool CApSettingsModel::HasWlanSecSettingsFilledL( CApAccessPointItem& aApItem ) { - APSETUILOGGER_ENTERFN( EModel,"Model::HasWlanSecSettingsFilledL") - TBool retval(EFalse); - - TUint32 secmode( 0 ); - aApItem.ReadUint( EApWlanSecurityMode, secmode ); - - TUint32 wlanid(0); - aApItem.ReadUint( EApIapServiceId, wlanid ); - - TUint32 oldwlanid(wlanid); - - TUint32 wapuid = aApItem.WapUid(); - - if ( ( wapuid == KApNoneUID ) - || ( iUtils->BearerTypeL( wapuid ) != EApBearerTypeWLAN ) ) - { - oldwlanid = 0; - } - - switch ( secmode ) - { - case EOpen: - { - retval = ETrue; - break; - } - case EWep: - { - if ( !iWepSecSettings ) - { - iWepSecSettings = CWEPSecuritySettings::NewL(); - iWepSecSettings->LoadL( oldwlanid, - *Database()->Database() ); - } - retval = iWepSecSettings->IsValid(); - break; - } - case E802_1x: - { - if ( !iWpaSecSettings ) - { - iWpaSecSettings = - CWPASecuritySettings::NewL( ESecurityMode8021x ); - iWpaSecSettings->LoadL( oldwlanid, - *Database()->Database() ); - } - retval = iWpaSecSettings->IsValid(); - break; - } - case EWpa: - case EWpa2: - { - if ( !iWpaSecSettings ) - { - iWpaSecSettings = - CWPASecuritySettings::NewL( ESecurityModeWpa ); - iWpaSecSettings->LoadL( oldwlanid, - *Database()->Database() ); - } - retval = iWpaSecSettings->IsValid(); - break; - } - default: - { - __ASSERT_DEBUG( EFalse, Panic( EUnknownCase ) ); - // do nothing in urel - break; - } - } - APSETUILOGGER_LEAVEFN( EModel,"Model::HasWlanSecSettingsFilledL") - return retval; + APSETUILOGGER_ENTERFN( EModel,"Model::HasWlanSecSettingsFilledL - ERROR: not supported") + aApItem; + return EFalse; } @@ -1512,66 +1167,9 @@ // void CApSettingsModel::UpdateSecurityModeL( CApAccessPointItem& aApItem ) { - APSETUILOGGER_ENTERFN( EModel,"Model::UpdateSecurityModeL") - TUint32 secmode( 0 ); - aApItem.ReadUint( EApWlanSecurityMode, secmode ); - - TUint32 wlanid(0); - aApItem.ReadUint( EApIapServiceId, wlanid ); - - switch ( secmode ) - { - case EOpen: - { - break; - } - case EWep: - { - if ( iWepSecSettings ) - { - delete iWepSecSettings; - iWepSecSettings = NULL; // to satisfy CodeScanner - } - iWepSecSettings = CWEPSecuritySettings::NewL(); - iWepSecSettings->LoadL( wlanid, - *Database()->Database() ); - break; - } - case E802_1x: - { - if ( iWpaSecSettings ) - { - delete iWpaSecSettings; - iWpaSecSettings = NULL; // to satisfy CodeScanner - } - iWpaSecSettings = - CWPASecuritySettings::NewL( ESecurityMode8021x ); - iWpaSecSettings->LoadL( wlanid, - *Database()->Database() ); - break; - } - case EWpa: - case EWpa2: - { - if ( iWpaSecSettings ) - { - delete iWpaSecSettings; - iWpaSecSettings = NULL; // to satisfy CodeScanner - } - iWpaSecSettings = - CWPASecuritySettings::NewL( ESecurityModeWpa ); - iWpaSecSettings->LoadL( wlanid, - *Database()->Database() ); - break; - } - default: - { - __ASSERT_DEBUG( EFalse, Panic( EUnknownCase ) ); - // do nothing in urel - break; - } - } - APSETUILOGGER_LEAVEFN( EModel,"Model::UpdateSecurityModeL") + APSETUILOGGER_ENTERFN( EModel,"Model::UpdateSecurityModeL - ERROR: not supported") + aApItem; + User::Leave( KErrNotSupported ); } // End of File diff -r 9c97ad6591ae -r 860702281757 apengine/apsettingshandlerui/src/apsettingsdeleteoperation.cpp --- a/apengine/apsettingshandlerui/src/apsettingsdeleteoperation.cpp Mon May 03 12:53:07 2010 +0300 +++ b/apengine/apsettingshandlerui/src/apsettingsdeleteoperation.cpp Thu May 13 23:10:21 2010 +0300 @@ -28,8 +28,6 @@ #include #include "Apsettingsdeleteoperation.h" -#include -#include #include // Following includes are needed only for the test diff -r 9c97ad6591ae -r 860702281757 apengine/group/bld.inf --- a/apengine/group/bld.inf Mon May 03 12:53:07 2010 +0300 +++ b/apengine/group/bld.inf Thu May 13 23:10:21 2010 +0300 @@ -24,6 +24,5 @@ PRJ_MMPFILES #include "../apeng/group/bld.inf" #include "../apsettingshandlerui/group/bld.inf" -#include "../apsettingsplugin/group/bld.inf" PRJ_TESTMMPFILES \ No newline at end of file diff -r 9c97ad6591ae -r 860702281757 bearermanagement/S60MCPR/inc/s60mcpractivities.h --- a/bearermanagement/S60MCPR/inc/s60mcpractivities.h Mon May 03 12:53:07 2010 +0300 +++ b/bearermanagement/S60MCPR/inc/s60mcpractivities.h Thu May 13 23:10:21 2010 +0300 @@ -608,22 +608,7 @@ NetStateMachine::MStateFork, TContext ) virtual TInt TransitionTag(); - DECLARE_SMELEMENT_FOOTER( TNoTagOrInformMigrationAvailableBackwardsOrErrorOrCancel ) - - /** - * FORK/DECISION: - * 1. Inform that the migration complete or go to error - * 2. Error - * @return - */ - DECLARE_SMELEMENT_HEADER( TInformMigrationCompletedOrError, - MeshMachine::TStateFork, - NetStateMachine::MStateFork, - TContext ) - virtual TInt TransitionTag(); - DECLARE_SMELEMENT_FOOTER( TInformMigrationCompletedOrError ) - - + DECLARE_SMELEMENT_FOOTER( TNoTagOrInformMigrationAvailableBackwardsOrErrorOrCancel ) /** * Class that is responsible for managing mobility on MCPR side. @@ -802,21 +787,6 @@ CS60MobilityActivity::TContext ) virtual TInt TransitionTag(); DECLARE_SMELEMENT_FOOTER( TNoTagOrApplicationRejectedMigrationOrCancel ) - - /** - * FORK/DECISION: - * 1. Proceed to reconnection - * 2. Re-establish connection to the same IAP, inform data client that migration is complete - * 3. Error - * @return - */ - DECLARE_SMELEMENT_HEADER( TNoTagOrRequestReConnectToCurrentSPOrErrorTag, - MeshMachine::TStateFork, - NetStateMachine::MStateFork, - TContext ) - virtual TInt TransitionTag(); - DECLARE_SMELEMENT_FOOTER( TNoTagOrRequestReConnectToCurrentSPOrErrorTag ) - /** * Mutex protected TRANSITION. diff -r 9c97ad6591ae -r 860702281757 bearermanagement/S60MCPR/inc/s60mcprstates.h --- a/bearermanagement/S60MCPR/inc/s60mcprstates.h Mon May 03 12:53:07 2010 +0300 +++ b/bearermanagement/S60MCPR/inc/s60mcprstates.h Thu May 13 23:10:21 2010 +0300 @@ -106,17 +106,6 @@ TContext ) virtual void DoL(); DECLARE_SMELEMENT_FOOTER( TRequestReConnect ) - - /** - * TRANSITION/ACTION: Starts ReConnect -activity to current service provider - */ - DECLARE_SMELEMENT_HEADER( TRequestReConnectToCurrentSP, - MeshMachine::TStateTransition, - NetStateMachine::MStateTransition, - TContext ) - virtual void DoL(); - DECLARE_SMELEMENT_FOOTER( TRequestReConnectToCurrentSP ) - /** * TRANSITION/ACTION: Requests Policy Server to process the error. diff -r 9c97ad6591ae -r 860702281757 bearermanagement/S60MCPR/src/s60mcpractivities.cpp --- a/bearermanagement/S60MCPR/src/s60mcpractivities.cpp Mon May 03 12:53:07 2010 +0300 +++ b/bearermanagement/S60MCPR/src/s60mcpractivities.cpp Thu May 13 23:10:21 2010 +0300 @@ -294,22 +294,17 @@ NODEACTIVITY_ENTRY( KNoTag, MCprStates::TSelectNextLayer, MCprStates::TAwaitingSelectNextLayerCompleted, // Ok. Error is fatal. - CS60MobilityActivity::TNoTagOrRequestReConnectToCurrentSPOrErrorTag ) + MeshMachine::TNoTagOrErrorTag ) // For the moment it is sufficient to use the re-connect activity, in the future we may want to // customise the behavior, for example start the new layer before rebinding it, etc. NODEACTIVITY_ENTRY( KNoTag, S60MCprStates::TRequestReConnect, MCprStates::TAwaitingReConnectCompleteOrError, // Ok. Error is fatal. - S60MCprMobilityActivity::TInformMigrationCompletedOrError ) //Own error handling MPM must be informed when error happens. + MeshMachine::TNoTagOrErrorTag ) //Own error handling MPM must be informed when error happens. - NODEACTIVITY_ENTRY( S60MCprStates::KRequestReConnectToCurrentSP, - S60MCprStates::TRequestReConnectToCurrentSP, - MCprStates::TAwaitingReConnectCompleteOrError, - S60MCprMobilityActivity::TInformMigrationCompletedOrError ) - // If the migration was acepted we loop again waiting for a new, preferred one - NODEACTIVITY_ENTRY( S60MCprStates::KInformMigrationCompleted, + NODEACTIVITY_ENTRY( KNoTag, CS60MobilityActivity::TInformMigrationCompleted, S60MCprMobilityActivity::TAwaitingMigrationAcceptedOrRejectedOrStartupErrorIgnoredOrCancel, S60MCprMobilityActivity::TNoTagOrErrorTagOrApplicationRejectedOrConsumeRejected ) diff -r 9c97ad6591ae -r 860702281757 bearermanagement/S60MCPR/src/s60mcprmobilityactivity.cpp --- a/bearermanagement/S60MCPR/src/s60mcprmobilityactivity.cpp Mon May 03 12:53:07 2010 +0300 +++ b/bearermanagement/S60MCPR/src/s60mcprmobilityactivity.cpp Thu May 13 23:10:21 2010 +0300 @@ -198,24 +198,6 @@ // else cancel return KCancelTag | NetStateMachine::EForward; } - - // ----------------------------------------------------------------------------- - // S60MCprMobilityActivity::TInformMigrationCompletedOrError::TransitionTag - // ----------------------------------------------------------------------------- - // - DEFINE_SMELEMENT( TInformMigrationCompletedOrError, NetStateMachine::MStateFork, TContext ) - TBool TInformMigrationCompletedOrError::TransitionTag() - { - // Error notification falls into the error -case. - if ( iContext.iNodeActivity->Error() ) - { - return MeshMachine::KErrorTag | NetStateMachine::EForward; - } - else - { - return S60MCprStates::KInformMigrationCompleted; - } - } // ----------------------------------------------------------------------------- // S60MCprMobilityActivity::TStartMobilityHandshakeBackwardsOrError::TransitionTag @@ -695,36 +677,6 @@ } // ----------------------------------------------------------------------------- - // CS60MobilityActivity::TNoTagOrRequestReConnectToCurrentSPOrErrorTag::DoL - // ----------------------------------------------------------------------------- - // - DEFINE_SMELEMENT( CS60MobilityActivity::TNoTagOrRequestReConnectToCurrentSPOrErrorTag, - NetStateMachine::MStateFork, CS60MobilityActivity::TContext ) - TInt CS60MobilityActivity::TNoTagOrRequestReConnectToCurrentSPOrErrorTag::TransitionTag() - { - CS60MetaConnectionProvider& node = (CS60MetaConnectionProvider&)iContext.Node(); - RMetaServiceProviderInterface* sp = (RMetaServiceProviderInterface*)node.ServiceProvider(); - - if ( iContext.iNodeActivity->Error() ) - { - S60MCPRLOGSTRING1("S60MCPR<%x>::TNoTagOrBearerPresentOrError::TransitionTag() KErrorTag",(TInt*)&iContext.Node()) - return MeshMachine::KErrorTag | NetStateMachine::EForward; - } - // Check whether we're bound to a provider for the given IAP ID already - else if (sp && sp->ProviderInfo().APId() == node.PolicyPrefs().IapId()) - { - // Restart the whole layer - S60MCPRLOGSTRING1("S60MCPR<%x>::TNoTagOrBearerPresentOrError::TransitionTag() Re-establishment",(TInt*)&iContext.Node()); - return S60MCprStates::KRequestReConnectToCurrentSP | NetStateMachine::EForward; - } - else - { - S60MCPRLOGSTRING1("S60MCPR<%x>::TNoTagOrBearerPresentOrError::TransitionTag() KNoTag",(TInt*)&iContext.Node()) - return MeshMachine::KNoTag | NetStateMachine::EForward; - } - } - - // ----------------------------------------------------------------------------- // CS60MobilityActivity::ClearHandshakingFlag // ----------------------------------------------------------------------------- // diff -r 9c97ad6591ae -r 860702281757 bearermanagement/S60MCPR/src/s60mcprstates.cpp --- a/bearermanagement/S60MCPR/src/s60mcprstates.cpp Mon May 03 12:53:07 2010 +0300 +++ b/bearermanagement/S60MCPR/src/s60mcprstates.cpp Thu May 13 23:10:21 2010 +0300 @@ -129,7 +129,6 @@ iContext.Node().GetClientIter(TClientType(TCFClientType::EServProvider)); RMetaServiceProviderInterface* itf = NULL; - //RNodeInterface* itf = NULL; for ( itf = (RMetaServiceProviderInterface*)iter++; ( itf != NULL && ( stoppingSP == NULL || startingSP == NULL ) ); @@ -155,13 +154,13 @@ // } } - // One must be started since this is already a reconnection - if ( stoppingSP==NULL ) + + if ( stoppingSP == NULL ) { - // Indication of a serious problem. - S60MCPRLOGSTRING1("S60MCPR<%x>::TRequestReConnect::DoL() - started service provider not found.",(TInt*)&iContext.Node()) - ASSERT( EFalse ); - User::Leave( KErrCorrupt ); // codescanner::leave + // If the above loop did not select a stoppingSP, the only reasonable chance is that + // this is one of the rare cases where reconnection is done to the same service provider. + S60MCPRLOGSTRING1("S60MCPR<%x>::TRequestReConnect::DoL() - reconnection to same service provider",(TInt*)&iContext.Node()) + stoppingSP = startingSP; } //If there is no other Service Provider to try, return KErrNotFound @@ -180,28 +179,7 @@ startingSP->RecipientId()).CRef() ); } -// ----------------------------------------------------------------------------- -// TRequestReConnectToCurrentSP::DoL -// ----------------------------------------------------------------------------- -// -DEFINE_SMELEMENT( TRequestReConnectToCurrentSP, NetStateMachine::MStateTransition, TContext ) -void TRequestReConnectToCurrentSP::DoL() // codescanner::leave - { - __ASSERT_DEBUG(iContext.iNodeActivity, User::Panic(KS60MCprPanic, KPanicNoActivity)); - S60MCPRLOGSTRING1("S60MCPR<%x>::TRequestReConnectToCurrentSP::DoL()",(TInt*)&iContext.Node()) - RNodeInterface* currentSP = iContext.Node().ServiceProvider(); - // There MUST be a service provider - __ASSERT_DEBUG( currentSP != NULL, User::Panic(KS60MCprPanic, KPanicNoServiceProvider)); - - // Diagnostic - there must be a data client or we cannot be here - __ASSERT_DEBUG(iContext.Node().GetFirstClient(TClientType(TCFClientType::EData)), - User::Panic(KS60MCprPanic, KPanicNoDataClient)); - - iContext.iNodeActivity->PostRequestTo( iContext.NodeId(), - TCFMcpr::TReConnect( currentSP->RecipientId(), - currentSP->RecipientId()).CRef() ); - } // ----------------------------------------------------------------------------- // TProcessError::DoL // ----------------------------------------------------------------------------- diff -r 9c97ad6591ae -r 860702281757 bearermanagement/mpm/src/mpmiapselection.cpp --- a/bearermanagement/mpm/src/mpmiapselection.cpp Mon May 03 12:53:07 2010 +0300 +++ b/bearermanagement/mpm/src/mpmiapselection.cpp Thu May 13 23:10:21 2010 +0300 @@ -123,6 +123,11 @@ snap ) iChooseIapPref.SetSnapId( snap ); iChooseIapPref.SetIapId( 0 ); + if ( iChooseIapPref.ConnType() == TMpmConnPref::EConnTypeImplicit ) + { + // No Connection selection dialog on reselection. + iChooseIapPref.SetConnType( TMpmConnPref::EConnTypeExplicit ); + } } else if ( iap ) { @@ -130,6 +135,11 @@ iap ) iChooseIapPref.SetIapId( iap ); iChooseIapPref.SetSnapId( 0 ); + if ( iChooseIapPref.ConnType() == TMpmConnPref::EConnTypeImplicit ) + { + // No Connection selection dialog on reselection. + iChooseIapPref.SetConnType( TMpmConnPref::EConnTypeExplicit ); + } } MPMLOGSTRING3( "CMPMIapSelection::ChooseIapL: IapID: %i SnapId: %i", @@ -345,7 +355,8 @@ // KErrGprsOfflineMode should be returned instead of KErrNone. // - if ( !iapTypeLanOrWlan && iSession->MyServer().IsPhoneOffline() ) + if ( !iapTypeLanOrWlan && ( iSession->MyServer().IsPhoneOffline() || + iSession->MyServer().RoamingWatcher()->RoamingStatus() == EMPMRoamingStatusUnknown ) ) { ChooseIapComplete( KErrGprsOfflineMode, &iChooseIapPref ); } @@ -471,7 +482,10 @@ // Check if any suitable IAP's were found, if not then complete selection with error code if ( validateIapId == 0 ) { - if ( iChooseIapPref.ConnType() == TMpmConnPref::EConnTypeDefault ) + if ( iChooseIapPref.ConnType() == TMpmConnPref::EConnTypeDefault || + ( iChooseIapPref.ConnType() == TMpmConnPref::EConnTypeExplicit && + !( iChooseIapPref.NoteBehaviour() & TExtendedConnPref::ENoteBehaviourConnDisableQueries ) && + iCommsDatAccess->IsInternetSnapL( 0, snap ) ) ) { ImplicitConnectionL(); } @@ -500,7 +514,8 @@ { ChooseIapComplete( KErrGprsServicesNotAllowed, NULL ); } - else if ( !iapTypeLanOrWlan && iSession->MyServer().IsPhoneOffline() ) + else if ( !iapTypeLanOrWlan && ( iSession->MyServer().IsPhoneOffline() || + iSession->MyServer().RoamingWatcher()->RoamingStatus() == EMPMRoamingStatusUnknown ) ) { // In case offline mode is enabled, only LAN or WLAN is allowed. // If some other bearer has been requested, then error code @@ -921,7 +936,8 @@ iapTypeLanOrWlan, *iSession ); - if ( !iapTypeLanOrWlan && iSession->MyServer().IsPhoneOffline() ) + if ( !iapTypeLanOrWlan && ( iSession->MyServer().IsPhoneOffline() || + iSession->MyServer().RoamingWatcher()->RoamingStatus() == EMPMRoamingStatusUnknown ) ) { MPMLOGSTRING2( "CMPMIapSelection::CompleteImplicitConnectionL: Completing with code = %i", KErrGprsOfflineMode ) diff -r 9c97ad6591ae -r 860702281757 bearermanagement/mpm/src/mpmserversession.cpp --- a/bearermanagement/mpm/src/mpmserversession.cpp Mon May 03 12:53:07 2010 +0300 +++ b/bearermanagement/mpm/src/mpmserversession.cpp Thu May 13 23:10:21 2010 +0300 @@ -436,12 +436,6 @@ MPMLOGSTRING3( "CMPMServerSession::HandleServerChooseIapL - iap %d \ connType %d", mpmConnPref.IapId(), mpmConnPref.ConnType() ) - if (!( mpmConnPref.NoteBehaviour() & - TExtendedConnPref::ENoteBehaviourConnDisableNotes ) ) - { - iMyServer.ConnUiUtils()->ConnectingViaDiscreetPopup(); - } - iIapSelection->ChooseIapL( mpmConnPref ); if ( iAppUid == iMyServer.CsIdWatcher()->ConnectScreenId() ) diff -r 9c97ad6591ae -r 860702281757 cmmanager/cmapplsettingsui/inc/cmapplsettingsui_p.h --- a/cmmanager/cmapplsettingsui/inc/cmapplsettingsui_p.h Mon May 03 12:53:07 2010 +0300 +++ b/cmmanager/cmapplsettingsui/inc/cmapplsettingsui_p.h Thu May 13 23:10:21 2010 +0300 @@ -2,7 +2,7 @@ * 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"" +* 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". * @@ -13,7 +13,6 @@ * * Description: * CM Manager Application Settings UI private interface. -* */ #ifndef CMAPPLSETTINGSUI_P_H @@ -36,7 +35,7 @@ // Forward declarations -class QTranslator; +class HbTranslator; class CmManagerShim; class CmRadioDialog; class TestCmApplSettingsUi; @@ -106,8 +105,7 @@ // General member data CmApplSettingsUi *q_ptr; //!< Public implementation QSharedPointer mCmManagerShim; //!< CM Manager client instance - QTranslator *mAppTranslator; //!< Translator for application text ID's - QTranslator *mCommonTranslator; //!< Translator for common text ID's + QSharedPointer mTranslator; //!< Translator for the dialog // Configuration QFlags mListItems; //!< Wanted dialog type's diff -r 9c97ad6591ae -r 860702281757 cmmanager/cmapplsettingsui/res/cmradiodialog.docml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cmmanager/cmapplsettingsui/res/cmradiodialog.docml Thu May 13 23:10:21 2010 +0300 @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff -r 9c97ad6591ae -r 860702281757 cmmanager/cmapplsettingsui/src/cmapplsettingsui_p.cpp --- a/cmmanager/cmapplsettingsui/src/cmapplsettingsui_p.cpp Mon May 03 12:53:07 2010 +0300 +++ b/cmmanager/cmapplsettingsui/src/cmapplsettingsui_p.cpp Thu May 13 23:10:21 2010 +0300 @@ -2,7 +2,7 @@ * 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"" +* 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". * @@ -13,21 +13,20 @@ * * Description: * CM Manager Application Settings UI private implementation. -* */ // System includes -#include +#include #include #include -#include #include // User includes #include "cmradiodialog.h" #include "cmapplsettingsui_p.h" + #include "OstTraceDefinitions.h" #ifdef OST_TRACE_COMPILER_IN_USE #include "cmapplsettingsui_pTraces.h" @@ -40,7 +39,6 @@ Displays a radio button list dialog for an application that can be used to select a destination or connection method. - */ // External function prototypes @@ -59,8 +57,7 @@ CmApplSettingsUiPrivate::CmApplSettingsUiPrivate(CmApplSettingsUi *q_pointer) : QObject(q_pointer), q_ptr(q_pointer), - mAppTranslator(new QTranslator(this)), - mCommonTranslator(new QTranslator(this)), + mTranslator(new HbTranslator("cmapplsettingsui")), mListItems( CmApplSettingsUi::ShowDestinations | CmApplSettingsUi::ShowConnectionMethods), @@ -77,15 +74,8 @@ mSelection.result = CmApplSettingsUi::SelectionTypeDestination; mSelection.id = 0; - // Install common localization - QString lang = QLocale::system().name(); - QString path = "Z:/resource/qt/translations/"; - bool loadStatus = mCommonTranslator->load("common_" + lang, path); - qApp->installTranslator(mCommonTranslator); - - // Install this library's localization - loadStatus = mAppTranslator->load("cmapplsettingsui_" + lang, path); - qApp->installTranslator(mAppTranslator); + // Install also common localization + mTranslator->loadCommon(); OstTraceFunctionExit0(CMAPPLSETTINGSUIPRIVATE_CMAPPLSETTINGSUIPRIVATE_EXIT); } diff -r 9c97ad6591ae -r 860702281757 cmmanager/cmmgr/cmmcommon/inc/cmmserverdefs.h --- a/cmmanager/cmmgr/cmmcommon/inc/cmmserverdefs.h Mon May 03 12:53:07 2010 +0300 +++ b/cmmanager/cmmgr/cmmcommon/inc/cmmserverdefs.h Thu May 13 23:10:21 2010 +0300 @@ -207,7 +207,7 @@ { ECmmRecordStatusBlank = 0x0001, ECmmRecordStatusLoaded = 0x0002, // Loaded and up-to-date. - ECmmRecordStatusExpired = 0x0004, // Loaded but out-of-date. //TODO, should this be cache side only? + ECmmRecordStatusExpired = 0x0004, // Loaded but out-of-date (Cache side only). ECmmRecordStatusModified = 0x0008, // Loaded and modified (Session side only). ECmmRecordStatusUnsaved = 0x0010 // Doesn't yet exist in database (Cache side only). }; diff -r 9c97ad6591ae -r 860702281757 cmmanager/cmmgr/cmmpluginbase/src/ccmpluginbaseeng.cpp --- a/cmmanager/cmmgr/cmmpluginbase/src/ccmpluginbaseeng.cpp Mon May 03 12:53:07 2010 +0300 +++ b/cmmanager/cmmgr/cmmpluginbase/src/ccmpluginbaseeng.cpp Thu May 13 23:10:21 2010 +0300 @@ -482,17 +482,18 @@ // CCmPluginBaseEng::CopyRecordDataL // --------------------------------------------------------------------------- // -void CCmPluginBaseEng::CopyRecordDataL( TUint32 aRecordIdentifier, - CCmPluginBaseEng* aCopyInstance ) +void CCmPluginBaseEng::CopyRecordDataL( + TUint32 aRecordIdentifier, + CCmPluginBaseEng* aCopyInstance ) { OstTraceFunctionEntry0( CCMPLUGINBASEENG_COPYRECORDDATAL_ENTRY ); - switch( aRecordIdentifier ) + switch ( aRecordIdentifier ) { case KIapRecordIndex: { - aCopyInstance->iIapRecord = - static_cast( CCDRecordBase::CreateCopyRecordL( *iIapRecord ) ); + aCopyInstance->iIapRecord = static_cast( + CCDRecordBase::CreateCopyRecordL( *iIapRecord ) ); } break; case KServiceRecordIndex: @@ -502,25 +503,26 @@ break; case KNetworkRecordIndex: { - aCopyInstance->iNetworkRecord = - static_cast( CCDRecordBase::CreateCopyRecordL( *iNetworkRecord ) ); + aCopyInstance->iNetworkRecord = static_cast( + CCDRecordBase::CreateCopyRecordL( *iNetworkRecord ) ); } break; case KWAPAPRecordIndex: { - aCopyInstance->iWapAPRecord = - static_cast( CCDRecordBase::CreateCopyRecordL( *iWapAPRecord ) ); + aCopyInstance->iWapAPRecord = static_cast( + CCDRecordBase::CreateCopyRecordL( *iWapAPRecord ) ); } break; case KWAPBearerRecordIndex: { - aCopyInstance->iWapIPBearerRecord = - static_cast( CCDRecordBase::CreateCopyRecordL( *iWapIPBearerRecord ) ); + aCopyInstance->iWapIPBearerRecord = static_cast( + CCDRecordBase::CreateCopyRecordL( *iWapIPBearerRecord ) ); } break; case KMetaDataRecordIndex: { - aCopyInstance->iMetaDataRecord = new (ELeave) CCDIAPMetadataRecord( iMetadataTableId ); + aCopyInstance->iMetaDataRecord = + new( ELeave ) CCDIAPMetadataRecord( iMetadataTableId ); aCopyInstance->iMetaDataRecord->iIAP = IAPRecordElementId(); aCopyInstance->iMetaDataRecord->iMetadata.SetL( iMetaDataRecord->iMetadata ); aCopyInstance->iMetaDataRecord->iSeamlessness.SetL( iMetaDataRecord->iSeamlessness ); @@ -537,8 +539,8 @@ { if ( iProxyRecord ) { - aCopyInstance->iProxyRecord = static_cast - ( CCDRecordBase::CreateCopyRecordL( *iProxyRecord ) ); + aCopyInstance->iProxyRecord = static_cast( + CCDRecordBase::CreateCopyRecordL( *iProxyRecord ) ); } } break; @@ -546,7 +548,9 @@ { User::Leave( KErrArgument ); } + break; } + OstTraceFunctionExit0( CCMPLUGINBASEENG_COPYRECORDDATAL_EXIT ); } @@ -1863,6 +1867,7 @@ { User::Leave( KErrCorrupt ); } + OstTraceFunctionExit0( CCMPLUGINBASEENG_SETNAMEL_EXIT ); } @@ -1870,8 +1875,8 @@ // CCmPluginBaseEng::CheckIfNameModifiedL // --------------------------------------------------------------------------- EXPORT_C void CCmPluginBaseEng::CheckIfNameModifiedL( - CCDRecordBase* aSrcRecord, - CCDRecordBase* aDestRecord ) const + CCDRecordBase* aSrcRecord, + CCDRecordBase* aDestRecord ) const { OstTraceFunctionEntry0( CCMPLUGINBASEENG_CHECKIFNAMEMODIFIEDL_ENTRY ); @@ -2165,8 +2170,8 @@ // CCmPluginBaseEng::GetIntAttributeL // ----------------------------------------------------------------------------- EXPORT_C TUint32 CCmPluginBaseEng::GetIntAttributeL( - TUint32 aAttribute, - CCmClientPluginInstance* aClientPluginInstance ) + TUint32 aAttribute, + CCmClientPluginInstance* aClientPluginInstance ) { OstTraceFunctionEntry0( CCMPLUGINBASEENG_GETINTATTRIBUTEL_ENTRY ); @@ -2275,15 +2280,15 @@ break; default: { - retVal = GetBearerIntAttributeL( aAttribute, - aClientPluginInstance->iGenRecordArray, - aClientPluginInstance->iBearerSpecRecordArray ); + retVal = GetBearerIntAttributeL( + aAttribute, + aClientPluginInstance->iGenRecordArray, + aClientPluginInstance->iBearerSpecRecordArray ); } break; } OstTraceFunctionExit0( CCMPLUGINBASEENG_GETINTATTRIBUTEL_EXIT ); - return retVal; } @@ -2291,8 +2296,8 @@ // CCmPluginBaseEng::GetBoolAttributeL // ----------------------------------------------------------------------------- EXPORT_C TBool CCmPluginBaseEng::GetBoolAttributeL( - TUint32 aAttribute, - CCmClientPluginInstance* aClientPluginInstance ) + TUint32 aAttribute, + CCmClientPluginInstance* aClientPluginInstance ) { OstTraceFunctionEntry0( CCMPLUGINBASEENG_GETBOOLATTRIBUTEL_ENTRY ); @@ -2308,7 +2313,7 @@ case ECmHidden: { CCDIAPRecord* iapRecord = static_cast( - aClientPluginInstance->iGenRecordArray[KIapRecordIndex] ); + aClientPluginInstance->iGenRecordArray[KIapRecordIndex] ); retVal = iapRecord->Attributes() & ECDHidden; } break; @@ -2347,7 +2352,7 @@ } break; case ECmCoverage: - // In default the plugin has no network coverage + // By default the plugin has no network coverage. { TRAPD( err, retVal = GetBearerBoolAttributeL( aAttribute, aClientPluginInstance->iGenRecordArray, @@ -2394,14 +2399,14 @@ break; default: { - retVal = GetBearerBoolAttributeL( aAttribute, - aClientPluginInstance->iGenRecordArray, - aClientPluginInstance->iBearerSpecRecordArray ); + retVal = GetBearerBoolAttributeL( + aAttribute, + aClientPluginInstance->iGenRecordArray, + aClientPluginInstance->iBearerSpecRecordArray ); } } OstTraceFunctionExit0( CCMPLUGINBASEENG_GETBOOLATTRIBUTEL_EXIT ); - return retVal; } @@ -2410,8 +2415,8 @@ // ----------------------------------------------------------------------------- // EXPORT_C HBufC* CCmPluginBaseEng::GetStringAttributeL( - TUint32 aAttribute, - CCmClientPluginInstance* aClientPluginInstance ) + TUint32 aAttribute, + CCmClientPluginInstance* aClientPluginInstance ) { OstTraceFunctionEntry0( CCMPLUGINBASEENG_GETSTRINGATTRIBUTEL_ENTRY ); @@ -2425,13 +2430,14 @@ static_cast( aClientPluginInstance->iGenRecordArray[KWAPAPRecordIndex] ); - retVal = TPtrC( wapAPRecord->iWAPStartPage).AllocL(); + retVal = TPtrC( wapAPRecord->iWAPStartPage ).AllocL(); } break; case ECmName: { CCDIAPRecord* iapRecord = static_cast( - aClientPluginInstance->iGenRecordArray[KIapRecordIndex] ); + aClientPluginInstance->iGenRecordArray[KIapRecordIndex] ); + retVal = TPtrC( iapRecord->iRecordName ).AllocL(); } break; @@ -2515,14 +2521,15 @@ break; default: { - retVal = GetBearerStringAttributeL( aAttribute, - aClientPluginInstance->iGenRecordArray, - aClientPluginInstance->iBearerSpecRecordArray ); + retVal = GetBearerStringAttributeL( + aAttribute, + aClientPluginInstance->iGenRecordArray, + aClientPluginInstance->iBearerSpecRecordArray ); } + break; } OstTraceFunctionExit0( CCMPLUGINBASEENG_GETSTRINGATTRIBUTEL_EXIT ); - return retVal; } @@ -2531,8 +2538,8 @@ // ----------------------------------------------------------------------------- // EXPORT_C HBufC8* CCmPluginBaseEng::GetString8AttributeL( - TUint32 aAttribute, - CCmClientPluginInstance* aClientPluginInstance ) + TUint32 aAttribute, + CCmClientPluginInstance* aClientPluginInstance ) { OstTraceFunctionEntry0( CCMPLUGINBASEENG_GETSTRING8ATTRIBUTEL_ENTRY ); @@ -2542,14 +2549,14 @@ { default: { - retVal = GetBearerString8AttributeL( aAttribute, - aClientPluginInstance->iGenRecordArray, - aClientPluginInstance->iBearerSpecRecordArray ); + retVal = GetBearerString8AttributeL( + aAttribute, + aClientPluginInstance->iGenRecordArray, + aClientPluginInstance->iBearerSpecRecordArray ); } } OstTraceFunctionExit0( CCMPLUGINBASEENG_GETSTRING8ATTRIBUTEL_EXIT ); - return retVal; } diff -r 9c97ad6591ae -r 860702281757 cmmanager/cmmgr/cmmplugins/cmpluginlan/src/cmpluginlan.cpp --- a/cmmanager/cmmgr/cmmplugins/cmpluginlan/src/cmpluginlan.cpp Mon May 03 12:53:07 2010 +0300 +++ b/cmmanager/cmmgr/cmmplugins/cmpluginlan/src/cmpluginlan.cpp Thu May 13 23:10:21 2010 +0300 @@ -157,7 +157,7 @@ TRAPD( err, iapRecord->LoadL( iSession ) ); - if( !err ) + if ( !err ) { retVal = CanHandleIapIdL( iapRecord ); } @@ -179,7 +179,7 @@ TBool retVal( EFalse ); - if( (TPtrC( aIapRecord->iServiceType ) == TPtrC( KCDTypeNameLANService ) ) && + if ( (TPtrC( aIapRecord->iServiceType ) == TPtrC( KCDTypeNameLANService ) ) && TPtrC( aIapRecord->iBearerType ) == TPtrC( KCDTypeNameLANBearer ) ) { retVal = ETrue; @@ -251,7 +251,7 @@ CCDLANServiceRecord* lanServiceRecord = static_cast( iServiceRecord ); - if( FeatureManager::FeatureSupported( KFeatureIdIPv6 ) ) + if ( FeatureManager::FeatureSupported( KFeatureIdIPv6 ) ) { lanServiceRecord->iIfNetworks.SetL( KDefIspIfNetworksIPv4IPv6LAN ); } @@ -294,19 +294,20 @@ { OstTraceFunctionEntry0( CCMPLUGINLAN_LOADSERVICERECORDL_ENTRY ); - if( TPtrC( KCDTypeNameLANService ) == iIapRecord->iServiceType ) + if ( TPtrC( KCDTypeNameLANService ) == iIapRecord->iServiceType ) { - iServiceRecord = static_cast - (CCDRecordBase::RecordFactoryL(KCDTIdLANServiceRecord)); + iServiceRecord = static_cast( + CCDRecordBase::RecordFactoryL( KCDTIdLANServiceRecord ) ); ServiceRecord().SetRecordId( iIapRecord->iService ); ServiceRecord().LoadL( iSession ); } else - // this IAP service is not supported by this plugin. { + // This IAP service is not supported by this plugin. User::Leave( KErrNotSupported ); } + OstTraceFunctionExit0( CCMPLUGINLAN_LOADSERVICERECORDL_EXIT ); } @@ -317,7 +318,6 @@ void CCmPluginLan::PrepareToCopyDataL( CCmPluginBaseEng* /*aCopyInstance*/ ) { OstTraceFunctionEntry0( CCMPLUGINLAN_PREPARETOCOPYDATAL_ENTRY ); - OstTraceFunctionExit0( CCMPLUGINLAN_PREPARETOCOPYDATAL_EXIT ); } @@ -329,13 +329,122 @@ { OstTraceFunctionEntry0( CCMPLUGINLAN_COPYSERVICERECORDL_ENTRY ); - __ASSERT_DEBUG( iServiceRecord != NULL, User::Leave( KErrNotFound )); + // New service record to be returned. + CCDRecordBase* serviceRecord = static_cast( + CCDRecordBase::RecordFactoryL( KCDTIdLANServiceRecord ) ); + CleanupStack::PushL( serviceRecord ); + + CCDLANServiceRecord* tempServiceRecordPtrToNew = + static_cast( serviceRecord ); + + // CommsDat version of service record. + CCDLANServiceRecord* origServiceRecord = + static_cast( iServiceRecord ); - CCDRecordBase* serviceRecord = static_cast - ( CCDRecordBase::CreateCopyRecordL( *iServiceRecord ) ); + if ( !origServiceRecord->iRecordTag.IsNull() ) + { + tempServiceRecordPtrToNew->iRecordTag.SetL( + origServiceRecord->iRecordTag ); + } + if ( !origServiceRecord->iRecordName.IsNull() ) + { + tempServiceRecordPtrToNew->iRecordName.SetL( + origServiceRecord->iRecordName ); + } + if ( !origServiceRecord->iServiceEnableLlmnr.IsNull() ) + { + tempServiceRecordPtrToNew->iServiceEnableLlmnr.SetL( + origServiceRecord->iServiceEnableLlmnr ); + } + if ( !origServiceRecord->iIfNetworks.IsNull() ) + { + tempServiceRecordPtrToNew->iIfNetworks.SetL( + origServiceRecord->iIfNetworks ); + } + if ( !origServiceRecord->iIpNetmask.IsNull() ) + { + tempServiceRecordPtrToNew->iIpNetmask.SetL( + origServiceRecord->iIpNetmask ); + } + if ( !origServiceRecord->iIpGateway.IsNull() ) + { + tempServiceRecordPtrToNew->iIpGateway.SetL( + origServiceRecord->iIpGateway ); + } + if ( !origServiceRecord->iIpAddrFromServer.IsNull() ) + { + tempServiceRecordPtrToNew->iIpAddrFromServer.SetL( + origServiceRecord->iIpAddrFromServer ); + } + if ( !origServiceRecord->iIpAddr.IsNull() ) + { + tempServiceRecordPtrToNew->iIpAddr.SetL( + origServiceRecord->iIpAddr ); + } + if ( !origServiceRecord->iIpDnsAddrFromServer.IsNull() ) + { + tempServiceRecordPtrToNew->iIpDnsAddrFromServer.SetL( + origServiceRecord->iIpDnsAddrFromServer ); + } + if ( !origServiceRecord->iIpNameServer1.IsNull() ) + { + tempServiceRecordPtrToNew->iIpNameServer1.SetL( + origServiceRecord->iIpNameServer1 ); + } + if ( !origServiceRecord->iIpNameServer2.IsNull() ) + { + tempServiceRecordPtrToNew->iIpNameServer2.SetL( + origServiceRecord->iIpNameServer2 ); + } + if ( !origServiceRecord->iIp6DnsAddrFromServer.IsNull() ) + { + tempServiceRecordPtrToNew->iIp6DnsAddrFromServer.SetL( + origServiceRecord->iIp6DnsAddrFromServer ); + } + if ( !origServiceRecord->iIp6NameServer1.IsNull() ) + { + tempServiceRecordPtrToNew->iIp6NameServer1.SetL( + origServiceRecord->iIp6NameServer1 ); + } + if ( !origServiceRecord->iIp6NameServer2.IsNull() ) + { + tempServiceRecordPtrToNew->iIp6NameServer2.SetL( + origServiceRecord->iIp6NameServer2 ); + } + if ( !origServiceRecord->iIpAddrLeaseValidFrom.IsNull() ) + { + tempServiceRecordPtrToNew->iIpAddrLeaseValidFrom.SetL( + origServiceRecord->iIpAddrLeaseValidFrom ); + } + if ( !origServiceRecord->iIpAddrLeaseValidTo.IsNull() ) + { + tempServiceRecordPtrToNew->iIpAddrLeaseValidTo.SetL( + origServiceRecord->iIpAddrLeaseValidTo ); + } + if ( !origServiceRecord->iConfigDaemonManagerName.IsNull() ) + { + tempServiceRecordPtrToNew->iConfigDaemonManagerName.SetL( + origServiceRecord->iConfigDaemonManagerName ); + } + if ( !origServiceRecord->iConfigDaemonName.IsNull() ) + { + tempServiceRecordPtrToNew->iConfigDaemonName.SetL( + origServiceRecord->iConfigDaemonName ); + } + if ( !origServiceRecord->iServiceExtensionTableName.IsNull() ) + { + tempServiceRecordPtrToNew->iServiceExtensionTableName.SetL( + origServiceRecord->iServiceExtensionTableName ); + } + if ( !origServiceRecord->iServiceExtensionTableRecordId.IsNull() ) + { + tempServiceRecordPtrToNew->iServiceExtensionTableRecordId.SetL( + origServiceRecord->iServiceExtensionTableRecordId ); + } + + CleanupStack::Pop( serviceRecord ); OstTraceFunctionExit0( CCMPLUGINLAN_COPYSERVICERECORDL_EXIT ); - return serviceRecord; } @@ -344,102 +453,120 @@ // ---------------------------------------------------------------------------- // void CCmPluginLan::UpdateServiceRecordL( - RPointerArray& aGenRecordArray, - RPointerArray& /*aBearerSpecRecordArray*/ ) + RPointerArray& aGenRecordArray, + RPointerArray& /*aBearerSpecRecordArray*/ ) { OstTraceFunctionEntry0( CCMPLUGINLAN_UPDATESERVICERECORDL_ENTRY ); - // Delete the original record and create a copy from the parameter + // Delete the original record and create a copy from the client's copy. delete iServiceRecord; iServiceRecord = NULL; - iServiceRecord = static_cast - (CCDRecordBase::RecordFactoryL( KCDTIdLANServiceRecord ) ); + iServiceRecord = static_cast( + CCDRecordBase::RecordFactoryL( KCDTIdLANServiceRecord ) ); - // LAN Service copy does not work so we have to copy it manually + CCDLANServiceRecord* origServiceRecord = static_cast( iServiceRecord ); + + // Client's copy of lan service record. + CCDLANServiceRecord* clientServiceRecordCopy = + static_cast( aGenRecordArray[KServiceRecordIndex] ); - CCDLANServiceRecord* lanServiceRecordTo = static_cast( iServiceRecord ); - CCDLANServiceRecord* lanServiceRecordFrom = - static_cast( aGenRecordArray[KServiceRecordIndex] ); + // LAN Service copy does not work so we have to copy it manually. - if( !lanServiceRecordFrom->iRecordName.IsNull() ) + if ( !clientServiceRecordCopy->iRecordTag.IsNull() ) { - lanServiceRecordTo->iRecordName.SetL( lanServiceRecordFrom->iRecordName ); + origServiceRecord->iRecordTag.SetL( clientServiceRecordCopy->iRecordTag ); } - if( !lanServiceRecordFrom->iIfNetworks.IsNull() ) + if ( !clientServiceRecordCopy->iRecordName.IsNull() ) { - lanServiceRecordTo->iIfNetworks.SetL( lanServiceRecordFrom->iIfNetworks ); + origServiceRecord->iRecordName.SetL( clientServiceRecordCopy->iRecordName ); } - if( !lanServiceRecordFrom->iIpNetmask.IsNull() ) + if ( !clientServiceRecordCopy->iServiceEnableLlmnr.IsNull() ) { - lanServiceRecordTo->iIpNetmask.SetL( lanServiceRecordFrom->iIpNetmask ); + origServiceRecord->iServiceEnableLlmnr.SetL( clientServiceRecordCopy->iServiceEnableLlmnr ); } - if( !lanServiceRecordFrom->iIpGateway.IsNull() ) + if ( !clientServiceRecordCopy->iIfNetworks.IsNull() ) { - lanServiceRecordTo->iIpGateway.SetL( lanServiceRecordFrom->iIpGateway ); + origServiceRecord->iIfNetworks.SetL( clientServiceRecordCopy->iIfNetworks ); + } + if ( !clientServiceRecordCopy->iIpNetmask.IsNull() ) + { + origServiceRecord->iIpNetmask.SetL( clientServiceRecordCopy->iIpNetmask ); } - if( !lanServiceRecordFrom->iIpAddrFromServer.IsNull() ) + if ( !clientServiceRecordCopy->iIpGateway.IsNull() ) { - lanServiceRecordTo->iIpAddrFromServer.SetL( lanServiceRecordFrom->iIpAddrFromServer ); + origServiceRecord->iIpGateway.SetL( clientServiceRecordCopy->iIpGateway ); } - if( !lanServiceRecordFrom->iIpAddr.IsNull() ) + if ( !clientServiceRecordCopy->iIpAddrFromServer.IsNull() ) { - lanServiceRecordTo->iIpAddr.SetL( lanServiceRecordFrom->iIpAddr ); + origServiceRecord->iIpAddrFromServer.SetL( clientServiceRecordCopy->iIpAddrFromServer ); } - if( !lanServiceRecordFrom->iIpDnsAddrFromServer.IsNull() ) + if ( !clientServiceRecordCopy->iIpAddr.IsNull() ) + { + origServiceRecord->iIpAddr.SetL( clientServiceRecordCopy->iIpAddr ); + } + if ( !clientServiceRecordCopy->iIpDnsAddrFromServer.IsNull() ) { - lanServiceRecordTo->iIpDnsAddrFromServer.SetL( lanServiceRecordFrom->iIpDnsAddrFromServer ); + origServiceRecord->iIpDnsAddrFromServer.SetL( clientServiceRecordCopy->iIpDnsAddrFromServer ); } - if( !lanServiceRecordFrom->iIpNameServer1.IsNull() ) + if ( !clientServiceRecordCopy->iIpNameServer1.IsNull() ) { - lanServiceRecordTo->iIpNameServer1.SetL( lanServiceRecordFrom->iIpNameServer1 ); + origServiceRecord->iIpNameServer1.SetL( clientServiceRecordCopy->iIpNameServer1 ); } - if( !lanServiceRecordFrom->iIpNameServer2.IsNull() ) + if ( !clientServiceRecordCopy->iIpNameServer2.IsNull() ) { - lanServiceRecordTo->iIpNameServer2.SetL( lanServiceRecordFrom->iIpNameServer2 ); + origServiceRecord->iIpNameServer2.SetL( clientServiceRecordCopy->iIpNameServer2 ); } - if( !lanServiceRecordFrom->iIp6DnsAddrFromServer.IsNull() ) + if ( !clientServiceRecordCopy->iIp6DnsAddrFromServer.IsNull() ) { - lanServiceRecordTo->iIp6DnsAddrFromServer.SetL( lanServiceRecordFrom->iIp6DnsAddrFromServer ); + origServiceRecord->iIp6DnsAddrFromServer.SetL( clientServiceRecordCopy->iIp6DnsAddrFromServer ); } - if( !lanServiceRecordFrom->iIp6NameServer1.IsNull() ) + if ( !clientServiceRecordCopy->iIp6NameServer1.IsNull() ) { - lanServiceRecordTo->iIp6NameServer1.SetL( lanServiceRecordFrom->iIp6NameServer1 ); + origServiceRecord->iIp6NameServer1.SetL( clientServiceRecordCopy->iIp6NameServer1 ); + } + if ( !clientServiceRecordCopy->iIp6NameServer2.IsNull() ) + { + origServiceRecord->iIp6NameServer2.SetL( clientServiceRecordCopy->iIp6NameServer2 ); } - if( !lanServiceRecordFrom->iIp6NameServer2.IsNull() ) + if ( !clientServiceRecordCopy->iIpAddrLeaseValidFrom.IsNull() ) { - lanServiceRecordTo->iIp6NameServer2.SetL( lanServiceRecordFrom->iIp6NameServer2 ); + origServiceRecord->iIpAddrLeaseValidFrom.SetL( clientServiceRecordCopy->iIpAddrLeaseValidFrom ); } - if( !lanServiceRecordFrom->iIpAddrLeaseValidFrom.IsNull() ) + if ( !clientServiceRecordCopy->iIpAddrLeaseValidTo.IsNull() ) { - lanServiceRecordTo->iIpAddrLeaseValidFrom.SetL( lanServiceRecordFrom->iIpAddrLeaseValidFrom ); + origServiceRecord->iIpAddrLeaseValidTo.SetL( clientServiceRecordCopy->iIpAddrLeaseValidTo ); } - if( !lanServiceRecordFrom->iIpAddrLeaseValidTo.IsNull() ) + if ( !clientServiceRecordCopy->iConfigDaemonManagerName.IsNull() ) { - lanServiceRecordTo->iIpAddrLeaseValidTo.SetL( lanServiceRecordFrom->iIpAddrLeaseValidTo ); + origServiceRecord->iConfigDaemonManagerName.SetL( clientServiceRecordCopy->iConfigDaemonManagerName ); } - if( !lanServiceRecordFrom->iConfigDaemonManagerName.IsNull() ) + if ( !clientServiceRecordCopy->iConfigDaemonName.IsNull() ) { - lanServiceRecordTo->iConfigDaemonManagerName.SetL( lanServiceRecordFrom->iConfigDaemonManagerName ); + origServiceRecord->iConfigDaemonName.SetL( clientServiceRecordCopy->iConfigDaemonName ); } - if( !lanServiceRecordFrom->iConfigDaemonName.IsNull() ) + if ( !clientServiceRecordCopy->iServiceExtensionTableName.IsNull() ) { - lanServiceRecordTo->iConfigDaemonName.SetL( lanServiceRecordFrom->iConfigDaemonName ); + origServiceRecord->iServiceExtensionTableName.SetL( clientServiceRecordCopy->iServiceExtensionTableName ); + } + if ( !clientServiceRecordCopy->iServiceExtensionTableRecordId.IsNull() ) + { + origServiceRecord->iServiceExtensionTableRecordId.SetL( clientServiceRecordCopy->iServiceExtensionTableRecordId ); //TODO, check this works ok. } - lanServiceRecordTo->SetElementId( lanServiceRecordFrom->ElementId() ); + origServiceRecord->SetElementId( clientServiceRecordCopy->ElementId() ); - if ( !ServiceRecord().RecordId() ) + if ( !origServiceRecord->RecordId() ) { - ServiceRecord().SetRecordId( KCDNewRecordRequest ); - ServiceRecord().StoreL( iSession ); + origServiceRecord->SetRecordId( KCDNewRecordRequest ); + origServiceRecord->StoreL( iSession ); - // Update needed values to record tables too( lanservice and wlanservice ) - lanServiceRecordFrom->SetElementId( ServiceRecord().ElementId() ); + // Update received element ID to client's copy too. + clientServiceRecordCopy->SetElementId( origServiceRecord->ElementId() ); } else { - ServiceRecord().ModifyL( iSession ); + origServiceRecord->ModifyL( iSession ); } OstTraceFunctionExit0( CCMPLUGINLAN_UPDATESERVICERECORDL_EXIT ); @@ -709,6 +836,18 @@ retVal = KDefaultPriorityLAN; } break; + case ELanServiceExtensionTableRecordId: + { + if ( !serviceRecord->iServiceExtensionTableRecordId.IsNull() ) + { + retVal = serviceRecord->iServiceExtensionTableRecordId.RecordId(); + } + else + { + retVal = 0; + } + } + break; default: { User::Leave( KErrNotSupported ); @@ -808,117 +947,78 @@ case ECmIFNetworks: case ELanIfNetworks: { - if ( !serviceRecord->iIfNetworks.IsNull() ) - { - retVal = TPtrC( serviceRecord->iIfNetworks ).AllocL(); - } + retVal = TPtrC( serviceRecord->iIfNetworks ).AllocL(); } break; case ECmIPNetmask: case ELanIpNetMask: { - if ( !serviceRecord->iIpNetmask.IsNull() ) - { - retVal = TPtrC( serviceRecord->iIpNetmask ).AllocL(); - } + retVal = TPtrC( serviceRecord->iIpNetmask ).AllocL(); } break; case ECmIPGateway: case ELanIpGateway: { - if ( !serviceRecord->iIpGateway.IsNull() ) - { - retVal = TPtrC( serviceRecord->iIpGateway ).AllocL(); - } + retVal = TPtrC( serviceRecord->iIpGateway ).AllocL(); } break; case ECmIPAddress: case ELanIpAddr: { - if ( !serviceRecord->iIpAddr.IsNull() ) - { - retVal = TPtrC( serviceRecord->iIpAddr ).AllocL(); - } + retVal = TPtrC( serviceRecord->iIpAddr ).AllocL(); } break; case ECmIPNameServer1: case ELanIpNameServer1: { - if ( !serviceRecord->iIpNameServer1.IsNull() ) - { - retVal = TPtrC( serviceRecord->iIpNameServer1 ).AllocL(); - } + retVal = TPtrC( serviceRecord->iIpNameServer1 ).AllocL(); } break; case ECmIPNameServer2: case ELanIpNameServer2: { - if ( !serviceRecord->iIpNameServer2.IsNull() ) - { - retVal = TPtrC( serviceRecord->iIpNameServer2 ).AllocL(); - } + retVal = TPtrC( serviceRecord->iIpNameServer2 ).AllocL(); } break; case ECmIP6NameServer1: case ELanIp6NameServer1: { - if ( !serviceRecord->iIp6NameServer1.IsNull() ) - { - retVal = TPtrC( serviceRecord->iIp6NameServer1 ).AllocL(); - } + retVal = TPtrC( serviceRecord->iIp6NameServer1 ).AllocL(); } break; case ECmIP6NameServer2: case ELanIp6NameServer2: { - if ( !serviceRecord->iIp6NameServer2.IsNull() ) - { - retVal = TPtrC( serviceRecord->iIp6NameServer2 ).AllocL(); - } + retVal = TPtrC( serviceRecord->iIp6NameServer2 ).AllocL(); } break; case ECmIPAddrLeaseValidFrom: case ELanIpAddrLeaseValidFrom: { - if ( !serviceRecord->iIpAddrLeaseValidFrom.IsNull() ) - { - retVal = TPtrC( serviceRecord->iIpAddrLeaseValidFrom ).AllocL(); - } + retVal = TPtrC( serviceRecord->iIpAddrLeaseValidFrom ).AllocL(); } break; case ECmIPAddrLeaseValidTo: case ELanIpAddrLeaseValidTo: { - if ( !serviceRecord->iIpAddrLeaseValidTo.IsNull() ) - { - retVal = TPtrC( serviceRecord->iIpAddrLeaseValidTo ).AllocL(); - } + retVal = TPtrC( serviceRecord->iIpAddrLeaseValidTo ).AllocL(); } break; case ECmConfigDaemonManagerName: case ELanConfigDaemonManagerName: { - if ( !serviceRecord->iConfigDaemonManagerName.IsNull() ) - { - retVal = TPtrC( serviceRecord->iConfigDaemonManagerName ).AllocL(); - } + retVal = TPtrC( serviceRecord->iConfigDaemonManagerName ).AllocL(); } break; case ECmConfigDaemonName: case ELanConfigDaemonName: { - if ( !serviceRecord->iConfigDaemonName.IsNull() ) - { - retVal = TPtrC( serviceRecord->iConfigDaemonName ).AllocL(); - } + retVal = TPtrC( serviceRecord->iConfigDaemonName ).AllocL(); } break; case ELanServiceExtensionTableName: { - if ( !serviceRecord->iServiceExtensionTableName.IsNull() ) - { - retVal = TPtrC( serviceRecord->iServiceExtensionTableName ).AllocL(); - } + retVal = TPtrC( serviceRecord->iServiceExtensionTableName ).AllocL(); } break; default: @@ -964,12 +1064,15 @@ // void CCmPluginLan::SetBearerIntAttributeL( TUint32 aAttribute, - TUint32 /*aValue*/, - RPointerArray& /*aGenRecordArray*/, + TUint32 aValue, + RPointerArray& aGenRecordArray, RPointerArray& /*aBearerSpecRecordArray*/ ) { OstTraceFunctionEntry0( CCMPLUGINLAN_SETBEARERINTATTRIBUTEL_ENTRY ); + CCDLANServiceRecord* serviceRecord = + static_cast( aGenRecordArray[KServiceRecordIndex] ); + switch ( aAttribute ) { case ECmExtensionLevel: @@ -980,6 +1083,11 @@ User::Leave( KErrArgument ); } break; + case ELanServiceExtensionTableRecordId: + { + serviceRecord->iServiceExtensionTableRecordId = aValue; + } + break; default: { User::Leave( KErrNotSupported ); diff -r 9c97ad6591ae -r 860702281757 cmmanager/cmmgr/cmmplugins/cmpluginpacketdata/src/cmpluginpacketdata.cpp --- a/cmmanager/cmmgr/cmmplugins/cmpluginpacketdata/src/cmpluginpacketdata.cpp Mon May 03 12:53:07 2010 +0300 +++ b/cmmanager/cmmgr/cmmplugins/cmpluginpacketdata/src/cmpluginpacketdata.cpp Thu May 13 23:10:21 2010 +0300 @@ -778,214 +778,221 @@ { OstTraceFunctionEntry0( CCMPLUGINPACKETDATA_UPDATESERVICERECORDL_ENTRY ); - // Delete the original record and create a copy from the parameter + // Delete the original record and create a copy from the parameter. delete iServiceRecord; iServiceRecord = NULL; - CCDWCDMAPacketServiceRecord* serviceRecord = - static_cast( aGenRecordArray[KServiceRecordIndex] ); - if ( iOutgoing ) { - iServiceRecord = static_cast( + iServiceRecord = static_cast( CCDRecordBase::RecordFactoryL( KCDTIdOutgoingGprsRecord ) ); } else { - iServiceRecord = static_cast( + iServiceRecord = static_cast( CCDRecordBase::RecordFactoryL( KCDTIdIncomingGprsRecord ) ); } CCDWCDMAPacketServiceRecord* origServiceRecord = static_cast( iServiceRecord ); - iServiceRecord->SetElementId( serviceRecord->ElementId() ); - iServiceRecord->iRecordName.SetL( serviceRecord->iRecordName ); - - if ( !serviceRecord->iServiceEnableLlmnr.IsNull() ) + // Client's copy of packet service record. + CCDWCDMAPacketServiceRecord* clientServiceRecordCopy = + static_cast( aGenRecordArray[KServiceRecordIndex] ); + + if ( !clientServiceRecordCopy->iRecordTag.IsNull() ) { - origServiceRecord->iServiceEnableLlmnr.SetL( serviceRecord->iServiceEnableLlmnr ); + origServiceRecord->iRecordTag.SetL( clientServiceRecordCopy->iRecordTag ); } - - if ( !serviceRecord->iGPRSAPN.IsNull() ) + if ( !clientServiceRecordCopy->iRecordName.IsNull() ) { - origServiceRecord->iGPRSAPN.SetL( serviceRecord->iGPRSAPN ); + origServiceRecord->iRecordName.SetL( clientServiceRecordCopy->iRecordName ); } - if ( !serviceRecord->iGPRSPDPType.IsNull() ) + + if ( !clientServiceRecordCopy->iServiceEnableLlmnr.IsNull() ) { - origServiceRecord->iGPRSPDPType.SetL( serviceRecord->iGPRSPDPType ); + origServiceRecord->iServiceEnableLlmnr.SetL( clientServiceRecordCopy->iServiceEnableLlmnr ); } - if ( !serviceRecord->iGPRSPDPAddress.IsNull() ) + + if ( !clientServiceRecordCopy->iGPRSAPN.IsNull() ) { - origServiceRecord->iGPRSPDPAddress.SetL( serviceRecord->iGPRSPDPAddress ); + origServiceRecord->iGPRSAPN.SetL( clientServiceRecordCopy->iGPRSAPN ); } - if ( !serviceRecord->iGPRSReqPrecedence.IsNull() ) + if ( !clientServiceRecordCopy->iGPRSPDPType.IsNull() ) { - origServiceRecord->iGPRSReqPrecedence.SetL( serviceRecord->iGPRSReqPrecedence ); + origServiceRecord->iGPRSPDPType.SetL( clientServiceRecordCopy->iGPRSPDPType ); } - if ( !serviceRecord->iGPRSReqDelay.IsNull() ) + if ( !clientServiceRecordCopy->iGPRSPDPAddress.IsNull() ) { - origServiceRecord->iGPRSReqDelay.SetL( serviceRecord->iGPRSReqDelay ); + origServiceRecord->iGPRSPDPAddress.SetL( clientServiceRecordCopy->iGPRSPDPAddress ); } - if ( !serviceRecord->iGPRSReqReliability.IsNull() ) + if ( !clientServiceRecordCopy->iGPRSReqPrecedence.IsNull() ) { - origServiceRecord->iGPRSReqReliability.SetL( serviceRecord->iGPRSReqReliability ); + origServiceRecord->iGPRSReqPrecedence.SetL( clientServiceRecordCopy->iGPRSReqPrecedence ); } - if ( !serviceRecord->iGPRSReqPeakThroughput.IsNull() ) + if ( !clientServiceRecordCopy->iGPRSReqDelay.IsNull() ) { - origServiceRecord->iGPRSReqPeakThroughput.SetL( serviceRecord->iGPRSReqPeakThroughput ); + origServiceRecord->iGPRSReqDelay.SetL( clientServiceRecordCopy->iGPRSReqDelay ); } - if ( !serviceRecord->iGPRSReqMeanThroughput.IsNull() ) + if ( !clientServiceRecordCopy->iGPRSReqReliability.IsNull() ) { - origServiceRecord->iGPRSReqMeanThroughput.SetL( serviceRecord->iGPRSReqMeanThroughput ); + origServiceRecord->iGPRSReqReliability.SetL( clientServiceRecordCopy->iGPRSReqReliability ); } - if ( !serviceRecord->iGPRSMinPrecedence.IsNull() ) + if ( !clientServiceRecordCopy->iGPRSReqPeakThroughput.IsNull() ) { - origServiceRecord->iGPRSMinPrecedence.SetL( serviceRecord->iGPRSMinPrecedence ); + origServiceRecord->iGPRSReqPeakThroughput.SetL( clientServiceRecordCopy->iGPRSReqPeakThroughput ); } - if ( !serviceRecord->iGPRSMinDelay.IsNull() ) + if ( !clientServiceRecordCopy->iGPRSReqMeanThroughput.IsNull() ) { - origServiceRecord->iGPRSMinDelay.SetL( serviceRecord->iGPRSMinDelay ); + origServiceRecord->iGPRSReqMeanThroughput.SetL( clientServiceRecordCopy->iGPRSReqMeanThroughput ); } - if ( !serviceRecord->iGPRSMinReliability.IsNull() ) + if ( !clientServiceRecordCopy->iGPRSMinPrecedence.IsNull() ) { - origServiceRecord->iGPRSMinReliability.SetL( serviceRecord->iGPRSMinReliability ); + origServiceRecord->iGPRSMinPrecedence.SetL( clientServiceRecordCopy->iGPRSMinPrecedence ); } - if ( !serviceRecord->iGPRSMinPeakThroughput.IsNull() ) + if ( !clientServiceRecordCopy->iGPRSMinDelay.IsNull() ) { - origServiceRecord->iGPRSMinPeakThroughput.SetL( serviceRecord->iGPRSMinPeakThroughput ); + origServiceRecord->iGPRSMinDelay.SetL( clientServiceRecordCopy->iGPRSMinDelay ); } - if ( !serviceRecord->iGPRSMinMeanThroughput.IsNull() ) + if ( !clientServiceRecordCopy->iGPRSMinReliability.IsNull() ) { - origServiceRecord->iGPRSMinMeanThroughput.SetL( serviceRecord->iGPRSMinMeanThroughput ); + origServiceRecord->iGPRSMinReliability.SetL( clientServiceRecordCopy->iGPRSMinReliability ); } - if ( !serviceRecord->iGPRSDataCompression.IsNull() ) + if ( !clientServiceRecordCopy->iGPRSMinPeakThroughput.IsNull() ) { - origServiceRecord->iGPRSDataCompression.SetL( serviceRecord->iGPRSDataCompression ); + origServiceRecord->iGPRSMinPeakThroughput.SetL( clientServiceRecordCopy->iGPRSMinPeakThroughput ); } - if ( !serviceRecord->iGPRSHeaderCompression.IsNull() ) + if ( !clientServiceRecordCopy->iGPRSMinMeanThroughput.IsNull() ) { - origServiceRecord->iGPRSHeaderCompression.SetL( serviceRecord->iGPRSHeaderCompression ); + origServiceRecord->iGPRSMinMeanThroughput.SetL( clientServiceRecordCopy->iGPRSMinMeanThroughput ); } - if ( !serviceRecord->iGPRSUseEdge.IsNull() ) + if ( !clientServiceRecordCopy->iGPRSDataCompression.IsNull() ) { - origServiceRecord->iGPRSUseEdge.SetL( serviceRecord->iGPRSUseEdge ); + origServiceRecord->iGPRSDataCompression.SetL( clientServiceRecordCopy->iGPRSDataCompression ); } - if ( !serviceRecord->iGPRSAnonymousAccess.IsNull() ) + if ( !clientServiceRecordCopy->iGPRSHeaderCompression.IsNull() ) { - origServiceRecord->iGPRSAnonymousAccess.SetL( serviceRecord->iGPRSAnonymousAccess ); + origServiceRecord->iGPRSHeaderCompression.SetL( clientServiceRecordCopy->iGPRSHeaderCompression ); } - if ( !serviceRecord->iGPRSIfParams.IsNull() ) + if ( !clientServiceRecordCopy->iGPRSUseEdge.IsNull() ) { - origServiceRecord->iGPRSIfParams.SetL( serviceRecord->iGPRSIfParams ); + origServiceRecord->iGPRSUseEdge.SetL( clientServiceRecordCopy->iGPRSUseEdge ); } - if ( !serviceRecord->iGPRSIfNetworks.IsNull() ) + if ( !clientServiceRecordCopy->iGPRSAnonymousAccess.IsNull() ) { - origServiceRecord->iGPRSIfNetworks.SetL( serviceRecord->iGPRSIfNetworks ); + origServiceRecord->iGPRSAnonymousAccess.SetL( clientServiceRecordCopy->iGPRSAnonymousAccess ); } - if ( !serviceRecord->iGPRSIfPromptForAuth.IsNull() ) + if ( !clientServiceRecordCopy->iGPRSIfParams.IsNull() ) { - origServiceRecord->iGPRSIfPromptForAuth.SetL( serviceRecord->iGPRSIfPromptForAuth ); + origServiceRecord->iGPRSIfParams.SetL( clientServiceRecordCopy->iGPRSIfParams ); } - if ( !serviceRecord->iGPRSIfAuthName.IsNull() ) + if ( !clientServiceRecordCopy->iGPRSIfNetworks.IsNull() ) { - origServiceRecord->iGPRSIfAuthName.SetL( serviceRecord->iGPRSIfAuthName ); + origServiceRecord->iGPRSIfNetworks.SetL( clientServiceRecordCopy->iGPRSIfNetworks ); } - if ( !serviceRecord->iGPRSIfAuthPass.IsNull() ) + if ( !clientServiceRecordCopy->iGPRSIfPromptForAuth.IsNull() ) { - origServiceRecord->iGPRSIfAuthPass.SetL( serviceRecord->iGPRSIfAuthPass ); + origServiceRecord->iGPRSIfPromptForAuth.SetL( clientServiceRecordCopy->iGPRSIfPromptForAuth ); } - if ( !serviceRecord->iGPRSIfAuthRetries.IsNull() ) + if ( !clientServiceRecordCopy->iGPRSIfAuthName.IsNull() ) { - origServiceRecord->iGPRSIfAuthRetries.SetL( serviceRecord->iGPRSIfAuthRetries ); + origServiceRecord->iGPRSIfAuthName.SetL( clientServiceRecordCopy->iGPRSIfAuthName ); } - if ( !serviceRecord->iGPRSIPNetMask.IsNull() ) + if ( !clientServiceRecordCopy->iGPRSIfAuthPass.IsNull() ) { - origServiceRecord->iGPRSIPNetMask.SetL( serviceRecord->iGPRSIPNetMask ); + origServiceRecord->iGPRSIfAuthPass.SetL( clientServiceRecordCopy->iGPRSIfAuthPass ); } - if ( !serviceRecord->iGPRSIPGateway.IsNull() ) + if ( !clientServiceRecordCopy->iGPRSIfAuthRetries.IsNull() ) { - origServiceRecord->iGPRSIPGateway.SetL( serviceRecord->iGPRSIPGateway ); + origServiceRecord->iGPRSIfAuthRetries.SetL( clientServiceRecordCopy->iGPRSIfAuthRetries ); } - if ( !serviceRecord->iGPRSIPAddrFromServer.IsNull() ) + if ( !clientServiceRecordCopy->iGPRSIPNetMask.IsNull() ) { - origServiceRecord->iGPRSIPAddrFromServer.SetL( serviceRecord->iGPRSIPAddrFromServer ); + origServiceRecord->iGPRSIPNetMask.SetL( clientServiceRecordCopy->iGPRSIPNetMask ); } - if ( !serviceRecord->iGPRSIPAddr.IsNull() ) + if ( !clientServiceRecordCopy->iGPRSIPGateway.IsNull() ) { - origServiceRecord->iGPRSIPAddr.SetL( serviceRecord->iGPRSIPAddr ); + origServiceRecord->iGPRSIPGateway.SetL( clientServiceRecordCopy->iGPRSIPGateway ); } - if ( !serviceRecord->iGPRSIPDNSAddrFromServer.IsNull() ) + if ( !clientServiceRecordCopy->iGPRSIPAddrFromServer.IsNull() ) { - origServiceRecord->iGPRSIPDNSAddrFromServer.SetL( serviceRecord->iGPRSIPDNSAddrFromServer ); + origServiceRecord->iGPRSIPAddrFromServer.SetL( clientServiceRecordCopy->iGPRSIPAddrFromServer ); } - if ( !serviceRecord->iGPRSIPNameServer1.IsNull() ) + if ( !clientServiceRecordCopy->iGPRSIPAddr.IsNull() ) { - origServiceRecord->iGPRSIPNameServer1.SetL( serviceRecord->iGPRSIPNameServer1 ); + origServiceRecord->iGPRSIPAddr.SetL( clientServiceRecordCopy->iGPRSIPAddr ); } - if ( !serviceRecord->iGPRSIPNameServer2.IsNull() ) + if ( !clientServiceRecordCopy->iGPRSIPDNSAddrFromServer.IsNull() ) { - origServiceRecord->iGPRSIPNameServer2.SetL( serviceRecord->iGPRSIPNameServer2 ); + origServiceRecord->iGPRSIPDNSAddrFromServer.SetL( clientServiceRecordCopy->iGPRSIPDNSAddrFromServer ); } - if ( !serviceRecord->iGPRSIP6DNSAddrFromServer.IsNull() ) + if ( !clientServiceRecordCopy->iGPRSIPNameServer1.IsNull() ) { - origServiceRecord->iGPRSIP6DNSAddrFromServer.SetL( serviceRecord->iGPRSIP6DNSAddrFromServer ); + origServiceRecord->iGPRSIPNameServer1.SetL( clientServiceRecordCopy->iGPRSIPNameServer1 ); } - if ( !serviceRecord->iGPRSIP6NameServer1.IsNull() ) + if ( !clientServiceRecordCopy->iGPRSIPNameServer2.IsNull() ) { - origServiceRecord->iGPRSIP6NameServer1.SetL( serviceRecord->iGPRSIP6NameServer1 ); + origServiceRecord->iGPRSIPNameServer2.SetL( clientServiceRecordCopy->iGPRSIPNameServer2 ); } - if ( !serviceRecord->iGPRSIP6NameServer2.IsNull() ) + if ( !clientServiceRecordCopy->iGPRSIP6DNSAddrFromServer.IsNull() ) { - origServiceRecord->iGPRSIP6NameServer2.SetL( serviceRecord->iGPRSIP6NameServer2 ); + origServiceRecord->iGPRSIP6DNSAddrFromServer.SetL( clientServiceRecordCopy->iGPRSIP6DNSAddrFromServer ); + } + if ( !clientServiceRecordCopy->iGPRSIP6NameServer1.IsNull() ) + { + origServiceRecord->iGPRSIP6NameServer1.SetL( clientServiceRecordCopy->iGPRSIP6NameServer1 ); } - if ( !serviceRecord->iGPRSIPAddrLeaseValidFrom.IsNull() ) + if ( !clientServiceRecordCopy->iGPRSIP6NameServer2.IsNull() ) { - origServiceRecord->iGPRSIPAddrLeaseValidFrom.SetL( serviceRecord->iGPRSIPAddrLeaseValidFrom ); + origServiceRecord->iGPRSIP6NameServer2.SetL( clientServiceRecordCopy->iGPRSIP6NameServer2 ); } - if ( !serviceRecord->iGPRSIPAddrLeaseValidTo.IsNull() ) + if ( !clientServiceRecordCopy->iGPRSIPAddrLeaseValidFrom.IsNull() ) { - origServiceRecord->iGPRSIPAddrLeaseValidTo.SetL( serviceRecord->iGPRSIPAddrLeaseValidTo ); + origServiceRecord->iGPRSIPAddrLeaseValidFrom.SetL( clientServiceRecordCopy->iGPRSIPAddrLeaseValidFrom ); } - if ( !serviceRecord->iGPRSConfigDaemonManagerName.IsNull() ) + if ( !clientServiceRecordCopy->iGPRSIPAddrLeaseValidTo.IsNull() ) { - origServiceRecord->iGPRSConfigDaemonManagerName.SetL( serviceRecord->iGPRSConfigDaemonManagerName ); + origServiceRecord->iGPRSIPAddrLeaseValidTo.SetL( clientServiceRecordCopy->iGPRSIPAddrLeaseValidTo ); } - if ( !serviceRecord->iGPRSConfigDaemonName.IsNull() ) + if ( !clientServiceRecordCopy->iGPRSConfigDaemonManagerName.IsNull() ) { - origServiceRecord->iGPRSConfigDaemonName.SetL( serviceRecord->iGPRSConfigDaemonName ); + origServiceRecord->iGPRSConfigDaemonManagerName.SetL( clientServiceRecordCopy->iGPRSConfigDaemonManagerName ); } - if ( !serviceRecord->iGPRSEnableLCPExtension.IsNull() ) + if ( !clientServiceRecordCopy->iGPRSConfigDaemonName.IsNull() ) { - origServiceRecord->iGPRSEnableLCPExtension.SetL( serviceRecord->iGPRSEnableLCPExtension ); + origServiceRecord->iGPRSConfigDaemonName.SetL( clientServiceRecordCopy->iGPRSConfigDaemonName ); } - if ( !serviceRecord->iGPRSDisablePlainTextAuth.IsNull() ) + if ( !clientServiceRecordCopy->iGPRSEnableLCPExtension.IsNull() ) { - origServiceRecord->iGPRSDisablePlainTextAuth.SetL( serviceRecord->iGPRSDisablePlainTextAuth ); + origServiceRecord->iGPRSEnableLCPExtension.SetL( clientServiceRecordCopy->iGPRSEnableLCPExtension ); } - if ( !serviceRecord->iGPRSAPType.IsNull() ) + if ( !clientServiceRecordCopy->iGPRSDisablePlainTextAuth.IsNull() ) { - origServiceRecord->iGPRSAPType.SetL( serviceRecord->iGPRSAPType ); + origServiceRecord->iGPRSDisablePlainTextAuth.SetL( clientServiceRecordCopy->iGPRSDisablePlainTextAuth ); } - if ( !serviceRecord->iGPRSQOSWarningTimeOut.IsNull() ) + if ( !clientServiceRecordCopy->iGPRSAPType.IsNull() ) { - origServiceRecord->iGPRSQOSWarningTimeOut.SetL( serviceRecord->iGPRSQOSWarningTimeOut ); + origServiceRecord->iGPRSAPType.SetL( clientServiceRecordCopy->iGPRSAPType ); } - if ( !serviceRecord->iGPRSR5DataCompression.IsNull() ) + if ( !clientServiceRecordCopy->iGPRSQOSWarningTimeOut.IsNull() ) { - origServiceRecord->iGPRSR5DataCompression.SetL( serviceRecord->iGPRSR5DataCompression ); + origServiceRecord->iGPRSQOSWarningTimeOut.SetL( clientServiceRecordCopy->iGPRSQOSWarningTimeOut ); } - if ( !serviceRecord->iGPRSR5HeaderCompression.IsNull() ) + if ( !clientServiceRecordCopy->iGPRSR5DataCompression.IsNull() ) { - origServiceRecord->iGPRSR5HeaderCompression.SetL( serviceRecord->iGPRSR5HeaderCompression ); + origServiceRecord->iGPRSR5DataCompression.SetL( clientServiceRecordCopy->iGPRSR5DataCompression ); } - if ( !serviceRecord->iGPRSPacketFlowIdentifier.IsNull() ) + if ( !clientServiceRecordCopy->iGPRSR5HeaderCompression.IsNull() ) { - origServiceRecord->iGPRSPacketFlowIdentifier.SetL( serviceRecord->iGPRSPacketFlowIdentifier ); + origServiceRecord->iGPRSR5HeaderCompression.SetL( clientServiceRecordCopy->iGPRSR5HeaderCompression ); } - if ( !serviceRecord->iGPRSUmtsGprsRelease.IsNull() ) + if ( !clientServiceRecordCopy->iGPRSPacketFlowIdentifier.IsNull() ) { - origServiceRecord->iGPRSUmtsGprsRelease.SetL( serviceRecord->iGPRSUmtsGprsRelease ); + origServiceRecord->iGPRSPacketFlowIdentifier.SetL( clientServiceRecordCopy->iGPRSPacketFlowIdentifier ); + } + if ( !clientServiceRecordCopy->iGPRSUmtsGprsRelease.IsNull() ) + { + origServiceRecord->iGPRSUmtsGprsRelease.SetL( clientServiceRecordCopy->iGPRSUmtsGprsRelease ); } if ( iPacketDataQoSRecord ) @@ -993,15 +1000,19 @@ origServiceRecord->iUmtsR99QoSAndOnTable = iPacketDataQoSRecord->RecordId(); } - if ( !iServiceRecord->RecordId() ) + origServiceRecord->SetElementId( clientServiceRecordCopy->ElementId() ); + + if ( !origServiceRecord->RecordId() ) { - iServiceRecord->SetRecordId( KCDNewRecordRequest ); - iServiceRecord->StoreL( iSession ); - serviceRecord->SetElementId( iServiceRecord->ElementId() ); + origServiceRecord->SetRecordId( KCDNewRecordRequest ); + origServiceRecord->StoreL( iSession ); + + // Update received element ID to client's copy too. + clientServiceRecordCopy->SetElementId( origServiceRecord->ElementId() ); } else { - iServiceRecord->ModifyL( iSession ); + origServiceRecord->ModifyL( iSession ); } OstTraceFunctionExit0( CCMPLUGINPACKETDATA_UPDATESERVICERECORDL_EXIT ); @@ -1034,7 +1045,7 @@ iPacketDataQoSRecord->StoreL( iSession ); packetDataQoSRecord->SetElementId( iPacketDataQoSRecord->ElementId() ); - // Set service record to point to QoS record + // Set service record to point to QoS record. ServiceRecord().iUmtsR99QoSAndOnTable = iPacketDataQoSRecord->RecordId(); ServiceRecord().ModifyL( iSession ); @@ -1560,14 +1571,14 @@ // --------------------------------------------------------------------------- // TBool CCmPluginPacketData::GetBearerBoolAttributeL( TUint32 aAttribute, - RPointerArray& aGenRecordArray, - RPointerArray& aBearerSpecRecordArray ) + RPointerArray& aGenRecordArray, + RPointerArray& aBearerSpecRecordArray ) { OstTraceFunctionEntry0( CCMPLUGINPACKETDATA_GETBEARERBOOLATTRIBUTEL_ENTRY ); TBool retVal( EFalse ); - switch( aAttribute ) + switch ( aAttribute ) { case EPacketDataOutGoing: { @@ -1577,7 +1588,7 @@ case ECmCoverage: { #ifndef __WINS__ - CCmPDCoverageCheck* coverage = new (ELeave) CCmPDCoverageCheck; + CCmPDCoverageCheck* coverage = new( ELeave ) CCmPDCoverageCheck; CleanupStack::PushL( coverage ); retVal = coverage->IsThereCoverageL(); @@ -1605,86 +1616,86 @@ break; case EPacketDataDataCompression: { - retVal = static_cast - ( aGenRecordArray[KServiceRecordIndex] )->iGPRSDataCompression; + retVal = static_cast( + aGenRecordArray[KServiceRecordIndex] )->iGPRSDataCompression; } break; case EPacketDataHeaderCompression: { - retVal = static_cast - ( aGenRecordArray[KServiceRecordIndex] )->iGPRSHeaderCompression; + retVal = static_cast( + aGenRecordArray[KServiceRecordIndex] )->iGPRSHeaderCompression; } break; case EPacketDataUseEdge: { - retVal = static_cast - ( aGenRecordArray[KServiceRecordIndex] )->iGPRSUseEdge; + retVal = static_cast( + aGenRecordArray[KServiceRecordIndex] )->iGPRSUseEdge; } break; case EPacketDataAnonymousAccess: { - retVal = static_cast - ( aGenRecordArray[KServiceRecordIndex] )->iGPRSAnonymousAccess; + retVal = static_cast( + aGenRecordArray[KServiceRecordIndex] )->iGPRSAnonymousAccess; } break; case ECmIFPromptForAuth: case EPacketDataIFPromptForAuth: { - retVal = static_cast - ( aGenRecordArray[KServiceRecordIndex] )->iGPRSIfPromptForAuth; + retVal = static_cast( + aGenRecordArray[KServiceRecordIndex] )->iGPRSIfPromptForAuth; } break; case ECmIPAddFromServer: case EPacketDataIPAddrFromServer: { - retVal = static_cast - ( aGenRecordArray[KServiceRecordIndex] )->iGPRSIPAddrFromServer; + retVal = static_cast( + aGenRecordArray[KServiceRecordIndex] )->iGPRSIPAddrFromServer; } break; case ECmIPDNSAddrFromServer: case EPacketDataIPDNSAddrFromServer: { - retVal = static_cast - ( aGenRecordArray[KServiceRecordIndex] )->iGPRSIPDNSAddrFromServer; + retVal = static_cast( + aGenRecordArray[KServiceRecordIndex] )->iGPRSIPDNSAddrFromServer; } break; case ECmIP6DNSAddrFromServer: case EPacketDataIPIP6DNSAddrFromServer: { - retVal = static_cast - ( aGenRecordArray[KServiceRecordIndex] )->iGPRSIP6DNSAddrFromServer; + retVal = static_cast( + aGenRecordArray[KServiceRecordIndex] )->iGPRSIP6DNSAddrFromServer; } break; case ECmEnableLPCExtension: case EPacketDataEnableLcpExtension: { - retVal = static_cast - ( aGenRecordArray[KServiceRecordIndex] )->iGPRSEnableLCPExtension; + retVal = static_cast( + aGenRecordArray[KServiceRecordIndex] )->iGPRSEnableLCPExtension; } break; case EPacketDataServiceEnableLLMNR: { - retVal = static_cast - ( aGenRecordArray[KServiceRecordIndex] )->iServiceEnableLlmnr; + retVal = static_cast( + aGenRecordArray[KServiceRecordIndex] )->iServiceEnableLlmnr; } break; case ECmDisablePlainTextAuth: case EPacketDataDisablePlainTextAuth: { - retVal = static_cast - ( aGenRecordArray[KServiceRecordIndex] )->iGPRSDisablePlainTextAuth; + retVal = static_cast( + aGenRecordArray[KServiceRecordIndex] )->iGPRSDisablePlainTextAuth; } break; case EGPRSSignallingIndication: { - retVal = static_cast - ( aBearerSpecRecordArray[KQosRecordIndex] )->iGPRSSignallingIndication; + retVal = static_cast( + aBearerSpecRecordArray[KQosRecordIndex] )->iGPRSSignallingIndication; } break; case EGPRS_ImCnSignallingIndication: { - retVal = static_cast - ( aBearerSpecRecordArray[KQosRecordIndex] )->iGPRS_ImCnSignallingIndication; + retVal = static_cast( + aBearerSpecRecordArray[KQosRecordIndex] )->iGPRS_ImCnSignallingIndication; } break; default: @@ -1695,7 +1706,6 @@ } OstTraceFunctionExit0( CCMPLUGINPACKETDATA_GETBEARERBOOLATTRIBUTEL_EXIT ); - return retVal; } @@ -1710,8 +1720,8 @@ OstTraceFunctionEntry0( CCMPLUGINPACKETDATA_GETBEARERSTRINGATTRIBUTEL_ENTRY ); HBufC* retVal( NULL ); - if ( ( aAttribute > EPacketDataSpecificAttributes && aAttribute < EGPRSReqTrafficClass ) - || ( aAttribute > ECmCommonAttributesStart && aAttribute < ECmCommonAttributesEnd ) ) + if ( ( aAttribute > EPacketDataSpecificAttributes && aAttribute < EGPRSReqTrafficClass ) || + ( aAttribute > ECmCommonAttributesStart && aAttribute < ECmCommonAttributesEnd ) ) { retVal = GetServiceStringAttributeL( aAttribute, aGenRecordArray ); } @@ -1729,8 +1739,8 @@ // --------------------------------------------------------------------------- // HBufC* CCmPluginPacketData::GetServiceStringAttributeL( - TUint32 aAttribute, - RPointerArray& aGenRecordArray) + TUint32 aAttribute, + RPointerArray& aGenRecordArray ) { OstTraceFunctionEntry0( CCMPLUGINPACKETDATA_GETSERVICESTRINGATTRIBUTEL_ENTRY ); @@ -1738,158 +1748,107 @@ CCDWCDMAPacketServiceRecord* serviceRecord = static_cast( aGenRecordArray[KServiceRecordIndex] ); - switch( aAttribute ) + switch ( aAttribute ) { case ECmIFName: case EPacketDataAPName: { - if ( !serviceRecord->iGPRSAPN.IsNull() ) - { - retVal = TPtrC( serviceRecord->iGPRSAPN ).AllocL(); - } + retVal = TPtrC( serviceRecord->iGPRSAPN ).AllocL(); } break; case EPacketDataPDPAddress: { - if ( !serviceRecord->iGPRSPDPAddress.IsNull() ) - { - retVal = TPtrC( serviceRecord->iGPRSPDPAddress ).AllocL(); - } + retVal = TPtrC( serviceRecord->iGPRSPDPAddress ).AllocL(); } break; case ECmIFParams: case EPacketDataIFParams: { - if ( !serviceRecord->iGPRSIfParams.IsNull() ) - { - retVal = TPtrC( serviceRecord->iGPRSIfParams ).AllocL(); - } + retVal = TPtrC( serviceRecord->iGPRSIfParams ).AllocL(); } break; case ECmIFNetworks: case EPacketDataIFNetworks: { - if ( !serviceRecord->iGPRSIfNetworks.IsNull() ) - { - retVal = TPtrC( serviceRecord->iGPRSIfNetworks ).AllocL(); - } + retVal = TPtrC( serviceRecord->iGPRSIfNetworks ).AllocL(); } break; case ECmIFAuthName: case EPacketDataIFAuthName: { - if ( !serviceRecord->iGPRSIfAuthName.IsNull() ) - { - retVal = TPtrC( serviceRecord->iGPRSIfAuthName ).AllocL(); - } + retVal = TPtrC( serviceRecord->iGPRSIfAuthName ).AllocL(); } break; case ECmIFAuthPass: case EPacketDataIFAuthPass: { - if ( !serviceRecord->iGPRSIfAuthPass.IsNull() ) - { - retVal = TPtrC( serviceRecord->iGPRSIfAuthPass ).AllocL(); - } + retVal = TPtrC( serviceRecord->iGPRSIfAuthPass ).AllocL(); } break; case ECmIPNetmask: case EPacketDataIPNetmask: { - if ( !serviceRecord->iGPRSIPNetMask.IsNull() ) - { - retVal = TPtrC( serviceRecord->iGPRSIPNetMask ).AllocL(); - } + retVal = TPtrC( serviceRecord->iGPRSIPNetMask ).AllocL(); } break; case ECmIPGateway: case EPacketDataIPGateway: { - if ( !serviceRecord->iGPRSIPGateway.IsNull() ) - { - retVal = TPtrC( serviceRecord->iGPRSIPGateway ).AllocL(); - } + retVal = TPtrC( serviceRecord->iGPRSIPGateway ).AllocL(); } break; case ECmIPAddress: case EPacketDataIPAddr: { - if ( !serviceRecord->iGPRSIPAddr.IsNull() ) - { - retVal = TPtrC( serviceRecord->iGPRSIPAddr ).AllocL(); - } + retVal = TPtrC( serviceRecord->iGPRSIPAddr ).AllocL(); } break; case ECmIPNameServer1: case EPacketDataIPNameServer1: { - if ( !serviceRecord->iGPRSIPNameServer1.IsNull() ) - { - retVal = TPtrC( serviceRecord->iGPRSIPNameServer1 ).AllocL(); - } + retVal = TPtrC( serviceRecord->iGPRSIPNameServer1 ).AllocL(); } break; case ECmIPNameServer2: case EPacketDataIPNameServer2: { - if ( !serviceRecord->iGPRSIPNameServer2.IsNull() ) - { - retVal = TPtrC( serviceRecord->iGPRSIPNameServer2 ).AllocL(); - } + retVal = TPtrC( serviceRecord->iGPRSIPNameServer2 ).AllocL(); } break; case ECmIP6NameServer1: case EPacketDataIPIP6NameServer1: { - if ( !serviceRecord->iGPRSIP6NameServer1.IsNull() ) - { - retVal = TPtrC( serviceRecord->iGPRSIP6NameServer1 ).AllocL(); - } + retVal = TPtrC( serviceRecord->iGPRSIP6NameServer1 ).AllocL(); } break; case ECmIP6NameServer2: case EPacketDataIPIP6NameServer2: { - if ( !serviceRecord->iGPRSIP6NameServer2.IsNull() ) - { - retVal = TPtrC( serviceRecord->iGPRSIP6NameServer2 ).AllocL(); - } + retVal = TPtrC( serviceRecord->iGPRSIP6NameServer2 ).AllocL(); } break; case ECmIPAddrLeaseValidFrom: case EPacketDataIPAddrLeaseValidFrom: { - if ( !serviceRecord->iGPRSIPAddrLeaseValidFrom.IsNull() ) - { - retVal = TPtrC( serviceRecord->iGPRSIPAddrLeaseValidFrom ).AllocL(); - } + retVal = TPtrC( serviceRecord->iGPRSIPAddrLeaseValidFrom ).AllocL(); } break; case ECmIPAddrLeaseValidTo: case EPacketDataIPAddrLeaseValidTo: { - if ( !serviceRecord->iGPRSIPAddrLeaseValidTo.IsNull() ) - { - retVal = TPtrC( serviceRecord->iGPRSIPAddrLeaseValidTo ).AllocL(); - } + retVal = TPtrC( serviceRecord->iGPRSIPAddrLeaseValidTo ).AllocL(); } break; case ECmConfigDaemonManagerName: case EPacketDataConfigDaemonManagerName: { - if ( !serviceRecord->iGPRSConfigDaemonManagerName.IsNull() ) - { - retVal = TPtrC( serviceRecord->iGPRSConfigDaemonManagerName ).AllocL(); - } + retVal = TPtrC( serviceRecord->iGPRSConfigDaemonManagerName ).AllocL(); } break; case ECmConfigDaemonName: case EPacketDataConfigDaemonName: { - if ( !serviceRecord->iGPRSConfigDaemonName.IsNull() ) - { - retVal = TPtrC( serviceRecord->iGPRSConfigDaemonName ).AllocL(); - } + retVal = TPtrC( serviceRecord->iGPRSConfigDaemonName ).AllocL(); } break; @@ -1901,7 +1860,6 @@ } OstTraceFunctionExit0( CCMPLUGINPACKETDATA_GETSERVICESTRINGATTRIBUTEL_EXIT ); - return retVal; } @@ -1910,15 +1868,14 @@ // --------------------------------------------------------------------------- // HBufC8* CCmPluginPacketData::GetBearerString8AttributeL( TUint32 /*aAttribute*/, - RPointerArray& /*aGenRecordArray*/, - RPointerArray& /*aBearerSpecRecordArray*/ ) + RPointerArray& /*aGenRecordArray*/, + RPointerArray& /*aBearerSpecRecordArray*/ ) { OstTraceFunctionEntry0( CCMPLUGINPACKETDATA_GETBEARERSTRING8ATTRIBUTEL_ENTRY ); User::Leave( KErrNotSupported ); OstTraceFunctionExit0( CCMPLUGINPACKETDATA_GETBEARERSTRING8ATTRIBUTEL_EXIT ); - return NULL; } @@ -1926,9 +1883,11 @@ // CCmPluginPacketData::SetBearerIntAttributeL // --------------------------------------------------------------------------- // -void CCmPluginPacketData::SetBearerIntAttributeL( TUint32 aAttribute, TUint32 aValue, - RPointerArray& aGenRecordArray, - RPointerArray& aBearerSpecRecordArray ) +void CCmPluginPacketData::SetBearerIntAttributeL( + TUint32 aAttribute, + TUint32 aValue, + RPointerArray& aGenRecordArray, + RPointerArray& aBearerSpecRecordArray ) { OstTraceFunctionEntry0( CCMPLUGINPACKETDATA_SETBEARERINTATTRIBUTEL_ENTRY ); @@ -1944,6 +1903,7 @@ { User::Leave( KErrNotFound ); } + OstTraceFunctionExit0( CCMPLUGINPACKETDATA_SETBEARERINTATTRIBUTEL_EXIT ); } @@ -2240,7 +2200,7 @@ CCDWCDMAPacketServiceRecord* serviceRecord = static_cast( aGenRecordArray[KServiceRecordIndex] ); - switch( aAttribute ) + switch ( aAttribute ) { case EPacketDataOutGoing: { @@ -2520,7 +2480,7 @@ OstTraceFunctionEntry0( CCMPLUGINPACKETDATA_GETBEARERINFOINTL_ENTRY ); TUint32 retVal( 0 ); - switch( aAttribute ) + switch ( aAttribute ) { case ECmBearerType: { @@ -2566,7 +2526,7 @@ OstTraceFunctionEntry0( CCMPLUGINPACKETDATA_GETBEARERINFOBOOLL_ENTRY ); TBool retVal( EFalse ); - switch( aAttribute ) + switch ( aAttribute ) { case ECmCoverage: { @@ -2625,7 +2585,7 @@ OstTraceFunctionEntry0( CCMPLUGINPACKETDATA_GETBEARERINFOSTRINGL_ENTRY ); HBufC* retVal( NULL ); - switch( aAttribute ) + switch ( aAttribute ) { default: { @@ -2648,18 +2608,16 @@ OstTraceFunctionEntry0( CCMPLUGINPACKETDATA_GETBEARERINFOSTRING8L_ENTRY ); HBufC8* retVal( NULL ); - switch( aAttribute ) + switch ( aAttribute ) { default: { - User::Leave( KErrNotSupported ); } - break; + break; } OstTraceFunctionExit0( CCMPLUGINPACKETDATA_GETBEARERINFOSTRING8L_EXIT ); - return retVal; } @@ -2672,7 +2630,6 @@ OstTraceFunctionEntry0( CCMPLUGINPACKETDATA_PREPARETOCOPYDATAL_ENTRY ); CCmPluginPacketData* plugin = static_cast( aCopyInstance ); - plugin->iOutgoing = iOutgoing; OstTraceFunctionExit0( CCMPLUGINPACKETDATA_PREPARETOCOPYDATAL_EXIT ); @@ -2686,216 +2643,273 @@ { OstTraceFunctionEntry0( CCMPLUGINPACKETDATA_COPYSERVICERECORDL_ENTRY ); - __ASSERT_ALWAYS( iServiceRecord != NULL, User::Leave( KErrNotFound )); - - CCDWCDMAPacketServiceRecord* origServiceRecord = - static_cast( iServiceRecord ); - - // New service record - CCDWCDMAPacketServiceRecord* serviceRecord = NULL; + // New service record to be returned. + CCDRecordBase* serviceRecord = NULL; if ( iOutgoing ) { - serviceRecord = static_cast( + serviceRecord = static_cast( CCDRecordBase::RecordFactoryL( KCDTIdOutgoingGprsRecord ) ); } else { - serviceRecord = static_cast( + serviceRecord = static_cast( CCDRecordBase::RecordFactoryL( KCDTIdIncomingGprsRecord ) ); } - CleanupStack::PushL( serviceRecord ); - serviceRecord->iRecordName.SetL( origServiceRecord->iRecordName ); + CCDWCDMAPacketServiceRecord* tempServiceRecordPtrToNew = + static_cast( serviceRecord ); + + // CommsDat version of service record. + CCDWCDMAPacketServiceRecord* origServiceRecord = + static_cast( iServiceRecord ); + + if ( !origServiceRecord->iRecordTag.IsNull() ) + { + tempServiceRecordPtrToNew->iRecordTag.SetL( + origServiceRecord->iRecordTag ); + } + if ( !origServiceRecord->iRecordName.IsNull() ) + { + tempServiceRecordPtrToNew->iRecordName.SetL( + origServiceRecord->iRecordName ); + } if ( !origServiceRecord->iServiceEnableLlmnr.IsNull() ) { - serviceRecord->iServiceEnableLlmnr.SetL( origServiceRecord->iServiceEnableLlmnr ); + tempServiceRecordPtrToNew->iServiceEnableLlmnr.SetL( + origServiceRecord->iServiceEnableLlmnr ); } if ( !origServiceRecord->iGPRSAPN.IsNull() ) { - serviceRecord->iGPRSAPN.SetL( origServiceRecord->iGPRSAPN ); + tempServiceRecordPtrToNew->iGPRSAPN.SetL( + origServiceRecord->iGPRSAPN ); } if ( !origServiceRecord->iGPRSPDPType.IsNull() ) { - serviceRecord->iGPRSPDPType.SetL( origServiceRecord->iGPRSPDPType ); + tempServiceRecordPtrToNew->iGPRSPDPType.SetL( + origServiceRecord->iGPRSPDPType ); } if ( !origServiceRecord->iGPRSPDPAddress.IsNull() ) { - serviceRecord->iGPRSPDPAddress.SetL( origServiceRecord->iGPRSPDPAddress ); + tempServiceRecordPtrToNew->iGPRSPDPAddress.SetL( + origServiceRecord->iGPRSPDPAddress ); } if ( !origServiceRecord->iGPRSReqPrecedence.IsNull() ) { - serviceRecord->iGPRSReqPrecedence.SetL( origServiceRecord->iGPRSReqPrecedence ); + tempServiceRecordPtrToNew->iGPRSReqPrecedence.SetL( + origServiceRecord->iGPRSReqPrecedence ); } if ( !origServiceRecord->iGPRSReqDelay.IsNull() ) { - serviceRecord->iGPRSReqDelay.SetL( origServiceRecord->iGPRSReqDelay ); + tempServiceRecordPtrToNew->iGPRSReqDelay.SetL( + origServiceRecord->iGPRSReqDelay ); } if ( !origServiceRecord->iGPRSReqReliability.IsNull() ) { - serviceRecord->iGPRSReqReliability.SetL( origServiceRecord->iGPRSReqReliability ); + tempServiceRecordPtrToNew->iGPRSReqReliability.SetL( + origServiceRecord->iGPRSReqReliability ); } if ( !origServiceRecord->iGPRSReqPeakThroughput.IsNull() ) { - serviceRecord->iGPRSReqPeakThroughput.SetL( origServiceRecord->iGPRSReqPeakThroughput ); + tempServiceRecordPtrToNew->iGPRSReqPeakThroughput.SetL( + origServiceRecord->iGPRSReqPeakThroughput ); } if ( !origServiceRecord->iGPRSReqMeanThroughput.IsNull() ) { - serviceRecord->iGPRSReqMeanThroughput.SetL( origServiceRecord->iGPRSReqMeanThroughput ); + tempServiceRecordPtrToNew->iGPRSReqMeanThroughput.SetL( + origServiceRecord->iGPRSReqMeanThroughput ); } if ( !origServiceRecord->iGPRSMinPrecedence.IsNull() ) { - serviceRecord->iGPRSMinPrecedence.SetL( origServiceRecord->iGPRSMinPrecedence ); + tempServiceRecordPtrToNew->iGPRSMinPrecedence.SetL( + origServiceRecord->iGPRSMinPrecedence ); } if ( !origServiceRecord->iGPRSMinDelay.IsNull() ) { - serviceRecord->iGPRSMinDelay.SetL( origServiceRecord->iGPRSMinDelay ); + tempServiceRecordPtrToNew->iGPRSMinDelay.SetL( + origServiceRecord->iGPRSMinDelay ); } if ( !origServiceRecord->iGPRSMinReliability.IsNull() ) { - serviceRecord->iGPRSMinReliability.SetL( origServiceRecord->iGPRSMinReliability ); + tempServiceRecordPtrToNew->iGPRSMinReliability.SetL( + origServiceRecord->iGPRSMinReliability ); } if ( !origServiceRecord->iGPRSMinPeakThroughput.IsNull() ) { - serviceRecord->iGPRSMinPeakThroughput.SetL( origServiceRecord->iGPRSMinPeakThroughput ); + tempServiceRecordPtrToNew->iGPRSMinPeakThroughput.SetL( + origServiceRecord->iGPRSMinPeakThroughput ); } if ( !origServiceRecord->iGPRSMinMeanThroughput.IsNull() ) { - serviceRecord->iGPRSMinMeanThroughput.SetL( origServiceRecord->iGPRSMinMeanThroughput ); + tempServiceRecordPtrToNew->iGPRSMinMeanThroughput.SetL( + origServiceRecord->iGPRSMinMeanThroughput ); } if ( !origServiceRecord->iGPRSDataCompression.IsNull() ) { - serviceRecord->iGPRSDataCompression.SetL( origServiceRecord->iGPRSDataCompression ); + tempServiceRecordPtrToNew->iGPRSDataCompression.SetL( + origServiceRecord->iGPRSDataCompression ); } if ( !origServiceRecord->iGPRSHeaderCompression.IsNull() ) { - serviceRecord->iGPRSHeaderCompression.SetL( origServiceRecord->iGPRSHeaderCompression ); + tempServiceRecordPtrToNew->iGPRSHeaderCompression.SetL( + origServiceRecord->iGPRSHeaderCompression ); } if ( !origServiceRecord->iGPRSUseEdge.IsNull() ) { - serviceRecord->iGPRSUseEdge.SetL( origServiceRecord->iGPRSUseEdge ); + tempServiceRecordPtrToNew->iGPRSUseEdge.SetL( + origServiceRecord->iGPRSUseEdge ); } if ( !origServiceRecord->iGPRSAnonymousAccess.IsNull() ) { - serviceRecord->iGPRSAnonymousAccess.SetL( origServiceRecord->iGPRSAnonymousAccess ); + tempServiceRecordPtrToNew->iGPRSAnonymousAccess.SetL( + origServiceRecord->iGPRSAnonymousAccess ); } if ( !origServiceRecord->iGPRSIfParams.IsNull() ) { - serviceRecord->iGPRSIfParams.SetL( origServiceRecord->iGPRSIfParams ); + tempServiceRecordPtrToNew->iGPRSIfParams.SetL( + origServiceRecord->iGPRSIfParams ); } if ( !origServiceRecord->iGPRSIfNetworks.IsNull() ) { - serviceRecord->iGPRSIfNetworks.SetL( origServiceRecord->iGPRSIfNetworks ); + tempServiceRecordPtrToNew->iGPRSIfNetworks.SetL( + origServiceRecord->iGPRSIfNetworks ); } if ( !origServiceRecord->iGPRSIfPromptForAuth.IsNull() ) { - serviceRecord->iGPRSIfPromptForAuth.SetL( origServiceRecord->iGPRSIfPromptForAuth ); + tempServiceRecordPtrToNew->iGPRSIfPromptForAuth.SetL( + origServiceRecord->iGPRSIfPromptForAuth ); } if ( !origServiceRecord->iGPRSIfAuthName.IsNull() ) { - serviceRecord->iGPRSIfAuthName.SetL( origServiceRecord->iGPRSIfAuthName ); + tempServiceRecordPtrToNew->iGPRSIfAuthName.SetL( + origServiceRecord->iGPRSIfAuthName ); } if ( !origServiceRecord->iGPRSIfAuthPass.IsNull() ) { - serviceRecord->iGPRSIfAuthPass.SetL( origServiceRecord->iGPRSIfAuthPass ); + tempServiceRecordPtrToNew->iGPRSIfAuthPass.SetL( + origServiceRecord->iGPRSIfAuthPass ); } if ( !origServiceRecord->iGPRSIfAuthRetries.IsNull() ) { - serviceRecord->iGPRSIfAuthRetries.SetL( origServiceRecord->iGPRSIfAuthRetries ); + tempServiceRecordPtrToNew->iGPRSIfAuthRetries.SetL( + origServiceRecord->iGPRSIfAuthRetries ); } if ( !origServiceRecord->iGPRSIPNetMask.IsNull() ) { - serviceRecord->iGPRSIPNetMask.SetL( origServiceRecord->iGPRSIPNetMask ); + tempServiceRecordPtrToNew->iGPRSIPNetMask.SetL( + origServiceRecord->iGPRSIPNetMask ); } if ( !origServiceRecord->iGPRSIPGateway.IsNull() ) { - serviceRecord->iGPRSIPGateway.SetL( origServiceRecord->iGPRSIPGateway ); + tempServiceRecordPtrToNew->iGPRSIPGateway.SetL( + origServiceRecord->iGPRSIPGateway ); } if ( !origServiceRecord->iGPRSIPAddrFromServer.IsNull() ) { - serviceRecord->iGPRSIPAddrFromServer.SetL( origServiceRecord->iGPRSIPAddrFromServer ); + tempServiceRecordPtrToNew->iGPRSIPAddrFromServer.SetL( + origServiceRecord->iGPRSIPAddrFromServer ); } if ( !origServiceRecord->iGPRSIPAddr.IsNull() ) { - serviceRecord->iGPRSIPAddr.SetL( origServiceRecord->iGPRSIPAddr ); + tempServiceRecordPtrToNew->iGPRSIPAddr.SetL( + origServiceRecord->iGPRSIPAddr ); } if ( !origServiceRecord->iGPRSIPDNSAddrFromServer.IsNull() ) { - serviceRecord->iGPRSIPDNSAddrFromServer.SetL( origServiceRecord->iGPRSIPDNSAddrFromServer ); + tempServiceRecordPtrToNew->iGPRSIPDNSAddrFromServer.SetL( + origServiceRecord->iGPRSIPDNSAddrFromServer ); } if ( !origServiceRecord->iGPRSIPNameServer1.IsNull() ) { - serviceRecord->iGPRSIPNameServer1.SetL( origServiceRecord->iGPRSIPNameServer1 ); + tempServiceRecordPtrToNew->iGPRSIPNameServer1.SetL( + origServiceRecord->iGPRSIPNameServer1 ); } if ( !origServiceRecord->iGPRSIPNameServer2.IsNull() ) { - serviceRecord->iGPRSIPNameServer2.SetL( origServiceRecord->iGPRSIPNameServer2 ); + tempServiceRecordPtrToNew->iGPRSIPNameServer2.SetL( + origServiceRecord->iGPRSIPNameServer2 ); } if ( !origServiceRecord->iGPRSIP6DNSAddrFromServer.IsNull() ) { - serviceRecord->iGPRSIP6DNSAddrFromServer.SetL( origServiceRecord->iGPRSIP6DNSAddrFromServer ); + tempServiceRecordPtrToNew->iGPRSIP6DNSAddrFromServer.SetL( + origServiceRecord->iGPRSIP6DNSAddrFromServer ); } if ( !origServiceRecord->iGPRSIP6NameServer1.IsNull() ) { - serviceRecord->iGPRSIP6NameServer1.SetL( origServiceRecord->iGPRSIP6NameServer1 ); + tempServiceRecordPtrToNew->iGPRSIP6NameServer1.SetL( + origServiceRecord->iGPRSIP6NameServer1 ); } if ( !origServiceRecord->iGPRSIP6NameServer2.IsNull() ) { - serviceRecord->iGPRSIP6NameServer2.SetL( origServiceRecord->iGPRSIP6NameServer2 ); + tempServiceRecordPtrToNew->iGPRSIP6NameServer2.SetL( + origServiceRecord->iGPRSIP6NameServer2 ); } if ( !origServiceRecord->iGPRSIPAddrLeaseValidFrom.IsNull() ) { - serviceRecord->iGPRSIPAddrLeaseValidFrom.SetL( origServiceRecord->iGPRSIPAddrLeaseValidFrom ); + tempServiceRecordPtrToNew->iGPRSIPAddrLeaseValidFrom.SetL( + origServiceRecord->iGPRSIPAddrLeaseValidFrom ); } if ( !origServiceRecord->iGPRSIPAddrLeaseValidTo.IsNull() ) { - serviceRecord->iGPRSIPAddrLeaseValidTo.SetL( origServiceRecord->iGPRSIPAddrLeaseValidTo ); + tempServiceRecordPtrToNew->iGPRSIPAddrLeaseValidTo.SetL( + origServiceRecord->iGPRSIPAddrLeaseValidTo ); } if ( !origServiceRecord->iGPRSConfigDaemonManagerName.IsNull() ) { - serviceRecord->iGPRSConfigDaemonManagerName.SetL( origServiceRecord->iGPRSConfigDaemonManagerName ); + tempServiceRecordPtrToNew->iGPRSConfigDaemonManagerName.SetL( + origServiceRecord->iGPRSConfigDaemonManagerName ); } if ( !origServiceRecord->iGPRSConfigDaemonName.IsNull() ) { - serviceRecord->iGPRSConfigDaemonName.SetL( origServiceRecord->iGPRSConfigDaemonName ); + tempServiceRecordPtrToNew->iGPRSConfigDaemonName.SetL( + origServiceRecord->iGPRSConfigDaemonName ); } if ( !origServiceRecord->iGPRSEnableLCPExtension.IsNull() ) { - serviceRecord->iGPRSEnableLCPExtension.SetL( origServiceRecord->iGPRSEnableLCPExtension ); + tempServiceRecordPtrToNew->iGPRSEnableLCPExtension.SetL( + origServiceRecord->iGPRSEnableLCPExtension ); } if ( !origServiceRecord->iGPRSDisablePlainTextAuth.IsNull() ) { - serviceRecord->iGPRSDisablePlainTextAuth.SetL( origServiceRecord->iGPRSDisablePlainTextAuth ); + tempServiceRecordPtrToNew->iGPRSDisablePlainTextAuth.SetL( + origServiceRecord->iGPRSDisablePlainTextAuth ); } if ( !origServiceRecord->iGPRSAPType.IsNull() ) { - serviceRecord->iGPRSAPType.SetL( origServiceRecord->iGPRSAPType ); + tempServiceRecordPtrToNew->iGPRSAPType.SetL( + origServiceRecord->iGPRSAPType ); } if ( !origServiceRecord->iGPRSQOSWarningTimeOut.IsNull() ) { - serviceRecord->iGPRSQOSWarningTimeOut.SetL( origServiceRecord->iGPRSQOSWarningTimeOut ); + tempServiceRecordPtrToNew->iGPRSQOSWarningTimeOut.SetL( + origServiceRecord->iGPRSQOSWarningTimeOut ); } if ( !origServiceRecord->iUmtsR99QoSAndOnTable.IsNull() ) { - serviceRecord->iUmtsR99QoSAndOnTable.SetL( origServiceRecord->iUmtsR99QoSAndOnTable ); + tempServiceRecordPtrToNew->iUmtsR99QoSAndOnTable.SetL( + origServiceRecord->iUmtsR99QoSAndOnTable ); } if ( !origServiceRecord->iGPRSR5DataCompression.IsNull() ) { - serviceRecord->iGPRSR5DataCompression.SetL( origServiceRecord->iGPRSR5DataCompression ); + tempServiceRecordPtrToNew->iGPRSR5DataCompression.SetL( + origServiceRecord->iGPRSR5DataCompression ); } if ( !origServiceRecord->iGPRSR5HeaderCompression.IsNull() ) { - serviceRecord->iGPRSR5HeaderCompression.SetL( origServiceRecord->iGPRSR5HeaderCompression ); + tempServiceRecordPtrToNew->iGPRSR5HeaderCompression.SetL( + origServiceRecord->iGPRSR5HeaderCompression ); } if ( !origServiceRecord->iGPRSPacketFlowIdentifier.IsNull() ) { - serviceRecord->iGPRSPacketFlowIdentifier.SetL( origServiceRecord->iGPRSPacketFlowIdentifier ); + tempServiceRecordPtrToNew->iGPRSPacketFlowIdentifier.SetL( + origServiceRecord->iGPRSPacketFlowIdentifier ); } if ( !origServiceRecord->iGPRSUmtsGprsRelease.IsNull() ) { - serviceRecord->iGPRSUmtsGprsRelease.SetL( origServiceRecord->iGPRSUmtsGprsRelease ); + tempServiceRecordPtrToNew->iGPRSUmtsGprsRelease.SetL( + origServiceRecord->iGPRSUmtsGprsRelease ); } CleanupStack::Pop( serviceRecord ); @@ -2934,7 +2948,6 @@ } iPacketDataQoSRecord->DeleteL( iSession ); - iPacketDataQoSRecord = NULL; OstTraceFunctionExit0( DUP1_CCMPLUGINPACKETDATA_DELETEBEARERRECORDSL_EXIT ); } diff -r 9c97ad6591ae -r 860702281757 cmmanager/cmmgr/cmmplugins/cmpluginwlan/src/cmpluginwlan.cpp --- a/cmmanager/cmmgr/cmmplugins/cmpluginwlan/src/cmpluginwlan.cpp Mon May 03 12:53:07 2010 +0300 +++ b/cmmanager/cmmgr/cmmplugins/cmpluginwlan/src/cmpluginwlan.cpp Thu May 13 23:10:21 2010 +0300 @@ -1261,16 +1261,14 @@ TBool retVal( EFalse ); - if ( (TPtrC(aIapRecord->iServiceType) == TPtrC(KCDTypeNameLANService) ) && - TPtrC(aIapRecord->iBearerType) == TPtrC(KCDTypeNameLANBearer) ) + if ( ( TPtrC( aIapRecord->iServiceType ) == TPtrC( KCDTypeNameLANService ) ) && + TPtrC( aIapRecord->iBearerType ) == TPtrC( KCDTypeNameLANBearer ) ) { // Check if there is a WLAN record with an iServiceId == iIapRecord->iService. CCDWlanServiceRecord* tmprec = new( ELeave ) CCDWlanServiceRecord ( iWlanTableId ); CleanupStack::PushL( tmprec ); - TInt service = aIapRecord->iService; - - tmprec->iWlanServiceId.SetL( (TUint32)service ); + tmprec->iWlanServiceId.SetL( ( TUint32 )( aIapRecord->iService ) ); if ( tmprec->FindL( iSession ) ) { // we found at least one WLAN using this IAP, @@ -1292,10 +1290,9 @@ { OstTraceFunctionEntry0( CCMPLUGINWLAN_DELETEBEARERRECORDSL_ENTRY ); - // as base class deletes service record, in this case LAN, - // only WLAN related stuff needs to be deleted + // As base class deletes service record, in this case LAN, only WLAN + // related stuff needs to be deleted. iWlanServiceRecord->DeleteL( iSession ); - iWlanServiceRecord = NULL; OstTraceFunctionExit0( CCMPLUGINWLAN_DELETEBEARERRECORDSL_EXIT ); } @@ -1463,7 +1460,7 @@ aGenRecordArray[KIapRecordIndex] ); CheckIfNameModifiedL( iapRecord, wlanServiceRecord ); - wlanServiceRecord->iWlanServiceId.SetL( iapRecord->iService ); + wlanServiceRecord->iWlanServiceId.SetL( ( TUint32 )( iapRecord->iService ) ); CCDLANServiceRecord* serviceRecord = static_cast( @@ -1491,101 +1488,125 @@ // ---------------------------------------------------------------------------- // void CCmPluginWlan::UpdateServiceRecordL( - RPointerArray& aGenRecordArray, - RPointerArray& aBearerSpecRecordArray ) + RPointerArray& aGenRecordArray, + RPointerArray& aBearerSpecRecordArray ) { OstTraceFunctionEntry0( CCMPLUGINWLAN_UPDATESERVICERECORDL_ENTRY ); - // Delete the original record and create a copy from the parameter + // Delete the original record and create a copy from the client's copy. delete iServiceRecord; iServiceRecord = NULL; - iServiceRecord = static_cast - (CCDRecordBase::RecordFactoryL( KCDTIdLANServiceRecord ) ); + iServiceRecord = static_cast( + CCDRecordBase::RecordFactoryL( KCDTIdLANServiceRecord ) ); - // LAN Service copy does not work so we have to copy it manually + // LAN Service copy does not work so we have to copy it manually. + + // Plugin's commsdat copy. + CCDLANServiceRecord* origServiceRecord = static_cast( iServiceRecord ); - CCDLANServiceRecord* lanServiceRecordTo = - static_cast( - iServiceRecord ); + // Client's copy of lan service record. + CCDLANServiceRecord* clientServiceRecordCopy = + static_cast( aGenRecordArray[KServiceRecordIndex] ); - CCDLANServiceRecord* lanServiceRecordFrom = - static_cast( - aGenRecordArray[KServiceRecordIndex] ); - - if ( !lanServiceRecordFrom->iRecordName.IsNull() ) + if ( !clientServiceRecordCopy->iRecordTag.IsNull() ) + { + origServiceRecord->iRecordTag.SetL( clientServiceRecordCopy->iRecordTag ); + } + if ( !clientServiceRecordCopy->iRecordName.IsNull() ) + { + origServiceRecord->iRecordName.SetL( clientServiceRecordCopy->iRecordName ); + } + if ( !clientServiceRecordCopy->iServiceEnableLlmnr.IsNull() ) { - lanServiceRecordTo->iRecordName.SetL( lanServiceRecordFrom->iRecordName ); + origServiceRecord->iServiceEnableLlmnr.SetL( clientServiceRecordCopy->iServiceEnableLlmnr ); } - if ( !lanServiceRecordFrom->iIfNetworks.IsNull() ) + if ( !clientServiceRecordCopy->iIfNetworks.IsNull() ) { - lanServiceRecordTo->iIfNetworks.SetL( lanServiceRecordFrom->iIfNetworks ); + origServiceRecord->iIfNetworks.SetL( clientServiceRecordCopy->iIfNetworks ); } - if ( !lanServiceRecordFrom->iIpGateway.IsNull() ) + if ( !clientServiceRecordCopy->iIpNetmask.IsNull() ) + { + origServiceRecord->iIpNetmask.SetL( clientServiceRecordCopy->iIpNetmask ); + } + if ( !clientServiceRecordCopy->iIpGateway.IsNull() ) { - lanServiceRecordTo->iIpGateway.SetL( lanServiceRecordFrom->iIpGateway ); + origServiceRecord->iIpGateway.SetL( clientServiceRecordCopy->iIpGateway ); } - if ( !lanServiceRecordFrom->iIpAddrFromServer.IsNull() ) + if ( !clientServiceRecordCopy->iIpAddrFromServer.IsNull() ) { - lanServiceRecordTo->iIpAddrFromServer.SetL( lanServiceRecordFrom->iIpAddrFromServer ); + origServiceRecord->iIpAddrFromServer.SetL( clientServiceRecordCopy->iIpAddrFromServer ); } - if ( !lanServiceRecordFrom->iIpAddr.IsNull() ) + if ( !clientServiceRecordCopy->iIpAddr.IsNull() ) + { + origServiceRecord->iIpAddr.SetL( clientServiceRecordCopy->iIpAddr ); + } + if ( !clientServiceRecordCopy->iIpDnsAddrFromServer.IsNull() ) { - lanServiceRecordTo->iIpAddr.SetL( lanServiceRecordFrom->iIpAddr ); + origServiceRecord->iIpDnsAddrFromServer.SetL( clientServiceRecordCopy->iIpDnsAddrFromServer ); } - if ( !lanServiceRecordFrom->iIpDnsAddrFromServer.IsNull() ) + if ( !clientServiceRecordCopy->iIpNameServer1.IsNull() ) { - lanServiceRecordTo->iIpDnsAddrFromServer.SetL( lanServiceRecordFrom->iIpDnsAddrFromServer ); + origServiceRecord->iIpNameServer1.SetL( clientServiceRecordCopy->iIpNameServer1 ); } - if ( !lanServiceRecordFrom->iIpNameServer1.IsNull() ) + if ( !clientServiceRecordCopy->iIpNameServer2.IsNull() ) { - lanServiceRecordTo->iIpNameServer1.SetL( lanServiceRecordFrom->iIpNameServer1 ); + origServiceRecord->iIpNameServer2.SetL( clientServiceRecordCopy->iIpNameServer2 ); } - if ( !lanServiceRecordFrom->iIpNameServer2.IsNull() ) + if ( !clientServiceRecordCopy->iIp6DnsAddrFromServer.IsNull() ) { - lanServiceRecordTo->iIpNameServer2.SetL( lanServiceRecordFrom->iIpNameServer2 ); + origServiceRecord->iIp6DnsAddrFromServer.SetL( clientServiceRecordCopy->iIp6DnsAddrFromServer ); } - if ( !lanServiceRecordFrom->iIp6DnsAddrFromServer.IsNull() ) + if ( !clientServiceRecordCopy->iIp6NameServer1.IsNull() ) + { + origServiceRecord->iIp6NameServer1.SetL( clientServiceRecordCopy->iIp6NameServer1 ); + } + if ( !clientServiceRecordCopy->iIp6NameServer2.IsNull() ) { - lanServiceRecordTo->iIp6DnsAddrFromServer.SetL( lanServiceRecordFrom->iIp6DnsAddrFromServer ); + origServiceRecord->iIp6NameServer2.SetL( clientServiceRecordCopy->iIp6NameServer2 ); } - if ( !lanServiceRecordFrom->iIp6NameServer1.IsNull() ) + if ( !clientServiceRecordCopy->iIpAddrLeaseValidFrom.IsNull() ) { - lanServiceRecordTo->iIp6NameServer1.SetL( lanServiceRecordFrom->iIp6NameServer1 ); + origServiceRecord->iIpAddrLeaseValidFrom.SetL( clientServiceRecordCopy->iIpAddrLeaseValidFrom ); } - if ( !lanServiceRecordFrom->iIp6NameServer2.IsNull() ) + if ( !clientServiceRecordCopy->iIpAddrLeaseValidTo.IsNull() ) + { + origServiceRecord->iIpAddrLeaseValidTo.SetL( clientServiceRecordCopy->iIpAddrLeaseValidTo ); + } + if ( !clientServiceRecordCopy->iConfigDaemonManagerName.IsNull() ) { - lanServiceRecordTo->iIp6NameServer2.SetL( lanServiceRecordFrom->iIp6NameServer2 ); + origServiceRecord->iConfigDaemonManagerName.SetL( clientServiceRecordCopy->iConfigDaemonManagerName ); } - if ( !lanServiceRecordFrom->iConfigDaemonManagerName.IsNull() ) + if ( !clientServiceRecordCopy->iConfigDaemonName.IsNull() ) { - lanServiceRecordTo->iConfigDaemonManagerName.SetL( lanServiceRecordFrom->iConfigDaemonManagerName ); + origServiceRecord->iConfigDaemonName.SetL( clientServiceRecordCopy->iConfigDaemonName ); } - if ( !lanServiceRecordFrom->iConfigDaemonName.IsNull() ) + if ( !clientServiceRecordCopy->iServiceExtensionTableName.IsNull() ) { - lanServiceRecordTo->iConfigDaemonName.SetL( lanServiceRecordFrom->iConfigDaemonName ); + origServiceRecord->iServiceExtensionTableName.SetL( clientServiceRecordCopy->iServiceExtensionTableName ); + } + if ( !clientServiceRecordCopy->iServiceExtensionTableRecordId.IsNull() ) + { + origServiceRecord->iServiceExtensionTableRecordId.SetL( clientServiceRecordCopy->iServiceExtensionTableRecordId ); //TODO, check this works ok. } - lanServiceRecordTo->SetElementId( lanServiceRecordFrom->ElementId() ); - // this is shared between wlan iaps so it cannot be hidden or protected - lanServiceRecordTo->ClearAttributes( ECDHidden ); - lanServiceRecordTo->ClearAttributes( ECDProtectedWrite ); + origServiceRecord->SetElementId( clientServiceRecordCopy->ElementId() ); - if ( !ServiceRecord().RecordId() ) + if ( !origServiceRecord->RecordId() ) { - ServiceRecord().SetRecordId( KCDNewRecordRequest ); - ServiceRecord().StoreL( iSession ); + origServiceRecord->SetRecordId( KCDNewRecordRequest ); + origServiceRecord->StoreL( iSession ); - // Update needed values to record tables too( lanservice and wlanservice ) - lanServiceRecordFrom->SetElementId( ServiceRecord().ElementId() ); - CCDWlanServiceRecord* wlanServiceRecord = - static_cast( - aBearerSpecRecordArray[KWlanServiceRecordIndex] ); - wlanServiceRecord->iWlanServiceId.SetL( ServiceRecord().RecordId() ); + // Update received element ID to client's copy too. + clientServiceRecordCopy->SetElementId( origServiceRecord->ElementId() ); + // Update needed values to other table records too (wlanservice). + CCDWlanServiceRecord* wlanServiceRecord = static_cast( + aBearerSpecRecordArray[KWlanServiceRecordIndex] ); + wlanServiceRecord->iWlanServiceId.SetL( origServiceRecord->RecordId() ); } else { - ServiceRecord().ModifyL( iSession ); + origServiceRecord->ModifyL( iSession ); } OstTraceFunctionExit0( CCMPLUGINWLAN_UPDATESERVICERECORDL_EXIT ); @@ -1601,114 +1622,156 @@ { OstTraceFunctionEntry0( CCMPLUGINWLAN_UPDATEBEARERRECORDSL_ENTRY ); + // Delete the original record and create a copy from the client's copy. delete iWlanServiceRecord; iWlanServiceRecord = NULL; - CCDWlanServiceRecord* wlanServiceRecord = - static_cast( - aBearerSpecRecordArray[KWlanServiceRecordIndex] ); + iWlanServiceRecord = new( ELeave ) CCDWlanServiceRecord( iWlanTableId ); - iWlanServiceRecord = new( ELeave ) CCDWlanServiceRecord ( iWlanTableId ); - - iWlanServiceRecord->SetElementId( wlanServiceRecord->ElementId() ); - iWlanServiceRecord->iRecordName.SetL( wlanServiceRecord->iRecordName ); + // Client's copy of wlan service record. + CCDWlanServiceRecord* clientWlanServiceRecord = static_cast( + aBearerSpecRecordArray[KWlanServiceRecordIndex] ); - iWlanServiceRecord->iWlanServiceId.SetL( wlanServiceRecord->iWlanServiceId ); - iWlanServiceRecord->iWlanConnMode.SetL( wlanServiceRecord->iWlanConnMode ); - if ( !wlanServiceRecord->iWLanSSID.IsNull() ) + if ( !clientWlanServiceRecord->iRecordTag.IsNull() ) { - iWlanServiceRecord->iWLanSSID.SetL( wlanServiceRecord->iWLanSSID ); + iWlanServiceRecord->iRecordTag.SetL( + clientWlanServiceRecord->iRecordTag ); + } + if ( !clientWlanServiceRecord->iRecordName.IsNull() ) + { + iWlanServiceRecord->iRecordName.SetL( + clientWlanServiceRecord->iRecordName ); } - if ( !wlanServiceRecord->iWLanUsedSSID.IsNull() ) + if ( !clientWlanServiceRecord->iWlanServiceId.IsNull() ) { - iWlanServiceRecord->iWLanUsedSSID.SetL( wlanServiceRecord->iWLanUsedSSID ); + iWlanServiceRecord->iWlanServiceId.SetL( + clientWlanServiceRecord->iWlanServiceId ); } - if ( !wlanServiceRecord->iWLanWepKey1.IsNull() ) + if ( !clientWlanServiceRecord->iWlanConnMode.IsNull() ) { - iWlanServiceRecord->iWLanWepKey1.SetL( wlanServiceRecord->iWLanWepKey1 ); + iWlanServiceRecord->iWlanConnMode.SetL( + clientWlanServiceRecord->iWlanConnMode ); + } + if ( !clientWlanServiceRecord->iWLanSSID.IsNull() ) + { + iWlanServiceRecord->iWLanSSID.SetL( + clientWlanServiceRecord->iWLanSSID ); } - if ( !wlanServiceRecord->iWLanWepKey2.IsNull() ) + if ( !clientWlanServiceRecord->iWLanUsedSSID.IsNull() ) { - iWlanServiceRecord->iWLanWepKey2.SetL( wlanServiceRecord->iWLanWepKey2 ); + iWlanServiceRecord->iWLanUsedSSID.SetL( + clientWlanServiceRecord->iWLanUsedSSID ); } - if ( !wlanServiceRecord->iWLanWepKey3.IsNull() ) + if ( !clientWlanServiceRecord->iWLanWepKey1.IsNull() ) { - iWlanServiceRecord->iWLanWepKey3.SetL( wlanServiceRecord->iWLanWepKey3 ); + iWlanServiceRecord->iWLanWepKey1.SetL( + clientWlanServiceRecord->iWLanWepKey1 ); } - if ( !wlanServiceRecord->iWLanWepKey4.IsNull() ) + if ( !clientWlanServiceRecord->iWLanWepKey2.IsNull() ) { - iWlanServiceRecord->iWLanWepKey4.SetL( wlanServiceRecord->iWLanWepKey4 ); + iWlanServiceRecord->iWLanWepKey2.SetL( + clientWlanServiceRecord->iWLanWepKey2 ); } - if ( !wlanServiceRecord->iWlanWepIndex.IsNull() ) + if ( !clientWlanServiceRecord->iWLanWepKey3.IsNull() ) { - iWlanServiceRecord->iWlanWepIndex.SetL( wlanServiceRecord->iWlanWepIndex ); + iWlanServiceRecord->iWLanWepKey3.SetL( + clientWlanServiceRecord->iWLanWepKey3 ); } - if ( !wlanServiceRecord->iWlanSecMode.IsNull() ) + if ( !clientWlanServiceRecord->iWLanWepKey4.IsNull() ) { - iWlanServiceRecord->iWlanSecMode.SetL( wlanServiceRecord->iWlanSecMode ); + iWlanServiceRecord->iWLanWepKey4.SetL( + clientWlanServiceRecord->iWLanWepKey4 ); } - if ( !wlanServiceRecord->iWlanAuthMode.IsNull() ) + if ( !clientWlanServiceRecord->iWlanWepIndex.IsNull() ) { - iWlanServiceRecord->iWlanAuthMode.SetL( wlanServiceRecord->iWlanAuthMode ); + iWlanServiceRecord->iWlanWepIndex.SetL( + clientWlanServiceRecord->iWlanWepIndex ); } - if ( !wlanServiceRecord->iWlanEnableWpaPsk.IsNull() ) + if ( !clientWlanServiceRecord->iWlanSecMode.IsNull() ) + { + iWlanServiceRecord->iWlanSecMode.SetL( + clientWlanServiceRecord->iWlanSecMode ); + } + if ( !clientWlanServiceRecord->iWlanAuthMode.IsNull() ) { - iWlanServiceRecord->iWlanEnableWpaPsk.SetL( wlanServiceRecord->iWlanEnableWpaPsk ); - } - if ( !wlanServiceRecord->iWLanWpaPreSharedKey.IsNull() ) - { - iWlanServiceRecord->iWLanWpaPreSharedKey.SetL( wlanServiceRecord->iWLanWpaPreSharedKey ); + iWlanServiceRecord->iWlanAuthMode.SetL( + clientWlanServiceRecord->iWlanAuthMode ); } - if ( !wlanServiceRecord->iWlanWpaKeyLength.IsNull() ) + if ( !clientWlanServiceRecord->iWlanEnableWpaPsk.IsNull() ) { - iWlanServiceRecord->iWlanWpaKeyLength.SetL( wlanServiceRecord->iWlanWpaKeyLength ); + iWlanServiceRecord->iWlanEnableWpaPsk.SetL( + clientWlanServiceRecord->iWlanEnableWpaPsk ); } - if ( !wlanServiceRecord->iWLanEaps.IsNull() ) + if ( !clientWlanServiceRecord->iWLanWpaPreSharedKey.IsNull() ) + { + iWlanServiceRecord->iWLanWpaPreSharedKey.SetL( + clientWlanServiceRecord->iWLanWpaPreSharedKey ); + } + if ( !clientWlanServiceRecord->iWlanWpaKeyLength.IsNull() ) { - iWlanServiceRecord->iWLanEaps.SetL( wlanServiceRecord->iWLanEaps ); + iWlanServiceRecord->iWlanWpaKeyLength.SetL( + clientWlanServiceRecord->iWlanWpaKeyLength ); } - if ( !wlanServiceRecord->iWlanScanSSID.IsNull() ) + if ( !clientWlanServiceRecord->iWLanEaps.IsNull() ) { - iWlanServiceRecord->iWlanScanSSID.SetL( wlanServiceRecord->iWlanScanSSID ); + iWlanServiceRecord->iWLanEaps.SetL( + clientWlanServiceRecord->iWLanEaps ); } - if ( !wlanServiceRecord->iWlanChannelID.IsNull() ) + if ( !clientWlanServiceRecord->iWlanScanSSID.IsNull() ) { - iWlanServiceRecord->iWlanChannelID.SetL( wlanServiceRecord->iWlanChannelID ); + iWlanServiceRecord->iWlanScanSSID.SetL( + clientWlanServiceRecord->iWlanScanSSID ); } - if ( !wlanServiceRecord->iWlanFormatKey1.IsNull() ) + if ( !clientWlanServiceRecord->iWlanChannelID.IsNull() ) + { + iWlanServiceRecord->iWlanChannelID.SetL( + clientWlanServiceRecord->iWlanChannelID ); + } + if ( !clientWlanServiceRecord->iWlanFormatKey1.IsNull() ) { - iWlanServiceRecord->iWlanFormatKey1.SetL( wlanServiceRecord->iWlanFormatKey1 ); - } - if ( !wlanServiceRecord->iWlanFormatKey2.IsNull() ) - { - iWlanServiceRecord->iWlanFormatKey2.SetL( wlanServiceRecord->iWlanFormatKey2 ); + iWlanServiceRecord->iWlanFormatKey1.SetL( + clientWlanServiceRecord->iWlanFormatKey1 ); } - if ( !wlanServiceRecord->iWlanFormatKey3.IsNull() ) + if ( !clientWlanServiceRecord->iWlanFormatKey2.IsNull() ) { - iWlanServiceRecord->iWlanFormatKey3.SetL( wlanServiceRecord->iWlanFormatKey3 ); + iWlanServiceRecord->iWlanFormatKey2.SetL( + clientWlanServiceRecord->iWlanFormatKey2 ); } - if ( !wlanServiceRecord->iWlanFormatKey4.IsNull() ) + if ( !clientWlanServiceRecord->iWlanFormatKey3.IsNull() ) + { + iWlanServiceRecord->iWlanFormatKey3.SetL( + clientWlanServiceRecord->iWlanFormatKey3 ); + } + if ( !clientWlanServiceRecord->iWlanFormatKey4.IsNull() ) { - iWlanServiceRecord->iWlanFormatKey4.SetL( wlanServiceRecord->iWlanFormatKey4 ); + iWlanServiceRecord->iWlanFormatKey4.SetL( + clientWlanServiceRecord->iWlanFormatKey4 ); } - if ( !wlanServiceRecord->iWlanAllowSSIDRoaming.IsNull() ) + if ( !clientWlanServiceRecord->iWlanAllowSSIDRoaming.IsNull() ) { - iWlanServiceRecord->iWlanAllowSSIDRoaming.SetL( wlanServiceRecord->iWlanAllowSSIDRoaming ); + iWlanServiceRecord->iWlanAllowSSIDRoaming.SetL( + clientWlanServiceRecord->iWlanAllowSSIDRoaming ); } - if ( !wlanServiceRecord->iWLanEnabledEaps.IsNull() ) + if ( !clientWlanServiceRecord->iWLanEnabledEaps.IsNull() ) { - iWlanServiceRecord->iWLanEnabledEaps.SetL( wlanServiceRecord->iWLanEnabledEaps ); + iWlanServiceRecord->iWLanEnabledEaps.SetL( + clientWlanServiceRecord->iWLanEnabledEaps ); } - if ( !wlanServiceRecord->iWLanDisabledEaps.IsNull() ) + if ( !clientWlanServiceRecord->iWLanDisabledEaps.IsNull() ) { - iWlanServiceRecord->iWLanDisabledEaps.SetL( wlanServiceRecord->iWLanDisabledEaps ); + iWlanServiceRecord->iWLanDisabledEaps.SetL( + clientWlanServiceRecord->iWLanDisabledEaps ); } + iWlanServiceRecord->SetElementId( clientWlanServiceRecord->ElementId() ); + if ( !iWlanServiceRecord->RecordId() ) { iWlanServiceRecord->SetRecordId( KCDNewRecordRequest ); iWlanServiceRecord->StoreL( iSession ); - wlanServiceRecord->SetElementId( iWlanServiceRecord->ElementId() ); + + // Update received element ID to client's copy too. + clientWlanServiceRecord->SetElementId( iWlanServiceRecord->ElementId() ); } else { @@ -1729,7 +1792,7 @@ if ( !iWlanServiceRecord ) { - // IAP not yet in CommDat + // IAP not yet in CommsDat. GetDefaultWlanServiceRecordL( aRecordArray ); } else @@ -1738,7 +1801,6 @@ CleanupStack::PushL( wlanServiceRecord ); CopyWlanServiceRecordL( iWlanServiceRecord, wlanServiceRecord ); wlanServiceRecord->SetElementId( iWlanServiceRecord->ElementId() ); - wlanServiceRecord->iWlanServiceId.SetL( iWlanServiceRecord->iWlanServiceId ); aRecordArray.AppendL( wlanServiceRecord ); CleanupStack::Pop( wlanServiceRecord ); } @@ -1754,11 +1816,120 @@ { OstTraceFunctionEntry0( CCMPLUGINWLAN_COPYSERVICERECORDL_ENTRY ); - __ASSERT_DEBUG( iServiceRecord != NULL, User::Leave( KErrNotFound )); + // New service record to be returned. + CCDRecordBase* serviceRecord = static_cast( + CCDRecordBase::RecordFactoryL( KCDTIdLANServiceRecord ) ); + CleanupStack::PushL( serviceRecord ); + + CCDLANServiceRecord* tempServiceRecordPtrToNew = + static_cast( serviceRecord ); + + // CommsDat version of service record. + CCDLANServiceRecord* origServiceRecord = + static_cast( iServiceRecord ); - CCDRecordBase* serviceRecord = - static_cast( - CCDRecordBase::CreateCopyRecordL( *iServiceRecord ) ); + if ( !origServiceRecord->iRecordTag.IsNull() ) + { + tempServiceRecordPtrToNew->iRecordTag.SetL( + origServiceRecord->iRecordTag ); + } + if ( !origServiceRecord->iRecordName.IsNull() ) + { + tempServiceRecordPtrToNew->iRecordName.SetL( + origServiceRecord->iRecordName ); + } + if ( !origServiceRecord->iServiceEnableLlmnr.IsNull() ) + { + tempServiceRecordPtrToNew->iServiceEnableLlmnr.SetL( + origServiceRecord->iServiceEnableLlmnr ); + } + if ( !origServiceRecord->iIfNetworks.IsNull() ) + { + tempServiceRecordPtrToNew->iIfNetworks.SetL( + origServiceRecord->iIfNetworks ); + } + if ( !origServiceRecord->iIpNetmask.IsNull() ) + { + tempServiceRecordPtrToNew->iIpNetmask.SetL( + origServiceRecord->iIpNetmask ); + } + if ( !origServiceRecord->iIpGateway.IsNull() ) + { + tempServiceRecordPtrToNew->iIpGateway.SetL( + origServiceRecord->iIpGateway ); + } + if ( !origServiceRecord->iIpAddrFromServer.IsNull() ) + { + tempServiceRecordPtrToNew->iIpAddrFromServer.SetL( + origServiceRecord->iIpAddrFromServer ); + } + if ( !origServiceRecord->iIpAddr.IsNull() ) + { + tempServiceRecordPtrToNew->iIpAddr.SetL( + origServiceRecord->iIpAddr ); + } + if ( !origServiceRecord->iIpDnsAddrFromServer.IsNull() ) + { + tempServiceRecordPtrToNew->iIpDnsAddrFromServer.SetL( + origServiceRecord->iIpDnsAddrFromServer ); + } + if ( !origServiceRecord->iIpNameServer1.IsNull() ) + { + tempServiceRecordPtrToNew->iIpNameServer1.SetL( + origServiceRecord->iIpNameServer1 ); + } + if ( !origServiceRecord->iIpNameServer2.IsNull() ) + { + tempServiceRecordPtrToNew->iIpNameServer2.SetL( + origServiceRecord->iIpNameServer2 ); + } + if ( !origServiceRecord->iIp6DnsAddrFromServer.IsNull() ) + { + tempServiceRecordPtrToNew->iIp6DnsAddrFromServer.SetL( + origServiceRecord->iIp6DnsAddrFromServer ); + } + if ( !origServiceRecord->iIp6NameServer1.IsNull() ) + { + tempServiceRecordPtrToNew->iIp6NameServer1.SetL( + origServiceRecord->iIp6NameServer1 ); + } + if ( !origServiceRecord->iIp6NameServer2.IsNull() ) + { + tempServiceRecordPtrToNew->iIp6NameServer2.SetL( + origServiceRecord->iIp6NameServer2 ); + } + if ( !origServiceRecord->iIpAddrLeaseValidFrom.IsNull() ) + { + tempServiceRecordPtrToNew->iIpAddrLeaseValidFrom.SetL( + origServiceRecord->iIpAddrLeaseValidFrom ); + } + if ( !origServiceRecord->iIpAddrLeaseValidTo.IsNull() ) + { + tempServiceRecordPtrToNew->iIpAddrLeaseValidTo.SetL( + origServiceRecord->iIpAddrLeaseValidTo ); + } + if ( !origServiceRecord->iConfigDaemonManagerName.IsNull() ) + { + tempServiceRecordPtrToNew->iConfigDaemonManagerName.SetL( + origServiceRecord->iConfigDaemonManagerName ); + } + if ( !origServiceRecord->iConfigDaemonName.IsNull() ) + { + tempServiceRecordPtrToNew->iConfigDaemonName.SetL( + origServiceRecord->iConfigDaemonName ); + } + if ( !origServiceRecord->iServiceExtensionTableName.IsNull() ) + { + tempServiceRecordPtrToNew->iServiceExtensionTableName.SetL( + origServiceRecord->iServiceExtensionTableName ); + } + if ( !origServiceRecord->iServiceExtensionTableRecordId.IsNull() ) + { + tempServiceRecordPtrToNew->iServiceExtensionTableRecordId.SetL( + origServiceRecord->iServiceExtensionTableRecordId ); + } + + CleanupStack::Pop( serviceRecord ); OstTraceFunctionExit0( CCMPLUGINWLAN_COPYSERVICERECORDL_EXIT ); return serviceRecord; @@ -1897,10 +2068,23 @@ User::Leave( KErrArgument ); } - aDestRecord->iRecordName.SetL( aSourceRecord->iRecordName ); - aDestRecord->iRecordTag.SetL( aSourceRecord->iRecordTag ); - aDestRecord->iWlanConnMode.SetL( aSourceRecord->iWlanConnMode ); + if ( !aSourceRecord->iRecordTag.IsNull() ) + { + aDestRecord->iRecordTag.SetL( aSourceRecord->iRecordTag ); + } + if ( !aSourceRecord->iRecordName.IsNull() ) + { + aDestRecord->iRecordName.SetL( aSourceRecord->iRecordName ); + } + if ( !aSourceRecord->iWlanServiceId.IsNull() ) + { + aDestRecord->iWlanServiceId.SetL( aSourceRecord->iWlanServiceId ); + } + if ( !aSourceRecord->iWlanConnMode.IsNull() ) + { + aDestRecord->iWlanConnMode.SetL( aSourceRecord->iWlanConnMode ); + } if ( !aSourceRecord->iWLanSSID.IsNull() ) { aDestRecord->iWLanSSID.SetL( aSourceRecord->iWLanSSID ); @@ -2290,9 +2474,10 @@ OstTraceFunctionEntry0( CCMPLUGINWLAN_COPYBEARERRECORDSL_ENTRY ); CCmPluginWlan* plugin = static_cast( aCopyInstance ); - plugin->iWlanServiceRecord = new( ELeave ) CCDWlanServiceRecord ( iWlanTableId ); + plugin->iWlanServiceRecord = new( ELeave ) CCDWlanServiceRecord( iWlanTableId ); CopyWlanServiceRecordL( iWlanServiceRecord, plugin->iWlanServiceRecord ); + plugin->iWlanServiceRecord->iWlanServiceId.SetL( 0 ); plugin->iWAPISupported = iWAPISupported; OstTraceFunctionExit0( CCMPLUGINWLAN_COPYBEARERRECORDSL_EXIT ); diff -r 9c97ad6591ae -r 860702281757 cmmanager/cmmgr/cmmserver/inc/cmmcache.h --- a/cmmanager/cmmgr/cmmserver/inc/cmmcache.h Mon May 03 12:53:07 2010 +0300 +++ b/cmmanager/cmmgr/cmmserver/inc/cmmcache.h Thu May 13 23:10:21 2010 +0300 @@ -456,7 +456,9 @@ /** * Enumerates connections and checks if any of the connection methods in * the given destination is connected. - * //TODO, update comments with second parameter. + * If pointer to destination instance is given, then information about + * relevant connection methods is retrieved from that. Otherwise the + * information is retrieved from instance mapping using the given ID. */ TBool DestinationConnectedL( const TUint32 aDestinationId, @@ -559,7 +561,8 @@ void DeletePluginL( CCmmConnMethodStruct& aConnMethodStruct ); /** - * TODO + * Initiate the deletion of given destination if none of the connection + * methods inside it are connected. */ void DeleteDestinationForcedL( CCmmDestinationInstance& aDestinationInstance ); diff -r 9c97ad6591ae -r 860702281757 cmmanager/cmmgr/cmmserver/inc/cmmconnmethodinstance.h --- a/cmmanager/cmmgr/cmmserver/inc/cmmconnmethodinstance.h Mon May 03 12:53:07 2010 +0300 +++ b/cmmanager/cmmgr/cmmserver/inc/cmmconnmethodinstance.h Thu May 13 23:10:21 2010 +0300 @@ -33,7 +33,8 @@ /** - * TODO, see DestInstance + * Session side object representing a connection method. Keeps track of any + * changes the client makes before they are updated to database. */ NONSHARABLE_CLASS( CCmmConnMethodInstance ) : public CObject { diff -r 9c97ad6591ae -r 860702281757 cmmanager/cmmgr/cmmserver/inc/cmmconnmethodstruct.h --- a/cmmanager/cmmgr/cmmserver/inc/cmmconnmethodstruct.h Mon May 03 12:53:07 2010 +0300 +++ b/cmmanager/cmmgr/cmmserver/inc/cmmconnmethodstruct.h Thu May 13 23:10:21 2010 +0300 @@ -29,7 +29,8 @@ /** - * TODO + * Cache side object representing a connection method. Reflects the current + * state in database. */ NONSHARABLE_CLASS( CCmmConnMethodStruct ) : public CBase { diff -r 9c97ad6591ae -r 860702281757 cmmanager/cmmgr/cmmserver/inc/cmmdestinationinstance.h --- a/cmmanager/cmmgr/cmmserver/inc/cmmdestinationinstance.h Mon May 03 12:53:07 2010 +0300 +++ b/cmmanager/cmmgr/cmmserver/inc/cmmdestinationinstance.h Thu May 13 23:10:21 2010 +0300 @@ -269,7 +269,12 @@ private: TBool AllMandatoryRecordsContainData() const; + + /** + * Loads a requested type of record from database if it is not yet loaded. + */ void RefreshRecordL( TCmmDbRecords aRecordType ); + void LoadAllRecordsL(); void SetMetadataInternetL( const TUint32& aMetadata ); void SetMetadataHighlight( const TUint32& aMetadata ); diff -r 9c97ad6591ae -r 860702281757 cmmanager/cmmgr/cmmserver/inc/cmmdestinationstruct.h --- a/cmmanager/cmmgr/cmmserver/inc/cmmdestinationstruct.h Mon May 03 12:53:07 2010 +0300 +++ b/cmmanager/cmmgr/cmmserver/inc/cmmdestinationstruct.h Thu May 13 23:10:21 2010 +0300 @@ -36,6 +36,10 @@ class CCDSNAPMetadataRecord; +/** + * Cache side object representing a destination. Reflects the current state in + * database. + */ NONSHARABLE_CLASS( CCmmDestinationStruct ) : public CBase { public: diff -r 9c97ad6591ae -r 860702281757 cmmanager/cmmgr/cmmserver/inc/cmmserver.h --- a/cmmanager/cmmgr/cmmserver/inc/cmmserver.h Mon May 03 12:53:07 2010 +0300 +++ b/cmmanager/cmmgr/cmmserver/inc/cmmserver.h Thu May 13 23:10:21 2010 +0300 @@ -51,7 +51,7 @@ ~CCmmServer(); /** - * Increments the count of the active sessions for this server + * Increments the count of active sessions for this server. */ void IncrementSessions(); diff -r 9c97ad6591ae -r 860702281757 cmmanager/cmmgr/cmmserver/src/cmmcache.cpp --- a/cmmanager/cmmgr/cmmserver/src/cmmcache.cpp Mon May 03 12:53:07 2010 +0300 +++ b/cmmanager/cmmgr/cmmserver/src/cmmcache.cpp Thu May 13 23:10:21 2010 +0300 @@ -1640,10 +1640,6 @@ // Delete the destination unless an active connection is using // one of it's connection methods. TRAP_IGNORE( DeleteDestinationForcedL( aDestinationInstance ) ); - //{ - //if ( !DestinationConnectedL( aDestinationInstance.GetId() ) ) DeleteDestinationL( aDestinationInstance, ETrue ); - //} ); //TODO, make helper function - // Destination is now removed from database. Tell instance // mapping to stop ignoring the related ID. iInstanceMapping->RemoveDestinationFromDeletedList( aDestinationInstance.GetId() ); @@ -1699,6 +1695,7 @@ iConnMethodArray.Remove( index ); } } + OstTraceFunctionExit0( CCMMCACHE_CLOSECONNMETHOD_EXIT ); } @@ -2146,7 +2143,6 @@ retVal = cmInstance->GetIntAttributeL( aAttribute ); - CloseConnMethod( *cmInstance ); CleanupStack::PopAndDestroy( cmInstance ); OstTraceFunctionExit0( CCMMCACHE_GETCONNECTIONMETHODINFOINTL_EXIT ); @@ -2181,7 +2177,6 @@ retVal = cmInstance->GetBoolAttributeL( aAttribute ); - CloseConnMethod( *cmInstance ); CleanupStack::PopAndDestroy( cmInstance ); OstTraceFunctionExit0( CCMMCACHE_GETCONNECTIONMETHODINFOBOOLL_EXIT ); @@ -2216,7 +2211,6 @@ retVal = cmInstance->GetStringAttributeL( aAttribute ); - CloseConnMethod( *cmInstance ); CleanupStack::PopAndDestroy( cmInstance ); OstTraceFunctionExit0( CCMMCACHE_GETCONNECTIONMETHODINFOSTRINGL_EXIT ); @@ -2251,7 +2245,6 @@ retVal = cmInstance->GetString8AttributeL( aAttribute ); - CloseConnMethod( *cmInstance ); CleanupStack::PopAndDestroy( cmInstance ); OstTraceFunctionExit0( CCMMCACHE_GETCONNECTIONMETHODINFOSTRING8L_EXIT ); @@ -2569,13 +2562,15 @@ } OstTraceFunctionExit0( CCMMCACHE_CHECKIFCMCONNECTED_EXIT ); - return result; } // --------------------------------------------------------------------------- // Enumerates connections and checks if any of the connection methods in the // given destination is connected. +// If pointer to destination instance is given, then information about +// relevant connection methods is retrieved from that. Otherwise the +// information is retrieved from instance mapping using the given ID. // --------------------------------------------------------------------------- // TBool CCmmCache::DestinationConnectedL( @@ -2659,7 +2654,6 @@ TBool isEmbedded = iInstanceMapping->DestinationIsEmbedded( aDestinationId ); OstTraceFunctionExit0( CCMMCACHE_DESTINATIONISEMBEDDED_EXIT ); - return isEmbedded; } @@ -2674,7 +2668,6 @@ TBool hasEmbedded = iInstanceMapping->DestinationHasEmbedded( aDestinationId ); OstTraceFunctionExit0( CCMMCACHE_DESTINATIONHASEMBEDDED_EXIT ); - return hasEmbedded; } @@ -2691,7 +2684,6 @@ iInstanceMapping->DestinationPointedToByVirtualIap( aDestinationId ); OstTraceFunctionExit0( CCMMCACHE_DESTINATIONPOINTEDTOBYVIRTUALIAP_EXIT ); - return pointedByVirtual; } @@ -2723,7 +2715,6 @@ ConnMethodInDestinationButLocked( aConnMethodId, aDestinationId ); OstTraceFunctionExit0( CCMMCACHE_CONNMETHODINDESTINATIONBUTLOCKED_EXIT ); - return inAndlocked; } @@ -2819,6 +2810,7 @@ break; } } + OstTraceFunctionExit0( CCMMCACHE_REFRESHDESTINATIONID_EXIT ); } @@ -2840,6 +2832,7 @@ break; // Can only be 1 match. } } + OstTraceFunctionExit0( CCMMCACHE_REFRESHCONNMETHODID_EXIT ); } @@ -2870,6 +2863,7 @@ { ASSERT( 0 ); } + OstTraceFunctionExit0( CCMMCACHE_TRANSLATETEMPORARYID_EXIT ); } @@ -3037,14 +3031,14 @@ } // --------------------------------------------------------------------------- -// TODO +// Initiate the deletion of given destination if none of the connection +// methods inside it are connected. // --------------------------------------------------------------------------- // void CCmmCache::DeleteDestinationForcedL( CCmmDestinationInstance& aDestinationInstance ) //TODO, OST { //TODO if ( !DestinationConnectedL( 0, &aDestinationInstance ) ) - //if ( !DestinationConnectedL( aDestinationInstance.GetId() ) ) //TODO { DeleteDestinationL( aDestinationInstance, ETrue ); } diff -r 9c97ad6591ae -r 860702281757 cmmanager/cmmgr/cmmserver/src/cmmconnmethodinstance.cpp --- a/cmmanager/cmmgr/cmmserver/src/cmmconnmethodinstance.cpp Mon May 03 12:53:07 2010 +0300 +++ b/cmmanager/cmmgr/cmmserver/src/cmmconnmethodinstance.cpp Thu May 13 23:10:21 2010 +0300 @@ -44,7 +44,6 @@ CleanupStack::Pop( self ); OstTraceFunctionExit0( CCMMCONNMETHODINSTANCE_NEWL_EXIT ); - return self; } @@ -61,7 +60,6 @@ self->ConstructL(); OstTraceFunctionExit0( CCMMCONNMETHODINSTANCE_NEWLC_EXIT ); - return self; } diff -r 9c97ad6591ae -r 860702281757 cmmanager/cmmgr/cmmserver/src/cmmdestinationstruct.cpp --- a/cmmanager/cmmgr/cmmserver/src/cmmdestinationstruct.cpp Mon May 03 12:53:07 2010 +0300 +++ b/cmmanager/cmmgr/cmmserver/src/cmmdestinationstruct.cpp Thu May 13 23:10:21 2010 +0300 @@ -537,6 +537,23 @@ // ECmmRecordStatusModified Error, session side only status // ECmmRecordStatusUnsaved Skip load, not in database + //TODO, temporary block start + // Remove this codeblock after database change listeners are in place. This + // will force a database reload. + if ( iNetworkRecordStatus == ECmmRecordStatusLoaded ) + { + iNetworkRecordStatus = ECmmRecordStatusExpired; + } + if ( iDestApRecordStatus == ECmmRecordStatusLoaded ) + { + iDestApRecordStatus = ECmmRecordStatusExpired; + } + if ( iMetadataRecordStatus == ECmmRecordStatusLoaded ) + { + iMetadataRecordStatus = ECmmRecordStatusExpired; + } + //TODO, temporary block end + CommsDat::CCDRecordBase* aRecordPointer; switch ( aRecordType ) diff -r 9c97ad6591ae -r 860702281757 cmmanager/cmmgr/database/src/cmmanagertableformats.cpp --- a/cmmanager/cmmgr/database/src/cmmanagertableformats.cpp Mon May 03 12:53:07 2010 +0300 +++ b/cmmanager/cmmgr/database/src/cmmanagertableformats.cpp Thu May 13 23:10:21 2010 +0300 @@ -36,15 +36,15 @@ X_REGISTER_ATTRIBUTE( CCDWlanServiceRecord, iWlanConnMode, TMDBNum ) X_REGISTER_ATTRIBUTE( CCDWlanServiceRecord, iWLanSSID, TMDBText ) X_REGISTER_ATTRIBUTE( CCDWlanServiceRecord, iWLanUsedSSID, TMDBText ) - X_REGISTER_ATTRIBUTE( CCDWlanServiceRecord, iWLanWepKey1, TMDBText ) - X_REGISTER_ATTRIBUTE( CCDWlanServiceRecord, iWLanWepKey2, TMDBText ) - X_REGISTER_ATTRIBUTE( CCDWlanServiceRecord, iWLanWepKey3, TMDBText ) - X_REGISTER_ATTRIBUTE( CCDWlanServiceRecord, iWLanWepKey4, TMDBText ) + X_REGISTER_ATTRIBUTE( CCDWlanServiceRecord, iWLanWepKey1, TMDBBin ) + X_REGISTER_ATTRIBUTE( CCDWlanServiceRecord, iWLanWepKey2, TMDBBin ) + X_REGISTER_ATTRIBUTE( CCDWlanServiceRecord, iWLanWepKey3, TMDBBin ) + X_REGISTER_ATTRIBUTE( CCDWlanServiceRecord, iWLanWepKey4, TMDBBin ) X_REGISTER_ATTRIBUTE( CCDWlanServiceRecord, iWlanWepIndex, TMDBNum ) X_REGISTER_ATTRIBUTE( CCDWlanServiceRecord, iWlanSecMode, TMDBNum ) X_REGISTER_ATTRIBUTE( CCDWlanServiceRecord, iWlanAuthMode, TMDBNum ) X_REGISTER_ATTRIBUTE( CCDWlanServiceRecord, iWlanEnableWpaPsk, TMDBNum ) - X_REGISTER_ATTRIBUTE( CCDWlanServiceRecord, iWLanWpaPreSharedKey, TMDBText ) + X_REGISTER_ATTRIBUTE( CCDWlanServiceRecord, iWLanWpaPreSharedKey, TMDBBin ) X_REGISTER_ATTRIBUTE( CCDWlanServiceRecord, iWlanWpaKeyLength, TMDBNum ) X_REGISTER_ATTRIBUTE( CCDWlanServiceRecord, iWLanEaps, TMDBText ) X_REGISTER_ATTRIBUTE( CCDWlanServiceRecord, iWlanScanSSID, TMDBNum ) @@ -53,9 +53,9 @@ X_REGISTER_ATTRIBUTE( CCDWlanServiceRecord, iWlanFormatKey2, TMDBNum ) X_REGISTER_ATTRIBUTE( CCDWlanServiceRecord, iWlanFormatKey3, TMDBNum ) X_REGISTER_ATTRIBUTE( CCDWlanServiceRecord, iWlanFormatKey4, TMDBNum ) - X_REGISTER_ATTRIBUTE( CCDWlanServiceRecord, iWlanAllowSSIDRoaming, TMDBNum ) - X_REGISTER_ATTRIBUTE( CCDWlanServiceRecord, iWLanEnabledEaps, TMDBText ) - X_REGISTER_ATTRIBUTE( CCDWlanServiceRecord, iWLanDisabledEaps, TMDBText ) + X_REGISTER_ATTRIBUTE( CCDWlanServiceRecord, iWlanAllowSSIDRoaming, TMDBNum ) + X_REGISTER_ATTRIBUTE( CCDWlanServiceRecord, iWLanEnabledEaps, TMDBBin ) + X_REGISTER_ATTRIBUTE( CCDWlanServiceRecord, iWLanDisabledEaps, TMDBBin ) X_REGISTER_ATTRIBUTE( CCDRecordBase, iRecordTag, TMDBNum ) X_REGISTER_ATTRIBUTE( CCDRecordBase, iRecordName, TMDBText ) END_ATTRIBUTE_TABLE() diff -r 9c97ad6591ae -r 860702281757 cmmanager/connection_settings_shim/src/cmdestination_shim_s60.cpp --- a/cmmanager/connection_settings_shim/src/cmdestination_shim_s60.cpp Mon May 03 12:53:07 2010 +0300 +++ b/cmmanager/connection_settings_shim/src/cmdestination_shim_s60.cpp Thu May 13 23:10:21 2010 +0300 @@ -1,19 +1,19 @@ /* - * 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: - * Private implementation of Wrapper for CM Manager Symbian interface. - */ +* 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: +* Private implementation of Wrapper for CM Manager Symbian interface. +*/ // System includes @@ -27,12 +27,12 @@ #include "cmdestination_shim_s60_p.h" #include "cmconnectionmethod_shim_s60_p.h" + #include "OstTraceDefinitions.h" #ifdef OST_TRACE_COMPILER_IN_USE #include "cmdestination_shim_s60Traces.h" #endif - /*! \class CmDestinationShimPrivate \brief Private implementation class for CM Manager Destination Shim. @@ -311,7 +311,6 @@ int &index) { index = iDestination.AddConnectionMethodL(cmShim->d_ptr->iCm); - iDestination.UpdateL(); } void CmDestinationShimPrivate::DeleteConnectionMethodL( @@ -321,7 +320,6 @@ cm = iDestination.ConnectionMethodByIDL( cmShim->getIntAttribute(CMManagerShim::CmId)); iDestination.DeleteConnectionMethodL(cm); - iDestination.UpdateL(); } void CmDestinationShimPrivate::RemoveConnectionMethodL( @@ -331,7 +329,6 @@ cm = iDestination.ConnectionMethodByIDL( cmShim->getIntAttribute(CMManagerShim::CmId)); iDestination.RemoveConnectionMethodL(cm); - iDestination.UpdateL(); } void CmDestinationShimPrivate::ModifyPriorityL( @@ -342,14 +339,12 @@ cm = iDestination.ConnectionMethodByIDL( cmShim->getIntAttribute(CMManagerShim::CmId)); iDestination.ModifyPriorityL(cm, index); - iDestination.UpdateL(); } void CmDestinationShimPrivate::SetNameL(QString name) { TPtrC16 namePtr(reinterpret_cast(name.utf16())); iDestination.SetNameL(namePtr); - iDestination.UpdateL(); } /*! diff -r 9c97ad6591ae -r 860702281757 cmmanager/connection_settings_shim/tsrc/ut/testcmmgrshim.cpp --- a/cmmanager/connection_settings_shim/tsrc/ut/testcmmgrshim.cpp Mon May 03 12:53:07 2010 +0300 +++ b/cmmanager/connection_settings_shim/tsrc/ut/testcmmgrshim.cpp Thu May 13 23:10:21 2010 +0300 @@ -162,6 +162,7 @@ QVERIFY(cm != NULL); bool ok = cm->deleteConnectionMethod(); QVERIFY(ok == true); + cm->update(); delete cm; } @@ -640,7 +641,7 @@ // Check the default name QString name = cm->getStringAttribute(CMManagerShim::CmName); - QCOMPARE(name, QString("Connection Method")); + QVERIFY(name != QString("")); // Change name cm->setStringAttribute(CMManagerShim::CmName, "WlanBlaaBlaa"); @@ -795,7 +796,7 @@ QVERIFY(cmWlan != NULL); // Update to CommsDat cmWlan->update(); - + uint cmWlanId = cmWlan->getIntAttribute(CMManagerShim::CmId); QCOMPARE(cmWlanId, (uint)1); @@ -1099,6 +1100,7 @@ QVERIFY(cm != NULL); bool ok = cm->deleteConnectionMethod(); QVERIFY(ok == true); + cm->update(); delete cm; } } diff -r 9c97ad6591ae -r 860702281757 cmmanager/cpdestinationplugin/inc/cpiapitem.h --- a/cmmanager/cpdestinationplugin/inc/cpiapitem.h Mon May 03 12:53:07 2010 +0300 +++ b/cmmanager/cpdestinationplugin/inc/cpiapitem.h Thu May 13 23:10:21 2010 +0300 @@ -56,8 +56,6 @@ ~CpIapItem(); - int getIapId() const; - signals: void iapChanged(); @@ -81,7 +79,7 @@ void saveShare(int id); bool isCmManagerAvailable(); HbMenu *createItemMenu( - CMManagerShim::CmmProtectionLevel protLvl, + bool cmConnected, const QPointF &position); void showErrorNote(const QString &info); @@ -94,8 +92,6 @@ QString mIapName; //! ID of the destination referencing this access point int mDestId; - //! Boolean showing if access point is protected. - bool mProtected; //! Helper for connecting signals to underlying widgets CpItemDataHelper *mItemDataHelper; //! Pointer to CmManager for commsdat operations diff -r 9c97ad6591ae -r 860702281757 cmmanager/cpdestinationplugin/src/cpdestinationentryitem.cpp --- a/cmmanager/cpdestinationplugin/src/cpdestinationentryitem.cpp Mon May 03 12:53:07 2010 +0300 +++ b/cmmanager/cpdestinationplugin/src/cpdestinationentryitem.cpp Thu May 13 23:10:21 2010 +0300 @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include @@ -65,6 +64,7 @@ */ CpDestinationEntryItemData::CpDestinationEntryItemData(CpItemDataHelper &itemDataHelper) : CpSettingFormEntryItemData(itemDataHelper), + mList(0), mDialog(0), mOkAction(0) { @@ -76,14 +76,7 @@ OstTrace0(TRACE_NORMAL, CPDESTINATIONENTRYITEMDATA_CPDESTINATIONENTRYITEMDATA, "CpDestinationEntryItemData::CpDestinationEntryItemData: Exception caught"); mCmm = NULL; } - mList = new HbListWidget(); - bool connectionSuccessful = connect( - mList, - SIGNAL(released(HbListWidgetItem *)), - this, - SLOT(updateIndex(HbListWidgetItem*))); - Q_ASSERT(connectionSuccessful); - + // Fix connections itemDataHelper.removeConnection(this,SIGNAL(pressed()),this,SLOT(onLaunchView())); itemDataHelper.addConnection(this,SIGNAL(clicked()),this,SLOT(onLaunchView())); @@ -97,7 +90,6 @@ CpDestinationEntryItemData::~CpDestinationEntryItemData() { OstTraceFunctionEntry0(DUP1_CPDESTINATIONENTRYITEMDATA_CPDESTINATIONENTRYITEMDATA_ENTRY); - delete mList; delete mCmm; delete mAps; delete mOkAction; @@ -197,8 +189,11 @@ bool apProtected = false; if (mDestinationId != 0) { CmDestinationShim *destination = mCmm->destination(mDestinationId); - if (destination->protectionLevel() == CMManagerShim::ProtLevel3) { + CMManagerShim::CmmProtectionLevel level = destination->protectionLevel(); + if (level == CMManagerShim::ProtLevel3) { apProtected = apList[i]->getBoolAttribute(CMManagerShim::CmProtected); + } else if (level == CMManagerShim::ProtLevel1) { + apProtected = true; } delete destination; } @@ -212,7 +207,7 @@ apProtected, bearerPlugin); - // Add name to item + // Add name to UI item iapDataItem->setContentWidgetData( QString("text"), apList[i]->getStringAttribute(CMManagerShim::CmName)); @@ -250,7 +245,7 @@ void CpDestinationEntryItemData::updateDestinationView() { OstTraceFunctionEntry0(CPDESTINATIONENTRYITEMDATA_UPDATEDESTINATIONVIEW_ENTRY); - HbDataForm *form = static_cast(model()->parent()); + HbDataForm *form = static_cast(QObject::parent()->parent()); HbMainWindow *mainWnd = form->mainWindow(); if (mainWnd) { @@ -398,17 +393,23 @@ void CpDestinationEntryItemData::activateArrangeMode() { OstTraceFunctionEntry0(CPDESTINATIONENTRYITEMDATA_ACTIVATEARRANGEMODE_ENTRY); - mList = new HbListWidget(); - HbDataForm *form = static_cast(model()->parent()); + HbDataForm *form = static_cast(QObject::parent()->parent()); HbMainWindow *mainWnd = form->mainWindow(); HbView *view = new HbView(); createArrangeModeView(view); + bool connectionSuccessful = connect( + mList, + SIGNAL(released(HbListWidgetItem*)), + this, + SLOT(updateIndex(HbListWidgetItem*))); + Q_ASSERT(connectionSuccessful); + if (mainWnd && view) { mPreView = mainWnd->currentView(); mainWnd->addView(view); mainWnd->setCurrentView(view, false); - HbAction *arrangeViewBackAction = new HbAction(Hb::BackAction, view); + HbAction *arrangeViewBackAction = new HbAction(Hb::BackNaviAction, view); bool connected = connect( arrangeViewBackAction, SIGNAL(triggered()), @@ -447,7 +448,7 @@ return; } - HbDataForm *form = static_cast(model()->parent()); + HbDataForm *form = static_cast(QObject::parent()->parent()); HbMainWindow *mainWnd = form->mainWindow(); HbView* view = mainWnd->currentView(); @@ -467,7 +468,7 @@ void CpDestinationEntryItemData::viewCancel() { OstTraceFunctionEntry0(CPDESTINATIONENTRYITEMDATA_VIEWCANCEL_ENTRY); - HbDataForm *form = static_cast(model()->parent()); + HbDataForm *form = static_cast(QObject::parent()->parent()); HbMainWindow *mainWnd = form->mainWindow(); HbView* view = mainWnd->currentView(); @@ -596,6 +597,8 @@ QList > apList; fetchReferencedAps(apList, mCmm); CmDestinationShim *destination = NULL; + mList = new HbListWidget(); + view->setWidget(mList); try { destination = mCmm->destination(mDestinationId); @@ -611,17 +614,6 @@ mList->addItem(item); } mList->setArrangeMode(true); - view->setWidget(mList); - - // Toolbar - HbToolBar *tb = view->toolBar(); - HbAction *doneAction = tb->addAction(hbTrId("txt_common_button_ok")); - bool connected = connect( - doneAction, - SIGNAL(triggered()), - this, - SLOT(viewDone())); - Q_ASSERT(connected); delete destination; } catch (const std::exception&) { OstTrace0(TRACE_NORMAL, CPDESTINATIONENTRYITEMDATA_CREATEARRANGEMODEVIEW, "CpDestinationEntryItemData::createArrangeModeView: Exception caught"); @@ -635,6 +627,15 @@ } mList->clear(); } + // Toolbar + HbToolBar *tb = view->toolBar(); + HbAction *doneAction = tb->addAction(hbTrId("txt_common_button_ok")); + bool connected = connect( + doneAction, + SIGNAL(triggered()), + this, + SLOT(viewDone())); + Q_ASSERT(connected); OstTraceFunctionExit0(CPDESTINATIONENTRYITEMDATA_CREATEARRANGEMODEVIEW_EXIT); } @@ -692,7 +693,9 @@ cmm = new CmManagerShim(); if (isDestinationNameValid(destinationName, cmm)) { cmm = new CmManagerShim(); - cmm->destination(mDestinationId)->setName(destinationName); + destination = cmm->destination(mDestinationId); + destination->setName(destinationName); + destination->update(); mDestinationName = destinationName; destinationNameInvalid = false; } @@ -747,7 +750,7 @@ void CpDestinationEntryItemData::showErrorNote(const QString &info) { OstTraceFunctionEntry0(CPDESTINATIONENTRYITEMDATA_SHOWERRORNOTE_ENTRY); - HbMessageBox *note = new HbMessageBox(HbMessageBox::MessageTypeInformation); + HbMessageBox *note = new HbMessageBox(HbMessageBox::MessageTypeWarning); note->clearActions(); note->setAttribute(Qt::WA_DeleteOnClose); note->setText(info); diff -r 9c97ad6591ae -r 860702281757 cmmanager/cpdestinationplugin/src/cpdestinationgroup.cpp --- a/cmmanager/cpdestinationplugin/src/cpdestinationgroup.cpp Mon May 03 12:53:07 2010 +0300 +++ b/cmmanager/cpdestinationplugin/src/cpdestinationgroup.cpp Thu May 13 23:10:21 2010 +0300 @@ -135,7 +135,7 @@ connect(destDataItem, SIGNAL(destChanged()), this, SLOT(updateDestinationInformation())); // Use ItemDataHelper to make connections - QObject* form = this->model()->parent(); + QObject* form = QObject::parent()->parent(); mItemDataHelper->bindToForm(static_cast(form)); // Insert Child to correct position @@ -237,10 +237,10 @@ destDataItem->setContentWidgetData(QString("text"), destDataItem->destinationName()); } // Update UI - HbDataForm *form = static_cast(this->model()->parent()); - HbDataFormModel* model = static_cast(this->model()); + HbDataForm *form = static_cast(QObject::parent()->parent()); + HbDataFormModel* model = static_cast(QObject::parent()); QModelIndex index = model->indexFromItem(this); - HbDataFormViewItem *viewItem = form->dataFormViewItem(index); + HbDataFormViewItem *viewItem = static_cast(form->itemByIndex(index)); viewItem->setExpanded(false); viewItem->setExpanded(true); OstTraceFunctionExit0(CPDESTINATIONGROUP_UPDATEDESTINATIONINFORMATION_EXIT); diff -r 9c97ad6591ae -r 860702281757 cmmanager/cpdestinationplugin/src/cpiapitem.cpp --- a/cmmanager/cpdestinationplugin/src/cpiapitem.cpp Mon May 03 12:53:07 2010 +0300 +++ b/cmmanager/cpdestinationplugin/src/cpiapitem.cpp Thu May 13 23:10:21 2010 +0300 @@ -80,7 +80,6 @@ mIapId(iapId), mIapName(iapName), mDestId(destId), - mProtected(apProtected), mBearerPlugin(bearerPlugin), mMoveOngoing(false), mDialog(0), @@ -96,12 +95,12 @@ // Fix connections itemDataHelper.removeConnection(this,SIGNAL(pressed()),this,SLOT(onLaunchView())); - itemDataHelper.addConnection( - this, - SIGNAL(longPress(QPointF)), - this, - SLOT(showItemMenu(QPointF))); if (!apProtected) { + itemDataHelper.addConnection( + this, + SIGNAL(longPress(QPointF)), + this, + SLOT(showItemMenu(QPointF))); itemDataHelper.addConnection(this,SIGNAL(clicked()),this,SLOT(onLaunchView())); } OstTraceFunctionExit0(CPIAPITEM_CPIAPITEM_EXIT); @@ -118,16 +117,6 @@ } /*! - \return Returns ID of this access point - */ -int CpIapItem::getIapId() const -{ - OstTraceFunctionEntry0(CPIAPITEM_GETIAPID_ENTRY); - OstTraceFunctionExit0(CPIAPITEM_GETIAPID_EXIT); - return mIapId; -} - -/*! Shows user the item specific menu. The menu is triggered by long pressing the access point item. @@ -138,15 +127,11 @@ OstTraceFunctionEntry0(CPIAPITEM_SHOWITEMMENU_ENTRY); if (isCmManagerAvailable()) { bool settingsReadSuccessful = true; - CMManagerShim::CmmProtectionLevel protLvl; - try { - if (mDestId == 0) { - protLvl = CMManagerShim::ProtLevel0; - } else { - CmDestinationShim *destination = mCmm->destination(mDestId); - protLvl = destination->protectionLevel(); - delete destination; - } + bool cmConnected = false; + try { + CmConnectionMethodShim *cm = mCmm->connectionMethod(mIapId); + cmConnected = cm->getBoolAttribute(CMManagerShim::CmConnected); + delete cm; } catch (const std::exception&) { OstTrace0(TRACE_NORMAL, CPIAPITEM_SHOWITEMMENU, "CpIapItem::showItemMenu: Exception caught"); @@ -154,7 +139,7 @@ } if (settingsReadSuccessful) { // Settings could be read from commsdat: show menu. - createItemMenu(protLvl, position)->show(); + createItemMenu(cmConnected, position)->show(); } } OstTraceFunctionExit0(CPIAPITEM_SHOWITEMMENU_EXIT); @@ -248,9 +233,9 @@ deleteSuccessful = false; } if (deleteSuccessful) { - HbDataForm *form = static_cast(model()->parent()); - QModelIndex index = static_cast(this->model())->indexFromItem(this); - HbDataFormViewItem *viewItem = form->dataFormViewItem(index); + HbDataForm *form = static_cast(QObject::parent()->parent()); + QModelIndex index = static_cast(QObject::parent())->indexFromItem(this); + HbAbstractViewItem *viewItem = form->itemByIndex(index); viewItem->deleteLater(); OstTrace0(TRACE_NORMAL, CPIAPITEM_DELETECONFIRMED, "CpIapItem::deleteConfirmed: Emit access point changed signal"); emit iapChanged(); @@ -276,7 +261,7 @@ } // Disconnect because we need to do this only after returning // from accees point settings view - HbDataForm *form = static_cast(model()->parent()); + HbDataForm *form = static_cast(QObject::parent()->parent()); disconnect( form, SIGNAL(itemShown(const QModelIndex)), @@ -295,7 +280,7 @@ OstTraceFunctionEntry0(CPIAPITEM_CREATESETTINGVIEW_ENTRY); CpBaseSettingView *view = NULL; if (mBearerPlugin != NULL) { - HbDataForm *form = static_cast(model()->parent()); + HbDataForm *form = static_cast(QObject::parent()->parent()); bool connected = connect( form, SIGNAL(itemShown(const QModelIndex)), @@ -374,13 +359,9 @@ OstTraceFunctionEntry0(CPIAPITEM_SAVESHARE_ENTRY); try { CmConnectionMethodShim *cm; - if (mDestId != 0) { - CmDestinationShim *source = mCmm->destination(mDestId); - cm = source->connectionMethodByID(mIapId); - delete source; - } else { - cm = mCmm->connectionMethod(mIapId); - } + CmDestinationShim *source = mCmm->destination(mDestId); + cm = source->connectionMethodByID(mIapId); + delete source; CmDestinationShim *target = mCmm->destination(id); target->addConnectionMethod(cm); target->update(); @@ -461,7 +442,7 @@ access point. */ HbMenu *CpIapItem::createItemMenu( - CMManagerShim::CmmProtectionLevel protLvl, + bool cmConnected, const QPointF &position) { OstTraceFunctionEntry0(CPIAPITEM_CREATEITEMMENU_ENTRY); @@ -484,16 +465,11 @@ connected = connect(shareIapAction, SIGNAL(triggered()), this, SLOT(shareIap())); Q_ASSERT(connected); - if (protLvl == CMManagerShim::ProtLevel1) { - // Disable operations for protected destinations + if (cmConnected) { + // Disable operations for connected APs moveIapAction->setDisabled(true); deleteIapAction->setDisabled(true); shareIapAction->setDisabled(true); - } else if (protLvl == CMManagerShim::ProtLevel3) { - // Disable operations for protected access points. - moveIapAction->setDisabled(mProtected); - deleteIapAction->setDisabled(mProtected); - shareIapAction->setDisabled(mProtected); } // Can't share uncategorised APs diff -r 9c97ad6591ae -r 860702281757 cmmanager/cpipsettingsplugin/src/cpipsettingsview.cpp --- a/cmmanager/cpipsettingsplugin/src/cpipsettingsview.cpp Mon May 03 12:53:07 2010 +0300 +++ b/cmmanager/cpipsettingsplugin/src/cpipsettingsview.cpp Thu May 13 23:10:21 2010 +0300 @@ -20,6 +20,7 @@ #include #include #include +#include #include #include @@ -51,38 +52,38 @@ CpIpSettingsView::CpIpSettingsView(QGraphicsItem *parent) : CpBaseSettingView(0, parent) { - HbDataForm *form = settingForm(); - if (form) { - HbDataFormModelItem *modelItem; - CpPluginInterface *plugin = NULL; - QDir pluginsDir("\\resource\\qt\\plugins\\controlpanel"); - QPluginLoader pluginLoader; + HbDataForm *form = new HbDataForm(); + this->setWidget(form); + CpPluginUtility::addCpItemPrototype(form); + HbDataFormModel *model = new HbDataFormModel(form); - HbDataFormModel *model = new HbDataFormModel; - - mItemDataHelper = new CpItemDataHelper(); - mItemDataHelper->setParent(this); + // The parameter given as 0 is a HbDataForm pointer, not parent + mItemDataHelper = new CpItemDataHelper(0); + mItemDataHelper->setParent(this); + + HbDataFormModelItem *modelItem; + CpPluginInterface *plugin = NULL; + QDir pluginsDir("\\resource\\qt\\plugins\\controlpanel"); + QPluginLoader pluginLoader; - // Load listed child plugins - for (int i = 0; !ipSettingsPlugins[i].isEmpty(); i++) { - pluginLoader.setFileName(pluginsDir.absoluteFilePath(ipSettingsPlugins[i])); - plugin = qobject_cast(pluginLoader.instance()); - if (plugin) { - QList formDataItemList = - plugin->createSettingFormItemData(*mItemDataHelper); - for (int j = 0; j < formDataItemList.count(); j++) { - modelItem = formDataItemList.at(j); - if (modelItem) { - model->appendDataFormItem(modelItem); - } + // Load listed child plugins + for (int i = 0; !ipSettingsPlugins[i].isEmpty(); i++) { + pluginLoader.setFileName(pluginsDir.absoluteFilePath(ipSettingsPlugins[i])); + plugin = qobject_cast(pluginLoader.instance()); + if (plugin) { + QList formDataItemList = + plugin->createSettingFormItemData(*mItemDataHelper); + for (int j = 0; j < formDataItemList.count(); j++) { + modelItem = formDataItemList.at(j); + if (modelItem) { + model->appendDataFormItem(modelItem); } } } + } - form->setModel(model); - model->setParent(form); - mItemDataHelper->bindToForm(form); - } + mItemDataHelper->bindToForm(form); + form->setModel(model); } /*! diff -r 9c97ad6591ae -r 860702281757 cmmanager/cppacketdataapplugin/src/cppacketdataapadvancedview.cpp --- a/cmmanager/cppacketdataapplugin/src/cppacketdataapadvancedview.cpp Mon May 03 12:53:07 2010 +0300 +++ b/cmmanager/cppacketdataapplugin/src/cppacketdataapadvancedview.cpp Thu May 13 23:10:21 2010 +0300 @@ -51,15 +51,13 @@ mCmConnectionMethod(cmConnectionMethod) { // Construct packet data AP settings UI - mForm = settingForm(); - if (mForm) { - mModel = new HbDataFormModel(mForm); - - // Add advanced settings groups - createAdvancedSettings(); - - mForm->setModel(mModel); - } + mForm = new HbDataForm(); + this->setWidget(mForm); + mModel = new HbDataFormModel(mForm); + mForm->setModel(mModel); + + // Add advanced settings groups + createAdvancedSettings(); } /*! diff -r 9c97ad6591ae -r 860702281757 cmmanager/cppacketdataapplugin/src/cppacketdataapview.cpp --- a/cmmanager/cppacketdataapplugin/src/cppacketdataapview.cpp Mon May 03 12:53:07 2010 +0300 +++ b/cmmanager/cppacketdataapplugin/src/cppacketdataapview.cpp Thu May 13 23:10:21 2010 +0300 @@ -90,25 +90,23 @@ Q_ASSERT(status); // Construct packet data AP settings UI - mForm = settingForm(); - if (mForm) { - mModel = new HbDataFormModel(mForm); - - // Add access point settings group - createAccessPointSettingsGroup(); - - mForm->setModel(mModel); + mForm = new HbDataForm(); + this->setWidget(mForm); + mModel = new HbDataFormModel(mForm); + mForm->setModel(mModel); + + // Add access point settings group + createAccessPointSettingsGroup(); - status = connect( - mForm, - SIGNAL(itemShown(const QModelIndex)), - this, - SLOT(setEditorPreferences(const QModelIndex))); - Q_ASSERT(status); + status = connect( + mForm, + SIGNAL(itemShown(const QModelIndex)), + this, + SLOT(setEditorPreferences(const QModelIndex))); + Q_ASSERT(status); - // Expand Access point settings group - mForm->setExpanded(mModel->indexFromItem(mApSettingsGroupItem), true); - } + // Expand Access point settings group + mForm->setExpanded(mModel->indexFromItem(mApSettingsGroupItem), true); OstTraceFunctionExit0(CPPACKETDATAAPVIEW_CPPACKETDATAAPVIEW_EXIT); } @@ -577,7 +575,8 @@ { OstTraceFunctionEntry0(CPPACKETDATAAPVIEW_SETEDITORPREFERENCES_ENTRY); - HbDataFormViewItem *viewItem = mForm->dataFormViewItem(modelIndex); + HbDataFormViewItem *viewItem = qobject_cast + (mForm->itemByIndex(modelIndex)); HbDataFormModelItem *modelItem = mModel->itemFromIndex(modelIndex); if (modelItem == mConnectionNameItem @@ -592,45 +591,45 @@ if (modelItem == mConnectionNameItem) { // Setup editor for connection name - editInterface.setConstraints(HbEditorConstraintLatinAlphabetOnly); + editInterface.setInputConstraints(HbEditorConstraintLatinAlphabetOnly); edit->setInputMethodHints(Qt::ImhNoPredictiveText); edit->setMaxLength(CMManagerShim::CmNameLength); } else if (modelItem == mAccessPointNameItem) { // Setup editor for packet data AP name - editInterface.setInputMode(HbInputModeNone); - editInterface.setConstraints(HbEditorConstraintLatinAlphabetOnly); - editInterface.setLocalDigitType(HbDigitTypeNone); + editInterface.setMode(HbInputModeNone); + editInterface.setInputConstraints(HbEditorConstraintLatinAlphabetOnly); + editInterface.setDigitType(HbDigitTypeNone); edit->setInputMethodHints( Qt::ImhNoPredictiveText | Qt::ImhPreferLowercase); edit->setMaxLength(CMManagerShim::PacketDataAPNameLength); } else if (modelItem == mUserNameItem) { // Setup editor for user name - editInterface.setInputMode(HbInputModeNone); - editInterface.setConstraints(HbEditorConstraintLatinAlphabetOnly); + editInterface.setMode(HbInputModeNone); + editInterface.setInputConstraints(HbEditorConstraintLatinAlphabetOnly); editInterface.setEditorClass(HbInputEditorClassUsername); - editInterface.setLocalDigitType(HbDigitTypeNone); + editInterface.setDigitType(HbDigitTypeNone); edit->setInputMethodHints( Qt::ImhNoPredictiveText | Qt::ImhPreferLowercase); edit->setMaxLength(CMManagerShim::PacketDataIFAuthNameLength); } else if (modelItem == mPasswordItem) { // Setup editor for password - editInterface.setInputMode(HbInputModeNone); - editInterface.setConstraints(HbEditorConstraintLatinAlphabetOnly); + editInterface.setMode(HbInputModeNone); + editInterface.setInputConstraints(HbEditorConstraintLatinAlphabetOnly); editInterface.setEditorClass(HbInputEditorClassPassword); - editInterface.setLocalDigitType(HbDigitTypeNone); + editInterface.setDigitType(HbDigitTypeNone); edit->setInputMethodHints( Qt::ImhNoPredictiveText | Qt::ImhPreferLowercase); edit->setMaxLength(CMManagerShim::PacketDataIFAuthPassLength); } else { /* mHomepageItem */ // Setup editor for URL - editInterface.setInputMode(HbInputModeNone); - editInterface.setConstraints(HbEditorConstraintLatinAlphabetOnly); + editInterface.setMode(HbInputModeNone); + editInterface.setInputConstraints(HbEditorConstraintLatinAlphabetOnly); editInterface.setFilter(HbUrlFilter::instance()); editInterface.setEditorClass(HbInputEditorClassUrl); - editInterface.setLocalDigitType(HbDigitTypeNone); + editInterface.setDigitType(HbDigitTypeNone); edit->setInputMethodHints( Qt::ImhNoPredictiveText | Qt::ImhPreferLowercase); diff -r 9c97ad6591ae -r 860702281757 cmmanager/cpwlanapplugin/src/cpwlanapadvancedview.cpp --- a/cmmanager/cpwlanapplugin/src/cpwlanapadvancedview.cpp Mon May 03 12:53:07 2010 +0300 +++ b/cmmanager/cpwlanapplugin/src/cpwlanapadvancedview.cpp Thu May 13 23:10:21 2010 +0300 @@ -50,16 +50,14 @@ mModel(0), mCmConnectionMethod(cmConnectionMethod) { - // Construct packet data AP settings UI - mForm = settingForm(); - if (mForm) { - mModel = new HbDataFormModel(mForm); + // Construct WLAN AP advanced settings UI + mForm = new HbDataForm(); + this->setWidget(mForm); + mModel = new HbDataFormModel(mForm); + mForm->setModel(mModel); - // Add advanced settings groups - createAdvancedSettings(); - - mForm->setModel(mModel); - } + // Add advanced settings groups + createAdvancedSettings(); } /*! diff -r 9c97ad6591ae -r 860702281757 cmmanager/cpwlanapplugin/src/cpwlanapview.cpp --- a/cmmanager/cpwlanapplugin/src/cpwlanapview.cpp Mon May 03 12:53:07 2010 +0300 +++ b/cmmanager/cpwlanapplugin/src/cpwlanapview.cpp Thu May 13 23:10:21 2010 +0300 @@ -35,6 +35,7 @@ #include #include #include +#include #include #include @@ -99,34 +100,34 @@ Q_ASSERT(status); // Construct WLAN AP settings UI - mForm = settingForm(); - if (mForm) { - mModel = new HbDataFormModel(mForm); - - // The parameter given as 0 is a HbDataForm pointer, not parent - mItemDataHelper = new CpItemDataHelper(0); - mItemDataHelper->setParent(this); - - // Add access point settings group - createAccessPointSettingsGroup(); - - mItemDataHelper->bindToForm(mForm); - mForm->setModel(mModel); + mForm = new HbDataForm(); + this->setWidget(mForm); + CpPluginUtility::addCpItemPrototype(mForm); + mModel = new HbDataFormModel(mForm); + + // The parameter given as 0 is a HbDataForm pointer, not parent + mItemDataHelper = new CpItemDataHelper(0); + mItemDataHelper->setParent(this); - status = connect( - mForm, - SIGNAL(itemShown(const QModelIndex)), - this, - SLOT(setEditorPreferences(const QModelIndex))); - Q_ASSERT(status); + // Add access point settings group + createAccessPointSettingsGroup(); + + mItemDataHelper->bindToForm(mForm); + mForm->setModel(mModel); - // Expand access point settings group - mForm->setExpanded(mModel->indexFromItem(mApSettingsGroupItem), TRUE); + status = connect( + mForm, + SIGNAL(itemShown(const QModelIndex)), + this, + SLOT(setEditorPreferences(const QModelIndex))); + Q_ASSERT(status); + + // Expand access point settings group + mForm->setExpanded(mModel->indexFromItem(mApSettingsGroupItem), TRUE); - // Add security settings group if necessary - updateSecurityGroup( - mSecurityModeItem->contentWidgetData("currentIndex").toInt()); - } + // Add security settings group if necessary + updateSecurityGroup( + mSecurityModeItem->contentWidgetData("currentIndex").toInt()); OstTraceFunctionExit0(CPWLANAPVIEW_CPWLANAPVIEW_EXIT); } @@ -667,7 +668,8 @@ { OstTraceFunctionEntry0(CPWLANAPVIEW_SETEDITORPREFERENCES_ENTRY); - HbDataFormViewItem *viewItem = mForm->dataFormViewItem(modelIndex); + HbDataFormViewItem *viewItem = qobject_cast + (mForm->itemByIndex(modelIndex)); HbDataFormModelItem *modelItem = mModel->itemFromIndex(modelIndex); if (modelItem == mConnectionNameItem @@ -680,26 +682,25 @@ if (modelItem == mConnectionNameItem) { // Setup editor for connection name - editInterface.setConstraints(HbEditorConstraintLatinAlphabetOnly); + editInterface.setInputConstraints(HbEditorConstraintLatinAlphabetOnly); edit->setInputMethodHints(Qt::ImhNoPredictiveText); edit->setMaxLength(CMManagerShim::CmNameLength); } else if (modelItem == mWlanNetworkNameItem) { // Setup editor for WLAN SSID - editInterface.setInputMode(HbInputModeNone); - editInterface.setConstraints(HbEditorConstraintLatinAlphabetOnly); - // TODO: Remove comment, should be in w12 - //editInterface.setEditorClass(HbInputEditorClassNetworkName); - editInterface.setLocalDigitType(HbDigitTypeNone); + editInterface.setMode(HbInputModeNone); + editInterface.setInputConstraints(HbEditorConstraintLatinAlphabetOnly); + editInterface.setEditorClass(HbInputEditorClassNetworkName); + editInterface.setDigitType(HbDigitTypeNone); edit->setInputMethodHints( Qt::ImhNoPredictiveText | Qt::ImhPreferLowercase); edit->setMaxLength(CMManagerShim::WlanSSIDLength); } else { /* mHomepageItem */ // Setup editor for URL - editInterface.setInputMode(HbInputModeNone); - editInterface.setConstraints(HbEditorConstraintLatinAlphabetOnly); + editInterface.setMode(HbInputModeNone); + editInterface.setInputConstraints(HbEditorConstraintLatinAlphabetOnly); editInterface.setFilter(HbUrlFilter::instance()); editInterface.setEditorClass(HbInputEditorClassUrl); - editInterface.setLocalDigitType(HbDigitTypeNone); + editInterface.setDigitType(HbDigitTypeNone); edit->setInputMethodHints( Qt::ImhNoPredictiveText | Qt::ImhPreferLowercase); edit->setMaxLength(CMManagerShim::CmStartPageLength); diff -r 9c97ad6591ae -r 860702281757 cmmanager/group/bld.inf --- a/cmmanager/group/bld.inf Mon May 03 12:53:07 2010 +0300 +++ b/cmmanager/group/bld.inf Thu May 13 23:10:21 2010 +0300 @@ -27,4 +27,3 @@ // None #include "../cmmgr/group/bld.inf" -#include "../gsconnsettingsplugin/group/bld.inf" \ No newline at end of file diff -r 9c97ad6591ae -r 860702281757 connectionmonitoring/connmon/connectionmonitor/src/ConnMonBearerGPRS.cpp --- a/connectionmonitoring/connmon/connectionmonitor/src/ConnMonBearerGPRS.cpp Mon May 03 12:53:07 2010 +0300 +++ b/connectionmonitoring/connmon/connectionmonitor/src/ConnMonBearerGPRS.cpp Thu May 13 23:10:21 2010 +0300 @@ -60,13 +60,14 @@ { switch ( mode ) { - case RMobilePhone::ENetworkModeGsm: - case RMobilePhone::ENetworkModeUnknown: // Emulator default + case RMobilePhone::ENetworkModeGsm: err = iConnMonIAP->GetBearerSupportInfo( EBearerIdGPRS, byCell, byPhone ); break; case RMobilePhone::ENetworkModeWcdma: err = iConnMonIAP->GetBearerSupportInfo( EBearerIdWCDMA, byCell, byPhone ); break; + case RMobilePhone::ENetworkModeUnknown: // Emulator default + break; default: LOGEXITFN1("TConnMonBearerGPRS::GetAvailability()", err) return err; // Return silently, report not available diff -r 9c97ad6591ae -r 860702281757 connectionmonitoring/group/bld.inf --- a/connectionmonitoring/group/bld.inf Mon May 03 12:53:07 2010 +0300 +++ b/connectionmonitoring/group/bld.inf Thu May 13 23:10:21 2010 +0300 @@ -22,7 +22,6 @@ PRJ_EXPORTS PRJ_MMPFILES -#include "../connectionmonitorplugin/group/bld.inf" #include "../connectionmonitorui/group/bld.inf" #include "../connmon/connectionmonitor/group/bld.inf" #include "../connmon/dataconnectionlogger/group/bld.inf" diff -r 9c97ad6591ae -r 860702281757 connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifInc/cellulardataconfirmation.h --- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifInc/cellulardataconfirmation.h Mon May 03 12:53:07 2010 +0300 +++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifInc/cellulardataconfirmation.h Thu May 13 23:10:21 2010 +0300 @@ -20,7 +20,7 @@ #include #include -#include +#include #include "ConnectionDialogsNotifBase.h" #include "ConnectionUiUtilitiesCommon.h" @@ -90,7 +90,7 @@ private: /** Pointer to the device dialog interface for handling the dialog */ - CHbDeviceDialog* iDialog; + CHbDeviceDialogSymbian* iDialog; /** The observer to handle the data received from the orbit dialog */ CDeviceDialogObserver* iObserver; /* The choice selected by the user from the dialog */ diff -r 9c97ad6591ae -r 860702281757 connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/cellulardataconfirmation.cpp --- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/cellulardataconfirmation.cpp Mon May 03 12:53:07 2010 +0300 +++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/cellulardataconfirmation.cpp Thu May 13 23:10:21 2010 +0300 @@ -95,7 +95,7 @@ // Observer is needed in order to get the user inputs iObserver = CDeviceDialogObserver::NewL( this ); - iDialog = CHbDeviceDialog::NewL(); + iDialog = CHbDeviceDialogSymbian::NewL(); // The variant map is needed to construct the dialog correctly, // information whether we are in home network is needed diff -r 9c97ad6591ae -r 860702281757 connectionutilities/ConnectionDialogs/ecomsrc/connectiondialogswrapper.cpp --- a/connectionutilities/ConnectionDialogs/ecomsrc/connectiondialogswrapper.cpp Mon May 03 12:53:07 2010 +0300 +++ b/connectionutilities/ConnectionDialogs/ecomsrc/connectiondialogswrapper.cpp Thu May 13 23:10:21 2010 +0300 @@ -22,7 +22,6 @@ #include #include // link against aknnotifierwrapper.lib -#include // CONSTANTS @@ -102,19 +101,6 @@ KUidCConnDlgSelectConn, KMyPriority ) ); -_LIT( KWiFiProtSetupPluginName , "wifiprotplugin.dll" ); - master = - CAknCommonNotifierWrapper::NewL( KUidWiFiProtSetup, - KUidWiFiProtSetup, - KMyPriority, - KWiFiProtSetupPluginName, - 1 ); // we don't use synch reply - - CleanupStack::PushL( master ); - subjects->AppendL( master ); - CleanupStack::Pop( master ); - - // Disconnect dialog subjects->AppendL( CAknCommonNotifierWrapper::NewL( KUidDisconnectDlg, KUidDisconnectDlg, diff -r 9c97ad6591ae -r 860702281757 ipcm_plat/connection_settings_shim_api/inc/cmmanagerdefines_shim.h --- a/ipcm_plat/connection_settings_shim_api/inc/cmmanagerdefines_shim.h Mon May 03 12:53:07 2010 +0300 +++ b/ipcm_plat/connection_settings_shim_api/inc/cmmanagerdefines_shim.h Thu May 13 23:10:21 2010 +0300 @@ -40,18 +40,35 @@ */ namespace CMManagerShim { + /*! + * Constants for bearer types. + */ //! Wlan bearer type const uint BearerTypeWlan = KUidWlanBearerType; //! Packet data bearer type const uint BearerTypePacketData = KUidPacketDataBearerType; /*! + * Constants for IPv4 and IPv6 addresses. + */ + //! Unspecified IPv4 address + const QString UnspecifiedIpv4Address("0.0.0.0"); + //! Known IPv6 name server 1 + const QString KnownIpv6NameServer1("fec0:000:0000:ffff::1"); + //! Known IPv6 name server 2 + const QString KnownIpv6NameServer2("fec0:000:0000:ffff::2"); + //! Dynamic IPv6 address + const QString DynamicIpv6Address("0:0:0:0:0:0:0:0"); + + /*! * Constants for maximum string lengths. */ //! Connection name length const uint CmNameLength = 30; //! Homepage address length const uint CmStartPageLength = 1024; + //! IPv4 IP address length + const uint CmIP4AddressLength = 15; //! IPv6 DNS address length const uint CmIP6NameServerLength = 50; //! Proxy server address length @@ -85,6 +102,8 @@ //! From TConnectionMethodCommonAttributes in cmconnectionmethoddef.h CmNetworkId = CMManager::ECmNetworkId, //! From TConnectionMethodCommonAttributes in cmconnectionmethoddef.h + CmConnected = CMManager::ECmConnected, + //! From TConnectionMethodCommonAttributes in cmconnectionmethoddef.h CmId = CMManager::ECmId, //! From TConnectionMethodCommonAttributes in cmconnectionmethoddef.h CmStartPage = CMManager::ECmStartPage, @@ -95,6 +114,12 @@ //! From TConnectionMethodCommonAttributes in cmconnectionmethoddef.h CmIPAddress = CMManager::ECmIPAddress, //! From TConnectionMethodCommonAttributes in cmconnectionmethoddef.h + CmIPAddrFromServer = CMManager::ECmIPAddFromServer, + //! From TConnectionMethodCommonAttributes in cmconnectionmethoddef.h + CmIPNetmask = CMManager::ECmIPNetmask, + //! From TConnectionMethodCommonAttributes in cmconnectionmethoddef.h + CmIPGateway = CMManager::ECmIPGateway, + //! From TConnectionMethodCommonAttributes in cmconnectionmethoddef.h CmIPNameServer1 = CMManager::ECmIPNameServer1, //! From TConnectionMethodCommonAttributes in cmconnectionmethoddef.h CmIPNameServer2 = CMManager::ECmIPNameServer2, @@ -123,6 +148,11 @@ * From TConnectionMethodPacketDataSpecificAttributes in * cmpluginpacketdatadef.h */ + PacketDataPDPType = CMManager::EPacketDataPDPType, + /*! + * From TConnectionMethodPacketDataSpecificAttributes in + * cmpluginpacketdatadef.h + */ PacketDataIFPromptForAuth = CMManager::EPacketDataIFPromptForAuth, /*! * From TConnectionMethodPacketDataSpecificAttributes in @@ -133,6 +163,46 @@ * From TConnectionMethodPacketDataSpecificAttributes in * cmpluginpacketdatadef.h */ + PacketDataIPAddrFromServer = CMManager::EPacketDataIPAddrFromServer, + /*! + * From TConnectionMethodPacketDataSpecificAttributes in + * cmpluginpacketdatadef.h + */ + PacketDataIPAddr = CMManager::EPacketDataIPAddr, + /*! + * From TConnectionMethodPacketDataSpecificAttributes in + * cmpluginpacketdatadef.h + */ + PacketDataIPDNSAddrFromServer = CMManager::EPacketDataIPDNSAddrFromServer, + /*! + * From TConnectionMethodPacketDataSpecificAttributes in + * cmpluginpacketdatadef.h + */ + PacketDataIPNameServer1 = CMManager::EPacketDataIPNameServer1, + /*! + * From TConnectionMethodPacketDataSpecificAttributes in + * cmpluginpacketdatadef.h + */ + PacketDataIPNameServer2 = CMManager::EPacketDataIPNameServer2, + /*! + * From TConnectionMethodPacketDataSpecificAttributes in + * cmpluginpacketdatadef.h + */ + PacketDataIPIP6DNSAddrFromServer = CMManager::EPacketDataIPIP6DNSAddrFromServer, + /*! + * From TConnectionMethodPacketDataSpecificAttributes in + * cmpluginpacketdatadef.h + */ + PacketDataIPIP6NameServer1 = CMManager::EPacketDataIPIP6NameServer1, + /*! + * From TConnectionMethodPacketDataSpecificAttributes in + * cmpluginpacketdatadef.h + */ + PacketDataIPIP6NameServer2 = CMManager::EPacketDataIPIP6NameServer2, + /*! + * From TConnectionMethodPacketDataSpecificAttributes in + * cmpluginpacketdatadef.h + */ PacketDataIFAuthPass = CMManager::EPacketDataIFAuthPass, /*! * From TConnectionMethodPacketDataSpecificAttributes in @@ -168,9 +238,15 @@ //! From TConnectionMethodWlanSpecificAttributes in cmpluginwlandef.h WlanWepKeyIndex = CMManager::EWlanWepKeyIndex, //! From TConnectionMethodWlanSpecificAttributes in cmpluginwlandef.h + Wlan802_1xAllowUnencrypted = CMManager::EWlan802_1xAllowUnencrypted, + //! From TConnectionMethodWlanSpecificAttributes in cmpluginwlandef.h WlanEnableWpaPsk = CMManager::EWlanEnableWpaPsk, //! From TConnectionMethodWlanSpecificAttributes in cmpluginwlandef.h - WlanWpaPreSharedKey = CMManager::EWlanWpaPreSharedKey + WlanWpaPreSharedKey = CMManager::EWlanWpaPreSharedKey, + //! From TConnectionMethodWlanSpecificAttributes in cmpluginwlandef.h + WlanWapiPsk = CMManager::EWlanWapiPsk, + //! From TConnectionMethodWlanSpecificAttributes in cmpluginwlandef.h + WlanWapiPskFormat = CMManager::EWlanWapiPskFormat }; /*! diff -r 9c97ad6591ae -r 860702281757 ipcm_plat/extended_connection_settings_api/inc/cmcommonui.h --- a/ipcm_plat/extended_connection_settings_api/inc/cmcommonui.h Mon May 03 12:53:07 2010 +0300 +++ b/ipcm_plat/extended_connection_settings_api/inc/cmcommonui.h Thu May 13 23:10:21 2010 +0300 @@ -18,6 +18,9 @@ #ifndef CMCOMMONUI_H #define CMCOMMONUI_H +// Deprecation warning +#warning This header file is deprecated and will be removed. See Polonium CR #461 for details. + // INCLUDES #include #include diff -r 9c97ad6591ae -r 860702281757 ipcm_plat/extended_connection_settings_api/inc/cmconnectionmethodext.h --- a/ipcm_plat/extended_connection_settings_api/inc/cmconnectionmethodext.h Mon May 03 12:53:07 2010 +0300 +++ b/ipcm_plat/extended_connection_settings_api/inc/cmconnectionmethodext.h Thu May 13 23:10:21 2010 +0300 @@ -16,10 +16,12 @@ * */ - #ifndef CMCONNECTIONMETHODEXT_H #define CMCONNECTIONMETHODEXT_H +// Deprecation warning +#warning This header file is deprecated and shall not be used anymore. Please use cmconnectionmethod.h instead. See Polonium CR #461 for details. + #include #include diff -r 9c97ad6591ae -r 860702281757 ipcm_plat/extended_connection_settings_api/inc/cmdestinationext.h --- a/ipcm_plat/extended_connection_settings_api/inc/cmdestinationext.h Mon May 03 12:53:07 2010 +0300 +++ b/ipcm_plat/extended_connection_settings_api/inc/cmdestinationext.h Thu May 13 23:10:21 2010 +0300 @@ -20,6 +20,9 @@ #ifndef CMDESTINATIONEXT_H #define CMDESTINATIONEXT_H +// Deprecation warning +#warning This header file is deprecated and shall not be used anymore. Please use cmdestination.h instead. See Polonium CR #461 for details. + #include #include #include diff -r 9c97ad6591ae -r 860702281757 ipcm_plat/extended_connection_settings_api/inc/cmmanagerext.h --- a/ipcm_plat/extended_connection_settings_api/inc/cmmanagerext.h Mon May 03 12:53:07 2010 +0300 +++ b/ipcm_plat/extended_connection_settings_api/inc/cmmanagerext.h Thu May 13 23:10:21 2010 +0300 @@ -20,6 +20,9 @@ #ifndef CMMANAGEREXT_H #define CMMANAGEREXT_H +// Deprecation warning +#warning This header file is deprecated and shall not be used anymore. Please use cmmanager.h instead. See Polonium CR #461 for details. + #include #include #include diff -r 9c97ad6591ae -r 860702281757 ipcm_plat/extended_connection_settings_api/inc/cmpsettingsconsts.h --- a/ipcm_plat/extended_connection_settings_api/inc/cmpsettingsconsts.h Mon May 03 12:53:07 2010 +0300 +++ b/ipcm_plat/extended_connection_settings_api/inc/cmpsettingsconsts.h Thu May 13 23:10:21 2010 +0300 @@ -19,6 +19,9 @@ #ifndef CMPSETTINGS_CONSTS_H #define CMPSETTINGS_CONSTS_H +// Deprecation warning +#warning This header file is deprecated and shall not be used anymore. See Polonium CR #461 for details. + // CONSTANTS #define KMaxConnNameLength 30 diff -r 9c97ad6591ae -r 860702281757 ipcm_plat/extended_connection_settings_api/inc/cmsettingsui.h --- a/ipcm_plat/extended_connection_settings_api/inc/cmsettingsui.h Mon May 03 12:53:07 2010 +0300 +++ b/ipcm_plat/extended_connection_settings_api/inc/cmsettingsui.h Thu May 13 23:10:21 2010 +0300 @@ -18,6 +18,9 @@ #ifndef C_CMSETTINGSUI_H #define C_CMSETTINGSUI_H +// Deprecation warning +#warning This header file is deprecated and will be removed. See Polonium CR #461 for details. + #include #include