--- a/convergedconnectionhandler/cchclientapi/cchuinotif/inc/cchuinotifconnectionhandler.h Tue May 25 12:31:20 2010 +0300
+++ b/convergedconnectionhandler/cchclientapi/cchuinotif/inc/cchuinotifconnectionhandler.h Wed Jun 09 09:31:04 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-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"
@@ -96,18 +96,51 @@
void GetDestinationsL(
TDesC& aServiceName,
RArray<TUint32>& aDestinationIds );
-
+
+ /**
+ * Gets service´s destination Id where the given iapid belongs.
+ *
+ * @since S60 9.2
+ * @param aIapId internet accesspoint Id.
+ * @param aError error code in return
+ * @param aDestinationId returns destination id
+ */
+ void GetDestinationL(
+ TUint aIapId, TInt& aError, TUint32& aDestinationId );
+
/**
* Gets all access point ids from snap.
*
* @since S60 5.0
* @param aIapIds will store iap ids
* @param aDestinationId id of destination to use
- */
+ */
void GetAccessPointsFromSnapL(
RArray<TUint32>& aIapIds,
TUint32 aDestinationId );
-
+
+ /**
+ * Gets all gprs accesspoints id's from the service's snap.
+ *
+ * @since S60 9.2
+ * @param aIapIds will store iap ids
+ * @param aDestinationId id of destination to use
+ * @return error. KErrNotFound if no gprs accesspoints
+ */
+ TInt GetGprsAccessPointsSetToServiceSnapL(
+ CDesCArray& aIaps, RArray<TUint32>& aIapIds, TUint aIapId );
+
+ /**
+ * Checks given connection methods equality
+ *
+ * @since S60 9.2
+ * @param aIapId Iap Id.
+ * @param aIapIdToCompare Iap Id to compare.
+ * @return ETrue if equals
+ */
+ TBool IsConnectionMethodSimilarL(
+ TUint32 aIapId, TUint32 aIapIdToCompare );
+
private:
CCchUiNotifConnectionHandler();
--- a/convergedconnectionhandler/cchclientapi/cchuinotif/inc/cchuinotifierimpl.h Tue May 25 12:31:20 2010 +0300
+++ b/convergedconnectionhandler/cchclientapi/cchuinotif/inc/cchuinotifierimpl.h Wed Jun 09 09:31:04 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-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"
@@ -252,11 +252,40 @@
*
* @since S60 5.0
* @param aServiceId, service id
+ * @return Error code.
*/
- void ShowGprsSelectionL( TUint aServiceId );
+ TInt ShowGprsSelectionL( TUint aServiceId );
+ /**
+ * Returns ETrue if VoIP over WCDMA is allowed.
+ *
+ * @since S60 5.0
+ * @return ETrue if allowed.
+ */
TBool IsVoIPOverWCDMAAllowedL();
+ /**
+ * Returns ETrue if current service SNAP is missing gprs accespoints
+ * which are set to the internet SNAP.
+ *
+ * @since S60 9.2
+ * @return ETrue if the internet snap has gprs connection
+ * which are not in the services snap.
+ */
+ TBool IsServiceSnapMissingInternetGprsApsL() const;
+
+ /**
+ * Returns internet GPRS IAP's informations which are not
+ * in the current service snap.
+ *
+ * @since S60 9.2
+ * @param aIaps Iap names in return.
+ * @param aIapIds IapIds in return.
+ * @return internet SNAP ID.
+ */
+ TUint32 InternetGprsApsMissingFromServiceSnapL(
+ CDesCArray& aIaps, RArray<TUint32>& aIapIds ) const;
+
// from base class CCCHUiNotifierBase
/**
@@ -335,8 +364,16 @@
*/
CCchUiCallStateListener* iCallStateListener;
+ /**
+ * Service ID.
+ */
TUint iServiceId;
+ /**
+ * Current connection IAP ID.
+ */
+ TUint iCurrentConnectionIapId;
+
CCHUI_UNIT_TEST( T_CchUiNotifierImpl )
};
--- a/convergedconnectionhandler/cchclientapi/cchuinotif/src/cchuinotifconnectionhandler.cpp Tue May 25 12:31:20 2010 +0300
+++ b/convergedconnectionhandler/cchclientapi/cchuinotif/src/cchuinotifconnectionhandler.cpp Wed Jun 09 09:31:04 2010 +0300
@@ -201,6 +201,53 @@
}
// ---------------------------------------------------------------------------
+// CCchUiNotifConnectionHandler::GetDestinationL
+// ---------------------------------------------------------------------------
+//
+void CCchUiNotifConnectionHandler::GetDestinationL(
+ TUint aIapId, TInt& aError, TUint32& aDestinationId )
+ {
+ CCHUIDEBUG2(
+ "CCchUiNotifConnectionHandler::GetDestinationL - IN aIapID = %d", &aIapId );
+
+ aError = KErrNotFound;
+ RArray<TUint32> destinationIds;
+ CleanupClosePushL( destinationIds );
+
+ iCmManagerExt.AllDestinationsL( destinationIds );
+
+ // Find our service destination from Iap ids.
+ for ( TInt i( 0 ) ; i < destinationIds.Count() && KErrNone != aError; i++ )
+ {
+ RCmDestinationExt refDestination =
+ iCmManagerExt.DestinationL( destinationIds[ i ] );
+ CleanupClosePushL( refDestination );
+
+ HBufC* destName = refDestination.NameLC();
+ RCmConnectionMethodExt connectionMethod;
+ CleanupClosePushL( connectionMethod );
+
+ TRAPD( error, connectionMethod =
+ refDestination.ConnectionMethodByIDL( aIapId ) );
+
+ if ( KErrNone == error )
+ {
+ CCHUIDEBUG(
+ "GetDestinationsL - IapID found from destination" );
+ aDestinationId = destinationIds[ i ];
+ aError = KErrNone;
+ }
+ CleanupStack::PopAndDestroy( &connectionMethod );
+ CleanupStack::PopAndDestroy( destName );
+ CleanupStack::PopAndDestroy( &refDestination );
+ }
+
+ CleanupStack::PopAndDestroy( &destinationIds );
+
+ CCHUIDEBUG( "CCchUiNotifConnectionHandler::GetDestinationL - OUT" );
+ }
+
+// ---------------------------------------------------------------------------
// Gets all access point ids from SNAP.
// ---------------------------------------------------------------------------
//
@@ -278,3 +325,103 @@
CCHUIDEBUG(
"CCchUiNotifConnectionHandler::GetGprsAccessPointsFromSnapL - OUT" );
}
+
+// ---------------------------------------------------------------------------
+// CCchUiNotifConnectionHandler::GetGprsAccessPointsSetToServiceSnapL
+// ---------------------------------------------------------------------------
+//
+TInt CCchUiNotifConnectionHandler::GetGprsAccessPointsSetToServiceSnapL(
+ CDesCArray& aIaps, RArray<TUint32>& aIapIds, TUint aIapId )
+ {
+ CCHUIDEBUG2(
+ "CCchUiNotifConnectionHandler::GetGprsAccessPointsSetToServiceSnapL - IN aIapId = %d", aIapId );
+
+ TUint32 destinationId = 0;
+ TInt error;
+ GetDestinationL( aIapId, error, destinationId );
+ if ( KErrNone == error )
+ {
+ CCHUIDEBUG2(
+ "GetGprsAccessPointsSetToServiceSnapL - destinationId = %d", destinationId );
+
+ RCmDestinationExt refDestination;
+ CleanupClosePushL( refDestination );
+ TRAPD( error,
+ refDestination = iCmManagerExt.DestinationL( destinationId ) );
+ CCHUIDEBUG2(
+ "GetGprsAccessPointsSetToServiceSnapL -Destination error %d", error );
+
+ if ( KErrNone == error )
+ {
+ GetGprsAccessPointsFromSnapL( aIaps, aIapIds, refDestination );
+ }
+ CleanupStack::PopAndDestroy( &refDestination );
+ }
+
+ CCHUIDEBUG2(
+ "CCchUiNotifConnectionHandler::GetGprsAccessPointsSetToServiceSnapL -return %d", error );
+
+ return error;
+ }
+
+// ---------------------------------------------------------------------------
+// CCchUiNotifConnectionHandler::IsConnectionMethodSimilarL
+// ---------------------------------------------------------------------------
+//
+TBool CCchUiNotifConnectionHandler::IsConnectionMethodSimilarL(
+ TUint32 aIapId, TUint32 aIapIdToCompare )
+ {
+ CCHUIDEBUG( "CCchUiNotifConnectionHandler::IsConnectionMethodSimilarL - IN" );
+
+ TBool returnVal = EFalse;
+ TUint32 bearerType = iCmManagerExt.GetConnectionMethodInfoIntL(
+ aIapId, CMManager::ECmBearerType );
+ if ( bearerType == iCmManagerExt.GetConnectionMethodInfoIntL(
+ aIapIdToCompare, CMManager::ECmBearerType ) )
+ {
+ HBufC* buffer = NULL;
+ HBufC* bufferToCompare = NULL;
+
+ switch( bearerType )
+ {
+ case KUidWlanBearerType:
+ CCHUIDEBUG( "IsConnectionMethodSimilarL - KUidWlanBearerType" );
+ buffer = iCmManagerExt.GetConnectionMethodInfoStringL(
+ aIapId, CMManager::EWlanSSID );
+ CCHUIDEBUG( "GetConnectionMethodInfoStringL - aIapId EWlanSSID OUT" );
+ CleanupStack::PushL( buffer );
+ bufferToCompare = iCmManagerExt.GetConnectionMethodInfoStringL(
+ aIapIdToCompare, CMManager::EWlanSSID );
+ if ( buffer->Compare( *bufferToCompare ) == 0 )
+ {
+ returnVal = ETrue;
+ }
+ CleanupStack::PopAndDestroy( buffer );
+ delete bufferToCompare;
+ bufferToCompare = NULL;
+ break;
+ case KUidPacketDataBearerType:
+ CCHUIDEBUG( "IsConnectionMethodSimilarL - KUidPacketDataBearerType" );
+ buffer = iCmManagerExt.GetConnectionMethodInfoStringL(
+ aIapId, CMManager::EPacketDataAPName );
+ CleanupStack::PushL( buffer );
+ bufferToCompare = iCmManagerExt.GetConnectionMethodInfoStringL(
+ aIapIdToCompare, CMManager::EPacketDataAPName );
+ if ( buffer->Compare( *bufferToCompare ) == 0 )
+ {
+ returnVal = ETrue;
+ }
+ CleanupStack::PopAndDestroy( buffer );
+ delete bufferToCompare;
+ bufferToCompare = NULL;
+ break;
+ default:
+ CCHUIDEBUG( "IsConnectionMethodSimilarL - Bearer type unknown" );
+ break;
+ }
+ }
+ CCHUIDEBUG2(
+ "CCchUiNotifConnectionHandler::IsConnectionMethodSimilarL -return = %d", returnVal );
+
+ return returnVal;
+ }
--- a/convergedconnectionhandler/cchclientapi/cchuinotif/src/cchuinotifierimpl.cpp Tue May 25 12:31:20 2010 +0300
+++ b/convergedconnectionhandler/cchclientapi/cchuinotif/src/cchuinotifierimpl.cpp Wed Jun 09 09:31:04 2010 +0300
@@ -299,15 +299,23 @@
iResultParams.iDialogMode = currentType;
iResultParams.iServiceId = aServiceId;
iResultParams.iOperationCommand = commandArray[ result ];
-
+ TInt error = KErrNone;
if ( ECchUiCommandCopyGprs == commandArray[ result ] )
{
- ShowGprsSelectionL( aServiceId );
+ error = ShowGprsSelectionL( aServiceId );
}
- CCHUIDEBUG( "ShowNoConnectionsQueryL - write and complete" );
- iMessage.WriteL( iReplySlot,
- TPckgBuf<TCCHUiNotifierParams>( iResultParams ) );
- CompleteMessage( KErrNone );
+ if ( !error )
+ {
+ CCHUIDEBUG( "ShowNoConnectionsQueryL - write and complete" );
+ iMessage.WriteL( iReplySlot,
+ TPckgBuf<TCCHUiNotifierParams>( iResultParams ) );
+ CompleteMessage( KErrNone );
+ }
+ else
+ {
+ CCHUIDEBUG( "ShowNoConnectionsQueryL - complete with cancel" );
+ CompleteMessage( error );
+ }
}
else
{
@@ -452,15 +460,23 @@
iResultParams.iDialogMode = type;
iResultParams.iServiceId = aServiceId;
iResultParams.iOperationCommand = commandArray[ result ];
-
+ TInt error = KErrNone;
if ( ECchUiCommandCopyGprs == commandArray[ result ] )
{
- ShowGprsSelectionL( aServiceId );
+ error = ShowGprsSelectionL( aServiceId );
}
- CCHUIDEBUG( "ShowChangeConnectionQueryL - write and complete" );
- iMessage.WriteL( iReplySlot,
- TPckgBuf<TCCHUiNotifierParams>( iResultParams ) );
- CompleteMessage( KErrNone );
+ if ( !error )
+ {
+ CCHUIDEBUG( "ShowChangeConnectionQueryL - write and complete" );
+ iMessage.WriteL( iReplySlot,
+ TPckgBuf<TCCHUiNotifierParams>( iResultParams ) );
+ CompleteMessage( KErrNone );
+ }
+ else
+ {
+ CCHUIDEBUG( "ShowChangeConnectionQueryL - complete with cancel" );
+ CompleteMessage( error );
+ }
}
else
{
@@ -717,10 +733,11 @@
// Shows gprs iap selection.
// ---------------------------------------------------------------------------
//
-void CCCHUiNotifierImpl::ShowGprsSelectionL( TUint aServiceId )
+TInt CCCHUiNotifierImpl::ShowGprsSelectionL( TUint aServiceId )
{
CCHUIDEBUG( "CCCHUiNotifierImpl::ShowGprsSelectionL - IN" );
-
+
+ TInt error = KErrNone;
RArray<TUint32> iapIds;
CleanupClosePushL( iapIds );
@@ -742,10 +759,8 @@
TUint sourceSnap = KErrNone;
// Fill array here
- CCchUiNotifConnectionHandler* connHandler =
- CCchUiNotifConnectionHandler::NewLC();
- sourceSnap = connHandler->GetGprsAccessPointsL( *arrayforDialog, iapIds );
- CleanupStack::PopAndDestroy( connHandler );
+ sourceSnap = InternetGprsApsMissingFromServiceSnapL(
+ *arrayforDialog, iapIds );
CCHUIDEBUG( "ShowGprsSelectionL - set item array" );
dialog->SetItemTextArray( arrayforDialog );
@@ -756,7 +771,8 @@
iEikEnv->EikAppUi())->SuppressAppSwitching(ETrue);
iAppKeyBlocked = ETrue;
- CCHUIDEBUG( "ShowGprsSelectionL - run dialog" );
+ CCHUIDEBUG( "ShowGprsSelectionL - run dialog" );
+
dialog->RunLD();
// write result, result now holds the item number
@@ -768,7 +784,7 @@
}
else
{
- User::Leave( KErrCancel );
+ error = KErrCancel;
}
// Remove application key blocking
@@ -780,7 +796,8 @@
CleanupStack::PopAndDestroy( arrayforDialog );
CleanupStack::PopAndDestroy( &iapIds );
- CCHUIDEBUG( "CCCHUiNotifierImpl::ShowGprsSelectionL - OUT" );
+ CCHUIDEBUG2( "CCCHUiNotifierImpl::ShowGprsSelectionL -return %d", error );
+ return error;
}
// ---------------------------------------------------------------------------
@@ -875,7 +892,7 @@
CleanupStack::PopAndDestroy( useGprs );
CleanupStack::PopAndDestroy( searchWlan );
- CleanupStack::Pop();
+ CleanupStack::Pop( &aCommandArray );
CCHUIDEBUG(
"CCCHUiNotifierImpl::FillNoConnectionsDefinedListboxL - OUT" );
@@ -933,9 +950,10 @@
aListItems.AppendL( *searchWlan );
aCommandArray.AppendL( ECchUiCommandSearchWlan );
-
- if ( !IsPhoneOfflineL() && IsGprsIapsAvailableL()
- && IsVoIPOverWCDMAAllowedL() )
+
+ if ( !IsPhoneOfflineL() && IsGprsIapsAvailableL() &&
+ IsVoIPOverWCDMAAllowedL() &&
+ IsServiceSnapMissingInternetGprsApsL() )
{
aListItems.AppendL( *useGprs );
aCommandArray.AppendL( ECchUiCommandCopyGprs );
@@ -948,6 +966,104 @@
"CCCHUiNotifierImpl::FillChangeCurrentConnectionListboxL - OUT" );
}
+// ---------------------------------------------------------------------------
+// CCCHUiNotifierImpl::IsServiceSnapMissingInternetGprsApsL
+// ---------------------------------------------------------------------------
+//
+TBool CCCHUiNotifierImpl::IsServiceSnapMissingInternetGprsApsL() const
+ {
+ CCHUIDEBUG(
+ "CCCHUiNotifierImpl::IsServiceSnapMissingInternetGprsApsL - IN" );
+
+ TBool isMissingGPRSIap = EFalse;
+
+ RArray<TUint32> iapIds;
+ CleanupClosePushL( iapIds );
+
+ CDesCArray* iaps = new (ELeave) CDesCArrayFlat( 1 );
+ CleanupStack::PushL( iaps );
+
+ InternetGprsApsMissingFromServiceSnapL( *iaps, iapIds );
+
+ if ( iapIds.Count() )
+ {
+ isMissingGPRSIap = ETrue;
+ }
+ CleanupStack::PopAndDestroy( iaps );
+ CleanupStack::PopAndDestroy( &iapIds );
+
+ CCHUIDEBUG2(
+ "CCCHUiNotifierImpl::IsServiceSnapMissingInternetGprsApsL - return: %d", isMissingGPRSIap );
+
+ return isMissingGPRSIap;
+ }
+
+// ---------------------------------------------------------------------------
+// CCCHUiNotifierImpl::InternetGprsApsMissingFromServiceSnapL
+// ---------------------------------------------------------------------------
+//
+TUint32 CCCHUiNotifierImpl::InternetGprsApsMissingFromServiceSnapL(
+ CDesCArray& aIaps, RArray<TUint32>& aIapIds ) const
+ {
+ CCHUIDEBUG(
+ "CCCHUiNotifierImpl::InternetGprsApsMissingFromServiceSnapL - IN" );
+
+ TUint32 internetSnapId = KErrNone;
+
+ CCchUiNotifConnectionHandler* connHandler =
+ CCchUiNotifConnectionHandler::NewLC();
+
+ CDesCArray* voipGprsIaps = new (ELeave) CDesCArrayFlat( 1 );
+ CleanupStack::PushL( voipGprsIaps );
+
+ RArray<TUint32> voipGprsIapIds;
+ CleanupClosePushL( voipGprsIapIds );
+
+ connHandler->GetGprsAccessPointsSetToServiceSnapL(
+ *voipGprsIaps, voipGprsIapIds, iCurrentConnectionIapId );
+
+ CDesCArray* internetGprsIapNames = new (ELeave) CDesCArrayFlat( 2 );
+ CleanupStack::PushL( internetGprsIapNames );
+
+ RArray<TUint32> internetGprsIapIds;
+ CleanupClosePushL( internetGprsIapIds );
+
+ TRAPD( err, internetSnapId = connHandler->GetGprsAccessPointsL(
+ *internetGprsIapNames, internetGprsIapIds ) );
+ CCHUIDEBUG2( "-GetGprsAccessPointsL -Trap err = %d", err );
+
+ if ( !KErrNone == err && !KErrNotFound == err )
+ {
+ User::Leave( err );
+ }
+
+ for ( TInt i( 0 ); i < internetGprsIapIds.Count(); i++ )
+ {
+ TBool found = EFalse;
+ for ( TInt j( 0 ); j < voipGprsIapIds.Count() && !found; j++ )
+ {
+ found = connHandler->IsConnectionMethodSimilarL(
+ internetGprsIapIds[ i ], voipGprsIapIds[ j ] );
+ }
+ if ( !found )
+ {
+ CCHUIDEBUG2(
+ "IsVoIPSNAPMissingInternetGPRSAp -missing GPRS AP id: %d", internetGprsIapIds[ i ] );
+ aIapIds.AppendL( internetGprsIapIds[ i ] );
+ aIaps.AppendL( internetGprsIapNames->MdcaPoint( i ) );
+ }
+ }
+
+ CleanupStack::PopAndDestroy( &internetGprsIapIds );
+ CleanupStack::PopAndDestroy( internetGprsIapNames );
+ CleanupStack::PopAndDestroy( &voipGprsIapIds );
+ CleanupStack::PopAndDestroy( voipGprsIaps );
+ CleanupStack::PopAndDestroy( connHandler );
+
+ CCHUIDEBUG( "CCCHUiNotifierImpl::InternetGprsApsMissingFromServiceSnapL - OUT" );
+
+ return internetSnapId;
+ }
// ---------------------------------------------------------------------------
// Fills list items and commands for change connection dialog.
@@ -1048,6 +1164,7 @@
CCCHUiNotifierBase::StartL( aBuffer, aReplySlot, aMessage );
iDialogMode = pckg().iDialogMode;
iServiceId = pckg().iServiceId;
+ iCurrentConnectionIapId = pckg().iCurrentConnectionIapId;
switch( pckg().iDialogMode )
{
--- a/convergedconnectionhandler/cchclientapi/inc/cchuiconnectionhandler.h Tue May 25 12:31:20 2010 +0300
+++ b/convergedconnectionhandler/cchclientapi/inc/cchuiconnectionhandler.h Wed Jun 09 09:31:04 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2008-2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-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"
@@ -156,6 +156,17 @@
TBool aHidden );
/**
+ * Checks if connection method already exists.
+ *
+ * @since S60 9.2
+ * @param aIapId internet accespoint ID.
+ * @param aTargetSnap target destination.
+ * @return ETrue if exists.
+ */
+ TBool ConnectionMethodAlreadyExistsL(
+ TUint32 aIapId, RCmDestinationExt& aTargetSnap ) const;
+
+ /**
* Adds new connection method to snap.
*
* @since S60 5.0
--- a/convergedconnectionhandler/cchclientapi/src/cchuiconnectionhandler.cpp Tue May 25 12:31:20 2010 +0300
+++ b/convergedconnectionhandler/cchclientapi/src/cchuiconnectionhandler.cpp Wed Jun 09 09:31:04 2010 +0300
@@ -25,6 +25,8 @@
#include <cmconnectionmethodext.h>
#include <WEPSecuritySettingsUI.h>
#include <WPASecuritySettingsUI.h>
+#include <cmmanager.h>
+#include <cmpluginpacketdatadef.h>
#include "cchuilogger.h"
#include "cchuicchhandler.h"
@@ -610,7 +612,74 @@
CCHUIDEBUG( "CCchUiConnectionHandler::SetSnapToUseL - OUT" );
}
+
+// ---------------------------------------------------------------------------
+// CCchUiConnectionHandler::ConnectionMethodAlreadyExistsL
+// ---------------------------------------------------------------------------
+//
+TBool CCchUiConnectionHandler::ConnectionMethodAlreadyExistsL(
+ TUint32 aIapId, RCmDestinationExt& aTargetSnap ) const
+ {
+ CCHUIDEBUG( "CCchUiConnectionHandler::ConnectionMethodAlreadyExistsL - IN" );
+ TBool returnVal = EFalse;
+ TInt conMethodCount = aTargetSnap.ConnectionMethodCount();
+
+ for ( TInt i( 0 ) ; i < conMethodCount && !returnVal; i ++ )
+ {
+ RCmConnectionMethodExt cm = aTargetSnap.ConnectionMethodL( i );
+ CleanupClosePushL( cm );
+
+ TUint32 bearerType = cm.GetIntAttributeL( CMManager::ECmBearerType );
+ if ( bearerType == iCmManagerExt.GetConnectionMethodInfoIntL(
+ aIapId, CMManager::ECmBearerType ) )
+ {
+ HBufC* buffer = NULL;
+ HBufC* bufferToCompare = NULL;
+
+ switch( bearerType )
+ {
+ case KUidWlanBearerType:
+ CCHUIDEBUG( "ConnectionMethodAlreadyExistsL - KUidWlanBearerType" );
+ buffer = iCmManagerExt.GetConnectionMethodInfoStringL(
+ aIapId, CMManager::EWlanSSID );
+ CleanupStack::PushL( buffer );
+ bufferToCompare =
+ cm.GetStringAttributeL( CMManager::EWlanSSID );
+ if ( buffer->Compare( *bufferToCompare ) == 0 )
+ {
+ returnVal = ETrue;
+ }
+ CleanupStack::PopAndDestroy( buffer );
+ delete bufferToCompare;
+ bufferToCompare = NULL;
+ break;
+ case KUidPacketDataBearerType:
+ CCHUIDEBUG( "ConnectionMethodAlreadyExistsL - KUidPacketDataBearerType" );
+ buffer = iCmManagerExt.GetConnectionMethodInfoStringL(
+ aIapId, CMManager::EPacketDataAPName );
+ CleanupStack::PushL( buffer );
+ bufferToCompare =
+ cm.GetStringAttributeL( CMManager::EPacketDataAPName );
+ if ( buffer->Compare( *bufferToCompare ) == 0 )
+ {
+ returnVal = ETrue;
+ }
+ CleanupStack::PopAndDestroy( buffer );
+ delete bufferToCompare;
+ bufferToCompare = NULL;
+ break;
+ default:
+ break;
+ }
+ }
+ CleanupStack::PopAndDestroy( &cm );
+ }
+ CCHUIDEBUG2( "CCchUiConnectionHandler::ConnectionMethodAlreadyExistsL - return = %d", returnVal );
+
+ return returnVal;
+ }
+
// ---------------------------------------------------------------------------
// Copies specific iap from specific snap to target snap
// ---------------------------------------------------------------------------
@@ -642,38 +711,26 @@
{
CleanupClosePushL( targetSnap );
}
- CCHUIDEBUG( "CopyIapToServiceSnapL - Get source connection");
- RCmConnectionMethodExt sourceConn =
- iCmManagerExt.ConnectionMethodL( aSourceIap );
- CleanupClosePushL( sourceConn );
-
- TInt conMethodCount = targetSnap.ConnectionMethodCount();
- TUint32 sourceIapId = sourceConn.GetIntAttributeL( CMManager::ECmIapId );
- TBool matchFound( EFalse );
-
- for ( TInt ndx = 0 ; ndx < conMethodCount && matchFound == 0; ndx ++ )
- {
- RCmConnectionMethodExt cm = targetSnap.ConnectionMethodL( ndx );
- CleanupClosePushL( cm );
-
- TUint32 targetIapId = cm.GetIntAttributeL( CMManager::ECmIapId );
-
- if( targetIapId == sourceIapId )
- {
- matchFound = ETrue;
- }
- CleanupStack::PopAndDestroy( &cm );
- }
- if( !matchFound )
+ if( !ConnectionMethodAlreadyExistsL( aSourceIap, targetSnap ) )
{
CCHUIDEBUG(
- "CopyIapToServiceSnapL - Get source connection ok -> add connection");
+ "CopyIapToServiceSnapL - connection not exists -> add connection" );
+
+ RCmConnectionMethodExt sourceConn =
+ iCmManagerExt.ConnectionMethodL( aSourceIap );
+ CleanupClosePushL( sourceConn );
- targetSnap.AddConnectionMethodL( sourceConn.CreateCopyL() );
+ RCmConnectionMethodExt newConnection = sourceConn.CreateCopyL();
+ CleanupClosePushL( newConnection );
+ targetSnap.AddConnectionMethodL( newConnection );
+ CleanupStack::PopAndDestroy( &newConnection );
+ CleanupStack::PopAndDestroy( &sourceConn );
+
+ targetSnap.UpdateL();
}
- CleanupStack::PopAndDestroy( &sourceConn );
- CleanupStack::PopAndDestroy( &targetSnap );
+
+ CleanupStack::PopAndDestroy( &targetSnap );
CCHUIDEBUG( "CCchUiConnectionHandler::CopyIapToServiceSnapL - OUT" );
}
--- a/iptel_plat/cch_client_api/inc/cch.h Tue May 25 12:31:20 2010 +0300
+++ b/iptel_plat/cch_client_api/inc/cch.h Wed Jun 09 09:31:04 2010 +0300
@@ -372,7 +372,7 @@
*/
CCchImpl* iImplementation;
-#ifdef _DEBUG
+#ifdef CCHUI_EUNIT
friend class UT_CchUi;
#endif
};
--- a/sipvoipprovider/group/svpcontroller.mmp Tue May 25 12:31:20 2010 +0300
+++ b/sipvoipprovider/group/svpcontroller.mmp Wed Jun 09 09:31:04 2010 +0300
@@ -136,4 +136,5 @@
LIBRARY ipapputils.lib // CIpAppPhoneUtils, CIPAppUtilsAddressResolver
LIBRARY callprovider.lib
LIBRARY serviceprovidersettings.lib
+LIBRARY featdiscovery.lib
--- a/sipvoipprovider/inc/svpsessionbase.h Tue May 25 12:31:20 2010 +0300
+++ b/sipvoipprovider/inc/svpsessionbase.h Wed Jun 09 09:31:04 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2006-2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006-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"
@@ -497,6 +497,12 @@
*/
TBool IsIdle();
+ /**
+ * Returns ETrue if anonymous call is on.
+ * @since Series 60 9.2
+ * @return TBool Flag value
+ */
+ TBool IsCLIROnL() const;
// dtmf
--- a/sipvoipprovider/src/svpcontroller.cpp Tue May 25 12:31:20 2010 +0300
+++ b/sipvoipprovider/src/svpcontroller.cpp Wed Jun 09 09:31:04 2010 +0300
@@ -33,6 +33,7 @@
#include <wlantrafficstreamparameters.h> // CWlanMgmtClient
#include <ccpdefs.h>
+#include <featdiscovery.h>
#include "svpcontroller.h"
#include "svpmosession.h"
@@ -72,8 +73,12 @@
iSuppServices = CSVPSupplementaryServices::NewL();
iSVPUtility = CSVPUtility::NewL();
iRtpObserver = CSVPRtpObserver::NewL();
+ TBool wlanSupported = CFeatureDiscovery::IsFeatureSupportedL( KFeatureIdProtocolWlan );
#ifndef __WINS__
- iWlanMgmt = CWlanMgmtClient::NewL();
+ if ( wlanSupported )
+ {
+ iWlanMgmt = CWlanMgmtClient::NewL();
+ }
#endif // __WINS__
SVPDEBUG1( "CSVPController::ConstructL Out" )
--- a/sipvoipprovider/src/svpsessionbase.cpp Tue May 25 12:31:20 2010 +0300
+++ b/sipvoipprovider/src/svpsessionbase.cpp Wed Jun 09 09:31:04 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2006-2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006-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"
@@ -3274,3 +3274,11 @@
return iMuted;
}
+// ---------------------------------------------------------------------------
+// CSVPSessionBase::IsCLIROnL
+// ---------------------------------------------------------------------------
+//
+TBool CSVPSessionBase::IsCLIROnL() const
+ {
+ return iSVPUtility.IsCLIROnL();
+ }
--- a/sipvoipprovider/svptransfer/src/svptransferstatecontext.cpp Tue May 25 12:31:20 2010 +0300
+++ b/sipvoipprovider/svptransfer/src/svptransferstatecontext.cpp Wed Jun 09 09:31:04 2010 +0300
@@ -967,22 +967,25 @@
HBufC8* recipient = NULL;
const CMceSession& session = iSVPSession->Session();
__ASSERT_ALWAYS( &session, User::Leave( KErrArgument ) );
-
- if ( iSVPSession->IsMobileOriginated() )
+
+ TBool isCLIROn = iSVPSession->IsCLIROnL();
+
+ if ( ( iSVPSession->IsMobileOriginated() && !isCLIROn )
+ || ( !iSVPSession->IsMobileOriginated() && isCLIROn ) )
{
- SVPDEBUG1( "CSVPTransferStateContext::CreateMceOutReferL(aTarget), MO case" )
- const TDesC8& recip = session.Recipient();
- __ASSERT_ALWAYS( &recip, User::Leave( KErrArgument ) );
- recipient = HBufC8::NewLC( recip.Length() );
- recipient->Des().Copy( recip );
+ SVPDEBUG1( "CSVPTransferStateContext::CreateMceOutReferL(aTarget), orig" )
+ const TDesC8& orig = session.Originator();
+ __ASSERT_ALWAYS( &orig, User::Leave( KErrArgument ) );
+ recipient = HBufC8::NewLC( orig.Length() );
+ recipient->Des().Copy( orig );
}
else
{
- SVPDEBUG1( "CSVPTransferStateContext::CreateMceOutReferL(aTarget), MT case" )
- const TDesC8& orig = session.Originator();
- __ASSERT_ALWAYS( &orig, User::Leave( KErrArgument ) );
- recipient = HBufC8::NewLC( orig.Length() );
- recipient->Des().Copy( orig );
+ SVPDEBUG1( "CSVPTransferStateContext::CreateMceOutReferL(aTarget), recip" )
+ const TDesC8& recip = session.Recipient();
+ __ASSERT_ALWAYS( &recip, User::Leave( KErrArgument ) );
+ recipient = HBufC8::NewLC( recip.Length() );
+ recipient->Des().Copy( recip );
}
// remove all extra parameters from recipient address