# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1268401329 -7200 # Node ID 7117cbf1600ac8a904b5fbaf46535b0f190c5716 # Parent fc8c25e5a2e8cb4d2157188941d81165bdbd1b23 Revision: 201007 Kit: 201008 diff -r fc8c25e5a2e8 -r 7117cbf1600a commsconfig/cscapplicationui/data/csc.rss --- a/commsconfig/cscapplicationui/data/csc.rss Fri Feb 19 22:44:34 2010 +0200 +++ b/commsconfig/cscapplicationui/data/csc.rss Fri Mar 12 15:42:09 2010 +0200 @@ -143,7 +143,7 @@ RESOURCE AVKON_VIEW r_csc_view_service { menubar = r_csc_serviceview_menubar; - cba = R_AVKON_SOFTKEYS_OPTIONS_EXIT; + cba = R_AVKON_SOFTKEYS_OPTIONS_BACK; } //---------------------------------------------------- diff -r fc8c25e5a2e8 -r 7117cbf1600a commsconfig/cscapplicationui/group/cscappui.mmp --- a/commsconfig/cscapplicationui/group/cscappui.mmp Fri Feb 19 22:44:34 2010 +0200 +++ b/commsconfig/cscapplicationui/group/cscappui.mmp Fri Mar 12 15:42:09 2010 +0200 @@ -56,6 +56,7 @@ LIBRARY cch.lib LIBRARY ecom.lib LIBRARY egul.lib +LIBRARY ws32.lib LIBRARY bafl.lib LIBRARY cone.lib LIBRARY avkon.lib diff -r fc8c25e5a2e8 -r 7117cbf1600a commsconfig/cscapplicationui/inc/cscappui.h --- a/commsconfig/cscapplicationui/inc/cscappui.h Fri Feb 19 22:44:34 2010 +0200 +++ b/commsconfig/cscapplicationui/inc/cscappui.h Fri Mar 12 15:42:09 2010 +0200 @@ -194,6 +194,13 @@ * @param aServiceId service id */ void SnapCheckL( TUint aServiceId ) const; + + /* + * Exits GS application if needed + * + * @since S60 3.2 + */ + TBool ExitGSIfParentL(); private: // data diff -r fc8c25e5a2e8 -r 7117cbf1600a commsconfig/cscapplicationui/src/cscappui.cpp --- a/commsconfig/cscapplicationui/src/cscappui.cpp Fri Feb 19 22:44:34 2010 +0200 +++ b/commsconfig/cscapplicationui/src/cscappui.cpp Fri Mar 12 15:42:09 2010 +0200 @@ -29,6 +29,9 @@ #include #include #include +#include +#include +#include #include "cscappui.h" #include "csclogger.h" @@ -45,6 +48,7 @@ #include "cscenguiextensionpluginhandler.h" const TInt KMaxParamLength = 255; +const TInt KGSChildAppWindowGroupNameLength = 100; // ======== MEMBER FUNCTIONS ======== @@ -190,12 +194,19 @@ switch ( aCommand ) { + case EAknSoftkeyBack: + { + Exit(); + break; + } case EEikCmdExit: case EAknSoftkeyExit: - case EAknSoftkeyBack: case EAknCmdExit: + { + ExitGSIfParentL(); Exit(); break; + } default: break; } @@ -457,3 +468,50 @@ CSCDEBUG( "CCSCAppUi::SnapCheckL - end" ); } + +// --------------------------------------------------------------------------- +// Check if GS has to be closed +// --------------------------------------------------------------------------- +// +TBool CCSCAppUi::ExitGSIfParentL() + { + TBool ret = EFalse; + + RWsSession ws = CEikonEnv::Static()->WsSession(); + TApaTaskList taskList( ws ); + TApaTask gstask = taskList.FindApp( KUidGS ); + + if ( gstask.Exists() ) + { + TInt gswgid = gstask.WgId(); + RArray wgrp; + ws.WindowGroupList( &wgrp ); + TInt i = 0; + + // Loop window groups, find GS's child app + for ( i=0; i < wgrp.Count() ; ++i ) + { + TBuf< KGSChildAppWindowGroupNameLength > name; + ws.GetWindowGroupNameFromIdentifier( wgrp[i].iId , name ); + RWsSession::TWindowGroupChainInfo wginfo = wgrp[i]; + if ( wginfo.iParentId == gswgid ) // Child of GS found + { + CApaWindowGroupName* windowName1 = + CApaWindowGroupName::NewLC( ws, wginfo.iId ); // CS:1 + TUid embeddeeuid; + embeddeeuid = windowName1->AppUid(); + + // Check if CSC is the child of GS + if ( KUidCscHelp == embeddeeuid ) + { + ret = ETrue; + gstask.EndTask(); + } + CleanupStack::PopAndDestroy( windowName1 ); // CS:0 + } + } + wgrp.Close(); + } + + return ret; + } diff -r fc8c25e5a2e8 -r 7117cbf1600a commsconfig/cscapplicationui/src/cscserviceview.cpp --- a/commsconfig/cscapplicationui/src/cscserviceview.cpp Fri Feb 19 22:44:34 2010 +0200 +++ b/commsconfig/cscapplicationui/src/cscserviceview.cpp Fri Mar 12 15:42:09 2010 +0200 @@ -207,8 +207,10 @@ break; // Exit menu command. case EAknSoftkeyExit: + AppUi()->HandleCommandL( EEikCmdExit ); + break; case EAknSoftkeyBack: - AppUi()->HandleCommandL( EEikCmdExit ); + AppUi()->HandleCommandL( EAknSoftkeyBack ); break; // Let appui handle other commands. default: diff -r fc8c25e5a2e8 -r 7117cbf1600a commsconfig/cscsettingsui/inc/cscsettingsuimainview.h --- a/commsconfig/cscsettingsui/inc/cscsettingsuimainview.h Fri Feb 19 22:44:34 2010 +0200 +++ b/commsconfig/cscsettingsui/inc/cscsettingsuimainview.h Fri Mar 12 15:42:09 2010 +0200 @@ -267,6 +267,8 @@ CAknNavigationControlContainer* iNaviPane; CAknNavigationDecorator* iNaviDecorator; + + TBool iImToneSelectionListOpen; #ifdef _DEBUG friend class UT_cscsettingsui; diff -r fc8c25e5a2e8 -r 7117cbf1600a commsconfig/cscsettingsui/src/cscsettingsuimainview.cpp --- a/commsconfig/cscsettingsui/src/cscsettingsuimainview.cpp Fri Feb 19 22:44:34 2010 +0200 +++ b/commsconfig/cscsettingsui/src/cscsettingsuimainview.cpp Fri Mar 12 15:42:09 2010 +0200 @@ -81,6 +81,7 @@ iTitlePane = static_cast ( statusPane->ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) ); + iImToneSelectionListOpen = EFalse; CSCSETUIDEBUG( "CCSCSettingsUiMainView::ConstructL - end" ); } @@ -670,51 +671,60 @@ // --------------------------------------------------------------------------- void CCSCSettingsUiMainView::ShowImToneSelectionListL() { - CMediaFileList* list = CMediaFileList::NewL(); - CleanupStack::PushL( list ); - - HBufC* popupTitle = StringLoader::LoadLC( - R_CSCSETTINGSUI_IM_TONE_POPUP_HEADING ); - - HBufC* noTone = StringLoader::LoadLC( - R_CSCSETTINGSUI_NO_IM_TONE_TEXT ); - - list->SetAttrL( - CMediaFileList::EAttrAutomatedType, - CDRMHelper::EAutomatedTypeIMAlert ); - - list->SetNullItemL( - *noTone, - KNullDesC, - CMediaFileList::EMediaFileTypeAudio, - CMediaFileList::ENullItemIconOff ); + CSCSETUIDEBUG( "CCSCSettingsUiMainView::ShowImToneSelectionListL - begin" ); - list->SetAttrL( CMediaFileList::EAttrTitle, *popupTitle ); - - TBuf toneName; - TInt nullItem = KErrNotFound; - - TBool result = list->ShowMediaFileListL( - &toneName, &nullItem , NULL, NULL ); - - CleanupStack::PopAndDestroy( noTone ); - CleanupStack::PopAndDestroy( popupTitle ); - CleanupStack::PopAndDestroy( list ); - - if ( result ) + if ( !iImToneSelectionListOpen ) { - iContainer->SaveImTonePathL( toneName ); - } - else if( KErrNotFound != nullItem ) - { - iContainer->SaveImTonePathL( KNullDesC ); - } - else - { - // do nothing + iImToneSelectionListOpen = ETrue; + CMediaFileList* list = CMediaFileList::NewL(); + CleanupStack::PushL( list ); + + HBufC* popupTitle = StringLoader::LoadLC( + R_CSCSETTINGSUI_IM_TONE_POPUP_HEADING ); + + HBufC* noTone = StringLoader::LoadLC( + R_CSCSETTINGSUI_NO_IM_TONE_TEXT ); + + list->SetAttrL( + CMediaFileList::EAttrAutomatedType, + CDRMHelper::EAutomatedTypeIMAlert ); + + list->SetNullItemL( + *noTone, + KNullDesC, + CMediaFileList::EMediaFileTypeAudio, + CMediaFileList::ENullItemIconOff ); + + list->SetAttrL( CMediaFileList::EAttrTitle, *popupTitle ); + + TBuf toneName; + TInt nullItem = KErrNotFound; + + TBool result = list->ShowMediaFileListL( + &toneName, &nullItem , NULL, NULL ); + + CleanupStack::PopAndDestroy( noTone ); + CleanupStack::PopAndDestroy( popupTitle ); + CleanupStack::PopAndDestroy( list ); + + if ( result ) + { + iContainer->SaveImTonePathL( toneName ); + } + else if( KErrNotFound != nullItem ) + { + iContainer->SaveImTonePathL( KNullDesC ); + } + else + { + // do nothing + } + + iContainer->UpdateContainerL(); + iImToneSelectionListOpen = EFalse; } - iContainer->UpdateContainerL(); + CSCSETUIDEBUG( "CCSCSettingsUiMainView::ShowImToneSelectionListL - end" ); } diff -r fc8c25e5a2e8 -r 7117cbf1600a convergedconnectionhandler/cchclientapi/src/cchuiconnectionhandler.cpp --- a/convergedconnectionhandler/cchclientapi/src/cchuiconnectionhandler.cpp Fri Feb 19 22:44:34 2010 +0200 +++ b/convergedconnectionhandler/cchclientapi/src/cchuiconnectionhandler.cpp Fri Mar 12 15:42:09 2010 +0200 @@ -102,6 +102,9 @@ // Security mode of the WLAN network TWlanConnectionSecurityMode securityMode; + // Flag for determining if hidden wlan + TBool hiddenWlan( EFalse ); + CCHUIDEBUG( "CCchUiConnectionHandler::SearchAccessPointsL - begin search wlan" ); @@ -118,6 +121,27 @@ CCHUIDEBUG( "CCchUiConnectionHandler::SearchAccessPointsL - search wlan finished" ); + // Check if hidden wlan + TUint32 easyWlanId( 0 ); + easyWlanId = iCmManagerExt.EasyWlanIdL(); + + if ( easyWlanId ) + { + RCmConnectionMethodExt cmConnMethodExt = + iCmManagerExt.ConnectionMethodL( easyWlanId ); + CleanupClosePushL( cmConnMethodExt ); + + if ( cmConnMethodExt.GetBoolAttributeL( CMManager::EWlanScanSSID ) ) + { + CCHUIDEBUG( + "CCchUiConnectionHandler::SearchAccessPointsL - hidden wlan" ); + + hiddenWlan = ETrue; + } + + CleanupStack::PopAndDestroy( &cmConnMethodExt ); + } + HBufC* ssid16 = HBufC::NewL( KSsidLength ); CleanupStack::PushL( ssid16 ); @@ -157,7 +181,11 @@ TBool alreadyExists = EFalse; TInt iapId = AddNewConnectionMethodL( - newDestination, *ssid16, securityMode, alreadyExists, EFalse ); + newDestination, + *ssid16, + securityMode, + alreadyExists, + hiddenWlan ); if ( KErrCancel == iapId ) { @@ -191,7 +219,11 @@ TBool alreadyExists = EFalse; TInt iapId = AddNewConnectionMethodL( - destination, *ssid16, securityMode, alreadyExists, EFalse ); + destination, + *ssid16, + securityMode, + alreadyExists, + hiddenWlan ); CleanupStack::PopAndDestroy( &destination ); CleanupStack::PopAndDestroy( ssid16 ); @@ -230,6 +262,17 @@ SetSnapToUseL( aServiceId, aSnapId ); } + // Reset Easy Wlan EWlanScanSSID parameter to EFalse + if ( easyWlanId && hiddenWlan ) + { + RCmConnectionMethodExt cmConnMethodExt = + iCmManagerExt.ConnectionMethodL( easyWlanId ); + CleanupClosePushL( cmConnMethodExt ); + cmConnMethodExt.SetBoolAttributeL( CMManager::EWlanScanSSID, EFalse ); + cmConnMethodExt.UpdateL(); + CleanupStack::PopAndDestroy( &cmConnMethodExt ); + } + CCHUIDEBUG( "CCchUiConnectionHandler::SearchAccessPointsL - OUT" ); } diff -r fc8c25e5a2e8 -r 7117cbf1600a sipvoipprovider/src/svpcontroller.cpp --- a/sipvoipprovider/src/svpcontroller.cpp Fri Feb 19 22:44:34 2010 +0200 +++ b/sipvoipprovider/src/svpcontroller.cpp Fri Mar 12 15:42:09 2010 +0200 @@ -2226,8 +2226,15 @@ // Get VoIP profile by service id reg->FindByServiceIdL( callParams.ServiceId(), entryArray ); // Take first entry from array - CRCSEProfileEntry* entry = entryArray[0]; - + CRCSEProfileEntry* entry = NULL; + if (entryArray.Count() > 0) + { + entry = entryArray[0]; + } + else + { + User::Leave(KErrNotFound); + } // array for provisioned data CDesC8ArrayFlat* userAgentHeaders = new( ELeave )CDesC8ArrayFlat( 4 ); CleanupStack::PushL( userAgentHeaders ); diff -r fc8c25e5a2e8 -r 7117cbf1600a sipvoipprovider/src/svpsessionbase.cpp --- a/sipvoipprovider/src/svpsessionbase.cpp Fri Feb 19 22:44:34 2010 +0200 +++ b/sipvoipprovider/src/svpsessionbase.cpp Fri Mar 12 15:42:09 2010 +0200 @@ -1540,6 +1540,8 @@ { SVPDEBUG1( "CSVPSessionBase::HandleStreamStateChange(aStream,aSink) In" ) + CMceSession::TState sessionState = CMceSession::ETerminated; + if ( &aStream ) { SVPDEBUG2( "CSVPSessionBase::HandleStreamStateChange(aStream,aSink) stream state=%d", @@ -1550,8 +1552,8 @@ if ( &aStream && aStream.Session() ) { - SVPDEBUG2( "CSVPSessionBase::HandleStreamStateChange(aStream,aSink) session state=%d", - aStream.Session()->State() ) + sessionState = aStream.Session()->State(); + SVPDEBUG2( "CSVPSessionBase::HandleStreamStateChange(aStream,aSink) session state=%d", sessionState ) } if ( &aSink ) @@ -1560,7 +1562,7 @@ aSink.IsEnabled() ) if ( HasHoldController() && ESVPConnected == HoldController().HoldState() && - !aSink.IsEnabled() && CMceSession::EEstablished == aStream.Session()->State() ) + !aSink.IsEnabled() && CMceSession::EEstablished == sessionState ) { // Hold state is connected but sink is disabled -> try enable after a while SVPDEBUG1( "CSVPSessionBase::HandleStreamStateChange - Resume ICMP, Sink" ) @@ -1580,6 +1582,8 @@ { SVPDEBUG1( "CSVPSessionBase::HandleStreamStateChange(aStream,aSource) In" ) + CMceSession::TState sessionState = CMceSession::ETerminated; + if ( &aStream ) { SVPDEBUG2( "CSVPSessionBase::HandleStreamStateChange(aStream,aSource) stream state=%d", @@ -1590,8 +1594,8 @@ if ( &aStream && aStream.Session() ) { - SVPDEBUG2( "CSVPSessionBase::HandleStreamStateChange(aStream,aSource) session state=%d", - aStream.Session()->State() ) + sessionState = aStream.Session()->State(); + SVPDEBUG2( "CSVPSessionBase::HandleStreamStateChange(aStream,aSource) session state=%d", sessionState ) } if ( &aSource ) @@ -1600,7 +1604,7 @@ aSource.IsEnabled() ) if ( HasHoldController() && ESVPConnected == HoldController().HoldState() && - !aSource.IsEnabled() && CMceSession::EEstablished == aStream.Session()->State() ) + !aSource.IsEnabled() && CMceSession::EEstablished == sessionState ) { // Hold state is connected but source is disabled -> try enable after a while SVPDEBUG1( "CSVPSessionBase::HandleStreamStateChange - Resume ICMP, Source" ) diff -r fc8c25e5a2e8 -r 7117cbf1600a voipplugins/accountcreationplugin/engine/src/acpcontroller.cpp --- a/voipplugins/accountcreationplugin/engine/src/acpcontroller.cpp Fri Feb 19 22:44:34 2010 +0200 +++ b/voipplugins/accountcreationplugin/engine/src/acpcontroller.cpp Fri Mar 12 15:42:09 2010 +0200 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2007-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" @@ -134,8 +134,11 @@ { ACPLOG( "CAcpController::FetchProviderListFromNetworkL begin" ); - // Create SIP profile registry. From now on we'll get SIP events. - iSipModel = CSIPManagedProfileRegistry::NewL( *this ); + if ( !iSipModel ) + { + // Create SIP profile registry. From now on we'll get SIP events. + iSipModel = CSIPManagedProfileRegistry::NewL( *this ); + } // Delete old data, otherwise Refresh won't work. delete iData; diff -r fc8c25e5a2e8 -r 7117cbf1600a voipplugins/accountcreationplugin/inc/accountcreationplugin.h --- a/voipplugins/accountcreationplugin/inc/accountcreationplugin.h Fri Feb 19 22:44:34 2010 +0200 +++ b/voipplugins/accountcreationplugin/inc/accountcreationplugin.h Fri Mar 12 15:42:09 2010 +0200 @@ -169,6 +169,12 @@ * Not own. */ const MAiwNotifyCallback* iNotifyCallback; + + /** + * Handle to AIW callback notifier. + * Own. + */ + CAiwGenericParamList* iCBEventParamList; /** * Handle to provider list view. diff -r fc8c25e5a2e8 -r 7117cbf1600a voipplugins/accountcreationplugin/src/accountcreationplugin.cpp --- a/voipplugins/accountcreationplugin/src/accountcreationplugin.cpp Fri Feb 19 22:44:34 2010 +0200 +++ b/voipplugins/accountcreationplugin/src/accountcreationplugin.cpp Fri Mar 12 15:42:09 2010 +0200 @@ -65,6 +65,9 @@ iServiceHandler = CAiwServiceHandler::NewL(); iEikEnv = CEikonEnv::Static(); + + iCBEventParamList = CAiwGenericParamList::NewL(); + iCBEventParamList->Reset(); ACPLOG( "CAccountCreationPlugin::ConstructL end" ); } @@ -98,6 +101,7 @@ } iEikEnv = NULL; + delete iCBEventParamList; ACPLOG( "CAccountCreationPlugin::~CAccountCreationPlugin end" ); } @@ -134,13 +138,12 @@ variant.Set( placing ); TAiwGenericParam genericParamPlace( EGenericParamError, variant ); paramList.AppendL( genericParamPlace ); - + // Send callback to the customer application. - CAiwGenericParamList* nullList = NULL; callback->HandleNotifyL( KAiwCmdCSCUiExtensionPlugins, KAiwEventStarted, - *nullList, + *iCBEventParamList, paramList ); ACPLOG( "CAccountCreationPlugin::SendInitializedCallbackL end" ); @@ -165,11 +168,10 @@ paramList.AppendL( genericParamUid ); // Send callback to the customer application. - CAiwGenericParamList* nullList = NULL; callback->HandleNotifyL( KAiwCmdCSCUiExtensionPlugins, KAiwEventStopped, - *nullList, + *iCBEventParamList, paramList ); ACPLOG( "CAccountCreationPlugin::SendCompletedCallbackL end" ); @@ -194,11 +196,10 @@ paramList.AppendL( genericParamUid ); // Send callback to the customer application. - CAiwGenericParamList* nullList = NULL; callback->HandleNotifyL( KAiwCmdCSCUiExtensionPlugins, KAiwEventError, - *nullList, + *iCBEventParamList, paramList ); ACPLOG( "CAccountCreationPlugin::SendErrorCallbackL end" ); diff -r fc8c25e5a2e8 -r 7117cbf1600a voipplugins/sipconnectionprovider/src/scppresencehandler.cpp --- a/voipplugins/sipconnectionprovider/src/scppresencehandler.cpp Fri Feb 19 22:44:34 2010 +0200 +++ b/voipplugins/sipconnectionprovider/src/scppresencehandler.cpp Fri Mar 12 15:42:09 2010 +0200 @@ -207,6 +207,7 @@ if ( iReqIdArray.Count() ) { iDisableAfterXimpRequestsCompleted = ETrue; + StartForcedDisableTimer( CScpPresenceHandler::ForcePresenceServiceDisable ); } else { @@ -244,7 +245,13 @@ if ( EScpNetworkLost == aEvent ) { SCPLOGSTRING( "CScpPresenceHandler - EScpNetworkLost -> unbind" ); - TRAP_IGNORE( HandleDeregistrationL( EFalse ) ); + TRAPD( err, HandleDeregistrationL( EFalse ) ); + + if ( KErrNotReady == err ) + { + SCPLOGSTRING( "CScpPresenceHandler - EScpNetworkLost -> note ready: unbind" ); + TRAP_IGNORE( ServerUnBindL() ); + } } if ( EScpRoaming == aEvent ) @@ -298,6 +305,15 @@ { CancelDisableTimer(); } + + // If this flag is still true, it could be that presence server + // has not given answer -> ximp requests cannot be completed. + // But still have to unbind from ximp context + if ( iDisableAfterXimpRequestsCompleted ) + { + TRAP_IGNORE( ServerUnBindL() ); + } + // When SIP is deregistered, change presence state to no bind iPresenceState = ENoBind; } @@ -411,6 +427,7 @@ CancelDisableTimer(); + iReqIdArray.Reset(); iPresenceState = ENoBind; // Check if disable was not requested @@ -913,7 +930,7 @@ if ( iDisableAfterXimpRequestsCompleted && !iReqIdArray.Count() ) { iDisableAfterXimpRequestsCompleted = EFalse; - DisableSubService(); + DeregisterNow(); } SCPLOGSTRING( "CScpPresenceHandler::HandleRequestCompleteEvent OUT" ); diff -r fc8c25e5a2e8 -r 7117cbf1600a voipplugins/sipconnectionprovider/src/scpservicemanager.cpp --- a/voipplugins/sipconnectionprovider/src/scpservicemanager.cpp Fri Feb 19 22:44:34 2010 +0200 +++ b/voipplugins/sipconnectionprovider/src/scpservicemanager.cpp Fri Mar 12 15:42:09 2010 +0200 @@ -628,7 +628,7 @@ CScpSipConnection* sipConnection = GetSipConnectionL( aServiceId, aSubServiceType, sipConnectionCreated ); - + TInt result = sipConnection->GetIap( aIapId ); if( result != KErrNone ) { @@ -640,7 +640,9 @@ { aSnapId = 0; } - + + aPasswordSet = sipConnection->IsPasswordSet(); + if( sipConnectionCreated ) { delete sipConnection; @@ -681,8 +683,6 @@ aSnapLocked = EFalse; } } - - aPasswordSet = sipConnection->IsPasswordSet(); if( serviceCreated ) { diff -r fc8c25e5a2e8 -r 7117cbf1600a voipplugins/sipmxresolver/src/sipmxresolver.cpp --- a/voipplugins/sipmxresolver/src/sipmxresolver.cpp Fri Feb 19 22:44:34 2010 +0200 +++ b/voipplugins/sipmxresolver/src/sipmxresolver.cpp Fri Mar 12 15:42:09 2010 +0200 @@ -36,6 +36,8 @@ #include #include #include +#include +#include //For checking dynamic voip status and MuS availability #include @@ -59,7 +61,9 @@ _LIT8( KSendOnly, "sendonly" ); // For attribute checks _LIT8( KApplicationAttr, "application" ); // For attribute checks _LIT8( KXApplicationAttr, "X-application" ); // For attribute checks -_LIT8( KNokiaRtvs, "com.nokia.rtvs" ); // For attribute checks +_LIT8( KNokiaRtvs, "com.nokia.rtvs" ); // For attribute checks +_LIT8( KSIPMethodsInAllowHeader, "INVITE,ACK,CANCEL,OPTIONS,BYE,PRACK,SUBSCRIBE,REFER,NOTIFY,UPDATE"); // SIP Methods allowed by various plugins +_LIT8( KSIPExtensionsSupported, "100rel,timer,sec-agree"); //Extensions supported by various plugins /** * Cleanup function for RPointerArray @@ -469,8 +473,29 @@ // --------------------------------------------------------------------------- // void CSipMXResolver::AddClientSpecificHeadersForOptionsResponseL( - RPointerArray& /*aHeaders*/ ) + RPointerArray& aHeaders ) { + SIPMXRLOG( "[SIPMXRESOLVER] -> \ + CSipMXResolver::AddClientSpecificHeadersForOptionsResponseL()" ) + //Add Allow Header + RPointerArray allowheaders = + CSIPAllowHeader::DecodeL(KSIPMethodsInAllowHeader); + TInt count = allowheaders.Count(); + for(TInt i = 0; i supportedheaders = + CSIPSupportedHeader::DecodeL(KSIPExtensionsSupported); + count = supportedheaders.Count(); + for(TInt j = 0; j iWepKeys; + /** + * EAP type. + */ + TInt iEapType; + /** + * EAP username. + */ + HBufC* iEapUsername; + /** + * EAP password. + */ + HBufC* iEapPassword; }; /** diff -r fc8c25e5a2e8 -r 7117cbf1600a voipplugins/voipadapters/voipxmlprovisioning/voipxmlprocessor/inc/voipxmlprocessordefaults.h --- a/voipplugins/voipadapters/voipxmlprovisioning/voipxmlprocessor/inc/voipxmlprocessordefaults.h Fri Feb 19 22:44:34 2010 +0200 +++ b/voipplugins/voipadapters/voipxmlprovisioning/voipxmlprocessor/inc/voipxmlprocessordefaults.h Fri Mar 12 15:42:09 2010 +0200 @@ -49,6 +49,7 @@ _LIT( KSettingsTypeAdditionalStun, "additionalstun" ); _LIT( KSettingsTypeWepKey, "wepkey" ); _LIT( KSettingsTypeDestination, "destination" ); +_LIT( KSettingsTypeEap, "eap" ); // Parameter names (i.e. supported values for 'value' attribute). // Generic. _LIT( KParamValueName, "name" ); @@ -141,6 +142,7 @@ // ============================== // _LIT( KILbc, "ILBC" ); +const TInt KDefaultResubscribe = 600; // ============================== // SIP constants @@ -209,7 +211,8 @@ _LIT( KSecurityTypeWep, "WEP" ); _LIT( KSecurityTypeWpa, "WPA" ); _LIT( KSecurityTypeWpa2, "WPA2" ); -_LIT( KSecurityType8021x, "801X" ); +_LIT( KSecurityType8021x, "8021X" ); +_LIT( KEapTypeLeap, "LEAP" ); _LIT( KWepAuthModeOpen, "open" ); _LIT( KWepAuthModeShared, "shared" ); @@ -233,7 +236,8 @@ EProxy, ERegistrar, EAdditionalStun, - EWepKey + EWepKey, + EEap }; // Enumeration for parameters. diff -r fc8c25e5a2e8 -r 7117cbf1600a voipplugins/voipadapters/voipxmlprovisioning/voipxmlprocessor/src/voipxmliaphandler.cpp --- a/voipplugins/voipadapters/voipxmlprovisioning/voipxmlprocessor/src/voipxmliaphandler.cpp Fri Feb 19 22:44:34 2010 +0200 +++ b/voipplugins/voipadapters/voipxmlprovisioning/voipxmlprocessor/src/voipxmliaphandler.cpp Fri Mar 12 15:42:09 2010 +0200 @@ -25,6 +25,8 @@ #include #include #include +#include +#include #include "voipxmlutils.h" #include "voipxmliaphandler.h" @@ -65,6 +67,9 @@ iCurrentIap.iSecurityType = CMManager::EWlanSecModeOpen; iCurrentIap.iNetworkMode = CMManager::EInfra; iCurrentIap.iWepAuthMode = CWEPSecuritySettings::EAuthOpen; + iCurrentIap.iEapType = EAPSettings::EEapNone; + iCurrentIap.iEapUsername = NULL; + iCurrentIap.iEapPassword = NULL; } // --------------------------------------------------------------------------- @@ -100,6 +105,7 @@ case EName: { TInt err( KErrNotFound ); + //lint -e{960} No need for else statement here if ( EDestination == aType ) { delete iDestinationName; @@ -118,32 +124,38 @@ } case EType: { + TBuf value; + value.Copy( aValue ); + value.UpperCase(); + + if ( EEap == aType ) + { + if ( 0 == value.Compare( KEapTypeLeap ) ) + { + iCurrentIap.iEapType = EAPSettings::EEapLeap; + } + } + if ( EWlan != aType ) { break; } - TBuf value; - value.Copy( aValue ); - value.UpperCase(); + //lint -e{960} No need for else statement here if ( 0 == value.Compare( KSecurityTypeWep ) ) { iCurrentIap.iSecurityType = CMManager::EWlanSecModeWep; - iSettingsSet = ETrue; } else if ( 0 == value.Compare( KSecurityTypeWpa ) ) { iCurrentIap.iSecurityType = CMManager::EWlanSecModeWpa; - iSettingsSet = ETrue; } else if ( 0 == value.Compare( KSecurityTypeWpa2 ) ) { iCurrentIap.iSecurityType = CMManager::EWlanSecModeWpa2; - iSettingsSet = ETrue; } else if ( 0 == value.Compare( KSecurityType8021x ) ) { iCurrentIap.iSecurityType = CMManager::EWlanSecMode802_1x; - iSettingsSet = ETrue; } break; } @@ -151,8 +163,8 @@ { if ( EWlan == aType && !iCurrentIap.iSsid ) { - TRAPD( err, iCurrentIap.iSsid = aValue.AllocL() ); - if ( KErrNone == err ) + iCurrentIap.iSsid = aValue.Alloc(); + if ( iCurrentIap.iSsid ) { iSettingsSet = ETrue; } @@ -165,7 +177,6 @@ KErrNone == VoipXmlUtils::DesToInt( aValue, intValue ) ) { iCurrentIap.iHidden = intValue; - iSettingsSet = ETrue; } break; } @@ -178,15 +189,14 @@ TBuf value; value.Copy( aValue ); value.LowerCase(); + //lint -e{960} No need for else statement here if ( 0 == value.Compare( KNetworkModeInfra ) ) { iCurrentIap.iNetworkMode = CMManager::EInfra; - iSettingsSet = ETrue; } else if ( 0 == value.Compare( KNetworkModeAdhoc ) ) { iCurrentIap.iNetworkMode = CMManager::EAdhoc; - iSettingsSet = ETrue; } break; } @@ -194,11 +204,7 @@ { if ( EWlan == aType && !iCurrentIap.iPreSharedKey ) { - TRAPD( err, iCurrentIap.iPreSharedKey = aValue.AllocL() ); - if ( KErrNone == err ) - { - iSettingsSet = ETrue; - } + iCurrentIap.iPreSharedKey = aValue.Alloc(); } break; } @@ -211,15 +217,14 @@ TBuf value; value.Copy( aValue ); value.LowerCase(); + //lint -e{960} No need for else statement here if ( 0 == value.Compare( KWepAuthModeOpen ) ) { iCurrentIap.iWepAuthMode = CWEPSecuritySettings::EAuthOpen; - iSettingsSet = ETrue; } else if ( 0 == value.Compare( KWepAuthModeShared ) ) { iCurrentIap.iWepAuthMode = CWEPSecuritySettings::EAuthShared; - iSettingsSet = ETrue; } break; } @@ -229,7 +234,6 @@ KErrNone == VoipXmlUtils::DesToInt( aValue, intValue )) { iCurrentIap.iCurrentWepKey.iLength = intValue; - iSettingsSet = ETrue; } break; } @@ -238,7 +242,22 @@ if ( EWepKey == aType && KMaxWepKeyDataLength >= aValue.Length() ) { iCurrentIap.iCurrentWepKey.iData.Copy( aValue ); - iSettingsSet = ETrue; + } + break; + } + case EUsername: + { + if ( EEap == aType ) + { + iCurrentIap.iEapUsername = aValue.Alloc(); + } + break; + } + case EPassword: + { + if ( EEap == aType ) + { + iCurrentIap.iEapPassword = aValue.Alloc(); } break; } @@ -281,6 +300,7 @@ // void CVoipXmlIapHandler::SettingsEnd( TInt aType ) { + //lint -e{960} No need for else statement here if ( EWepKey == aType && iCurrentIap.iWepKeys.Count() < KMaxWepKeyCount ) { TInt keyDataLength = iCurrentIap.iCurrentWepKey.iData.Length(); @@ -358,6 +378,18 @@ iCurrentIap.iSecurityType = CMManager::EWlanSecModeOpen; iCurrentIap.iNetworkMode = CMManager::EInfra; iCurrentIap.iWepAuthMode = CWEPSecuritySettings::EAuthOpen; + + iCurrentIap.iEapType = EAPSettings::EEapNone; + if ( iCurrentIap.iEapUsername ) + { + delete iCurrentIap.iEapUsername; + iCurrentIap.iEapUsername = NULL; + } + if ( iCurrentIap.iEapPassword ) + { + delete iCurrentIap.iEapPassword; + iCurrentIap.iEapPassword = NULL; + } } // --------------------------------------------------------------------------- @@ -389,6 +421,16 @@ { iIaps[counter]->iWepKeys.Close(); } + if ( iIaps[counter]->iEapUsername ) + { + delete iIaps[counter]->iEapUsername; + iIaps[counter]->iEapUsername = NULL; + } + if ( iIaps[counter]->iEapPassword ) + { + delete iIaps[counter]->iEapPassword; + iIaps[counter]->iEapPassword = NULL; + } } iIaps.ResetAndDestroy(); if ( aCloseArray ) @@ -413,6 +455,8 @@ iap->iSsid = HBufC::NewLC( KMaxNodeValueLength ); // CS:1 iap->iName = HBufC::NewLC( KMaxNodeValueLength ); // CS:2 iap->iPreSharedKey = HBufC::NewLC( KMaxNodeValueLength ); // CS:3 + iap->iEapUsername = HBufC::NewLC( KMaxNodeValueLength ); // CS:4 + iap->iEapPassword = HBufC::NewLC( KMaxNodeValueLength ); // CS:5 iap->iSsid->Des().Copy( iCurrentIap.iSsid->Des() ); if ( iCurrentIap.iName ) @@ -423,10 +467,22 @@ { iap->iName->Des().Copy( iCurrentIap.iSsid->Des() ); } + if ( iCurrentIap.iPreSharedKey ) { iap->iPreSharedKey->Des().Copy( iCurrentIap.iPreSharedKey->Des() ); } + + iap->iEapType = iCurrentIap.iEapType; + if ( iCurrentIap.iEapUsername ) + { + iap->iEapUsername->Des().Copy( iCurrentIap.iEapUsername->Des() ); + } + if ( iCurrentIap.iEapPassword ) + { + iap->iEapPassword->Des().Copy( iCurrentIap.iEapPassword->Des() ); + } + iap->iHidden = iCurrentIap.iHidden; iap->iNetworkMode = iCurrentIap.iNetworkMode; iap->iSecurityType = iCurrentIap.iSecurityType; @@ -437,7 +493,7 @@ iap->iWepKeys.Append( iCurrentIap.iWepKeys[counter] ); } iIaps.AppendL( iap ); - CleanupStack::Pop( 3, iap->iSsid ); + CleanupStack::Pop( 5, iap->iSsid ); } // --------------------------------------------------------------------------- @@ -526,6 +582,7 @@ TUint32 CVoipXmlIapHandler::CreateIapL( RCmManagerExt& aCmManager, TTemporaryIap aTempIap ) { + DBG_PRINT( "CVoipXmlIapHandler::CreateIapL - begin" ); RCmConnectionMethodExt newConnMethod = aCmManager.CreateConnectionMethodL( KUidWlanBearerType ); CleanupClosePushL( newConnMethod ); // CS:1 @@ -545,11 +602,13 @@ TUint32 wlanId = newConnMethod.GetIntAttributeL( CMManager::EWlanServiceId ); TUint32 iapId = newConnMethod.GetIntAttributeL( CMManager::ECmIapId ); - + TUint32 iapServiceId = newConnMethod.GetIntAttributeL( + CMManager::ECmIapServiceId ); CleanupStack::PopAndDestroy( &newConnMethod ); // CS:0 if ( aTempIap.iSecurityType == CMManager::EWlanSecModeWep ) { + DBG_PRINT( " secMode WEP" ); CMDBSession* db = CMDBSession::NewLC( CMDBSession::LatestVersion() ); // CS:1 CWEPSecuritySettings* wepSecSettings = @@ -562,25 +621,63 @@ counter, aTempIap.iWepKeys[counter].iData, aTempIap.iWepKeys[counter].iHex ) ); } - wepSecSettings->SaveL( wlanId, *db ); - // wepSecSettings, db + wepSecSettings->SaveL( wlanId, *db ); + // wepSecSettings, db CleanupStack::PopAndDestroy( 2, db ); // CS:0 } - else if ( aTempIap.iSecurityType == CMManager::EWlanSecMode802_1x || - aTempIap.iSecurityType == CMManager::EWlanSecModeWpa || - aTempIap.iSecurityType == CMManager::EWlanSecModeWpa2 ) + else if ( CMManager::EWlanSecModeWpa == aTempIap.iSecurityType || + CMManager::EWlanSecModeWpa2 == aTempIap.iSecurityType ) { - CMDBSession* db = CMDBSession::NewLC( CMDBSession::LatestVersion() ); - // CS:1 + DBG_PRINT( " secMode WPA/WPA2" ); + CMDBSession* db = CMDBSession::NewLC( + CMDBSession::LatestVersion() ); // CS:1 CWPASecuritySettings* wpaSecSettings = CWPASecuritySettings::NewL( ESecurityModeWpa ); CleanupStack::PushL( wpaSecSettings ); // CS:2 + + if ( EAPSettings::EEapNone == aTempIap.iEapType ) + { + DBG_PRINT( " EapType none" ); + User::LeaveIfError( wpaSecSettings->SetWPAPreSharedKey( + aTempIap.iPreSharedKey->Des() )); + } + else if ( EAPSettings::EEapLeap == aTempIap.iEapType ) + { + DBG_PRINT( " eapType Leap" ); + TBuf8 eapId; + eapId.Copy( KEapLeapId, KEapChars ); + CEapType* eapType = CEapType::NewL( eapId, ELan, iapServiceId ); + CleanupStack::PushL( eapType ); // CS:3 + EAPSettings* eapSettings = new (ELeave) EAPSettings(); + CleanupStack::PushL( eapSettings ); // CS:4 + eapSettings->iEAPType = EAPSettings::EEapLeap; + eapSettings->iUsername.Copy( aTempIap.iEapUsername->Des() ); + eapSettings->iUsernamePresent = ETrue; + eapSettings->iPassword.Copy( aTempIap.iEapPassword->Des() ); + eapSettings->iPasswordPresent = ETrue; + eapType->SetConfigurationL( *eapSettings ); + CleanupStack::PopAndDestroy( 2, eapType ); + wpaSecSettings->SetWPAEnabledEAPPlugin( eapId ); + } + wpaSecSettings->SaveL( wlanId, *db, ESavingBrandNewAP, 0 ); + // wpaSecSettings, db + CleanupStack::PopAndDestroy( 2, db ); // CS:0 + } + else if ( CMManager::EWlanSecMode802_1x == aTempIap.iSecurityType ) + { + DBG_PRINT( " secMode 802.1X" ); + CMDBSession* db = CMDBSession::NewLC( + CMDBSession::LatestVersion() ); // CS:1 + CWPASecuritySettings* wpaSecSettings = + CWPASecuritySettings::NewL( ESecurityMode8021x ); + CleanupStack::PushL( wpaSecSettings ); // CS:2 User::LeaveIfError( wpaSecSettings->SetWPAPreSharedKey( aTempIap.iPreSharedKey->Des() )); wpaSecSettings->SaveL( wlanId, *db, ESavingBrandNewAP, 0 ); // wpaSecSettings, db CleanupStack::PopAndDestroy( 2, db ); // CS:0 } + DBG_PRINT( "CVoipXmlIapHandler::CreateIapL - end" ); return iapId; } diff -r fc8c25e5a2e8 -r 7117cbf1600a voipplugins/voipadapters/voipxmlprovisioning/voipxmlprocessor/src/voipxmlnatfwhandler.cpp --- a/voipplugins/voipadapters/voipxmlprovisioning/voipxmlprocessor/src/voipxmlnatfwhandler.cpp Fri Feb 19 22:44:34 2010 +0200 +++ b/voipplugins/voipadapters/voipxmlprovisioning/voipxmlprocessor/src/voipxmlnatfwhandler.cpp Fri Mar 12 15:42:09 2010 +0200 @@ -104,6 +104,7 @@ } case EUri: { + //lint -e{960} No need for else statement here if ( ENatFw == aType ) { iStunSrvAddr->Des().Copy( aValue ); @@ -118,6 +119,7 @@ } case EPort: { + //lint -e{960} No need for else statement here if ( ENatFw == aType && KErrNone == VoipXmlUtils::Des8ToInt( aValue, intVal ) ) { @@ -161,6 +163,7 @@ } case EUsername: { + //lint -e{960} No need for else statement here if ( ENatFw == aType ) { iStunSrvUsername->Des().Copy( aValue ); @@ -175,6 +178,7 @@ } case EPassword: { + //lint -e{960} No need for else statement here if ( ENatFw == aType ) { iStunSrvPassword->Des().Copy( aValue ); diff -r fc8c25e5a2e8 -r 7117cbf1600a voipplugins/voipadapters/voipxmlprovisioning/voipxmlprocessor/src/voipxmlparamhandler.cpp --- a/voipplugins/voipadapters/voipxmlprovisioning/voipxmlprocessor/src/voipxmlparamhandler.cpp Fri Feb 19 22:44:34 2010 +0200 +++ b/voipplugins/voipadapters/voipxmlprovisioning/voipxmlprocessor/src/voipxmlparamhandler.cpp Fri Mar 12 15:42:09 2010 +0200 @@ -148,6 +148,10 @@ { iSettingsType = EDestination; } + else if ( KSettingsTypeEap() == type ) + { + iSettingsType = EEap; + } else { iSettingsType = EUnknown; @@ -220,6 +224,7 @@ case EWlan: case EWepKey: case EDestination: + case EEap: { TInt param = ConvertParameter( aParam ); iIapHandler->SetSetting( iSettingsType, param, aValue ); diff -r fc8c25e5a2e8 -r 7117cbf1600a voipplugins/voipadapters/voipxmlprovisioning/voipxmlprocessor/src/voipxmlparser.cpp --- a/voipplugins/voipadapters/voipxmlprovisioning/voipxmlprocessor/src/voipxmlparser.cpp Fri Feb 19 22:44:34 2010 +0200 +++ b/voipplugins/voipadapters/voipxmlprovisioning/voipxmlprocessor/src/voipxmlparser.cpp Fri Mar 12 15:42:09 2010 +0200 @@ -60,14 +60,14 @@ // void CVoipXmlParser::ConstructL() { -DBG_PRINT( "CVoipXmlParser::ConstructL begin" ); + DBG_PRINT( "CVoipXmlParser::ConstructL begin" ); iParser = CMDXMLParser::NewL( this ); iParamHandler = CVoipXmlParamHandler::NewL(); iDescription = HBufC::NewL( 0 ); iBrandUrl = HBufC::NewL( 0 ); -DBG_PRINT( "CVoipXmlParser::ConstructL end" ); + DBG_PRINT( "CVoipXmlParser::ConstructL end" ); } // --------------------------------------------------------------------------- @@ -236,6 +236,7 @@ nodeName.Copy( node->NodeName() ); nodeName.LowerCase(); CMDXMLNode* child = node->FirstChild(); + //lint -e{960} No need for else statement here if ( KNodeConfDescription() == nodeName && child && CMDXMLNode::ETextNode == child->NodeType() ) { @@ -356,6 +357,7 @@ element = NULL; element = static_cast( node ); + //lint -e{960} No need for else statement here if ( KNodeParam() == nodeName ) { TPtrC nameVal; diff -r fc8c25e5a2e8 -r 7117cbf1600a voipplugins/voipadapters/voipxmlprovisioning/voipxmlprocessor/src/voipxmlsiphandler.cpp --- a/voipplugins/voipadapters/voipxmlprovisioning/voipxmlprocessor/src/voipxmlsiphandler.cpp Fri Feb 19 22:44:34 2010 +0200 +++ b/voipplugins/voipadapters/voipxmlprovisioning/voipxmlprocessor/src/voipxmlsiphandler.cpp Fri Mar 12 15:42:09 2010 +0200 @@ -234,6 +234,7 @@ tempBuf.Copy( KSip() ); } tempBuf.Append( aValue ); + //lint -e{960} No need for else statement here if ( EProxy == aType ) { iProxyUri->Des().Copy( tempBuf ); @@ -248,6 +249,7 @@ } case ETransport: { + //lint -e{960} No need for else statement here if ( EProxy == aType ) { iProxyTransport = ValidateTransport( aValue ); @@ -264,6 +266,7 @@ { TInt value; TInt err = VoipXmlUtils::Des8ToInt( aValue, value ); + //lint -e{960} No need for else statement here if ( EProxy == aType && KErrNone == err ) { iProxyPort = value; @@ -289,6 +292,7 @@ } case EUsername: { + //lint -e{960} No need for else statement here if ( EProxy == aType ) { if ( TSIPProfileTypeInfo::EInternet == @@ -323,6 +327,7 @@ } case EPassword: { + //lint -e{960} No need for else statement here if ( EProxy == aType ) { iProfile->SetParameter( KSIPOutboundProxy, KSIPDigestPassword, @@ -365,6 +370,7 @@ tempBuf.Copy( KColon() ); tempBuf.AppendNum( iProxyPort ); } + //lint -e{960} No need for else statement here if ( EUdp == iProxyTransport ) { tempBuf.Append( KTransport() ); @@ -398,6 +404,7 @@ tempBuf.Copy( KColon() ); tempBuf.AppendNum( iRegistrarPort ); } + //lint -e{960} No need for else statement here if ( EUdp == iRegistrarTransport ) { tempBuf.Append( KTransport() ); diff -r fc8c25e5a2e8 -r 7117cbf1600a voipplugins/voipadapters/voipxmlprovisioning/voipxmlprocessor/src/voipxmlvoiphandler.cpp --- a/voipplugins/voipadapters/voipxmlprovisioning/voipxmlprocessor/src/voipxmlvoiphandler.cpp Fri Feb 19 22:44:34 2010 +0200 +++ b/voipplugins/voipadapters/voipxmlprovisioning/voipxmlprocessor/src/voipxmlvoiphandler.cpp Fri Mar 12 15:42:09 2010 +0200 @@ -938,7 +938,7 @@ { iSpSettings.iAutoAcceptBuddies = EFalse; iSpSettings.iAutoEnable = EFalse; - iSpSettings.iResubrcribe = KErrNotFound; + iSpSettings.iResubrcribe = KDefaultResubscribe; if ( iSpSettings.iBrandingUri ) { delete iSpSettings.iBrandingUri; @@ -1076,6 +1076,7 @@ TBool vmbx( EFalse ); // Set MWI URI if present. + //lint -e{960} No need for else statement here if ( iSpSettings.iMwiUri ) { property->SetName( ESubPropertyVMBXMWIAddress ); @@ -1107,14 +1108,12 @@ vmbx = ETrue; } - if ( KErrNotFound != iSpSettings.iResubrcribe ) + if ( vmbx ) { property->SetName( ESubPropertyVMBXMWISubscribeInterval ); property->SetValue( iSpSettings.iResubrcribe ); spSettings->AddOrUpdatePropertyL( serviceId, *property ); - } - if ( vmbx ) - { + property->SetName( ESubPropertyVMBXSettingsId ); property->SetValue( iEntry->iIds[0].iProfileId ); spSettings->AddOrUpdatePropertyL( serviceId, *property );