--- a/voipplugins/voipadapters/dmvoipadapter/src/nsmldmvoipadapter.cpp Wed Sep 15 12:01:56 2010 +0300
+++ b/voipplugins/voipadapters/dmvoipadapter/src/nsmldmvoipadapter.cpp Wed Oct 13 14:20:32 2010 +0300
@@ -242,11 +242,6 @@
// Default IM message tone
_LIT( KDefaultTone, "Message 2.aac" );
-// Bearer related constants
-const TUint32 KBearerNotSpecified = 0;
-const TUint32 KBearerWlanOnly = 1;
-const TUint32 KBearerCellularOnly = 2;
-
// ---------------------------------------------------------------------------
// CNSmlDmVoIPAdapter::ConstructL
// Symbian 2nd phase constructor can leave.
@@ -307,7 +302,7 @@
{
delete iCRCSEProfile;
}
- delete iTempProfileIdObject;
+
iProfileModifs.Close();
iCodecModifs.Close();
@@ -1273,7 +1268,6 @@
{
retValue = CSmlDmAdapter::EInvalidObject;
}
- iAllowVoIPOverWCDMAModified = ETrue;
}
// VoIP/x/VoIPDigits
else if ( KNSmlDMVoIPVoIPDigits() == uriSeg )
@@ -1837,56 +1831,11 @@
{
iProfileEntries[iProfileID]->iIds[DesToInt(
LastURISeg( aLUID ).Right( 10 ))].iProfileType = 0;
- // If the profile id is not saved and the string to fetch it is only temporaly stored,
- // the profile id will be fetched from previously-stored member value and set as well
- // when saveing the profiletype.
- if( iTempProfileIdObject )
- {
- TUint32 profileId = SetSipRefL( *iTempProfileIdObject );
- if ( profileId > 0 )
- {
- // Set profileId to settingsids.
- iProfileEntries[iProfileID]->
- iIds[DesToInt( LastURISeg( aLUID ).Right( 10 ))].
- iProfileId = profileId;
- retValue = CSmlDmAdapter::EOk;
- }
- else
- {
- retValue = CSmlDmAdapter::EInvalidObject;
- }
- }
- iIsProfileTypeSet = ETrue;
- delete iTempProfileIdObject;
- iTempProfileIdObject = NULL;
}
else if ( KNSmlDMVoIPProfileTypeSCCP() == aObject )
{
iProfileEntries[iProfileID]->iIds[DesToInt(
LastURISeg( aLUID ).Right( 10 ))].iProfileType = 1;
- // If the profile id is not saved and the string to fetch it is only temporaly stored,
- // the profile id will be fetched from previously-stored member value and set as well
- // when saveing the profiletype.
- if( iTempProfileIdObject )
- {
- TUint32 profileId = SetSccpRefL( *iTempProfileIdObject );
- // profileId can be zero
- if ( profileId > 0 || 0 == profileId )
- {
- // set profileId to settingsids
- iProfileEntries[iProfileID]->iIds[DesToInt(
- LastURISeg( aLUID ).Right( 10 ))].
- iProfileId = profileId;
- retValue = CSmlDmAdapter::EOk;
- }
- else
- {
- retValue = CSmlDmAdapter::EInvalidObject;
- }
- }
- iIsProfileTypeSet = ETrue;
- delete iTempProfileIdObject;
- iTempProfileIdObject = NULL;
}
else
{
@@ -1934,17 +1883,6 @@
retValue = CSmlDmAdapter::EInvalidObject;
}
}
- // If the ProfileType has not been set yet,
- // the string used to fetch ProfileId temporarily is stored to a member value.
- else if ( !iIsProfileTypeSet )
- {
- if( iTempProfileIdObject )
- {
- delete iTempProfileIdObject;
- iTempProfileIdObject = NULL;
- }
- iTempProfileIdObject = aObject.AllocL();
- }
else
{
// no SCCP or SIP type found
@@ -2337,45 +2275,21 @@
// VoIP/x/AllowVoIPOverWCDMA
else if ( KNSmlDMVoIPAllowVoIPOverWCDMA() == uriSeg )
{
- TInt sipProfileId(0);
- TUint32 bearerFilttering(0);
-
- for ( TInt index = 0; index < iProfileEntries[iProfileID]->
- iIds.Count(); index++ )
+ if ( Entry::EOONotSet == iProfileEntries[iProfileID]->
+ iAllowVoIPoverWCDMA )
{
- if ( iProfileEntries[iProfileID]->iIds[index].iProfileType == 0 )
- {
- sipProfileId = iProfileEntries[iProfileID]->
- iIds[index].iProfileId;
- break;
- }
+ segmentResult.Copy( KNSmlDMVoIPValueNotSet );
}
-
- CSIPProfile* sipProf = NULL;
- CSIPProfileRegistryObserver* sipRegObs =
- CSIPProfileRegistryObserver::NewLC(); // CS:1
- CSIPManagedProfileRegistry* sipProfReg =
- CSIPManagedProfileRegistry::NewLC( *sipRegObs ); // CS:2
- TRAPD( err, ( sipProf = sipProfReg->ProfileL( sipProfileId ) ) );
-
- if ( KErrNone == err )
+ if ( Entry::EOn == iProfileEntries[iProfileID]->
+ iAllowVoIPoverWCDMA )
{
- User::LeaveIfError( sipProf->GetParameter(
- KBearerType, bearerFilttering ) );
+ segmentResult.Copy( KNSmlDMVoIPValueTrue );
}
-
- CleanupStack::PopAndDestroy( sipProfReg ); // CS:1
- CleanupStack::PopAndDestroy( sipRegObs ); // CS:0
-
- if ( bearerFilttering == KBearerWlanOnly )
+ if ( Entry::EOff == iProfileEntries[iProfileID]->
+ iAllowVoIPoverWCDMA )
{
segmentResult.Copy( KNSmlDMVoIPValueFalse );
}
-
- else if ( bearerFilttering == KBearerNotSpecified )
- {
- segmentResult.Copy( KNSmlDMVoIPValueTrue );
- }
}
// VoIP/x/VoIPDigits
else if ( KNSmlDMVoIPVoIPDigits() == uriSeg )
@@ -4376,14 +4290,13 @@
if ( ( 0 == iProfileEntries[counter]->
iIds[index].iProfileType )
&& iProfileEntries[counter]->
- iIds[index].iProfileId > 0
+ iIds[index].iProfileId > 1
&& ( iProfileEntries[counter]->
iSIPVoIPUAHTerminalType ||
iProfileEntries[counter]->
iSIPVoIPUAHeaderWLANMAC ||
iProfileEntries[counter]->
- iSIPVoIPUAHeaderString.Length() > 0 ||
- iAllowVoIPOverWCDMAModified ) )
+ iSIPVoIPUAHeaderString.Length() > 0 ) )
{
// Create objects that allow the creation of
// CSIPManagedProfile object.
@@ -4445,27 +4358,6 @@
sipManProf->SetParameter(
KSIPHeaders, *uahArray ) );
}
-
- if ( iAllowVoIPOverWCDMAModified )
- {
- if ( iProfileEntries[iProfileID]->
- iAllowVoIPoverWCDMA ==
- CRCSEProfileEntry::EOn )
- {
- User::LeaveIfError(
- sipManProf->SetParameter(
- KBearerType, KBearerNotSpecified ) );
- }
- else if ( iProfileEntries[iProfileID]->
- iAllowVoIPoverWCDMA ==
- CRCSEProfileEntry::EOff )
- {
- User::LeaveIfError(
- sipManProf->SetParameter(
- KBearerType, KBearerWlanOnly ) );
- }
- iAllowVoIPOverWCDMAModified = EFalse;
- }
sipProfReg->SaveL( *sipManProf );
uahArray->Reset();